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 526191 - libxml2 behaves differently on actual <attribute> vs attribute inserted using <ref>
libxml2 behaves differently on actual <attribute> vs attribute inserted using...
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: relaxng
2.6.31
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-04 16:52 UTC by jatayu74
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jatayu74 2008-04-04 16:52:11 UTC
I used <ref> to reference a predefined attribute in my Relax NG schema,
but I received this error from libxml2:

     "Invalid attribute Title for element Book"

To Reproduce:
See below schema and xml snippets (notice the <ref name="TitleAttribute"/>
under "Book" element.

I did not get the same error if I directly specify the <attribute>
under "Book", i.e: without using <ref>.

=========== test.rng ====================
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
 
  <start>
    <element name="Book">
      <ref name="TitleAttribute"/>  <!-- NOTE: using ref here caused error. -->
      <interleave>
        <zeroOrMore>
          <element name="Author">
            <text/>
          </element>
        </zeroOrMore>
      </interleave>
    </element>
  </start>

  <define name="TitleAttribute">
    <attribute name="Title">
      <data type="token"/>
    </attribute>
  </define>

</grammar>
===============================================

=============== test.xml =========================

<Book Title="History101">
  <Author>Joe Joe</Author>
  <Author>Jill Jill</Author>
</Book>

================================================
Comment 1 GNOME Infrastructure Team 2021-07-05 13:25:53 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.