XML Zebra is an XML Schema differencing tool that works by creating a "fingerprint" file for a set of Schemas. The "fingerprint" contains paths (like XPaths, but extended with extra information) that define what is allowed in valid XML documents for those Schemas. By comparing versions of the "fingerprint" files, both direct and indirect changes to the allowed XML can be detected between versions of the Schemas.
For more details about XML Zebra, see http://www.xmlzebra.com/.
This document summarises the syntax that XML Zebra uses for the paths it generates in its “fingerprint” XML files.
paragraph
”,
“html:p
”@ref
”, “@xml:id
”/b:docB/b:a/a:c
[m..n]
” = at least “m” occurrences,
no more than “n” occurrences/b:docB/b:a*/a:c?
xs:sequence
”,
“xs:choice
”, “xs:all
”,
“xs:any
”xs:sequence
" (one occurrence only), then the
structure element does not appear in the path.
These are suppressed because mandatory sequences occur so often in
XML Schemas/a:doc/xs:choice/a:recursion
/a:doc/xs:sequence*/a:recursion
xsi:type
” extension is allowed for an
element, for each extension type there is a path with
“[xsi:type=...]
” following the element name/b:base[xsi:type=b:ExtendedType]
[base=xs:...]
”/a:doc/a:elem1[base=xs:string]
/a:doc/xs:sequence*/a:attributed[base=xs:string]*/@optionalDefaulted[base=xs:string][default=my
default value]?
/a:doc/xs:sequence*/a:attributed[base=xs:string]*/@requiredFixed[base=xs:string][fixed=my
fixed value]
@value
”
(attribute) path element with an explicit value, e.g.
“xs:minLength/@value=3
” or
“xs:enumeration/@value=enum1
”/a:doc/xs:sequence*/a:elem1[base=xs:string]/xs:minLength/@value=3
...[recursion=...]
” which indicates the complex type for
which the recursion was detected/a:doc/xs:sequence*/a:recursion?/a:resursion*/...[recursion=a:RecursiveType]
xs:any
” is not yet fully handled/a:doc/xs:sequence*/a:numeric[base=xs:decimal][default=3.141592356589][0..3]
/b:base[xsi:type=b:ExtendedType]/b:base1[xsi:type=a:AttributedType]