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

Proposed by Nicolae Brinza
Status: Superseded
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 Needs Information
Markos Zaharioudakis Pending
Review via email: mp+105315@code.launchpad.net

This proposal supersedes a proposal from 2011-12-20.

This proposal has been superseded by 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 :
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: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 :

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
lp:~nbrinza/zorba/bugs updated
10548. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

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

10550. By Nicolae Brinza

Merged with Zorba trunk

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
=== modified file 'ChangeLog'
--- ChangeLog 2012-06-19 17:58:10 +0000
+++ ChangeLog 2012-06-21 11:36:21 +0000
@@ -12,6 +12,7 @@
12 which is only a performance bug)12 which is only a performance bug)
1313
14Bug Fixes/Other Changes:14Bug Fixes/Other Changes:
15 * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
15 * Fixed bug #932314 (non-comparable values must be treated as distinct by16 * Fixed bug #932314 (non-comparable values must be treated as distinct by
16 fn:distinct-values)17 fn:distinct-values)
17 * Fixed bug #991088$ (raise XUST0001 in trycatch with mixed updating and simple clauses)18 * Fixed bug #991088$ (raise XUST0001 in trycatch with mixed updating and simple clauses)
1819
=== modified file 'src/types/typeimpl.cpp'
--- src/types/typeimpl.cpp 2012-06-15 21:31:03 +0000
+++ src/types/typeimpl.cpp 2012-06-21 11:36:21 +0000
@@ -781,8 +781,8 @@
781 bool is_element_test = (781 bool is_element_test = (
782 m_node_kind == store::StoreConsts::documentNode &&782 m_node_kind == store::StoreConsts::documentNode &&
783 theContentType != NULL &&783 theContentType != NULL &&
784 theContentType->type_kind() == XQType::NODE_TYPE_KIND &&784 theContentType->type_kind() == XQType::NODE_TYPE_KIND /* &&
785 dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false);785 dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false */);
786786
787 if (m_node_kind != store::StoreConsts::elementNode &&787 if (m_node_kind != store::StoreConsts::elementNode &&
788 m_node_kind != store::StoreConsts::attributeNode &&788 m_node_kind != store::StoreConsts::attributeNode &&
@@ -842,7 +842,7 @@
842 if (m_node_kind == store::StoreConsts::documentNode)842 if (m_node_kind == store::StoreConsts::documentNode)
843 {843 {
844 os << "document-node(";844 os << "document-node(";
845 845
846 if (theContentType != NULL &&846 if (theContentType != NULL &&
847 theContentType->type_kind() == XQType::NODE_TYPE_KIND)847 theContentType->type_kind() == XQType::NODE_TYPE_KIND)
848 {848 {
@@ -859,7 +859,7 @@
859 else859 else
860 {860 {
861 os << store::StoreConsts::toSchemaString(get_node_kind()) << "(";861 os << store::StoreConsts::toSchemaString(get_node_kind()) << "(";
862 862
863 if (m_node_name != NULL)863 if (m_node_name != NULL)
864 {864 {
865 os << m_node_name->getStringValue();865 os << m_node_name->getStringValue();
@@ -880,9 +880,9 @@
880 os << "?";880 os << "?";
881 }881 }
882 }882 }
883 883
884 os << ")";884 os << ")";
885 885
886 return os.str();886 return os.str();
887}887}
888888
889889
=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res'
--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-03.xml.res 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1true
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res'
--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-05.xml.res 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1false
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res'
--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-06.xml.res 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1false
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res'
--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-07.xml.res 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1true
0\ No newline at end of file2\ No newline at end of file
13
=== added file 'test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res'
--- test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/schemas/doc-node-schema-elem-test-08.xml.res 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1false
0\ No newline at end of file2\ No newline at end of file
13
=== modified file 'test/rbkt/Queries/CMakeLists.txt'
--- test/rbkt/Queries/CMakeLists.txt 2012-06-15 21:31:03 +0000
+++ test/rbkt/Queries/CMakeLists.txt 2012-06-21 11:36:21 +0000
@@ -241,7 +241,6 @@
241####241####
242IF (FOUND_XQTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS)242IF (FOUND_XQTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS)
243243
244 #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Steps-leading-lone-slash-8a 3408285)
245 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 872732)244 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 872732)
246 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Basics/EQNames/eqname-001 997045)245 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Basics/EQNames/eqname-001 997045)
247 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Basics/EQNames/eqname-002 997045)246 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Basics/EQNames/eqname-002 997045)
248247
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.spec 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1Error: http://www.w3.org/2005/xqt-errors:XPTY0004
02
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-01.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,10 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9let $document as document-node(schema-element(Strings)) := $source
10return true()
011
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.spec 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1Error: http://www.w3.org/2005/xqt-errors:XPTY0004
02
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-02.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,10 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9let $document as document-node(schema-element(Strings2)) := $source
10return true()
011
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-03.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,10 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9let $document as document-node(schema-element(Strings)) := validate { $source }
10return true()
011
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.spec 2012-06-21 11:36:21 +0000
@@ -0,0 +1,1 @@
1Error: http://www.w3.org/2005/xqt-errors:XPTY0004
02
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-04.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,10 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9let $document as document-node(schema-element(Strings2)) := validate { $source }
10return true()
011
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-05.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,9 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9$source instance of document-node(schema-element(Strings))
010
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-06.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,9 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9$source instance of document-node(schema-element(Strings2))
010
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-07.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,9 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9validate{$source} instance of document-node(schema-element(Strings))
010
=== added file 'test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq'
--- test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/doc-node-schema-elem-test-08.xq 2012-06-21 11:36:21 +0000
@@ -0,0 +1,9 @@
1import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
2
3declare variable $source := document { (
4 <!--comment-->,
5 <Strings><orderData>one string</orderData></Strings>,
6 <?processing instruction?>
7 ) };
8
9validate{$source} instance of document-node(schema-element(Strings2))
010
=== added file 'test/rbkt/Queries/zorba/schemas/orderData.xsd'
--- test/rbkt/Queries/zorba/schemas/orderData.xsd 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/orderData.xsd 2012-06-21 11:36:21 +0000
@@ -0,0 +1,36 @@
1<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">
2 <xs:complexType name = "numbers">
3 <xs:sequence>
4 <xs:element name="orderData" type="xs:decimal" minOccurs="0" maxOccurs="unbounded"/>
5 </xs:sequence>
6 </xs:complexType>
7 <xs:element name = "Strings">
8 <xs:complexType>
9 <xs:sequence>
10 <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
11 </xs:sequence>
12 </xs:complexType>
13 </xs:element>
14 <xs:element name = "Strings2">
15 <xs:complexType>
16 <xs:sequence>
17 <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
18 </xs:sequence>
19 </xs:complexType>
20 </xs:element>
21 <xs:element name = "NegativeNumbers" type = "order:numbers"/>
22 <xs:element name = "PositiveNumbers" type = "order:numbers"/>
23 <xs:element name = "SmallNegativeNumbers" type = "order:numbers"/>
24 <xs:element name = "SmallPositiveNumbers" type = "order:numbers"/>
25 <xs:element name = "DataValues">
26 <xs:complexType>
27 <xs:sequence>
28 <xs:element ref="order:Strings"/>
29 <xs:element ref="order:NegativeNumbers"/>
30 <xs:element ref="order:PositiveNumbers"/>
31 <xs:element ref="order:SmallNegativeNumbers"/>
32 <xs:element ref="order:SmallPositiveNumbers"/>
33 </xs:sequence>
34 </xs:complexType>
35 </xs:element>
36</xs:schema>
0\ No newline at end of file37\ No newline at end of file

Subscribers

People subscribed via source and target branches