[Bug 5035] [XQ] Context item type 'none' in C.1 Static Context Components

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

           Summary: [XQ] Context item type 'none' in C.1 Static Context
                    Components
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


An area of incompatability between XQuery implementations has been uncovered in
relation to Bug 4595.

XQuery specifies in section C.1 Static Context Components that the default
context item static type is "none (raises error on access)".  It is unclear as
to whether or not this refers to the type 'none' defined in Formal Semantics. 
Since its typeface differs from other uses of 'none' in that section, I presume
it does.

Consider a query such as:

document(*)

in which the context item static type takes the default value of none.  This
query implicitly references the context item.  At type checking time, the
static context item type is found to be 'none' (its default value).  What error
should be raised in this case.  Possibilities are:

XPDY0002 

Evaluation of an expression relies on some part of the dynamic context that has
not been assigned a value.  

XPST0001 

It is a static error if analysis of an expression relies on some component of
the static context that has not been assigned a value.

XPTY0004

It is a type error if, during the static analysis phase, an expression is found
to have a static type that is not appropriate for the context in which the
expression occurs.

Arguments for and against these various codes can be found in Bug 4595.

Could the WG please clarify?

Received on Wednesday, 12 September 2007 07:00:40 UTC