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 573483 - xmllint complains that content model is not deterministic when using ‘choice’ with ‘any’ and ‘namespace’s ‘##other’ *and* ‘##local’ in XML Schema document
xmllint complains that content model is not deterministic when using ‘choice’...
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: xmlschema
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-27 22:30 UTC by Nico R.
Modified: 2019-09-16 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nico R. 2009-02-27 22:30:28 UTC
Using xmllint from libxml2-2.7.3 as follows results in an error.

-----BEGIN test.xml-----
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://example.org/xmllint-xsd-test-n-roeser-1a#"
    xmlns:testing="http://example.org/xmllint-xsd-test-n-roeser-1b#">
  <hello/>
  <testing:world/>
</test>
-----END test.xml-----

-----BEGIN test-schema.xml-----
<?xml version="1.0" encoding="UTF-8"?>
<s:schema xmlns:s="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://example.org/xmllint-xsd-test-n-roeser-1a#"
    xmlns="http://example.org/xmllint-xsd-test-n-roeser-1a#"
    elementFormDefault="qualified">
  <s:element name="test">
    <s:complexType>
      <s:choice minOccurs="1" maxOccurs="3">
        <s:any namespace="##local"/>
        <s:any namespace="##other"/>
      </s:choice>
    </s:complexType>
  </s:element>
</s:schema>
-----END test.xsd-----

$ xmllint --nonet --noout --schema test-schema.xml test.xml
test-schema.xml:7: element complexType: Schemas parser error : local complex type: The content model is not determinist.
WXS schema test-schema.xml failed to compile


This looks very much like the problem described in <URL:http://xsd.stylusstudio.com/2006May/post04004.htm> to me.




By the way: options for version 2.7.2 and 2.7.3 are missing in GNOME Bugzilla for product libxml2. Please add them.

Thanks.
Comment 1 breuerss 2011-02-03 13:29:18 UTC
I observed the same problem in the schema description of CML that uses the same constructs. Discussions with the developers of CML, lxml and the saxon parser tracked the problem down to the above mentioned namespace problems in the libxml2.
A fix would be great as this bug renders the usage of python for the validation of the CML xsd impossible.