ID unique to this type of element?

  • Thread starter Robert William Vesterman
  • Start date
R

Robert William Vesterman

Is there a way to specify an attribute as being sort of like an ID,
except that it has to be unique to this type of element rather than
unique within the document?

Or, more pleasantly, unique within the parent element's children?

Or, especially pleasantly, unique within the parent element's children
of the same element type?

Thanks,

Bob Vesterman.
 
M

Martin Honnen

Robert said:
Is there a way to specify an attribute as being sort of like an ID,
except that it has to be unique to this type of element rather than
unique within the document?

Or, more pleasantly, unique within the parent element's children?

Or, especially pleasantly, unique within the parent element's children
of the same element type?

A DTD doesn't allow that but a W3C XML schema does:
http://www.w3.org/TR/xmlschema-0/#specifyingUniqueness
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top