zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #09807
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/11-to-30 into lp:zorba.
Requested reviews:
Matthias Brantner (matthias-brantner)
Chris Hillery (ceejatec)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/11-to-30/+merge/106025
replaced occurrences of XQuery version 1.1 with 3.0
--
https://code.launchpad.net/~zorba-coders/zorba/11-to-30/+merge/106025
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/expression/expr.cpp'
--- src/compiler/expression/expr.cpp 2012-05-03 12:31:51 +0000
+++ src/compiler/expression/expr.cpp 2012-05-16 17:21:20 +0000
@@ -1235,8 +1235,8 @@
/////////////////////////////////////////////////////////////////////////
// //
-// XQuery 1.1 expressions //
-// [http://www.w3.org/TR/xquery-1.1/] //
+// XQuery 3.0 expressions //
+// [http://www.w3.org/TR/xquery-3.0/] //
// //
/////////////////////////////////////////////////////////////////////////
=== modified file 'src/compiler/expression/expr.h'
--- src/compiler/expression/expr.h 2012-05-03 12:31:51 +0000
+++ src/compiler/expression/expr.h 2012-05-16 17:21:20 +0000
@@ -907,8 +907,8 @@
/////////////////////////////////////////////////////////////////////////
// //
-// XQuery 1.1 expressions //
-// [http://www.w3.org/TR/xquery-1.1/] //
+// XQuery 3.0 expressions //
+// [http://www.w3.org/TR/xquery-3.0/] //
// //
/////////////////////////////////////////////////////////////////////////
=== modified file 'src/compiler/parser/xquery_parser.y'
--- src/compiler/parser/xquery_parser.y 2012-05-08 23:49:22 +0000
+++ src/compiler/parser/xquery_parser.y 2012-05-16 17:21:20 +0000
@@ -5199,8 +5199,8 @@
/*_______________________________________________________________________
* *
- * XQuery 1.1 productions *
- * [http://www.w3.org/TR/xquery-11/] *
+ * XQuery 3.0 productions *
+ * [http://www.w3.org/TR/xquery-30/] *
* *
*_______________________________________________________________________*/
=== modified file 'src/compiler/parsetree/parsenodes.h'
--- src/compiler/parsetree/parsenodes.h 2012-05-03 12:31:51 +0000
+++ src/compiler/parsetree/parsenodes.h 2012-05-16 17:21:20 +0000
@@ -1799,7 +1799,7 @@
/*******************************************************************************
[39] ExprSingle ::=
- ** XQuery 1.1 exprs
+ ** XQuery 3.0 exprs
FLWORExpr |
QuantifiedExpr |
TypeswitchExpr |
@@ -3875,7 +3875,7 @@
/*******************************************************************************
[108] Literal ::= NumericLiteral | StringLiteral
- [126] Literal ::= NumericLiteral | StringLiteral (XQuery 1.1)
+ [126] Literal ::= NumericLiteral | StringLiteral (XQuery 3.0)
********************************************************************************/
// Used by Annotations classes
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-05-16 06:45:13 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-05-16 17:21:20 +0000
@@ -2778,10 +2778,6 @@
<value>error $2: $3</value>
</entry>
- <entry key="Eval11">
- <value>"eval" only available in XQuery 1.1 or later</value>
- </entry>
-
<entry key="ExpectedNumericOrDurationType">
<value>expected numeric or duration type</value>
</entry>
=== modified file 'src/functions/func_durations_dates_times_impl.cpp'
--- src/functions/func_durations_dates_times_impl.cpp 2012-05-03 12:31:51 +0000
+++ src/functions/func_durations_dates_times_impl.cpp 2012-05-16 17:21:20 +0000
@@ -499,7 +499,7 @@
/*
- * XQuery1.1 formatting functions
+ * XQuery 3.0 formatting functions
*------------------------------------------------*/
class fn_format_datetime_4 : public function
=== modified file 'src/runtime/numerics/numerics_impl.cpp'
--- src/runtime/numerics/numerics_impl.cpp 2012-05-03 12:31:51 +0000
+++ src/runtime/numerics/numerics_impl.cpp 2012-05-16 17:21:20 +0000
@@ -396,7 +396,7 @@
STACK_END (state);
}
-//XQuery 1.1 functions
+//XQuery 3.0 functions
/*******************************************************************************
********************************************************************************/
=== modified file 'src/runtime/spec/codegen-cpp.xq'
--- src/runtime/spec/codegen-cpp.xq 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/codegen-cpp.xq 2012-05-16 17:21:20 +0000
@@ -120,12 +120,11 @@
declare function local:propagate($function) as xs:string?
{
let $xq30 := count($function//zorba:signature[@version eq "3.0"])
- let $xq11 := count($function//zorba:signature[@version eq "1.1"])
let $sigs := count($function//zorba:signature)
- let $xq10 := ($sigs - $xq30) - $xq11
+ let $xq10 := ($sigs - $xq30)
return
concat(
- if(($xq30 > 0 ) or ($xq11 > 0)) then
+ if ($xq30 > 0 ) then
local:propagateInputToOutput($function,"_3_0") else (),
if($xq10 >0) then
local:propagateInputToOutput($function,"") else ()
@@ -178,12 +177,11 @@
declare function local:create-functions($iter, $function) as xs:string?
{
let $xq30 := count($function//zorba:signature[@version eq "3.0"])
- let $xq11 := count($function//zorba:signature[@version eq "1.1"])
let $sigs := count($function//zorba:signature)
- let $xq10 := ($sigs - $xq30) - $xq11
+ let $xq10 := ($sigs - $xq30)
return
concat(
- if(($xq30 > 0 ) or ($xq11 > 0)) then local:create-function($iter, $function,"_3_0") else (),
+ if ($xq30 > 0 ) then local:create-function($iter, $function,"_3_0") else (),
if($xq10 >0) then local:create-function($iter, $function,"") else ()
)
};
@@ -256,8 +254,7 @@
{
if ($signature/@version eq "1.0") then ""
else
- if (($signature/@version eq "3.0") or
- ($signature/@version eq "1.1"))
+ if ($signature/@version eq "3.0")
then "_3_0"
else ""
};
=== modified file 'src/runtime/spec/codegen-h.xq'
--- src/runtime/spec/codegen-h.xq 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/codegen-h.xq 2012-05-16 17:21:20 +0000
@@ -56,8 +56,7 @@
if ($signature/@version eq "1.0")
then concat($gen:newline, $gen:indent, $gen:indent, "theXQueryVersion = StaticContextConsts::xquery_version_1_0;")
else
- if (($signature/@version eq "3.0") or
- ($signature/@version eq "1.1"))
+ if ($signature/@version eq "3.0")
then concat($gen:newline, $gen:indent, $gen:indent, "theXQueryVersion = StaticContextConsts::xquery_version_3_0;")
else ()
};
@@ -121,12 +120,11 @@
declare function local:create-function-XQuery-30($iter, $function) as xs:string?
{
let $xq30 := count($function//zorba:signature[@version eq "3.0"])
- let $xq11 := count($function//zorba:signature[@version eq "1.1"])
let $sigs := count($function//zorba:signature)
- let $xq10 := ($sigs - $xq30) - $xq11
+ let $xq10 := ($sigs - $xq30)
return
concat(
- if(($xq30 > 0 ) or ($xq11 > 0)) then
+ if ($xq30 > 0 ) then
local:create-function-arity( $iter,
$function,
"theXQueryVersion = StaticContextConsts::xquery_version_3_0;")
=== modified file 'src/runtime/spec/numerics/numerics.xml'
--- src/runtime/spec/numerics/numerics.xml 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/numerics/numerics.xml 2012-05-16 17:21:20 +0000
@@ -3,7 +3,7 @@
<!--
/////////////////////////////////////////////////////////////////////////////////
// 6.4 Functions on Numeric Values //
-// XQuery 1.1 functions (FormatNumber) //
+// XQuery 3.0 functions (FormatNumber) //
/////////////////////////////////////////////////////////////////////////////////
-->
<zorba:iterators
@@ -118,7 +118,7 @@
<!--
/*******************************************************************************
- * XQuery 1.1 functions
+ * XQuery 3.0 functions
********************************************************************************/
-->
<zorba:iterator name="FormatNumberIterator">
@@ -142,7 +142,7 @@
<!--
/*******************************************************************************
- * 4.5.1 fn:format-integer in XQuery3.0
+ * 4.5.1 fn:format-integer in XQuery 3.0
********************************************************************************/
-->
<zorba:iterator name="FormatIntegerIterator">
=== modified file 'src/runtime/spec/runtime.xsd'
--- src/runtime/spec/runtime.xsd 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/runtime.xsd 2012-05-16 17:21:20 +0000
@@ -81,7 +81,6 @@
<xs:simpleType name="xquery-version-enum">
<xs:restriction base="xs:string">
<xs:enumeration value="3.0"/>
- <xs:enumeration value="1.1"/>
<xs:enumeration value="1.0"/>
</xs:restriction>
</xs:simpleType>
=== modified file 'src/runtime/spec/store/maps.xml'
--- src/runtime/spec/store/maps.xml 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/store/maps.xml 2012-05-16 17:21:20 +0000
@@ -30,7 +30,16 @@
<zorba:description author="Matthias Brantner">
</zorba:description>
- <zorba:function>
+ <zorba:function generateDECL="false">
+
+ <zorba:signature
+ variadic="true"
+ localname="create"
+ prefix="zorba-store-data-structure-unordered-map">
+ <zorba:param>xs:QName</zorba:param> <!-- name of the hashmap -->
+ <zorba:param>xs:QName</zorba:param> <!-- list of key types -->
+ <zorba:output>empty-sequence()</zorba:output>
+ </zorba:signature>
<zorba:signature
variadic="true"
=== modified file 'test/rbkt/Queries/zorba/HigherOrder/hof-001.xq'
--- test/rbkt/Queries/zorba/HigherOrder/hof-001.xq 2012-05-03 12:31:51 +0000
+++ test/rbkt/Queries/zorba/HigherOrder/hof-001.xq 2012-05-16 17:21:20 +0000
@@ -1,4 +1,4 @@
-xquery version "1.1";
+xquery version "3.0";
(: Higher Order Functions :)
(: inline function literal, user-defined function :)
(: Author - Michael Kay, Saxonica :)
=== modified file 'test/rbkt/Queries/zorba/HigherOrder/hof-003.lib'
--- test/rbkt/Queries/zorba/HigherOrder/hof-003.lib 2012-05-03 12:31:51 +0000
+++ test/rbkt/Queries/zorba/HigherOrder/hof-003.lib 2012-05-16 17:21:20 +0000
@@ -1,4 +1,4 @@
-xquery version "1.1";
+xquery version "3.0";
module namespace m="http://example.com/hof-003";
declare function m:f() as xs:integer {
@@ -7,4 +7,4 @@
declare function m:f($x as xs:integer) as xs:integer {
$x + 1
-};
\ No newline at end of file
+};
Follow ups
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: noreply, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Chris Hillery, 2012-05-16
-
Re: [Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Chris Hillery, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
Re: [Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Matthias Brantner, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
Re: [Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Matthias Brantner, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
Re: [Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Zorba Build Bot, 2012-05-16
-
[Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Matthias Brantner, 2012-05-16
-
Re: [Merge] lp:~zorba-coders/zorba/11-to-30 into lp:zorba
From: Matthias Brantner, 2012-05-16