File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java Interview Guide
this week in the
XML and Related Technologies
ID and IDREF attributes in XML
Joined: May 25, 2006
May 25, 2006 00:51:00
can we create two ID attributes in for one element tag in XML DTD?
that is..... for example:
<!ATTLIST BOOK BOOK_ID ID #REQUIRED>
<!ATTLIST BOOK AUTH_ID ID #REQUIRED>
then i am using IDREF for another new attribute for EMP element.
then to which ID ..this IDREF refers...
<!ATTLIST BOOK REF_BOOK IDREF #IMPLIED>
i want to whether it is possible to create two ID attributes for one element. if possible ..how this above code will work.
plz let me know ..
looking forward for clear and quick response.
Joined: Apr 14, 2004
May 25, 2006 02:35:00
No element can have more than one ID. An ID is an identifier for that element. It doesn't make any sense to have more than one identifier for the same thing.
(BTW: you should probably read
before posting again)
I agree. Here's the link:
subject: ID and IDREF attributes in XML
XML for Assignment Log
DOM leaf nodes
Using IDREFs with XML Schema
ID/IDREF association in DTD
DTD - IDREF
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015