[Bug 3661] Custom inference rules and XPST0005

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

           Summary: Custom inference rules and XPST0005
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: frans.englich@telia.com
         QAContact: public-qt-comments@w3.org


XQuery allows arbitrary, implementation defined, inference rules, as per
5.2.3.1 Static Typing Extensions. It also says that XPST0005 should be raised
on any expression that has as static type the empty sequence:

"During the analysis phase, it is a static error if the static type assigned to
an expression other than the expression () or data(()) is empty-sequence()."

When combining these two, it is possible for an implementation to raise
XPST0005 on any expression that evaluates to the empty sequence. The only limit
is on what the implementation manages to infer.

I don't know if I'm here arguing a theoretic point which in practice is
irrelevant, but this stems from member-query-test where a member indeed wanted
to raise XPST0005 in such a case(path expression missing on a direct element
constructor).

Should it really be implementation defined what expressions that are "valid"?
Should XPST0005 be narrowed down to only apply on kind tests? (if so, should
probably apply both to steps and SequenceType scenarios)

Received on Wednesday, 6 September 2006 16:25:44 UTC