Thanks for your input.

Any idea how I can define the attribute ("id")
to be of type ID (other than through a DTD)?

Also, what I don't understand is how the "id"
attributes are correctly recognized as being 
of type ID (without any DTD) when they occur 
in the original XML file that I read in and 
parse to create the DOM, but the new elements 
added to the tree are not recognized as having
an "id" attribute of type ID.

I'm actually using IBM's XML4J 3.2.0, but I also
got the same problem with the latest Oracle parser.

I have noticed that the javadoc states that 
"attributes with the name "ID" are not of type ID
unless so defined" but doesn't say how you would
define them.  I guess using a dtd is one way of 
defining it, as you have suggested.

Thanks again for your help.

- Nosa



--- "Arnold, Curt" <[EMAIL PROTECTED]> wrote:
> An attribute is only added to the ID map used by
> getElementById() if it is defined to be of type ID
> in a document type declaration.  If you don't have a
> DTD or your new element isn't defined in the
> DTD or the desired attribute (by convention "id")
> defined as ID type, then things will not behave as
> expected.
> 
> If all those things are followed then it should
> work, however you might try turning validation on.
> 
> Identifying the version of xerces-j being used may
> be helpful in case it is actually a bug.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

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

Reply via email to