Hi,
I was wondering what the correct way add a doctype to xhtml output is?
Right now my xsl looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="xml" standalone="yes" doctype-public="-//W3C//DTD XHTML
1.0 Strict//EN"
doctype-system="DTD/xhtml1-strict.dtd" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes"><!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
</xsl:text>
<html>
...
which results in output:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/TR/xhtml1/strict">
...
Is this the correct way to do this? The "<xsl:text
disable-output-escaping="yes"><!DOCTYPE html PUBLIC "-//W3C..." part
seems like a hack to me. Why doesn't simply specifying the doctype-public
and doctype-system attributes in the xsl:output element result in the
doctype being added? I haven't made any changes to my sitemap file. Is
there something I should do there that would be more appropriate?
Thanks!
Ian
.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>