GNOME Bugzilla – Bug 310264
contrived UPA problem causes validation document to be rejected
Last modified: 2009-08-15 18:40:50 UTC
I wanted to test my understanding of UPA with the following (contrived) schema. This is a contrived example and does not impact any real-world work. The schema is accepted, but using the schema with the document causes the following error message: ./testSchemas upa-6.xsd upa-6.xml upa-6.xml:25: element a: Schemas validity error : Element '{http://myns}a': This element is not expected. upa-6.xml fails to validate libmlm2 2.6.20 ----------------------------------------------- <xs:schema xmlns:tns="http://myns" targetNamespace="http://myns" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:element name="a" /> <xs:complexType name="c" > <xs:sequence minOccurs="2" maxOccurs="4"> <xs:sequence minOccurs="19" maxOccurs="20"> <xs:element ref="tns:a" /> </xs:sequence> </xs:sequence> </xs:complexType> <xs:element name="c" type="tns:c" /> </xs:schema> ----------------------------------------------- The following contrived document with 2*19=38 <a/> fails validation even though it passes xerces-j 2.7.0. It also causes problems for the current version of xsv (XSV 2.10-1 of 2005/04/22 13:10:49). ------------------------------------------------- <c xmlns="http://myns" > <a/> <!-- 1 --> <a/> <!-- 2 --> <a/> <!-- 3 --> <a/> <!-- 4 --> <a/> <!-- 5 --> <a/> <!-- 6 --> <a/> <!-- 7 --> <a/> <!-- 8 --> <a/> <!-- 9 --> <a/> <!-- 10 --> <a/> <!-- 1 --> <a/> <!-- 2 --> <a/> <!-- 3 --> <a/> <!-- 4 --> <a/> <!-- 5 --> <a/> <!-- 6 --> <a/> <!-- 7 --> <a/> <!-- 8 --> <a/> <!-- 9 --> <a/> <!-- 20 --> <a/> <!-- 1 --> <a/> <!-- 2 --> <a/> <!-- 3 --> <a/> <!-- 4 --> <a/> <!-- 5 --> <a/> <!-- 6 --> <a/> <!-- 7 --> <a/> <!-- 8 --> <a/> <!-- 9 --> <a/> <!-- 30 --> <a/> <!-- 1 --> <a/> <!-- 2 --> <a/> <!-- 3 --> <a/> <!-- 4 --> <a/> <!-- 5 --> <a/> <!-- 6 --> <a/> <!-- 7 --> <a/> <!-- 8 --> </c>
Fixed in CVS, I also added the test to the regression suite, paphio:~/XML/test/schemas -> ../../xmllint --noout --schema bug310264_0.xsd bug310264_0.xml bug310264_0.xml validates thanks a lot for your report, Daniel
This should be closed by release of libxml2-2.6.21, thanks, Daniel