The DeltaXML Unified Delta or Unidelta format is a representation of two or more XML documents in a single document. Any of the original documents can be extracted from the Unidelta.
The namespace for Unidelta is
http://www.deltaxml.com/ns/unified-delta-v1 and the preferred
prefix is dxu: .
This is a list of the elements used by Unidelta:
Element name | Content | Purpose |
|---|---|---|
dxu:attributes | Elements each of which has a name corresponding to an attribute beloning to the parent element. | Appears as the first child of an element and details any differences between the attributes for this element |
dxu:PCDATA | PCDATA or, when within a dxu:attributes element, CDATA represenitng the value of an attribute. | To record a text item or attribute value that appeared in one or more of the input documents. |
This is a list of the attributes used by Unidelta
Attribute name | Content | Purpose |
|---|---|---|
dxu:vset | Details the version set for this element, using letters such as 'A', 'B' and 'C' as the version identifiers and a pipe symbol '|' as the delimiter. | This attribute lists the documents in which a particular data item appears.
For example, |
There is no DTD or Schema for a Unidelta, but the Unidelta will have the same look and feel as the original documents. There is a set of simple rules which apply to the Unidelta format. In general terms, the Unidelta generated from a set of documents will be a union of these documents in the sense that all the data that appears in any of the documents will also appear in the Unidelta.
Elements, attributes and text that are identified by DeltaXML as common to two or more of the documents are shared in the Unidelta. A subtree that appears unchanged in one or more documents will appear in the Unidelta almost exactly as it appeared in the original document(s).
xmlns:dxu="http://www.deltaxml.com/ns/unified-delta-v1"dxu:vset attribute with a value showing
all the versions of data in the file.dxu:vset attribute, the versions are separated using a
pipe symbol. Note that the first and last characters will be the pipe symbol.
dxu:vset attribute of the root
element is the reverse order of addition to the unified delta file, i.e. most
recent first.dxu:vset attribute unless its
value is the same as that of the parent node, in which case it is omitted.dxu:vset attribute will always be a subset of
the actual or implied value of the dxu:vset attribute on its parent.dxu:PCDATA element, which
itself has a dxu:vset attribute.dxu:attributes element whose
child elements are elements with the same names as the original attributes.dxu:PCDATA items.
deltaxml:key attribute remains as an attribute and is never
subject to a change.There is also an expanded or canoncial form of the Unidelta. This can be useful in some situations. This is the same as the standard Unidelta except that:
dxu:vset attributedxu:PCDATAdxu:attributes element
Document A | Document B | Document C |
|---|---|---|
<example> | <example> </person> | <example> </person> |
And the Unidelta for this will be as follows:
Unidelta | Comments |
|---|---|
<example dxu:vset="|C|A|B|"> | The <person> element and the <firstName> element have the same value for the dxu:vset as their parent elements. Element <lastName> appears in two documents, A and B. Element <T> appears in only one document, A. |
Document A | Document B | Document C |
|---|---|---|
<example> | <example> | <example> |
And the Unidelta for this will be as follows:
Unidelta | Comments |
|---|---|
<example dxu:vset="|C|A|B|"> | The text in <firstName> is "J" in both A and C. The text in <firstName> is "John" in document B. The text in <lastName> is the same in all documents. |
Document A | Document B | Document C |
|---|---|---|
<example> | <example> | <example> |
And the Unidelta for this will be as follows:
Unidelta | Comments |
|---|---|
<example dxu:vset="|C|A|B|"> | The attribute 'gender' is unchanged and so appears as a regular attribute. The attribute 'age' has a value of 36 in document A and 37 in B. Element <firstName> appears now as the second child of <person>. |