This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Illegal ID values (was: DTD help!)
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Illegal ID values (was: DTD help!)
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 12 Apr 2001 11:43:03 +0100
- References: <3AD57F09.ECE05CB3@zkb.ch>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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