Closed ithena closed 10 years ago
@keshavarzi , Some of the Difference descriptions still exclusively use Element.name, resulting in descriptions like "Position of element null changed from 4 to 6."
The difference in a choice is not identified:
<xsd:element name="AnotherComplex" type="AnotherComplexType"/>
<xsd:complexType name="AnotherComplexType">
<xsd:choice>
<xsd:element minOccurs="0" ref="AlternativeEnterpriseNumber"/>
<xsd:element minOccurs="0" ref="AlternativeEnterpriseIdentification"/>
</xsd:choice>
</xsd:complexType>
<xsd:element name="AnotherComplex" type="AnotherComplexType"/>
<xsd:complexType name="AnotherComplexType">
<xsd:choice>
<xsd:element minOccurs="0" ref="EnterpriseNumber"/>
<xsd:element minOccurs="0" ref="EnterpriseIdentification"/>
</xsd:choice>
</xsd:complexType>
@ithena please check the latest commit out and give a new try!
Seems to work correctly now. Thx!
When using refs instead of name+type for elements some differences between Schemas are not found. This due to the compare algorithm regularly using the comparison a.name == b.name. When refs are used a.name and b.name are both null.
The link provides two XSD files that when compared do not have any differences, while they contain several changes to the references.
https://www.dropbox.com/s/s4kat000mw99wga/RefStructChanges_v001.xsd https://www.dropbox.com/s/ubkjppodira3qn0/RefStructChanges_v002.xsd
Would it be a solution to have the name function of an element returning the ref in case name == null? Or would this cause undesired changes in other parts of the library?