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]

Re: Illegal ID values (was: DTD help!)



> A quick glance at the XPath spec does not reveal any real advice how to
> handle this. So there is still the question: is this a bug or a feature?
> (I didn't try very hard, so this may be specified somewhere).

I think the implication in the XML spec is that if a non validating
parser reads ID declarations then it should report those attributes as
ID values without checking the ID name is a legal name,

In which case XSLT can use any string as an ID so long as it works with
such a parser.


> I also miss some advice how to handle the case if the ID-attributes matched
> are not unique, as they should. Saxon appears to pick the first matching
> element from the document, Xalan picks the last.

Saxon is right:

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


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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]