Bug 5035 - [XQ] Context item type 'none' in C.1 Static Context Components
: [XQ] Context item type 'none' in C.1 Static Context Components
Status: RESOLVED INVALID
Product: XPath / XQuery / XSLT
XQuery 1.0
: Recommendation
: PC Windows NT
: P2 normal
: ---
Assigned To: Don Chamberlin
: Mailing list for public feedback on specs from XSL and XML Query WGs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-09-12 07:00 UTC by Tim Mills
Modified: 2007-09-19 06:44 UTC (History)
0 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2007-09-12 07:00:37 UTC
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?
Comment 1 Don Chamberlin 2007-09-18 17:27:52 UTC
Tim,
The Query Working Group discussed this bug report on Sept 18, 2007, and
observed that, when several error codes apply to a given query, a conforming
implementation may raise any of the error codes. The initial value and initial
static type of the context item are both implementation-defined (see
"overwriteable" in column three of the tables in Sections 3.1 and 3.1).
Therefore, depending on the documented policy of a given implementation, any of
the error codes suggested in your bug report might be valid. Based on this
analysis, the working group decided to close this bug report with no change to
the specifications. If you are satisfied with this resolution, please change
the status of the bug report to "Closed."
Regards,
Don Chamberlin (for the Query Working Group)
Comment 2 Tim Mills 2007-09-19 06:44:40 UTC
Thanks - but could we please have clarification as to whether the initial
setting 'none' in C.1 Static Context Components is indeed a reference to the
'none' type in Formal Semantics?


  翻译: