- From: Kay Michael <Michael.Kay@icl.com>
- Date: Fri, 9 Jun 2000 11:11:16 +0100
- To: "'www-xml-linking-comments@w3.org'" <www-xml-linking-comments@w3.org>
- Cc: "'w3c-xsl-wg@w3.org'" <w3c-xsl-wg@w3.org>
16. I didn't see anything in the XPointer spec that says the XPath expression has to evaluate to a node-set. Since 2+2 is a valid XPath expression, it seems that XPointer(2+2) is a syntactically valid XPointer, though presumably it will always fail as "a scheme that does not locate any subresource present in the resource". However, the rule that the expression must return a node-set could be stated more explicitly; and in particular, the syntax of an XPointer could refer to an XPath UnionExpr rather than an XPath Expr, since an Expr that is not a UnionExpr will never return a node-set. In fact the rules could be more restrictive than this. As a precedent, the XSLT syntax for Patterns describes a subset of XPath syntax that will always return a node-set. This subset is probably more restrictive than the subset that would be appropriate for XPointer, for example because it only allows use of the child and attribute axes, but the same idea could be applied. Michael Kay
Received on Friday, 9 June 2000 06:09:06 UTC