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 565219 - Unimplemented block at relaxng.c:3790
Unimplemented block at relaxng.c:3790
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: relaxng
2.6.x
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-21 01:29 UTC by Daniel O
Modified: 2017-06-12 19:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Daniel O 2008-12-21 01:29:06 UTC
Please describe the problem:
Validating
http://feedparser.googlecode.com/svn/trunk/feedparser/tests/wellformed/base/relative_xml_base_2.xml

with
http://atompub.org/2005/08/17/atom.rnc (converted by trang, see other information section); produces 

"Unimplemented block at relaxng.c:3790"

libxml 2.6.32

Steps to reproduce:



Actual results:
Unimplemented block at relaxng.c:3790

Expected results:
Validation occurs correctly

Does this happen every time?
Yes

Other information:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  -*- rnc -*-
  RELAX NG Compact Syntax Grammar for the
  Atom Format Specification Version 11
-->
<grammar ns="http://www.w3.org/1999/xhtml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://www.ascc.net/xml/schematron" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <choice>
      <ref name="atomFeed"/>
      <ref name="atomEntry"/>
    </choice>
  </start>
  <!-- Common attributes -->
  <define name="atomCommonAttributes">
    <optional>
      <attribute name="xml:base">
        <ref name="atomUri"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="xml:lang">
        <ref name="atomLanguageTag"/>
      </attribute>
    </optional>
    <zeroOrMore>
      <ref name="undefinedAttribute"/>
    </zeroOrMore>
  </define>
  <!-- Text Constructs -->
  <define name="atomPlainTextConstruct">
    <ref name="atomCommonAttributes"/>
    <optional>
      <attribute name="type">
        <choice>
          <value>text</value>
          <value>html</value>
        </choice>
      </attribute>
    </optional>
    <text/>
  </define>
  <define name="atomXHTMLTextConstruct">
    <ref name="atomCommonAttributes"/>
    <attribute name="type">
      <value>xhtml</value>
    </attribute>
    <ref name="xhtmlDiv"/>
  </define>
  <define name="atomTextConstruct">
    <choice>
      <ref name="atomPlainTextConstruct"/>
      <ref name="atomXHTMLTextConstruct"/>
    </choice>
  </define>
  <!-- Person Construct -->
  <define name="atomPersonConstruct">
    <ref name="atomCommonAttributes"/>
    <interleave>
      <element name="atom:name">
        <text/>
      </element>
      <optional>
        <element name="atom:uri">
          <ref name="atomUri"/>
        </element>
      </optional>
      <optional>
        <element name="atom:email">
          <ref name="atomEmailAddress"/>
        </element>
      </optional>
      <zeroOrMore>
        <ref name="extensionElement"/>
      </zeroOrMore>
    </interleave>
  </define>
  <!-- Date Construct -->
  <define name="atomDateConstruct">
    <ref name="atomCommonAttributes"/>
    <data type="dateTime"/>
  </define>
  <!-- atom:feed -->
  <define name="atomFeed">
    <element name="atom:feed">
      <s:rule context="atom:feed">
        <s:assert test="atom:author or not(atom:entry[not(atom:author)])">An atom:feed must have an atom:author unless all of its atom:entry children have an atom:author.</s:assert>
      </s:rule>
      <ref name="atomCommonAttributes"/>
      <interleave>
        <zeroOrMore>
          <ref name="atomAuthor"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="atomCategory"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="atomContributor"/>
        </zeroOrMore>
        <optional>
          <ref name="atomGenerator"/>
        </optional>
        <optional>
          <ref name="atomIcon"/>
        </optional>
        <ref name="atomId"/>
        <zeroOrMore>
          <ref name="atomLink"/>
        </zeroOrMore>
        <optional>
          <ref name="atomLogo"/>
        </optional>
        <optional>
          <ref name="atomRights"/>
        </optional>
        <optional>
          <ref name="atomSubtitle"/>
        </optional>
        <ref name="atomTitle"/>
        <ref name="atomUpdated"/>
        <zeroOrMore>
          <ref name="extensionElement"/>
        </zeroOrMore>
      </interleave>
      <zeroOrMore>
        <ref name="atomEntry"/>
      </zeroOrMore>
    </element>
  </define>
  <!-- atom:entry -->
  <define name="atomEntry">
    <element name="atom:entry">
      <s:rule context="atom:entry">
        <s:assert test="atom:link[@rel='alternate'] or atom:link[not(@rel)] or atom:content">An atom:entry must have at least one atom:link element with a rel attribute of 'alternate' or an atom:content.</s:assert>
      </s:rule>
      <s:rule context="atom:entry">
        <s:assert test="atom:author or ../atom:author or atom:source/atom:author">An atom:entry must have an atom:author if its feed does not.</s:assert>
      </s:rule>
      <ref name="atomCommonAttributes"/>
      <interleave>
        <zeroOrMore>
          <ref name="atomAuthor"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="atomCategory"/>
        </zeroOrMore>
        <optional>
          <ref name="atomContent"/>
        </optional>
        <zeroOrMore>
          <ref name="atomContributor"/>
        </zeroOrMore>
        <ref name="atomId"/>
        <zeroOrMore>
          <ref name="atomLink"/>
        </zeroOrMore>
        <optional>
          <ref name="atomPublished"/>
        </optional>
        <optional>
          <ref name="atomRights"/>
        </optional>
        <optional>
          <ref name="atomSource"/>
        </optional>
        <optional>
          <ref name="atomSummary"/>
        </optional>
        <ref name="atomTitle"/>
        <ref name="atomUpdated"/>
        <zeroOrMore>
          <ref name="extensionElement"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>
  <!-- atom:content -->
  <define name="atomInlineTextContent">
    <element name="atom:content">
      <ref name="atomCommonAttributes"/>
      <optional>
        <attribute name="type">
          <choice>
            <value>text</value>
            <value>html</value>
          </choice>
        </attribute>
      </optional>
      <zeroOrMore>
        <text/>
      </zeroOrMore>
    </element>
  </define>
  <define name="atomInlineXHTMLContent">
    <element name="atom:content">
      <ref name="atomCommonAttributes"/>
      <attribute name="type">
        <value>xhtml</value>
      </attribute>
      <ref name="xhtmlDiv"/>
    </element>
  </define>
  <define name="atomInlineOtherContent">
    <element name="atom:content">
      <ref name="atomCommonAttributes"/>
      <optional>
        <attribute name="type">
          <ref name="atomMediaType"/>
        </attribute>
      </optional>
      <zeroOrMore>
        <choice>
          <text/>
          <ref name="anyElement"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <define name="atomOutOfLineContent">
    <element name="atom:content">
      <ref name="atomCommonAttributes"/>
      <optional>
        <attribute name="type">
          <ref name="atomMediaType"/>
        </attribute>
      </optional>
      <attribute name="src">
        <ref name="atomUri"/>
      </attribute>
      <empty/>
    </element>
  </define>
  <define name="atomContent">
    <choice>
      <ref name="atomInlineTextContent"/>
      <ref name="atomInlineXHTMLContent"/>
      <ref name="atomInlineOtherContent"/>
      <ref name="atomOutOfLineContent"/>
    </choice>
  </define>
  <!-- atom:author -->
  <define name="atomAuthor">
    <element name="atom:author">
      <ref name="atomPersonConstruct"/>
    </element>
  </define>
  <!-- atom:category -->
  <define name="atomCategory">
    <element name="atom:category">
      <ref name="atomCommonAttributes"/>
      <attribute name="term"/>
      <optional>
        <attribute name="scheme">
          <ref name="atomUri"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="label"/>
      </optional>
      <ref name="undefinedContent"/>
    </element>
  </define>
  <!-- atom:contributor -->
  <define name="atomContributor">
    <element name="atom:contributor">
      <ref name="atomPersonConstruct"/>
    </element>
  </define>
  <!-- atom:generator -->
  <define name="atomGenerator">
    <element name="atom:generator">
      <ref name="atomCommonAttributes"/>
      <optional>
        <attribute name="uri">
          <ref name="atomUri"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="version"/>
      </optional>
      <text/>
    </element>
  </define>
  <!-- atom:icon -->
  <define name="atomIcon">
    <element name="atom:icon">
      <ref name="atomCommonAttributes"/>
      <ref name="atomUri"/>
    </element>
  </define>
  <!-- atom:id -->
  <define name="atomId">
    <element name="atom:id">
      <ref name="atomCommonAttributes"/>
      <ref name="atomUri"/>
    </element>
  </define>
  <!-- atom:logo -->
  <define name="atomLogo">
    <element name="atom:logo">
      <ref name="atomCommonAttributes"/>
      <ref name="atomUri"/>
    </element>
  </define>
  <!-- atom:link -->
  <define name="atomLink">
    <element name="atom:link">
      <ref name="atomCommonAttributes"/>
      <attribute name="href">
        <ref name="atomUri"/>
      </attribute>
      <optional>
        <attribute name="rel">
          <choice>
            <ref name="atomNCName"/>
            <ref name="atomUri"/>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="type">
          <ref name="atomMediaType"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="hreflang">
          <ref name="atomLanguageTag"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="title"/>
      </optional>
      <optional>
        <attribute name="length"/>
      </optional>
      <ref name="undefinedContent"/>
    </element>
  </define>
  <!-- atom:published -->
  <define name="atomPublished">
    <element name="atom:published">
      <ref name="atomDateConstruct"/>
    </element>
  </define>
  <!-- atom:rights -->
  <define name="atomRights">
    <element name="atom:rights">
      <ref name="atomTextConstruct"/>
    </element>
  </define>
  <!-- atom:source -->
  <define name="atomSource">
    <element name="atom:source">
      <ref name="atomCommonAttributes"/>
      <interleave>
        <zeroOrMore>
          <ref name="atomAuthor"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="atomCategory"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="atomContributor"/>
        </zeroOrMore>
        <optional>
          <ref name="atomGenerator"/>
        </optional>
        <optional>
          <ref name="atomIcon"/>
        </optional>
        <optional>
          <ref name="atomId"/>
        </optional>
        <zeroOrMore>
          <ref name="atomLink"/>
        </zeroOrMore>
        <optional>
          <ref name="atomLogo"/>
        </optional>
        <optional>
          <ref name="atomRights"/>
        </optional>
        <optional>
          <ref name="atomSubtitle"/>
        </optional>
        <optional>
          <ref name="atomTitle"/>
        </optional>
        <optional>
          <ref name="atomUpdated"/>
        </optional>
        <zeroOrMore>
          <ref name="extensionElement"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>
  <!-- atom:subtitle -->
  <define name="atomSubtitle">
    <element name="atom:subtitle">
      <ref name="atomTextConstruct"/>
    </element>
  </define>
  <!-- atom:summary -->
  <define name="atomSummary">
    <element name="atom:summary">
      <ref name="atomTextConstruct"/>
    </element>
  </define>
  <!-- atom:title -->
  <define name="atomTitle">
    <element name="atom:title">
      <ref name="atomTextConstruct"/>
    </element>
  </define>
  <!-- atom:updated -->
  <define name="atomUpdated">
    <element name="atom:updated">
      <ref name="atomDateConstruct"/>
    </element>
  </define>
  <!-- Low-level simple types -->
  <define name="atomNCName">
    <data type="string">
      <param name="minLength">1</param>
      <param name="pattern">[^:]*</param>
    </data>
  </define>
  <!-- Whatever a media type is, it contains at least one slash -->
  <define name="atomMediaType">
    <data type="string">
      <param name="pattern">.+/.+</param>
    </data>
  </define>
  <!-- As defined in RFC 3066 -->
  <define name="atomLanguageTag">
    <data type="string">
      <param name="pattern">[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*</param>
    </data>
  </define>
  <!--
    Unconstrained; it's not entirely clear how IRI fit into
    xsd:anyURI so let's not try to constrain it here
  -->
  <define name="atomUri">
    <text/>
  </define>
  <!-- Whatever an email address is, it contains at least one @ -->
  <define name="atomEmailAddress">
    <data type="string">
      <param name="pattern">.+@.+</param>
    </data>
  </define>
  <!-- Simple Extension -->
  <define name="simpleExtensionElement">
    <element>
      <anyName>
        <except>
          <nsName ns="http://www.w3.org/2005/Atom"/>
        </except>
      </anyName>
      <text/>
    </element>
  </define>
  <!-- Structured Extension -->
  <define name="structuredExtensionElement">
    <element>
      <anyName>
        <except>
          <nsName ns="http://www.w3.org/2005/Atom"/>
        </except>
      </anyName>
      <choice>
        <group>
          <oneOrMore>
            <attribute>
              <anyName/>
            </attribute>
          </oneOrMore>
          <zeroOrMore>
            <choice>
              <text/>
              <ref name="anyElement"/>
            </choice>
          </zeroOrMore>
        </group>
        <group>
          <zeroOrMore>
            <attribute>
              <anyName/>
            </attribute>
          </zeroOrMore>
          <group>
            <optional>
              <text/>
            </optional>
            <oneOrMore>
              <ref name="anyElement"/>
            </oneOrMore>
            <zeroOrMore>
              <choice>
                <text/>
                <ref name="anyElement"/>
              </choice>
            </zeroOrMore>
          </group>
        </group>
      </choice>
    </element>
  </define>
  <!-- Other Extensibility -->
  <define name="extensionElement">
    <choice>
      <ref name="simpleExtensionElement"/>
      <ref name="structuredExtensionElement"/>
    </choice>
  </define>
  <define name="undefinedAttribute">
    <attribute>
      <anyName>
        <except>
          <name>xml:base</name>
          <name>xml:lang</name>
          <nsName ns=""/>
        </except>
      </anyName>
    </attribute>
  </define>
  <define name="undefinedContent">
    <zeroOrMore>
      <choice>
        <text/>
        <ref name="anyForeignElement"/>
      </choice>
    </zeroOrMore>
  </define>
  <define name="anyElement">
    <element>
      <anyName/>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="anyElement"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <define name="anyForeignElement">
    <element>
      <anyName>
        <except>
          <nsName ns="http://www.w3.org/2005/Atom"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="anyElement"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <!-- XHTML -->
  <define name="anyXHTML">
    <element>
      <nsName/>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="anyXHTML"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
  <define name="xhtmlDiv">
    <element name="xhtml:div">
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="anyXHTML"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</grammar>
<!-- EOF -->
Comment 1 j.rosenboom 2015-03-13 13:28:57 UTC
It seems that the issue is still present in current libxml2-2.9.2 and occurs during some tests in OpenStack. Specifically, when testing the repo https://github.com/openstack/nova.git in branch stable/icehouse, the warning is triggered during the tox tests. The validation still succeeds and the warning mostly seems to go unnoticed. It can be easily reproduced by running:

jrosenboom@cuboid ~/src/nova $ xmllint --relaxng ./nova/api/openstack/compute/schemas/atom.rng resp.body
Unimplemented block at /var/tmp/portage/dev-libs/libxml2-2.9.2/work/libxml2-2.9.2/relaxng.c:3822
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title type="text">About This Version</title><updated>2011-01-21T11:33:21Z</updated><id>http://localhost/v2/</id><link rel="self" href="http://localhost/v2/"/><author><name>Rackspace</name><uri>http://www.rackspace.com/</uri></author><entry><id>http://localhost/v2/</id><title type="text">Version v2.0</title><updated>2011-01-21T11:33:21Z</updated><link rel="self" href="http://localhost/v2/"/><link rel="describedby" href="http://docs.openstack.org/" type="text/html"/><content type="text">Version v2.0 CURRENT (2011-01-21T11:33:21Z)</content></entry></feed>
resp.body validates
jrosenboom@cuboid ~/src/nova $

Is there any plan to fill in the missing code?
Comment 2 Daniel Veillard 2015-03-14 10:46:06 UTC
Haha, I didn't know openstack were using libxml2 for validation :-)

Lemme see quickly ... so that's an except contruct used in nameclasses comparisons.  
   <element>
      <anyName>
        <except>
          <nsName ns="http://www.w3.org/2005/Atom"/>
        </except>
      </anyName>
      ....
   </element>

is probably what is raising it in the original example.
Sure I can fix it, can I trade that for a pass to the Vancouver OpenStack summit
for one of my guys :) ?

Daniel, also original libvirt author ;-)
Comment 3 Daniel Veillard 2015-03-16 00:50:37 UTC
Okay, I think I fixed it:

https://git.gnome.org/browse/libxml2/commit/?id=2fab235d10e8aee321133d11df61e4527a02a511

  thanks,

Daniel
Comment 4 j.rosenboom 2015-03-16 08:48:43 UTC
Thanks for the fast response, I can confirm that the patch works for me. I'll see what I can do about the summit.
Comment 5 Daniel Veillard 2015-03-16 10:06:00 UTC
Okay for Summit, I was kind of joking, though if you could provide one
access to a person of my choice (I'm in China and definitely can't go
to Vancouver), I would be grateful,

 Thanks for the confirmation of the fix :-)

Daniel