Discussion:
[xquery-talk] XQuery 3.1 and the version declaration in a query
Benito van der Zander
2014-10-26 18:52:21 UTC
Permalink
Hi,
A query can start with xquery version "..." to set a specific version.

Is xquery version "3.1"; valid?

What should a XQuery processor that understands 3.1 do, if the query
starts with xquery version "3.0";
but contains expressions that are only valid in 3.1 and not in 3.0?


Benito
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Christian Grün
2014-10-26 18:59:58 UTC
Permalink
Post by Benito van der Zander
Is xquery version "3.1"; valid?
I think it should be (although it seems not to be mentioned in the
current version of the spec [1]).
Post by Benito van der Zander
What should a XQuery processor that understands 3.1 do, if the query starts
with xquery version "3.0";
but contains expressions that are only valid in 3.1 and not in 3.0?
The spec offers three alternatives:

* Process the module using the specification of the XQuery version
identified in the version declaration.
* Process the module using the specification of XQuery 3.0. (→ 3.1)
* Raise a static error [err:XQST0031]

Hope this helps,
Christian

[1] http://www.w3.org/TR/2014/WD-xquery-31-20141007/#id-version-declaration

_______________________________________________
***@x-query.com
http
Benito van der Zander
2014-10-26 20:07:36 UTC
Permalink
Hi Christian,
Post by Christian Grün
* Process the module using the specification of the XQuery version
identified in the version declaration.
* Process the module using the specification of XQuery 3.0. (→ 3.1)
* Raise a static error [err:XQST0031]
But these are the alternatives for
Post by Christian Grün
If an XQuery 3.0 processor processes a module labeled with a version
of "1.0", it must do one of the following:

How do we know that they also apply to an XQuery 3.1 processor ?



Bye,
Benito
Post by Christian Grün
Post by Benito van der Zander
Is xquery version "3.1"; valid?
I think it should be (although it seems not to be mentioned in the
current version of the spec [1]).
Post by Benito van der Zander
What should a XQuery processor that understands 3.1 do, if the query starts
with xquery version "3.0";
but contains expressions that are only valid in 3.1 and not in 3.0?
* Process the module using the specification of the XQuery version
identified in the version declaration.
* Process the module using the specification of XQuery 3.0. (→ 3.1)
* Raise a static error [err:XQST0031]
Hope this helps,
Christian
[1] http://www.w3.org/TR/2014/WD-xquery-31-20141007/#id-version-declaration
_______________________________________________
ta
Michael Kay
2014-10-26 20:49:01 UTC
Permalink
I raised the issue recently here:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27094

No doubt the next draft will say exactly what should happen.

Michael Kay
Saxonica
***@saxonica.com
+44 (0) 118 946 5893
Post by Benito van der Zander
Hi,
A query can start with xquery version "..." to set a specific version.
Is xquery version "3.1"; valid?
What should a XQuery processor that understands 3.1 do, if the query starts with xquery version "3.0";
but contains expressions that are only valid in 3.1 and not in 3.0?
Benito
_______________________________________________
http://x-query.com/mailman/listinfo/talk
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk

Loading...