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 693647 - Cannot validate xinclude spec
Cannot validate xinclude spec
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: xmlschema
git master
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-12 10:26 UTC by Martin Häcker
Modified: 2021-07-05 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Häcker 2013-02-12 10:26:13 UTC
Hi there,

we recently tripped validating qti documents with xmlint because it seems unable to validate the xinclude schema.

Here's the reduction I've come up with:

% wget http://www.w3.org/2001/XInclude.xsd
% xmllint --schema XInclude.xsd XInclude.xsd                                                           
XInclude.xsd:15: element complexType: Schemas parser error : complex type 'includeType': The content model is not determinist.
XInclude.xsd:40: element complexType: Schemas parser error : complex type 'fallbackType': The content model is not determinist.
WXS schema XInclude.xsd failed to compile
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2001/XInclude" targetNamespace="http://www.w3.org/2001/XInclude" finalDefault="extension">
  <xs:annotation>
   <xs:documentation>
    Not normative, but may be useful.
    See the REC http://www.w3.org/TR/XInclude for definitive
    information about this namespace.
   </xs:documentation>
  </xs:annotation>

  <xs:element name="include" type="xi:includeType"/>

  <xs:complexType name="includeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="xi:fallback"/>
      <xs:any namespace="##other" processContents="lax"/>
      <xs:any namespace="##local" processContents="lax"/>
    </xs:choice>
    <xs:attribute name="href" use="optional" type="xs:anyURI"/>
    <xs:attribute name="parse" use="optional" default="xml" type="xi:parseType"/>
    <xs:attribute name="xpointer" use="optional" type="xs:string"/>
    <xs:attribute name="encoding" use="optional" type="xs:string"/>
    <xs:attribute name="accept" use="optional" type="xs:string"/>
    <xs:attribute name="accept-language" use="optional" type="xs:string"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

  <xs:simpleType name="parseType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="xml"/>
      <xs:enumeration value="text"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:element name="fallback" type="xi:fallbackType"/>

  <xs:complexType name="fallbackType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="xi:include"/>
      <xs:any namespace="##other" processContents="lax"/>
      <xs:any namespace="##local" processContents="lax"/>
    </xs:choice>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

</xs:schema>

% xmllint --version
xmllint: using libxml version 20708
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib 

This seems like an error in libxml2 that makes it unable to parse that schema. Is that right? If not, how can I validate files with the qti schema that includes the xinclude schema? The schema that tripped us up is this <http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd>

Do you need any more information?
Comment 1 GNOME Infrastructure Team 2021-07-05 13:21:26 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.