Your source needs to specify
<?xml version="1.0" encoding="UTF-8"?>
and not the doctype.
The serializer will put the doctype in.
Derek Hohls wrote:
Reijn
That works fine .. but now Cocoon is adding in other attributes:
eg.
<script type="text/javascript">
becomes
<script type="text/javascript" xml:space="preserve">
And this is causing script errors - how do I switch this effect off?
Thanks
Derek
>>> Jeroen Reijn <[EMAIL PROTECTED]> 2006/10/11 03:50 PM >>>
Hi Derek,
yes you can do that by adding the following configuration parameter:
<omit-xml-declaration>yes</omit-xml-declaration>
which would make it:
<map:serializer name="xhtml"
src="org.apache.cocoon.serialization.XMLSerializer"
mime-type="text/html"
logger="sitemap.serializer.xhtml"
pool-max="64"
>
<doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%3C/doctype-system>>
<encoding>UTF-8</encoding>
<omit-xml-declaration>yes</omit-x! ml-declaration>
</map:serializer>
Regards,
Reijn
Derek Hohls wrote:
> Thanks Niels
>
> Just one problem is that this nows adds:
> <?xml version="1.0" encoding="UTF-8"?>
> at the top - any way to avoid this?
>
> Thanks
> Derek
>
>>>> Niels van Kampenhout <[EMAIL PROTECTED]> 2006/10/11 03:13 PM
>>>>
>
> Hi,
>
> Derek Hohls wrote:
>> Using Cocoon 2.1.7.... I need to serve up a "plain" XHTML page with:
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>>
>> at the top - Cocoon replaces this and serves the page with a:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>! ; "http://www.w 3.org/TR/html4/loose.dtd"
<http://www.w3.org/TR/html4/loose.dtd>>
>> header.
>
> You can configure this in your XHTML serializer declaration:
>
> <map:serializer name="xhtml"
> src="org.apache.cocoon.serialization.XMLSerializer"
> mime-type="text/html"
> logger="sitemap.serializer.xhtml"
> pool-max="64"
> >
> <doctype-public>-//W3C//DTD XHTML 1.0
> Strict//EN</doctype-public>
>
> <doctype-system><A
>
href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%3C/doctype-system>>
> &n! bsp; <encoding>UTF-8</encoding>
> </map:serializer>
>
> See [1] for more info.
>
> Regards,
> Niels
>
> [1] http://cocoon.apache.org/2.1/userdocs/xhtml-serializer.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
This message is subject to the CSIR's copyright, terms and conditions
and e-mail legal notice.
Views expressed herein do not necessarily represent the views of the
CSIR.
*CSIR E-mail Legal Notice*
<http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html>
*CSIR Copyright, Terms and Conditions*
<http://mail.csir.co.za/CSIR_Copyright.html>
For electronic copies of the CSIR Copyright, Terms and Conditions and
the CSIR Legal Notice
send a blank message with "REQUEST LEGAL" in the subject line to CSIR
CallCentre <mailto:[EMAIL PROTECTED]>
This message has been scanned for viruses and dangerous content by
*MailScanner* <http://www.mailscanner.info/>,
and is believed to be clean.
--
Kamal Bhatt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]