> or call
> "putIdentifier" explicitly, otherwise how would the parser know whether
> this newly added attribute has type "ID"?
Please, note, the above solution [suggested by Evert/Sandy] is a hack
into Xerces implementation. If you use it, you code is no longer
COMPLIANT with DOM Rec (it will only work with Xerces implementation!).


> The name "id" is not sufficient. Note that an attribute with type "ID" can
> have any name (not only "id"), while an attribute with name "id" can have
> any type.
Sandy is right. DOM L2 does not provide a way to specify the type of
attribute. From the spec [see getElementById]:
"Note: The DOM implementation must have information that says which
attributes are of type ID. Attributes with the name "ID" are not of type
ID unless so defined. Implementations that do not know whether
attributes are of type ID or not are expected to return null"

Thus, it is not a bug and to be able to use getElementByID method you
should define you attributes in DTD (of type ID).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to