This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes ID and IDREF attributes in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "ID and IDREF attributes in XML" Watch "ID and IDREF attributes in XML" New topic

ID and IDREF attributes in XML

chaitanya sai

Joined: May 25, 2006
Posts: 2
Hi all,
can we create two ID attributes in for one element tag in XML DTD?
that is..... for example:


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

for Ex:


i want to whether it is possible to create two ID attributes for one element. if possible this above code will work.
its urgent..
plz let me know ..

looking forward for clear and quick response.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

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)

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: ID and IDREF attributes in XML
It's not a secret anymore!