You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just for the record, I investigated the XML Schema spec, and there is a note about this situation at the end of 4.2.6.2:
Given that the schemaLocation [attribute] is only a hint, it is open to applications to ignore all but the first for a given namespace, regardless of the ·actual value· of schemaLocation, but such a strategy risks missing useful information when new schemaLocations are offered.
Apparently, Xerces implementation indeed ignores all but the first import with a given namespace, resulting in exactly what the specification warns about - missing information, which then has to be provided by the user.
I have this document and an XSD (linked from it from schemaLocation).
Now, the XSD imports 2 other XSDs with the same targetNamespace:
The XSDs have both the same targetNamespace and contain no conflicting definitions. Nevertheless, the second import is ignored, resulting in an error:
![{90310AA0-A8FD-4BC6-9C83-01261FF2DC72}](https://private-user-images.githubusercontent.com/718827/373388365-1d4c1dac-3970-427d-b6d2-b693de44e4bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg2OTEsIm5iZiI6MTczOTE2ODM5MSwicGF0aCI6Ii83MTg4MjcvMzczMzg4MzY1LTFkNGMxZGFjLTM5NzAtNDI3ZC1iNmQyLWI2OTNkZTQ0ZTRiYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNjE5NTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kOTRjNzUyOTNmODY5N2UxNTViNDQ5OGUzZGMwNTA2NmY2NTg2YjY2Yzg1ZDZiYzVhNTY1ZWRmNzVkYmJlNDgxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.S1Mw0EAwJ4unR_-0ka6X89oY4TptuBDHNSjgj57bLlk)
because that type is defined in the second imported XSD. When I comment out the first import, the second starts working.
This should be legal in XML Schema, and other validators like Altova work fine with it.
The text was updated successfully, but these errors were encountered: