Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > ID unique to this type of element?

Reply
Thread Tools

ID unique to this type of element?

 
 
Robert William Vesterman
Guest
Posts: n/a
 
      12-19-2004
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.
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      12-20-2004


Robert William Vesterman wrote:

> 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

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a unique method in python to unique a list? Token Type Python 9 09-09-2012 02:13 PM
list question... unique values in all possible unique spots ToshiBoy Python 6 08-12-2008 05:01 AM
#define ALLOCIT(Type) ((Type*) malloc (sizeof (Type))) Yevgen Muntyan C Programming 10 02-13-2007 02:52 AM
Re: Type casting- a larger type to a smaller type pete C Programming 4 04-02-2004 05:19 PM
Re: Type casting- a larger type to a smaller type heyo C Programming 3 04-01-2004 06:35 PM



Advertisments