- From: Abel Braaksma <abel.braaksma@xs4all.nl>
- Date: Wed, 30 Sep 2015 18:15:28 +0200
- To: "'Public XSLWG'" <public-xsl-wg@w3.org>
> In any case, in XPath expressions it is always true that ".[1]" selects > the same thing as “.”, while “.[2]” selects nothing; so we’re being > faithful to XPath semantics. That makes sense. Perhaps somewhat unfortunate, but it follows the logic that any pattern can (trivially) be rewritten as an XPath expression. Pondering about co-existence: there is no way with the XSLT 2.0 syntax, but with the dot-syntax, which applies to both nodes and atomic items, this *could* be defined as "the context item, with context size and position set to their respective values in the current match selection". It is then still equivalent to XPath (as any XPath inside a similar for-each, if you replace it with if(predicate) then). That way, while non-predicate patterns can only select elements and the position on some axis, dot-syntax, which matches "anything", then matches the position in the match selection. I say "could", because I know we aren't changing stuff anymore. It is good to know, however, the rationale behind the current feature description. Cheers, Abel
Received on Wednesday, 30 September 2015 16:16:03 UTC