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 138220 - Unterminated meta elements in HTML output using xsl:document
Unterminated meta elements in HTML output using xsl:document
Status: VERIFIED NOTABUG
Product: libxslt
Classification: Platform
Component: general
1.1.5
Other Linux
: High normal
: ---
Assigned To: William M. Brack
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-03-26 15:18 UTC by bwohlberg
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description bwohlberg 2004-03-26 15:18:43 UTC
Create the following files:

a.dtd:

<!ELEMENT a (b*)>
<!ELEMENT b (#PCDATA)>


a.xml:

<?xml version="1.0"?>
<!DOCTYPE a SYSTEM "a.dtd">

<a>
  <b>B1</b>
  <b>B2</b>
  <b>B3</b>
</a>


a.xsl:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

  <xsl:output method="xml" indent="yes"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    encoding="iso-8859-1" omit-xml-declaration = "yes"/>

    <xsl:template match="/">
      <html>
        <head>
          <meta name="generator" content="a.xsl"/>
          <title>Index</title>
        </head>
        <body>
          <h1>Index</h1>
          <ul>
            <xsl:for-each select="//b">
              <li><xsl:value-of select="."/></li>
              <xsl:call-template name="subdoc"/>
            </xsl:for-each>
          </ul>
        </body>
      </html>
    </xsl:template>


    <xsl:template name="subdoc">
      <xsl:document href="{concat(.,'.html')}"
        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
        encoding="iso-8859-1" indent="yes">
        <html>
          <head>
            <meta name="generator" content="a.xsl"/>
            <title><xsl:value-of select="."/></title>
          </head>
          <body>
            <h1><xsl:value-of select="."/></h1>
          </body>
        </html>
      </xsl:document>
    </xsl:template>

</xsl:stylesheet>


Do:
    xsltproc a.xsl a.xml > index.html

The meta elements in index.html are terminated correctly, but those in
B{1,2,3}.html, generated using xsl:document, are not.
Comment 1 William M. Brack 2004-04-18 13:37:40 UTC
Sorry for a rather slow response to this report.

Your xsl:document is creating documents with output filename *.html.  By 
default, that will force the output method to be "html", and that in turn will 
cause the <meta> to be output without a closing tag.  In order to make it 
behave in the way you want, include the attribute method="xml" within the 
xsl:document.

Bill