Project

Profile

Help

Bug #3908

closed

XQuery allows a context item to be supplied when it is already initialized in the query

Added by Michael Kay almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery conformance
Sprint/Milestone:
-
Start date:
2018-09-17
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8
Fixed in Maintenance Release:
Platforms:

Description

With a query

declare context item := 3; .

it can be called from the command line specifying -s:temp.xml, and the query returns the content of temp.xml.

This conflicts with the XQuery recommendation which says:

If VarValue is specified, then the initial context item is the result of evaluating VarValue.

Note: In such a case, the initial context item does not obtain its value from the external environment. If the external environment attempts to provide a value for the initial context item, it is outside the scope of this specification whether that is ignored, or results in an error.

It seems we have two options, ignoring the -s option or rejecting it as an error; using the value (which we do) is not an option.

Please register to edit this issue

Also available in: Atom PDF