getElementById failure with attributes derived by restriction from xs::ID
--------------------------------------------------------------------------
Key: XERCESC-1344
URL: http://issues.apache.org/jira/browse/XERCESC-1344
Project: Xerces-C++
Type: Bug
Components: DOM
Versions: 2.6.0
Environment: Win32 VC6
Reporter: Kris De Meyer
Priority: Minor
Attributes derived by restriction as local simpleType from xs:ID (e.g. by
restriction of the allowed ID-names to a predefined pattern) are correctly
schema-validated as ID's (e.g., when 2 have the same name this is flagged as
error), but are - as far as I can see - not added to DOMNodeIdMap. As a
consequence, subsequent calls to getElementByID with these specific ID-names
fails and returns null pointers.
Example:
<xs:attribute name="id" use="optional">
<xs:simpleType>
<xs:restriction base="xs:ID">
<xs:pattern value="P\d+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Calls of getElementByID to elements with this ID attribute fail.
Removing the restriction:
<xs:attribute name="id" type="xs:ID" use="optional"/>
results in working getElementByID calls.
Although a minor issue, it leads to non-conformant behaviour and should be
corrected at some stage.
Thanks,
Kris
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]