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 427620 - Namespace lost during schema validation
Namespace lost during schema validation
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: xmlschema
2.6.27
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-08 17:06 UTC by Mike Hommey
Modified: 2021-07-05 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Hommey 2007-04-08 17:06:23 UTC
(this bug has been reported to the Debian BTS a while ago ; here is a copy/paste)

The following example reprocuces the problem 
test.xsd-------------------------------------------------------------------------
<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://heute-morgen.de/namespaces/sqil"
  xmlns:sqil="http://heute-morgen.de/namespaces/sqil"
>

  <!-- Types -->
  <!-- Most sqil elements have a name -->
  <xs:complexType name="namedEmptyElement">
    <xs:attribute name="name" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="conditional">
    <xs:complexContent mixed="true">
      <xs:extension base="sqil:namedEmptyElement">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="bind" type="sqil:namedEmptyElement"/>
        </xs:choice>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- We need the root element -->
  <xs:element name="sqil"/>

  <xs:element name="bind" type="sqil:namedEmptyElement"/>

  <xs:element name="if-exists" type="sqil:conditional"/>

</xs:schema>
bug.sqil-------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<sqil:sqil xmlns:sqil="http://heute-morgen.de/namespaces/sqil">

      WHERE 1=1
      <sqil:if-exists name="agent">
        AND al.agent=<sqil:bind  name="agent"/>
      </sqil:if-exists>

</sqil:sqil>
TEST-------------------------------------------------------------------------
jo@asus:$ xmllint --noout --schema test.xsd bug.sqil
bug.sqil:6: element bind: Schemas validity error : Element
'{http://heute-morgen.de/namespaces/sqil}bind': This element is not
expected. Expected is ( bind ).
bug.sqil fails to validate
-------------------------------------------------------------------------

As far as I understand it, a bind tag in the sqil namespace should be
expected and no error should be generated.
Comment 1 GNOME Infrastructure Team 2021-07-05 13:23:55 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.