Delta XML

Table of content


Description

The DeltaXML  format is a representation of two or more XML documents in a single document.It describes the is a comparison of two XML files. When the format is applied to two documents, these input documents are denoted A and B


Delta XML details

Additional Atributes and Elements in the WbDelta Format

The following namespace can be found in the header:

usual prefixnamespace URIpurpose
wbdatahttp://www.worldbox.net/xml/well-formed-deltaElements and attributes used to represent change between the inputs

The following elements appear when there's a change detected:

Element nameContentPurpose
wbdata:attributesOne of more elements, each of which has a local-name and namespace corresponding to an attribute beloning to the parent element.Details any differences between the attributes associated with the parent element.
wbdata:attributeValueCDATA representing the value of an attributeTo record an attribute value that appeared in one or more of the input documents.
wbdata:textGroupOne or more deltaxml:text elements.This element contains the variants of this segment of text.
wbdata:textPCDATA, i.e. textTo record a text item that appeared in one or more of the input documents.

The attribute that indicates whether an element changed or not looks like the following:

Attribute nameContentPurpose
wbdata:delta

For a delta of two documents, one of the following values: A, B, A=B, A!=B

Details the documents in which this data item appeared. If it appeared in more than one document, this attribute also indicates whether the data items were the same or different. For example, wbdata:delta="A!=B"  means that the element that appears in document B is different to the element in document A.

An example could look somewhat like this:

<CompanyFigures wbdata:delta="A!=B">

    <CompanyFigure wbdata:delta="A!=B" user="300" editdate="2013-09-24" nr="1" extent="6" format="T">

        <WIN wbdata:delta="A=B">US0000020449</WIN>

        <Name wbdata:delta="A!=B">

            <wbdata:textGroup wbdata:delta="A!=B">

                <wbdata:text wbdata:delta="A">Apple Inc.</wbdata:text>

                <wbdata:text wbdata:delta="B">Apple Inc</wbdata:text>

            </wbdata:textGroup>

        </Name>

        <TradeName wbdata:delta="A=B"/>

        <ActualFigures wbdata:delta="A!=B">

            <PeriodEndYear wbdata:delta="A=B"/>

                <EmployeesRangeCode wbdata:delta="A=B">AC</EmployeesRangeCode>

                <EmployeesRange wbdata:delta="A!=B">

                    <wbdata:textGroup wbdata:delta="A!=B">

                        <wbdata:text wbdata:delta="A">60,000-79,999</wbdata:text>

                        <wbdata:text wbdata:delta="B">60,100-79,999</wbdata:text>

                    </wbdata:textGroup>

                </EmployeesRange>

                <EmployeesValue wbdata:delta="A=B">72800</EmployeesValue>

                <SalesRangeCode wbdata:delta="A=B">AC</SalesRangeCode>

                <SalesRange wbdata:delta="A=B"/>

                <Sales wbdata:delta="A=B"/>

                <SalesCurrencyCode wbdata:delta="A=B"/>

                <SalesCurrency wbdata:delta="A=B"/>

                <Estimated wbdata:delta="A=B">0</Estimated>

            </ActualFigures>

        <AnnualFigures wbdata:delta="A=B" FIN=""/>

    </CompanyFigure>

</CompanyFigures>

On the root element the following attributes appear:

Attribute nameContentPurpose
wbdata:versionThis must be "2.0"This indicates the version of the delta format.
wbdata:content-typeThis must have one of the values: full-context, changes-only or merge-concurrent.This indicates if the delta document contains just the changes (changes-only) or if the data that is unchanged in all the documents is also present (full-context).

Link to the DeltaXML website: https://www.deltaxml.com/