You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Perry Molendijk <xi...@iinet.net.au> on 2002/12/05 05:06:47 UTC
DTD Declaration in sitemap/serializers
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
Re: DTD Declaration in sitemap/serializers
Posted by Perry Molendijk <xi...@iinet.net.au>.
BlankOK it's in the FAQs, sorry. But is there a way to generate an XML document that does add a DTD Declaration?
Perry
----- Original Message -----
From: Perry Molendijk
To: cocoon-users@xml.apache.org
Sent: Thursday, December 05, 2002 12:06 PM
Subject: DTD Declaration in sitemap/serializers
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