David Graf has proposed merging lp:~zorba-coders/zorba/fots30 into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fots30/+merge/84904

I added the proposed w3c tests for the 'default value for external variable' 
feature. The tests a located at test/rbkt/Queries/zorba/ext_var/w3c. Some of 
the added tests are failing because forward references and declaring context 
items are not possible in zorba yet.
-- 
https://code.launchpad.net/~zorba-coders/zorba/fots30/+merge/84904
Your team Zorba Coders is subscribed to branch lp:zorba.
=== added directory 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c'
=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-009.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-009.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-009.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+result

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+3

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010a.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010a.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010a.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+28

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-012.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-012.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-012.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+3

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-013.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-013.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-013.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+28

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+1

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.spec'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,2 @@
+Args:
+--context-item=$RBKT_SRC_DIR/Queries/zorba/typeswitch/works-mod.xml

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016a.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016a.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016a.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+3

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016b.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016b.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016b.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+10

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-017.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-017.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-017.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+10

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-019.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-019.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-019.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+28

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-020.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-020.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-020.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+28

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-021.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-021.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-021.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-022.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-022.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-022.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+5

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-023.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-023.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-023.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+<abf xmlns="http://www.w3.org/XQueryTest/hats";><a/><b/><b/><f/><f/><f/></abf>

=== added file 'test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-025.xml.res'
--- test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-025.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-025.xml.res	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+<hats:abf xmlns:hats="http://www.w3.org/XQueryTest/hats";><hats:a/><hats:b/><hats:b/><hats:f/><hats:f/><hats:f/></hats:abf>

=== modified file 'test/rbkt/Queries/CMakeLists.txt'
--- test/rbkt/Queries/CMakeLists.txt	2011-12-06 03:28:20 +0000
+++ test/rbkt/Queries/CMakeLists.txt	2011-12-08 08:58:27 +0000
@@ -295,3 +295,12 @@
 EXPECTED_FAILURE(test/rbkt/zorba/reference/reference_5 868640)
 
 EXPECTED_FAILURE(test/rbkt/zorba/fulltext/ft-same-sentence-true-4 900552)
+
+# external variable default expected failures
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-010 XXXXXX) # forward references not implemented
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-011 XXXXXX) # forward references not implemented -> cycles cannot be detected
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-014 XXXXXX) # not possible to set context item for rbkt tests
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-015 XXXXXX) # not possible to set context item in XQuery
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-016a XXXXXX) # not possible to set context item in XQuery
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-016b XXXXXX) # not possible to set context item in XQuery
+EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-022 XXXXXX) # forward references not implemented

