[Bug 1728] [FS] stronger inference is possible in 7.2.13 "fn:subsequence"

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1728





------- Additional Comments From jmdyck@ibiblio.org  2005-07-20 22:55 -------
(In reply to comment #5)
>
> The normalization of [] predicates is mapped to fn:subsequence.

Not always. In particular, not for Expr[1+6 div 6].

> The desire to 
> allow people to get static type reductions in Expr[numeric-literal] was the 
> main driving scenario to have these static rules. If we widen the rules on 
> fn:subsequence, it thus also affects [] expressions.

Calls to fn:subsequence() resulting from normalization of predicates have a
second arg that is either a NumericLiteral, $fs:last, or $fs:position. Given
that you've just agreed to generalize fn:subsequence rule 3 to NumericLiteral,
the only further effect (on STA for predicates) of simplifying the STA for
fn:subsequence() in the suggested way would be to handle $fs:position, and my
guess is that you actually *want* cardinality reduction in a case like
ancestor::node()[2].

Received on Wednesday, 20 July 2005 22:55:29 UTC