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 744146 - relaxng: datatypeLibrary attributes on div elements are ignored
relaxng: datatypeLibrary attributes on div elements are ignored
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: relaxng
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-07 19:57 UTC by Hal Blackburn
Modified: 2021-07-05 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hal Blackburn 2015-02-07 19:57:12 UTC
datatypeLibrary attributes on ancestor div elements are not picked up by data elements when resolving their datatype library.

Attached below is a schema and (valid) xml file which reproduce the problem. As of 2.9.2 the schema fails to compile, though it is valid and should match the xml file:

    $ xmllint --relaxng /tmp/datatypeLibrary-div-bug.rng /tmp/datatypeLibrary-div-bug.xml
    /tmp/datatypeLibrary-div-bug.rng:10: element data: Relax-NG parser error : Error type 'anyURI' is not exported by type library 'http://relaxng.org/ns/structure/1.0'
    Relax-NG schema /tmp/datatypeLibrary-div-bug.rng failed to compile
    <?xml version="1.0"?>
    <abc bar="/a/url"/>

I wonder if div elements are being stripped (per section 4.11 of the spec) before the datatypeLibrary attributes get inherited and stripped (per section 4.3).


datatypeLibrary-div-bug.rng:
    <?xml version="1.0"?>
    <grammar xmlns="http://relaxng.org/ns/structure/1.0">

        <!-- The datatypeLibrary attribute here doesn't get picked up by the inner 
                 data element. -->
        <div datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
            <define name="foo">
                <element name="abc">
                    <attribute name="bar">
                        <data type="anyURI"/>
                    </attribute>
                </element>
            </define>
        </div>

        <start>
            <ref name="foo"/>
        </start>
    </grammar>


datatypeLibrary-div-bug.xml:
    <abc bar="/a/url"/>
Comment 1 GNOME Infrastructure Team 2021-07-05 13:22:32 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.