=== added directory 'test/rbkt/Queries/zorba/ext_var/w3c'
=== added directory 'test/rbkt/Queries/zorba/ext_var/w3c/SchemaImport'
=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/SchemaImport/hats.xsd'
--- test/rbkt/Queries/zorba/ext_var/w3c/SchemaImport/hats.xsd	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/SchemaImport/hats.xsd	2011-12-08 08:58:27 +0000
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://www.w3.org/XQueryTest/hats";
+  xmlns:hats="http://www.w3.org/XQueryTest/hats";
+  elementFormDefault="qualified">
+
+<!-- A hodge-podge of random type declarations -->
+
+
+<xsd:element name="ArrayTest">
+	<xsd:complexType>
+	    <xsd:sequence>
+	        <xsd:element name="array1" type="xsd:string" maxOccurs="10"/>
+	        <xsd:choice minOccurs="0" maxOccurs="unbounded">
+		        <xsd:element name="array2" type="xsd:boolean" minOccurs="2" maxOccurs="2"/>
+		        <xsd:element name="array3" type="xsd:string" maxOccurs="4"/>
+	        </xsd:choice>
+	    </xsd:sequence>
+    </xsd:complexType>
+</xsd:element>
+
+<xsd:simpleType name="hatsize">
+  <xsd:restriction base="xsd:integer">
+    <xsd:minInclusive value="4"/>
+    <xsd:maxInclusive value="10"/>
+  </xsd:restriction>
+</xsd:simpleType>
+
+<xsd:simpleType name="bighatsize">
+  <xsd:restriction base="hats:hatsize">
+    <xsd:minInclusive value="7"/>
+    <!--<xsd:maxInclusive value="10"/>--> <!-- inherit the maxInclusive facet -->
+  </xsd:restriction>
+</xsd:simpleType>
+
+<xsd:simpleType name="shoesize">
+  <xsd:restriction base="xsd:negativeInteger">
+    <xsd:minExclusive value="-8"/>
+    <xsd:maxExclusive value="-2"/>
+  </xsd:restriction>
+</xsd:simpleType>
+
+
+<xsd:simpleType name="date2003">
+  <xsd:restriction base="xsd:date">
+    <xsd:minInclusive value="2003-01-01"/>
+    <xsd:maxInclusive value="2003-12-31"/>
+  </xsd:restriction>
+</xsd:simpleType>
+
+<xsd:simpleType name="vreg">
+  <xsd:restriction base="xsd:string">
+    <xsd:pattern value="[a-z]{3}[0-9]{3}"/>
+  </xsd:restriction>
+</xsd:simpleType>
+
+<xsd:complexType name="abfType">
+    <xsd:sequence>
+      <xsd:element name="a" minOccurs="1" type="xsd:string"/>
+      <xsd:element name="b" minOccurs="0" maxOccurs="2"/>
+      <xsd:element name="f" minOccurs="1" maxOccurs="unbounded"/>
+    </xsd:sequence>
+</xsd:complexType>
+
+<xsd:element name="abf" type="hats:abfType"/>
+
+<xsd:element name="s" type="xsd:string"/>
+
+</xsd:schema>

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPDY0002

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+declare variable $x external; $x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-009.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-009.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-009.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+declare variable $x external; "result"

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare variable $a := 1;
+declare variable $x external := $a + $b;
+declare variable $b external := 2;
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010a.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010a.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010a.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare variable $a external := 6 + local:foo();
+declare variable $b external := 12;
+declare function local:foo() { $b + 10 };
+$a

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQST0054

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,3 @@
+declare variable $a := $x;
+declare variable $x external := $a + $b;
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQST0054

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,9 @@
+declare variable $x external := 3 + local:foo();
+declare variable $b external := 2 + local:foo();
+
+declare function local:foo()
+{
+  $b
+};
+
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-012.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-012.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-012.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare function local:aaa() { 1 };
+declare variable $x external := local:bbb() + local:aaa();
+declare function local:bbb() { 2 };
+$x 

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-013.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-013.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-013.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,6 @@
+declare variable $y external;
+declare variable $z external := 10;
+declare function local:aaa() { $z };
+declare variable $x external := local:bbb() + local:aaa() + 2;
+declare function local:bbb() { $y };
+$x 

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,3 @@
+Args:
+-x 
+input-context1=$RBKT_SRC_DIR/Queries/w3c_testsuite/TestSources/works-mod.xml

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,3 @@
+declare variable $x external := /works/employee[@name eq "Jane Doe 1"];
+fn:count($x)
+

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQST0107

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare variable $y := /works/employee;
+declare context item := $y[9];
+declare variable $x external := fn:position();
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016a.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016a.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016a.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare variable $y := (<a>1</a>,<a>2</a>,<a>3</a>,<a>4</a>,<a>5</a>,<a>6</a>,<a>7</a>,<a>8</a>,<a>9</a>,<a>10</a>);
+declare context item := $y[3];
+declare variable $x external := fn:position();
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016b.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016b.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016b.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,4 @@
+declare variable $y := (<a>1</a>,<a>2</a>,<a>3</a>,<a>4</a>,<a>5</a>,<a>6</a>,<a>7</a>,<a>8</a>,<a>9</a>,<a>10</a>);
+declare context item := $y;
+declare variable $x external := fn:last();
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-017.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-017.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-017.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,2 @@
+declare variable $x as xs:decimal external := xs:integer(10);
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPST0008

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,2 @@
+declare variable $x external := $a + 10;
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-019.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-019.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-019.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,3 @@
+declare variable $x external := 10;
+declare variable $y external := 18 + $x;
+$y

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-020.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-020.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-020.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,5 @@
+declare variable $x external := 5;
+declare variable $a := $x + 2;
+declare function local:foo() {$x +$a};
+declare variable $y external := 11 + local:foo() + $x;
+$y

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-021.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-021.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-021.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,3 @@
+declare variable $x as xs:integer external := xs:int(5);
+declare variable $y as xs:decimal external := $x;
+$y instance of xs:decimal

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-022.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-022.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-022.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,5 @@
+declare function local:foo() {
+  $x
+};
+declare variable $x external := 5;
+$y instance of xs:decimal

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-023.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-023.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-023.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,8 @@
+declare construction strip; 
+import schema default element namespace "http://www.w3.org/XQueryTest/hats"; at "SchemaImport/hats.xsd"; 
+declare variable $x :=
+  validate strict {
+    <abf> 
+      <a/> <b/> <b/> <f/> <f/> <f/> 
+    </abf>};
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0084

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,8 @@
+declare construction strip; 
+import schema default element namespace "http://www.w3.org/XQueryTest/hats"; at "SchemaImport/hats.xsd"; 
+declare variable $x external :=
+  validate strict {
+    <abc> 
+      <a/> <b/> <b/> <f/> <f/> <f/> 
+    </abc>};
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-025.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-025.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-025.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,8 @@
+declare construction strip; 
+import schema namespace hats="http://www.w3.org/XQueryTest/hats"; at "SchemaImport/hats.xsd"; 
+declare variable $x as schema-element(hats:abf) external :=
+  validate strict {
+    <hats:abf> 
+      <hats:a/> <hats:b/> <hats:b/> <hats:f/> <hats:f/> <hats:f/> 
+    </hats:abf>};
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPTY0004

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,8 @@
+declare construction strip; 
+import schema namespace hats="http://www.w3.org/XQueryTest/hats"; at "SchemaImport/hats.xsd"; 
+declare variable $x as schema-element(hats:s) external :=
+  validate strict {
+    <hats:abf> 
+      <hats:a/> <hats:b/> <hats:b/> <hats:f/> <hats:f/> <hats:f/> 
+    </hats:abf>};
+$x

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.spec'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.spec	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.spec	2011-12-08 08:58:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPTY0004

=== added file 'test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.xq'
--- test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.xq	2011-12-08 08:58:27 +0000
@@ -0,0 +1,7 @@
+declare construction strip; 
+import schema namespace hats="http://www.w3.org/XQueryTest/hats"; at "SchemaImport/hats.xsd"; 
+declare variable $x as schema-element(hats:s) external :=
+    <hats:abf> 
+      <hats:a/> <hats:b/> <hats:b/> <hats:f/> <hats:f/> <hats:f/> 
+    </hats:abf>;
+$x

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to