zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #03379
[Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
Federico Cavalieri has proposed merging lp:~fcavalieri/zorba/bugs2 into lp:zorba.
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749
Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
--
https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2012-01-05 13:20:30 +0000
+++ ChangeLog 2012-01-06 13:32:24 +0000
@@ -19,6 +19,7 @@
* Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
support.
* zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
+ * fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
version 2.1
=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp 2011-11-02 17:19:09 +0000
+++ src/store/naive/pul_primitives.cpp 2012-01-06 13:32:24 +0000
@@ -820,7 +820,7 @@
}
else
{
- theTarget = theTarget->copy(NULL, copymode);
+ theTarget = theTarget->copy(NULL, copymode);
}
store->addNode(targetUri, theTarget);
=== modified file 'src/types/schema/SchemaValidatorFilter.cpp'
--- src/types/schema/SchemaValidatorFilter.cpp 2011-06-14 17:26:33 +0000
+++ src/types/schema/SchemaValidatorFilter.cpp 2012-01-06 13:32:24 +0000
@@ -1543,13 +1543,19 @@
if(!theStrictValidation &&
errDomain == XMLUni::fgValidityDomain &&
errType != XMLErrorReporter::ErrType_Fatal &&
- !( errCode == XMLValid::ElementNotValidForContent ||
+ !( errCode == XMLValid::AttNotDefined ||
+ errCode == XMLValid::AttNotDefinedForElement ||
+ errCode == XMLValid::SimpleTypeHasChild ||
+ errCode == XMLValid::ElementNotValidForContent ||
errCode == XMLValid::NotEnoughElemsForCM ||
errCode == XMLValid::EmptyNotValidForContent ||
errCode == XMLValid::AttNotDefinedForElement ||
errCode == XMLValid::RequiredAttrNotProvided ||
errCode == XMLValid::AttributeNotQualified ||
- errCode == XMLValid::ElementNotQualified) )
+ errCode == XMLValid::ElementNotQualified) &&
+ !(theParentStack &&
+ errCode == XMLValid::ElementNotDefined)
+ )
return;
theErrorOccurred = true;
=== added file 'test/rbkt/Queries/zorba/schemas/extracontent.xsd'
--- test/rbkt/Queries/zorba/schemas/extracontent.xsd 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/extracontent.xsd 2012-01-06 13:32:24 +0000
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.zorba-xquery.org/schema" xmlns="http://www.zorba-xquery.org/schema"
+ elementFormDefault="qualified">
+
+ <xs:element name="root" type="xs:anySimpleType"/>
+
+
+</xs:schema>
=== added file 'test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec'
--- test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec 2012-01-06 13:32:24 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0027
=== added file 'test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq'
--- test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq 2012-01-06 13:32:24 +0000
@@ -0,0 +1,9 @@
+import schema namespace d="http://www.zorba-xquery.org/schema" at "extracontent.xsd";
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";
+
+declare revalidation lax;
+
+declare variable $x:=validate lax {<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.zorba-xquery.org/schema" aa="aa">
+</root>};
+$x/@*
=== added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec'
--- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec 2012-01-06 13:32:24 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0027
=== added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq'
--- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq 2012-01-06 13:32:24 +0000
@@ -0,0 +1,10 @@
+import schema namespace d="http://www.zorba-xquery.org/schema" at "extracontent.xsd";
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";
+
+declare revalidation lax;
+
+declare variable $x:=validate lax {<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.zorba-xquery.org/schema">
+<a/>aa
+</root>};
+$x/text()
=== added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.spec'
--- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.spec 2012-01-06 13:32:24 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0027
=== added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.xq'
--- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.xq 2012-01-06 13:32:24 +0000
@@ -0,0 +1,10 @@
+import schema namespace d="http://www.zorba-xquery.org/schema" at "extracontent.xsd";
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";
+
+declare revalidation lax;
+
+declare variable $x:=validate lax {<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.zorba-xquery.org/schema">
+<a/>
+</root>};
+$x/text()
=== added file 'test/rbkt/Queries/zorba/schemas/val-inplace-err3.spec'
--- test/rbkt/Queries/zorba/schemas/val-inplace-err3.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-inplace-err3.spec 2012-01-06 13:32:24 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0027
=== added file 'test/rbkt/Queries/zorba/schemas/val-inplace-err3.xq'
--- test/rbkt/Queries/zorba/schemas/val-inplace-err3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-inplace-err3.xq 2012-01-06 13:32:24 +0000
@@ -0,0 +1,11 @@
+import schema namespace d="http://www.zorba-xquery.org/schema" at "extracontent.xsd";
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";
+
+declare revalidation lax;
+
+declare variable $doc:=<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.zorba-xquery.org/schema">
+<a/>
+</root>;
+
+schema:validate-in-place($doc);
\ No newline at end of file
=== added file 'test/rbkt/Queries/zorba/schemas/val-inplace-err4.spec'
--- test/rbkt/Queries/zorba/schemas/val-inplace-err4.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-inplace-err4.spec 2012-01-06 13:32:24 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:XQDY0027
=== added file 'test/rbkt/Queries/zorba/schemas/val-inplace-err4.xq'
--- test/rbkt/Queries/zorba/schemas/val-inplace-err4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/schemas/val-inplace-err4.xq 2012-01-06 13:32:24 +0000
@@ -0,0 +1,11 @@
+import schema namespace d="http://www.zorba-xquery.org/schema" at "extracontent.xsd";
+import module namespace schema = "http://www.zorba-xquery.com/modules/schema";
+
+declare revalidation lax;
+
+declare variable $doc:=<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.zorba-xquery.org/schema" xx="xx">
+
+</root>;
+
+schema:validate-in-place($doc);
\ No newline at end of file
Follow ups
-
[Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Cezar Andrei, 2012-03-28
-
Re: [Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Cezar Andrei, 2012-03-28
-
Re: [Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Federico Cavalieri, 2012-01-24
-
Re: [Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Cezar Andrei, 2012-01-20
-
Re: [Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Markos Zaharioudakis, 2012-01-20
-
Re: [Merge] lp:~zorba-coders/zorba/bugs-912586-912593-912722 into lp:zorba
From: Markos Zaharioudakis, 2012-01-20
-
[Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
From: Zorba Build Bot, 2012-01-06
-
Re: [Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
From: Zorba Build Bot, 2012-01-06
-
[Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
From: Zorba Build Bot, 2012-01-06
-
[Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
From: Zorba Build Bot, 2012-01-06
-
[Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
From: Federico Cavalieri, 2012-01-06