This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1767 - [FS] technical: 7.2.13 The fn:subsequence function: incorrect typing?
Summary: [FS] technical: 7.2.13 The fn:subsequence function: incorrect typing?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-19 23:57 UTC by Michael Dyck
Modified: 2005-10-13 13:17 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-19 23:57:19 UTC
7.2.13 The fn:subsequence function

STA / rule 5
    If quantifier(Type) in { 1, + }, I don't think you're guaranteed that
    the result type has the same quantifier. Are you missing a "· ?" in
    the conclusion?
Comment 1 Jerome Simeon 2005-07-20 21:45:51 UTC
The working group agrees with your comment. The rule is bogus, and should have a
? at the end. also the ''' in the conclusion of the inferrence rule has to be
removed.

this results in the following inference rule.

statEnv |- Expr : Type
statEnv |- Expr1 : xs:double      statEnv |- Expr2 : xs:double
--------------------------------------------------------------------------------
statEnv |- fn:subsequence(Expr, Expr1, Expr2) : prime(Type) · quantifier(Type)

- Jerome
Comment 2 Michael Dyck 2005-07-20 22:22:58 UTC
Uh, except that you left out the '?' again.
Comment 3 Jerome Simeon 2005-10-13 13:17:50 UTC
Yes, you are right.

The '?' is used as expected in the latest published draft. See:

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

- Jerome