You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gabor Pusztai <pg...@azero.hu> on 2005/03/03 12:52:24 UTC
Serialization: tabs to decimal entity references
Hi everybody!
I have a very strange problem with cocoon-2.1.6:
I have an xml file, 'test.xml':
<?xml version="1.0" encoding="iso-8859-1"?>
<root>
<child>foo</child>
<child>bar</child>
</root>
the tabs are _real_ tab characters, not softtabs
and I setup a pipeline:
...
<map:match pattern="test.xml">
<map:generate type="file" src="test.xml"/>
<map:serialize type="xml"/>
</map:match>
...
the components are configured as in the default sitemap.
When I request 'test.xml', all tab characters are converted to decimal
entity references (	) in the result. Other whitespace characters are
serialized "normally", the problem occurs only with tabs. I dont know what
to do.
I tried to modify the parameters of the XMLSerializer (encoding, indent,
method, etc), many things in the sitamap and cocoon.xconf, and i tried
a clean "factory" cocoon install, but nothing changed. Anyone can help
me?
I'm using:
- cocoon-2.1.6
- tomcat-5.5.7
- jdk-1.5.0
Thank you!
--
Gabor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Serialization: tabs to decimal entity references
Posted by Geert Josten <Ge...@daidalos.nl>.
Gabor Pusztai wrote:
> When I request 'test.xml', all tab characters are converted to decimal
> entity references (	) in the result. Other whitespace characters are
> serialized "normally", the problem occurs only with tabs. I dont know what
> to do.
>
> I tried to modify the parameters of the XMLSerializer (encoding, indent,
> method, etc), many things in the sitamap and cocoon.xconf, and i tried
> a clean "factory" cocoon install, but nothing changed. Anyone can help
> me?
The cause might be in the _generator_ instead of in the serializer. Though, I have never noticed
this problem (before).
Anyone: how do you switch from XML parser?
Cheers,
Geert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Serialization: tabs to decimal entity references
Posted by Gabor Pusztai <pg...@azero.hu>.
On Thu, 3 Mar 2005, Askild Aaberg Olsen wrote:
> >
> >
> Try changing the src-attribute of the serializer-declaration to
> "org.apache.cocoon.components.serializers.XMLSerializer"
>
> as in http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110237346321979&w=2
>
> This made the trick for me.
>
> Askild
Hi everybody!
The alternative serializers are not the perfect solution for me, because
these serializers are not so flexible as the original ones (eg. the
Content-Type header is hard-coded thus it's impossible to serve xhtml with
application/xhtml+xml content type).
I did some debugging on this issue, the result is:
With cocoon-2.1.6 - jdk-1.4 - tomcat-5.0.x the tabs are displayed
correctly, the entity references only occured with jdk-1.5 and
tomcat-5.5.7.
Because the XMLSerializer using the xalan transformer by default, I tried
the older xalan-2.6.0 instead of 2.6.1-dev which is bundled with cocoon,
and voilá: the tabs are displayed correctly.
I don't know, what is the problem _exactly_, so this is a dirty solution,
but works for me (my applications seems to work correctly, but I didn't
tested with all of the Cocoon samples).
--
Cheers,
Gabor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Serialization: tabs to decimal entity references
Posted by Geert Josten <Ge...@daidalos.nl>.
> Try changing the src-attribute of the serializer-declaration to
> "org.apache.cocoon.components.serializers.XMLSerializer"
>
> as in http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110237346321979&w=2
Let me guess: the other class reference is a remainder of a previous version?
Cheers...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Serialization: tabs to decimal entity references
Posted by Askild Aaberg Olsen <as...@xangeli.com>.
Gabor Pusztai wrote:
>When I request 'test.xml', all tab characters are converted to decimal
>entity references (	) in the result. Other whitespace characters are
>serialized "normally", the problem occurs only with tabs. I dont know what
>to do.
>
>I tried to modify the parameters of the XMLSerializer (encoding, indent,
>method, etc), many things in the sitamap and cocoon.xconf, and i tried
>a clean "factory" cocoon install, but nothing changed. Anyone can help
>me?
>
>
Try changing the src-attribute of the serializer-declaration to
"org.apache.cocoon.components.serializers.XMLSerializer"
as in http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=110237346321979&w=2
This made the trick for me.
Askild
-
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org