Try adding the elements "doctype-public", "doctype-system" in your
sitemap to the HTML-Serializer like the following:

<map:serializer name="html" mime-type="text/html"
src="org.apache.cocoon.serialization.HTMLSerializer">
  <doctype-public>-//W3C//DTD HTML 4.01//EN</doctype-public>
  <doctype-system>http://www.w3.org/TR/html4/strict.dtd</doctype-system>
  <encoding>UTF-8</encoding>
</map:serializer>

Stefan

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 17. Dezember 2001 18:06
> An: [EMAIL PROTECTED]
> Betreff: [C2] Newbie: Adding doctype to xhtml output?
> 
> 
> 
> 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]>
> 
> 
> 
> 
> 

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

Reply via email to