mgaerber / basepim-legacy Goto Github PK
View Code? Open in Web Editor NEWXML based Product Information Management
XML based Product Information Management
Timing: Trigger für Schattenbaumerstellung (shadow_ws_bootsmotoren)
spätestens 1 Minute nach der letzten Änderung, wenn inzwischen keine weitere Änderung an den Daten vorgenommen wurde.
Schattenbaum :=
import module namespace nodes = "http://basepim.org/nodes" at "basePIM/CORE/services/node-service.xqm";
//node ! nodes:expand(nodes:inherit(., fn:true()), fn:true())
Sieht einfach aus, ist es aber nicht!
Should attributes that mark slot
properties be prefixed with the xml namespace slot
?
Pros:
Cons:
Programmatically generate test data based on XQuery to conduct first benchmarks
There are two reference types:
Modelling proposal:
<?xml version="1.0"?>
<workspaces>
<workspace name="a">
<node name="Produkt A" id="abc">
<property idref="foo"/>
<property name="propc">
<value>bar</value>
</property>
</node>
</workspace>
<workspace name="b">
<node name="Prop B" id="xyz">
<property name="propfoo" id="foo">
<value>foo</value>
</property>
</node>
</workspace>
</workspaces>
which will yield the following XML when Produkt A is materialized:
<?xml version="1.0"?>
<node name="Produkt A" id="abc">
<property name="propfoo" id="foo">
<value>foo</value>
</property>
<property name="propc">
<value>bar</value>
</property>
</node>
Comments welcome!
Definition der node Typen
<config type="irgendwie">
<propertyType schema="xy.xsd">
</propertyType>
<nodeType name="Motoren" version="">
<propertyType ref=""/>
<propertyType ref=""/>
<propertyType ref=""/>
<propertyType ref=""/>
<propertyType ref=""/>
<allowedChildNodes>
</allowedChildNodes>
</nodeType>
</config>
(
let $live := <nodes>
<node id="moto1" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto55" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto2" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto8" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto101" ts="6">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
</nodes>
let $new :=<nodes>
<node id="moto1" ts="4">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto55" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto2" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto8" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto7" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
<node id="moto101" ts="2">
<property name="bezeichnung">
<value>
<slot lang="de en" brand="any">Motor 1.6</slot>
<slot lang="fr" brand="citroen">Moteur 1.6</slot>
</value>
</property>
</node>
</nodes>
let $liveMap := map:new(
for $node in $live/node
return map:entry($node/@id, $node/@ts)
)
return
for $id in map:keys($liveMap)
let $deleted := not($new/node[@id = $id])
let $updated := $new/node[@id = $id] and $new/node[@id = $id]/@ts < $live/node[@id = $id]/@ts
return <diff>
{ attribute {"deleted"} {$deleted} }
{ attribute {"updated"} {$updated} }
{ $live/node[@id = $id]}
</diff> )[@deleted = fn:true() or @updated = fn:true()]
Datenbank zur Protokollierung der Änderungen pro Workspace -> history_ws_bootsmotoren
->
->
->
=> oder so
=> als Feed: Notification API
dient gleichzeitig als Eingabe für:
Timing: Trigger für Schattenbaumerstellung (shadow_ws_bootsmotoren)
spätestens 1 Minute nach der letzten Änderung, wenn inzwischen keine weitere Änderung an den Daten vorgenommen wurde.
Feed über Änderungen an Properties
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.