You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kees Broenink <ke...@backbase.com> on 2005/06/08 16:31:51 UTC

strange character in output (html with doctype)

Hi,
 
Using the latest Cocoon (2.1.7) I have a problem with serialize
type="html".
 
  <map:read src="index.html"/>
 
works fine.
 
But using the following (index.html is well balanced XML):
 
  <map:generate src="index.html"/>
  <map:serialize type="html"/>
 
adds a greater than character '>' in the output:
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:b="http://www.backbase.com/b" xmlns:s="http://www.backbase.com/s">
 
It only happens if the original document also has a DOCTYPE definition
(will be removed by Cocoon):
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:b="http://www.backbase.com/b" xmlns:s="http://www.backbase.com/s">

Note that it only happens with
org.apache.cocoon.serialization.HTMLSerializer; not with
org.apache.cocoon.serialization.XMLSerializer.
It doesn't matter if you configure with or without doctype, encoding
etc.
 
    <map:serializer logger="sitemap.serializer.html"
mime-type="text/html" name="html" pool-grow="4" pool-max="32"
pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
      <doctype-public>-//W3C//DTD HTML 4.01
Transitional//EN</doctype-public>
 
<doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
      <encoding>UTF-8</encoding>
    </map:serializer>

 
Any ideas?
 
Thanks,
 
Kees
 
 
 
 
 

Re: strange character in output (html with doctype)

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi:

Seems to be a bug in HTML Serializer. Please fill a bug report to not
forget ir. I will check it next week. Thanks for reporting.

Best Regards,

Antonio Gallardo.

On Mie, 8 de Junio de 2005, 9:31, Kees Broenink dijo:
> Hi,
>
> Using the latest Cocoon (2.1.7) I have a problem with serialize
> type="html".
>
>   <map:read src="index.html"/>
>
> works fine.
>
> But using the following (index.html is well balanced XML):
>
>   <map:generate src="index.html"/>
>   <map:serialize type="html"/>
>
> adds a greater than character '>' in the output:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
>>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:b="http://www.backbase.com/b" xmlns:s="http://www.backbase.com/s">
>
> It only happens if the original document also has a DOCTYPE definition
> (will be removed by Cocoon):
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:b="http://www.backbase.com/b" xmlns:s="http://www.backbase.com/s">
>
> Note that it only happens with
> org.apache.cocoon.serialization.HTMLSerializer; not with
> org.apache.cocoon.serialization.XMLSerializer.
> It doesn't matter if you configure with or without doctype, encoding
> etc.
>
>     <map:serializer logger="sitemap.serializer.html"
> mime-type="text/html" name="html" pool-grow="4" pool-max="32"
> pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
>       <doctype-public>-//W3C//DTD HTML 4.01
> Transitional//EN</doctype-public>
>
> <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
>       <encoding>UTF-8</encoding>
>     </map:serializer>
>
>
> Any ideas?
>
> Thanks,
>
> Kees
>
>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org