[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uniqueness operator for XPath?
- From: David Carlisle <firstname.lastname@example.org>
- To: email@example.com
- Date: Thu, 08 Feb 2001 19:01:08 +0000 (GMT)
> I suppose you may think that this should be
> in the realm of schema,
probbaly yes, because a schema validator has many more options on what
to do on failure.
XPath's don't ever really fail, they just don't always select any nodes,
so if the author is expecting there is only one head and goes
and then in the document there are two <head>. One might hope to
get an error condition, but (presumably) in XPath there would be no
error, but the above XPath would just fail to select any nodes, just as
if there were not a <head> element at all. I'm not sure if this would be
the expected behaviour.
This is assuming the semantics of !head are (baring optimisation
concerns) the same as head[position()=1 and last()=1]