cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [C2] Newbie: Adding doctype to xhtml output?
Date Mon, 17 Dec 2001 12:05:36 GMT


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"
<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">

which results in output:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">

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?




Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message