[Bug 3676] fn:subsequence typeing rules

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

           Summary: fn:subsequence typeing rules
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


In the typechecking rules for fn:subsequence

http://www.w3.org/TR/xquery-semantics/#sec_fn_subsequence

we have:

statEnv |-  QName of func expands to (FN-URI,"subsequence")
statEnv |-  Expr : Type      quantifier(Type) in { * }
------------------------------------------------------
statEnv  |-  QName(Expr, NumericLiteral, 1) : prime(Type) ?

This can also include quantifier +.

i.e.

statEnv |-  QName of func expands to (FN-URI,"subsequence")
statEnv |-  Expr : Type      quantifier(Type) in { *, + }
------------------------------------------------------
statEnv  |-  QName(Expr, NumericLiteral, 1) : prime(Type) ?

Similarly:

statEnv |-  QName of func expands to (FN-URI,"subsequence")
statEnv |-  Expr : Type      quantifier(Type) in { *, + }
------------------------------------------------------
statEnv  |-  QName(Expr, $fs:last, 1) : prime(Type) ?

and

statEnv |-  QName of func expands to (FN-URI,"subsequence")
statEnv |-  Expr : Type      quantifier(Type) in { *, + }
------------------------------------------------------
statEnv  |-  QName(Expr, $fs:position, 1) : prime(Type) ?

although in the case of +, the type of the last two could be deduced as
Prime(Type)) (I think!)

Received on Friday, 8 September 2006 12:57:02 UTC