[xslt] method="html" produces invalid XHTML
- From: Noah Edelstein <noah aquaminds com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: [xslt] method="html" produces invalid XHTML
- Date: Fri, 4 Nov 2005 12:23:48 -0800
XSLT folks,
I am trying to create W3C XHTML validator compliant output using
xsltproc but have run into some problems. It appears that output
method="html" does not properly close the meta tag to specify the
page encoding or link tags within the head bloc. I have seen this
behavior using the following statements to create output:
<xsl:output method="html"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
indent="yes"
encoding="UTF-8"
omit-xml-declaration="yes"/>
<exsl:document href="cover.html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd"
method="html"
encoding="UTF-8"
indent="yes"
omit-xml-declaration="yes">
The following statements:
<xsl:element name="head">
<xsl:element name="link">
<xsl:attribute name="rel">StyleSheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">notebookstyle.css</
xsl:attribute>
<xsl:attribute name="title">STYLE</xsl:attribute>
</xsl:element>
<xsl:element name="link">
<xsl:attribute name="rel">StyleSheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">styleheet.css</
xsl:attribute>
<xsl:attribute name="title">STYLE</xsl:attribute>
</xsl:element>
</xsl:element>
...resulted in the following output:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="StyleSheet" type="text/css" href="notebookstyle.css"
title="STYLE">
<link rel="StyleSheet" type="text/css" href="styleheet.css"
title="STYLE">
</head>
xsltproc info:
Using libxml 20618, libxslt 10113 and libexslt 811
xsltproc was compiled against libxml 20618, libxslt 10113 and
libexslt 811
libxslt 10113 was compiled against libxml 20618
libexslt 811 was compiled against libxml 20618
The pages render fine in Firefox (Standards compliance mode) and
Safari, but fail the W3C Validator (http://validator.w3.org/) test.
Please let me know if I am missing any output options or if this is a
bug.
Thanks for your help,
-Noah Edelstein
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]