cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <alexander.klimetsc...@mindquarry.com>
Subject CleanupTransformer + HTMLSerializer = Doctype twice problem
Date Thu, 18 Jan 2007 22:03:49 GMT
Hi,

when using the CleanupTransformer from the html-block together with the 
o.a.c.serialization.HTMLSerializer I get duplicate Doctype declarations 
at the beginning of the HTML document.

-----------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
...
-----------------------

The HTMLSerializer is configured like this:

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

And in the sitemap I use as the final transformation steps:

	<transform type="htmlcleanup" />
	<serialize type="html"/>

The transformer factory is configured to be 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.

If I take the htmlcleanup out of the pipeline, there will be only one 
doctype.

Any ideas?


Alex

-- 
Alexander Klimetschek
http://www.mindquarry.com


Mime
View raw message