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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top