DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13293>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13293 Schema ID validation can fail depending on declaration ordering Summary: Schema ID validation can fail depending on declaration ordering Product: Xerces-C++ Version: 2.1.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Validating Parser (Schema) (Xerces 1.5 or up only) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Running "saxcount -n -s" on the attached XML (that refers to the attached XML schema) results in this error: Error at file c:\testcase.xsd, line 5, char 61 Message: ID 'record.e' is not unique even if the XSD file has this content, where "record.e" is used only once: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="collection" type="collectionType" id="collection.e"/> <xsd:element name="record" type="xsd:string" id="record.e"/> <xsd:complexType name="collectionType" id="collection.ct"> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element ref="record"/> </xsd:sequence> </xsd:complexType> </xsd:schema> It turns out that, if the schema gets rearranged to have the "record" definition occur *before* the "collection" one, it validates fine. The error should reside in the fact that the declaration for "collection" looks up for the declaration of "collectionType", that invokes processElementDeclRef on the "record" reference, that forces the lookup and validation of the (yet unseen) "record" entry. When validating the "record" entry, its ID is entered in the global ID map; after the validation succeeds, the schema information is restored, but the ID map is not cleaned. So, when the validation process comes to validate the "record" definition, the ID seems to have been already used. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
