zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #16324
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs into lp:zorba.
Commit message:
Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing.
Requested reviews:
Markos Zaharioudakis (markos-za)
Matthias Brantner (matthias-brantner)
Related bugs:
Bug #867256 in Zorba: ""instance of document-node(element(x))" in predicate"
https://bugs.launchpad.net/zorba/+bug/867256
For more details, see:
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/139848
Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing.
--
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/139848
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2012-12-12 08:11:40 +0000
+++ ChangeLog 2012-12-14 07:57:34 +0000
@@ -20,6 +20,7 @@
* No need to cast xs:untypedAtomic to xs:string in order-by expression.
Bug Fixes/Other Changes:
+ * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
* Change XQXQ (XQuery-for-XQuery) module now part of Zorba core
* Fixed mustCopyInputNodes() method of no-copy, and jsoniq functions.
* Fixed bug #868640 (Node lifetime is shorter than expected due to let
=== modified file 'src/types/typeimpl.cpp'
--- src/types/typeimpl.cpp 2012-12-12 07:36:20 +0000
+++ src/types/typeimpl.cpp 2012-12-14 07:57:34 +0000
@@ -794,8 +794,8 @@
bool is_element_test = (
m_node_kind == store::StoreConsts::documentNode &&
theContentType != NULL &&
- theContentType->type_kind() == XQType::NODE_TYPE_KIND &&
- dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false);
+ theContentType->type_kind() == XQType::NODE_TYPE_KIND /* &&
+ dynamic_cast<const NodeXQType*>(theContentType.getp())->m_schema_test == false */);
if (m_node_kind != store::StoreConsts::elementNode &&
m_node_kind != store::StoreConsts::attributeNode &&
@@ -855,7 +855,7 @@
if (m_node_kind == store::StoreConsts::documentNode)
{
os << "document-node(";
-
+
if (theContentType != NULL &&
theContentType->type_kind() == XQType::NODE_TYPE_KIND)
{
@@ -872,7 +872,7 @@
else
{
os << store::StoreConsts::toSchemaString(get_node_kind()) << "(";
-
+
if (m_node_name != NULL)
{
os << m_node_name->getStringValue();
@@ -893,9 +893,9 @@
os << "?";
}
}
-
+
os << ")";
-
+
return os.str();
}
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+true
\ No newline at end of file
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+false
\ No newline at end of file
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+false
\ No newline at end of file
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+true
\ No newline at end of file
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+false
\ No newline at end of file
=== modified file 'test/rbkt/Queries/CMakeLists.txt'
--- test/rbkt/Queries/CMakeLists.txt 2012-11-06 10:11:37 +0000
+++ test/rbkt/Queries/CMakeLists.txt 2012-12-14 07:57:34 +0000
@@ -230,7 +230,6 @@
####
IF (FOUND_XQTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS)
- #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Steps-leading-lone-slash-8a 3408285)
EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 872732)
IF (NOT ZORBA_WITH_BIG_INTEGER)
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,10 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+let $document as document-node(schema-element(Strings)) := $source
+return true()
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,10 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+let $document as document-node(schema-element(Strings2)) := $source
+return true()
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,10 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+let $document as document-node(schema-element(Strings)) := validate { $source }
+return true()
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XPTY0004
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,10 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+let $document as document-node(schema-element(Strings2)) := validate { $source }
+return true()
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,9 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+$source instance of document-node(schema-element(Strings))
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,9 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+$source instance of document-node(schema-element(Strings2))
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,9 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+validate{$source} instance of document-node(schema-element(Strings))
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,9 @@
+import schema default element namespace "http://www.w3.org/XQueryTestOrderBy" at "orderData.xsd";
+
+declare variable $source := document { (
+ <!--comment-->,
+ <Strings><orderData>one string</orderData></Strings>,
+ <?processing instruction?>
+ ) };
+
+validate{$source} instance of document-node(schema-element(Strings2))
=== 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-12-14 07:57:34 +0000
@@ -0,0 +1,36 @@
+<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">
+ <xs:complexType name = "numbers">
+ <xs:sequence>
+ <xs:element name="orderData" type="xs:decimal" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name = "Strings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "Strings2">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="orderData" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "NegativeNumbers" type = "order:numbers"/>
+ <xs:element name = "PositiveNumbers" type = "order:numbers"/>
+ <xs:element name = "SmallNegativeNumbers" type = "order:numbers"/>
+ <xs:element name = "SmallPositiveNumbers" type = "order:numbers"/>
+ <xs:element name = "DataValues">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="order:Strings"/>
+ <xs:element ref="order:NegativeNumbers"/>
+ <xs:element ref="order:PositiveNumbers"/>
+ <xs:element ref="order:SmallNegativeNumbers"/>
+ <xs:element ref="order:SmallPositiveNumbers"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
\ No newline at end of file
Follow ups
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Chris Hillery, 2013-09-19
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Chris Hillery, 2013-09-19
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Nicolae Brinza, 2013-01-30
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Chris Hillery, 2013-01-30
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Nicolae Brinza, 2013-01-30
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Chris Hillery, 2013-01-30
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2013-01-30
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2013-01-30
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Chris Hillery, 2013-01-30
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-19
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-19
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-19
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Nicolae Brinza, 2012-12-19
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-14
-
Re: [Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-14
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Zorba Build Bot, 2012-12-14
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Nicolae Brinza, 2012-12-14
-
[Merge] lp:~nbrinza/zorba/bugs into lp:zorba
From: Nicolae Brinza, 2012-12-14