Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ID and IDREF attributes in XML

 
chaitanya sai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
can we create two ID attributes in for one element tag in XML DTD?
that is..... for example:


<!ELEMENT BOOK(#PCDATA)>
<!ATTLIST BOOK BOOK_ID ID #REQUIRED>
<!ATTLIST BOOK AUTH_ID ID #REQUIRED>

if so..,
then i am using IDREF for another new attribute for EMP element.
then to which ID ..this IDREF refers...

for Ex:

<!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.
its urgent..
plz let me know ..

looking forward for clear and quick response.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 this and this before posting again)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic