Merge lp:~nbrinza/zorba/bugs into lp:zorba

Proposed by Nicolae Brinza
Status: Rejected
Rejected by: Chris Hillery
Proposed branch: lp:~nbrinza/zorba/bugs
Merge into: lp:zorba
Diff against target: 279 lines (+127/-7)
20 files modified
ChangeLog (+1/-0)
src/types/typeimpl.cpp (+6/-6)
test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res (+1/-0)
test/rbkt/Queries/CMakeLists.txt (+0/-1)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq (+10/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq (+10/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq (+10/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq (+10/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq (+9/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq (+9/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq (+9/-0)
test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq (+9/-0)
test/rbkt/Queries/zorba/schemas/orderData.xsd (+36/-0)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs
Reviewer Review Type Date Requested Status
Matthias Brantner Pending
Markos Zaharioudakis Pending
Review via email: mp+139848@code.launchpad.net

This proposal supersedes a proposal from 2012-06-21.

Commit message

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing.

Description of the change

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing.

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

Nicolae, could you please also update the ChangeLog?

review: Needs Fixing
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-11-03T02-45-02.853Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T17-26-04.331Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Pending.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T17-48-33.425Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue starting for merge proposal.
Log at: http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T18-09-02.8Z/log.html

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T18-09-02.8Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) wrote : Posted in a previous version of this proposal

In computing the value of the is_element_test variable, why do we need the condition:

dynamic_cast<const NodeXQType*>(m_content_type.getp())->m_schema_test == false

? In fact, this seems wrong to me, because if "this" is document-node(SchemaElementTest), then we will return true without really checking the SchemaElementTest.

BTW, the dynamic_cast is not necessary since you have already checked the type kind. A static_cast is better here.

Revision history for this message
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

Indeed, the condition that Markos mentioned was not necessary, so I have removed it. Resubmitting for merge into the trunk.

Revision history for this message
Markos Zaharioudakis (markos-za) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) wrote : Posted in a previous version of this proposal

Nicolae, I have approved the branch, but it would be nice to also add a test for the document-node(schema-element-test) case. Apparently, the XQTS does not have one!

Revision history for this message
Markos Zaharioudakis (markos-za) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-12-19T15-39-06.572Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

Reposting a comment, as I have incorrectly put it in the description of the change:

Markos,

There are some tests in the XQTS with the document-node(schema-element()) node test. But they indeed do not cover all the cases. In fact I found a few queries involving variable declared "as document-node(schema-element())" and "instance of" expressions which did not work correctly in Zorba. I have added a few tests to cover them.

Revision history for this message
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

I have struggled to reproduce the regression that is reported by the remote queue, but I have not been successful: the test passes on my machine. I have merged again the trunk into the branch and I'm resubmitting it again in the hopes it was a problem with the merge. Please re-approve.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-12-20T16-46-13.591Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog
text conflict in src/types/typeimpl.cpp

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bugs-2012-05-10T12-51-03.223Z is finished. The final
  status was:

  6 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

What's the status of this? It needs merge with the trunk? Also, do the 6 tests that were failing work now?

review: Needs Information
Revision history for this message
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

I have fixed the failing tests and I'm resubmitting the merge proposal.

Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bugs-2012-06-22T09-15-04.275Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bugs-2012-12-14T08-00-08.241Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bugs-2012-12-19T13-02-16.011Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog
text conflict in src/types/typeimpl.cpp

Revision history for this message
Chris Hillery (ceejatec) wrote :

Nicolae - please fix the merge conflicts; since you created this branch as ~nbrinza rather than ~zorba-coders, I can't do it.

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

This merge proposal's problem is not the conflict but some failing tests. They are all schema-related and I'm waiting for some help with them from Cezar. Until those failing tests are fixed the branch cannot be merged.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Nicolae - please look at the comment from Zorba Build Bot immediately prior to mine. There are merge conflicts too. There may be a test failure as well, but we can't run the RQ to see it until the merge succeeds.

Revision history for this message
Nicolae Brinza (nbrinza) wrote :

I'll fix the conflicts but Cezar already knows what the issue is and which tests are failing, so basically he knows what needs to be fixed. Solving the conflicts won't solve those bugs and the Changelog will start conflicting again on the next trunk merge.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Rejecting this proposal as it is too far out of date, and since it is owned by ~nbrinza we can't edit it any further. We should probably re-create the branch and re-propose it; possibly the failures that existed before on the old remote queue won't happen on the new remote queue.

Unmerged revisions

10550. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

Fixed the 6 failing doc-node-schema-elem-test- tests

10548. By Nicolae Brinza

Merged with Zorba trunk

10547. By Nicolae Brinza

Merged with Zorba trunk

10546. By Nicolae Brinza

Merged with Zorba trunk

10545. By Nicolae Brinza

Merged with Zorba trunk

10544. By Nicolae Brinza

Merged with Zorba trunk

10543. By Nicolae Brinza

Added spec files for tests with the document-node(schema-element()) node tests

10542. By Nicolae Brinza

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10541. By Nicolae Brinza

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-12-12 08:11:40 +0000
3+++ ChangeLog 2012-12-14 07:57:34 +0000
4@@ -20,6 +20,7 @@
5 * No need to cast xs:untypedAtomic to xs:string in order-by expression.
6
7 Bug Fixes/Other Changes:
8+ * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
9 * Change XQXQ (XQuery-for-XQuery) module now part of Zorba core
10 * Fixed mustCopyInputNodes() method of no-copy, and jsoniq functions.
11 * Fixed bug #868640 (Node lifetime is shorter than expected due to let
12
13=== modified file 'src/types/typeimpl.cpp'
14--- src/types/typeimpl.cpp 2012-12-12 07:36:20 +0000
15+++ src/types/typeimpl.cpp 2012-12-14 07:57:34 +0000
16@@ -794,8 +794,8 @@
17 bool is_element_test = (
18 m_node_kind == store::StoreConsts::documentNode &&
19 theContentType != NULL &&
20- theContentType->type_kind() == XQType::NODE_TYPE_KIND &&
21- dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false);
22+ theContentType->type_kind() == XQType::NODE_TYPE_KIND /* &&
23+ dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false */);
24
25 if (m_node_kind != store::StoreConsts::elementNode &&
26 m_node_kind != store::StoreConsts::attributeNode &&
27@@ -855,7 +855,7 @@
28 if (m_node_kind == store::StoreConsts::documentNode)
29 {
30 os << "document-node(";
31-
32+
33 if (theContentType != NULL &&
34 theContentType->type_kind() == XQType::NODE_TYPE_KIND)
35 {
36@@ -872,7 +872,7 @@
37 else
38 {
39 os << store::StoreConsts::toSchemaString(get_node_kind()) << "(";
40-
41+
42 if (m_node_name != NULL)
43 {
44 os << m_node_name->getStringValue();
45@@ -893,9 +893,9 @@
46 os << "?";
47 }
48 }
49-
50+
51 os << ")";
52-
53+
54 return os.str();
55 }
56
57
58=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res'
59--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res 1970-01-01 00:00:00 +0000
60+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res 2012-12-14 07:57:34 +0000
61@@ -0,0 +1,1 @@
62+true
63\ No newline at end of file
64
65=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res'
66--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res 1970-01-01 00:00:00 +0000
67+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res 2012-12-14 07:57:34 +0000
68@@ -0,0 +1,1 @@
69+false
70\ No newline at end of file
71
72=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res'
73--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res 1970-01-01 00:00:00 +0000
74+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res 2012-12-14 07:57:34 +0000
75@@ -0,0 +1,1 @@
76+false
77\ No newline at end of file
78
79=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res'
80--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res 1970-01-01 00:00:00 +0000
81+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res 2012-12-14 07:57:34 +0000
82@@ -0,0 +1,1 @@
83+true
84\ No newline at end of file
85
86=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res'
87--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res 1970-01-01 00:00:00 +0000
88+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res 2012-12-14 07:57:34 +0000
89@@ -0,0 +1,1 @@
90+false
91\ No newline at end of file
92
93=== modified file 'test/rbkt/Queries/CMakeLists.txt'
94--- test/rbkt/Queries/CMakeLists.txt 2012-11-06 10:11:37 +0000
95+++ test/rbkt/Queries/CMakeLists.txt 2012-12-14 07:57:34 +0000
96@@ -230,7 +230,6 @@
97 ####
98 IF (FOUND_XQTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS)
99
100- #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Steps-leading-lone-slash-8a 3408285)
101 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 872732)
102
103 IF (NOT ZORBA_WITH_BIG_INTEGER)
104
105=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec'
106--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec 1970-01-01 00:00:00 +0000
107+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec 2012-12-14 07:57:34 +0000
108@@ -0,0 +1,1 @@
109+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
110
111=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq'
112--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq 1970-01-01 00:00:00 +0000
113+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq 2012-12-14 07:57:34 +0000
114@@ -0,0 +1,10 @@
115+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
116+
117+declare variable $source := document { (
118+ <!--comment-->,
119+ <Strings><orderData>one string</orderData></Strings>,
120+ <?processing instruction?>
121+ ) };
122+
123+let $document as document-node(schema-element(Strings)) := $source
124+return true()
125
126=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec'
127--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec 1970-01-01 00:00:00 +0000
128+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec 2012-12-14 07:57:34 +0000
129@@ -0,0 +1,1 @@
130+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
131
132=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq'
133--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq 1970-01-01 00:00:00 +0000
134+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq 2012-12-14 07:57:34 +0000
135@@ -0,0 +1,10 @@
136+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
137+
138+declare variable $source := document { (
139+ <!--comment-->,
140+ <Strings><orderData>one string</orderData></Strings>,
141+ <?processing instruction?>
142+ ) };
143+
144+let $document as document-node(schema-element(Strings2)) := $source
145+return true()
146
147=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq'
148--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq 1970-01-01 00:00:00 +0000
149+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq 2012-12-14 07:57:34 +0000
150@@ -0,0 +1,10 @@
151+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
152+
153+declare variable $source := document { (
154+ <!--comment-->,
155+ <Strings><orderData>one string</orderData></Strings>,
156+ <?processing instruction?>
157+ ) };
158+
159+let $document as document-node(schema-element(Strings)) := validate { $source }
160+return true()
161
162=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec'
163--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec 1970-01-01 00:00:00 +0000
164+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec 2012-12-14 07:57:34 +0000
165@@ -0,0 +1,1 @@
166+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
167
168=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq'
169--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq 1970-01-01 00:00:00 +0000
170+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq 2012-12-14 07:57:34 +0000
171@@ -0,0 +1,10 @@
172+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
173+
174+declare variable $source := document { (
175+ <!--comment-->,
176+ <Strings><orderData>one string</orderData></Strings>,
177+ <?processing instruction?>
178+ ) };
179+
180+let $document as document-node(schema-element(Strings2)) := validate { $source }
181+return true()
182
183=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq'
184--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq 1970-01-01 00:00:00 +0000
185+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq 2012-12-14 07:57:34 +0000
186@@ -0,0 +1,9 @@
187+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
188+
189+declare variable $source := document { (
190+ <!--comment-->,
191+ <Strings><orderData>one string</orderData></Strings>,
192+ <?processing instruction?>
193+ ) };
194+
195+$source instance of document-node(schema-element(Strings))
196
197=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq'
198--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq 1970-01-01 00:00:00 +0000
199+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq 2012-12-14 07:57:34 +0000
200@@ -0,0 +1,9 @@
201+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
202+
203+declare variable $source := document { (
204+ <!--comment-->,
205+ <Strings><orderData>one string</orderData></Strings>,
206+ <?processing instruction?>
207+ ) };
208+
209+$source instance of document-node(schema-element(Strings2))
210
211=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq'
212--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq 1970-01-01 00:00:00 +0000
213+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq 2012-12-14 07:57:34 +0000
214@@ -0,0 +1,9 @@
215+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
216+
217+declare variable $source := document { (
218+ <!--comment-->,
219+ <Strings><orderData>one string</orderData></Strings>,
220+ <?processing instruction?>
221+ ) };
222+
223+validate{$source} instance of document-node(schema-element(Strings))
224
225=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq'
226--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq 1970-01-01 00:00:00 +0000
227+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq 2012-12-14 07:57:34 +0000
228@@ -0,0 +1,9 @@
229+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
230+
231+declare variable $source := document { (
232+ <!--comment-->,
233+ <Strings><orderData>one string</orderData></Strings>,
234+ <?processing instruction?>
235+ ) };
236+
237+validate{$source} instance of document-node(schema-element(Strings2))
238
239=== added file 'test/rbkt/Queries/zorba/schemas/orderData.xsd'
240--- test/rbkt/Queries/zorba/schemas/orderData.xsd 1970-01-01 00:00:00 +0000
241+++ test/rbkt/Queries/zorba/schemas/orderData.xsd 2012-12-14 07:57:34 +0000
242@@ -0,0 +1,36 @@
243+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:order="http://www.w3.org/XQueryTestOrderBy" targetNamespace="http://www.w3.org/XQueryTestOrderBy" elementFormDefault="qualified">
244+ <xs:complexType name = "numbers">
245+ <xs:sequence>
246+ <xs:element name="orderData" type="xs:decimal" minOccurs="0" maxOccurs="unbounded"/>
247+ </xs:sequence>
248+ </xs:complexType>
249+ <xs:element name = "Strings">
250+ <xs:complexType>
251+ <xs:sequence>
252+ <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
253+ </xs:sequence>
254+ </xs:complexType>
255+ </xs:element>
256+ <xs:element name = "Strings2">
257+ <xs:complexType>
258+ <xs:sequence>
259+ <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
260+ </xs:sequence>
261+ </xs:complexType>
262+ </xs:element>
263+ <xs:element name = "NegativeNumbers" type = "order:numbers"/>
264+ <xs:element name = "PositiveNumbers" type = "order:numbers"/>
265+ <xs:element name = "SmallNegativeNumbers" type = "order:numbers"/>
266+ <xs:element name = "SmallPositiveNumbers" type = "order:numbers"/>
267+ <xs:element name = "DataValues">
268+ <xs:complexType>
269+ <xs:sequence>
270+ <xs:element ref="order:Strings"/>
271+ <xs:element ref="order:NegativeNumbers"/>
272+ <xs:element ref="order:PositiveNumbers"/>
273+ <xs:element ref="order:SmallNegativeNumbers"/>
274+ <xs:element ref="order:SmallPositiveNumbers"/>
275+ </xs:sequence>
276+ </xs:complexType>
277+ </xs:element>
278+</xs:schema>
279\ No newline at end of file

Subscribers

People subscribed via source and target branches