cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perry Molendijk" <xi...@iinet.net.au>
Subject DTD Declaration in sitemap/serializers
Date Thu, 05 Dec 2002 04:06:47 GMT
Blank
 


I'm sure there is a sensible explanation for this but I can't find it. When I change:

<map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/>


to

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

The resulting html output has the correct dtd declaration at the top of the file:

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

Now when I try this with the xml serializer that doesn't happen e.g.

<map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer">
  <doctype-public>-//OASIS//DTD DocBook XML V4.2//EN</doctype-public>
  <doctype-system>http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd</doctype-system>
</map:serializer>

I would like to see this:

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

I noticed the same behaviour with the "svgxml" serializer which leads me to believe that this
is a feature of the XMLSerializer. Is there a way to generate XML output with a DTD declaration
in it?

Bye

Perry Molendijk

Mime
View raw message