xsl-list
[Top] [All Lists]

Re: [xsl] Numeric top-level predicates in patterns

2014-04-02 13:50:49

On 2-4-2014 20:32, David Carlisle wrote:

That is why I think Michael defined it as he did. [1] is only
redundant if the preceding sequence is known to be at most 1.

So [1] is a numerical predicate and a sibling predicate in

$foo[true()][1]

but it is not redundant.

This is true.

While I emphasized patterns specifically, Michael generalized it with
his remark on cardinality. My original post was on sibling predicates,
where [1] is added to the right of an existing numeric predicate, in
which case it is a no-op, because the cardinality is already 0:1. But in
your example, assuming we don't know statically that $foo is a sequence
of zero or one, then indeed, it is surely not redundant.

Cheers,
Abel


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--