After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310264 - contrived UPA problem causes validation document to be rejected
contrived UPA problem causes validation document to be rejected
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.20
Other Linux
: Normal minor
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-13 19:06 UTC by Tom Moog
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tom Moog 2005-07-13 19:06:12 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>
Comment 1 Daniel Veillard 2005-08-08 13:06:53 UTC
  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
Comment 2 Daniel Veillard 2005-09-05 09:02:03 UTC
This should be closed by release of libxml2-2.6.21,

  thanks,

Daniel