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 3211 - [FS] editorial: B.2 Mapping of Overloaded Internal Functions
Summary: [FS] editorial: B.2 Mapping of Overloaded Internal Functions
Status: ASSIGNED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 07:59 UTC by Michael Dyck
Modified: 2007-11-04 06:00 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2006-05-09 07:59:49 UTC
B.2 Mapping of Overloaded Internal Functions

STA
"The following static typing rules apply generically to all the fs:
special functions."
    This should be conveyed by the inference rules too. I.e., add
        expanded-QName = (FS-URI,String)
        String in {"plus","minus","times","idiv","div", ...}
    (directly or indirectly) to each rule.  (leftover from Bug 1580)

STA / rule 1
    The top set of premises is only satisfied if every Typei is a union of
    the same number (m) of OptAtomicTypes, which is not what you want.
    You could fix this by making the m's distinct:
        ... OptAtomicType<sub>m<sub>1</sub>,1</sub>
        ... OptAtomicType<sub>m<sub>n</sub>,1</sub>
    But then what would you do in the second set of premises?
    If you want the rule to consider all possible combinations of argument
    types, you probably need a recursive rule, e.g.

        Typei = (OptAtomicType1 | ... | OptAtomicTypem)
        statEnv |- expanded-QName(Type1, ..., OptAtomicType1, ..., Typen) :
            Type1'
        ...
        statEnv |- expanded-QName(Type1, ..., OptAtomicTypem, ..., Typen) :
            Typem'
        -----------------------------------------------
        statEnv |- expanded-QName(Type1, ..., Typen) : (Type1' |...| Typem')

    If you concede that the only possibilities are n=1 or n=2, you could
    split this rule into three simpler rules.

STA / rule (2|3|4|5|6|7) / conclusion
HTML source:
<em><a href="#id-expanded-qnames"><em>expanded-QName</em></a></em>
    Remove outer <em></em>.

STA / rule (4|5|6|8|9)
"AtomicType"
    AtomicType is a SequenceType, not a Formal Type. Instead,
    you probably mean AtomicTypeName, which *is* a Formal Type.

STA / rule 7
    The rule needs a premise: Type1 = empty

Notation 2 / rule (1|2)
"AtomicType"
    As above, change to AtomicTypeName.
Comment 1 Michael Dyck 2006-10-06 07:31:56 UTC
> "The following static typing rules apply generically to all the fs:
> special functions."
>     This should be conveyed by the inference rules too. I.e., add
>         expanded-QName = (FS-URI,String)
>         String in {"plus","minus","times","idiv","div", ...}
>     (directly or indirectly) to each rule.  (leftover from Bug 1580)

    Or, each rule could have a premise saying
        expanded-QName is an overloaded internal function
    where you define that with a rule like:

        LocalPart in {
          'plus', 'minus', 'times', 'idiv', 'div', 'mod',
          'eq', 'ne', 'gt', 'lt', 'ge', 'le', 'is-same-node',
          'node-before', 'node-after', 'unary-plus, 'unary-minus' }
        ----------------
        (FS-URI,LocalPart) is an overloaded internal function
Comment 2 Jim Melton 2007-02-26 00:13:27 UTC
The fix for this bug does not appear in the Recommendation of 23 January 2007. 
It will be considered for a future publication (either an Errata document or
some possible future version of the specification).