cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject Re: XHTML issues
Date Fri, 09 Jan 2004 19:54:02 GMT wrote:
> I'm having some really strange problems with the 
> transformation of XHTML. It seems something's going 
> wrong with the DOCTYPE definition (because it works without).
> If I load it (FileGenerator) and directly serialize (xml) it, the output is:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
> Strict//EN" ""<!--
> ================== Imported Names ====================================-->

Seems the XML comments from the DTD in the input got into the SAX stream.
This is, well, some sort of unintended consequence of trying to be nice.

> So, how can I go around this?

The easiest way is to use an XSLT which filters out comments. At least
comments outside the document element. Too bad if you have some there
you want to keep.
   <xsl:stylesheet version="1.0"
     <xsl:template match="/">
       <xsl:copy-of select="."/>

You might want to report the behaviour as FileGenerator bug.


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

View raw message