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 130216 - xmllint processes anyName except nsName incorrectly
xmllint processes anyName except nsName incorrectly
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.4
Other other
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-30 12:53 UTC by David Tolpin
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Tolpin 2003-12-30 12:53:15 UTC
xmllint: using libxml version 20604
   compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer
XInclude Unicode Regexps Automata Schemas

fails to validate

  <stylesheet xmlns:foo="http://example.com/foo"
xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <template>
      <foo:x a="b"/>
    </template>
  </stylesheet>

against

  <grammar xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
ns="http://www.w3.org/1999/XSL/Transform"
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-dat
atypes">
    <start>
      <element name="stylesheet">
        <attribute name="version"><text/></attribute>
        <zeroOrMore>
          <ref name="template.element"/>
        </zeroOrMore>
      </element>
    </start>
    <define name="template.element">
      <element name="template">
        <ref name="template.model"/>
      </element>
    </define>
    <define name="template.model">
      <zeroOrMore>
        <choice>
          <ref name="template.element"/>
          <ref name="literal-result-element"/>
          <text/>
        </choice>
      </zeroOrMore>
    </define>
    <define name="literal-result-element">
      <element>
        <anyName>
          <except>
            <nsName/>
          </except>
        </anyName>
        <ref name="literal-result-element.atts"/>
        <ref name="template.model"/>
      </element>
    </define>
    <define name="literal-result-element.atts">
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName>
              <except>
                <nsName/>
              </except>
            </anyName>
            <data type="string"/>
          </attribute>
        </choice>
      </zeroOrMore>
    </define>
  </grammar>


complaining, that

  /home/dvd/work/PreTI/CImpl/admon.xsl:5: element x: Relax-NG validity
error : Did not expect element x there
  /home/dvd/work/PreTI/CImpl/admon.xsl fails to validate
Comment 1 William M. Brack 2004-03-27 18:09:33 UTC
My apologies for the rather long time before this problem was resolved, but it 
turned out to be quite complex.  In fact, it had nothing to do with "anyName 
except nsName", but rather with the manner in which the recursive defines were 
applied.

The fix was to the module relaxng.c, and has already been committed to CVS.  
It will, of course, appear in the next release of the library (2.6.9).

Thanks for the report - it was very helpful.

Bill
Comment 2 Daniel Veillard 2004-04-18 23:58:08 UTC
  This should be closed by release 2.6.9,
                                                                                
   thanks,
                                                                                
Daniel