XML compare inaccurrate
Posted: Mon Nov 24, 2008 12:22 am
I created an XML Schema file with two type definitions and an element instance. I then copied the XML Schema file to a second one and swapped the order to the two complex types. Then I did an XML compare.
The Oxygen XML compare reported eight differences. I would expect the XML compare to report no differences as schema type definitions can appear in any order in a schema file. I compare XML Schema files up to 25000 lines but as they are generated from a model, the output order of types/elements is the same. But at times I do want an XML, not text, comparison. I would get a similar result by XML formatting both files and use a text difference tool - like WinMerge.
Is there some setting in OxygenXML to compare these two files and have them report no differences?
The files that I used were:
The Oxygen XML compare reported eight differences. I would expect the XML compare to report no differences as schema type definitions can appear in any order in a schema file. I compare XML Schema files up to 25000 lines but as they are generated from a model, the output order of types/elements is the same. But at times I do want an XML, not text, comparison. I would get a similar result by XML formatting both files and use a text difference tool - like WinMerge.
Is there some setting in OxygenXML to compare these two files and have them report no differences?
The files that I used were:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Identifier">
<xs:simpleContent>
<xs:extension base="xs:integer"/>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Amount">
<xs:sequence>
<xs:element name="amount" type="xs:decimal"/>
<xs:element name="unit" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="number" type="Identifier"/>
<xs:element name="amount" type="Amount"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Amount">
<xs:sequence>
<xs:element name="amount" type="xs:decimal"/>
<xs:element name="unit" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Identifier">
<xs:simpleContent>
<xs:extension base="xs:integer"/>
</xs:simpleContent>
</xs:complexType>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="number" type="Identifier"/>
<xs:element name="amount" type="Amount"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>