This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XPath unique ids


> http://www.w3.org/TR/xpath#unique-id
>
> Bizarrely XPath does not state that the system should always take the
> first, it states that if there are two, then the second should not be
> taken, which seems to leave it formally undefined what to do if three
or
> more elements are specified with the same id. (Although it's clear
that
> the intention is that the first be used)
>
> David

If an XML processor reports that three elements in a document have the
same unique ID, then it has also reported that two elements in a
document have the same unique ID.  Examining all pairs of such elements
(yes, this is not strictly necessary and would be inefficient ;-) shows
that the only element that must not be treated as not having a unique ID
is the first one.  Ergo, the first one must be treated as having a
unique ID.  (Yeah, I know, it's hokey. <grin>)

Dave



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]