You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Ariane Ibig, Infonic AG" <ai...@infonic.net> on 2003/08/13 11:08:26 UTC
Xalan-Transformer adds no tags
Hi all
I have a problem with the use of svg's in my Cocoon.
I use Fins to derive charts from JFreechart and display it in Cocoon.
But when I use svg's the transformer doesn't add the svg tags.
I tried it with cocoon 2.0.4 an it worked, but with cocoon 2.1.dev it didn't
worked.
I have this pipeline:
<map:match name="wildcard" pattern="chart-minimal.svg">
<map:generate type="file"
src="fins-samples/documents/charts/minimal.xml"/>
<map:transform type="chart"/>
<map:serialize type="svgxml"/>
</map:match>
When I call it, there is this error in the browser
"whitespace not aloud at this place" (place "here")
<?xml version="1.0" encoding="UTF-8"?> <
"here"xmlns="http://www.w3.org/2000/svg" xmlns:chart="http://ipzs.it/chart"
fill-opacity="1" color-interpolation="auto" color-rendering="auto"
text-rendering="auto" stroke="
There is no error in the logs, but an interesting debug info in the
sitemap-log, referring to the xalan-transformer:
"Trax handler ... handles correctly namespaces"
DEBUG (2003-08-13) 10:55.12:719 [sitemap] (/cocoon/chart-minimal.svg)
HttpProcessor[8080][4]/DefaultComponentFactory: ComponentFactory creating
new instance of org.apache.cocoon.serialization.XMLSerializer.
DEBUG (2003-08-13) 10:55.12:719 [sitemap] (/cocoon/chart-minimal.svg)
HttpProcessor[8080][4]/DefaultComponentFactory: logger attribute is
sitemap.serializer.svgxml
DEBUG (2003-08-13) 10:55.15:243 [sitemap.serializer.svgxml]
(/cocoon/chart-minimal.svg) HttpProcessor[8080][4]/AbstractTextSerializer:
Trax handler org.apache.xalan.transformer.TransformerHandlerImpl handles
correctly namespaces.
DEBUG (2003-08-13) 10:55.15:243 [sitemap] (/cocoon/chart-minimal.svg)
HttpProcessor[8080][4]/ResourceLimitingPool: Created a new
org.apache.cocoon.serialization.XMLSerializer from the object factory.
DEBUG (2003-08-13) 10:55.15:243 [sitemap] (/cocoon/chart-minimal.svg)
HttpProcessor[8080][4]/ResourceLimitingPool: Got a
org.apache.cocoon.serialization.XMLSerializer from the pool.
I don't think the problem lies within Fins, for when I use the svg2png or
svg2jpeg transformer, I get a correct picture.
Does anybody have an idea? I tried all I could think of and am quite
helpless now.
Thanks
Ariane
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Xalan-Transformer adds no tags
Posted by Bruno Dumon <br...@outerthought.org>.
On Wed, 2003-08-13 at 11:08, Ariane Ibig, Infonic AG wrote:
> Hi all
> I have a problem with the use of svg's in my Cocoon.
> I use Fins to derive charts from JFreechart and display it in Cocoon.
> But when I use svg's the transformer doesn't add the svg tags.
> I tried it with cocoon 2.0.4 an it worked, but with cocoon 2.1.dev it didn't
> worked.
>
> I have this pipeline:
> <map:match name="wildcard" pattern="chart-minimal.svg">
> <map:generate type="file"
> src="fins-samples/documents/charts/minimal.xml"/>
> <map:transform type="chart"/>
> <map:serialize type="svgxml"/>
> </map:match>
>
> When I call it, there is this error in the browser
> "whitespace not aloud at this place" (place "here")
> <?xml version="1.0" encoding="UTF-8"?> <
> "here"xmlns="http://www.w3.org/2000/svg" xmlns:chart="http://ipzs.it/chart"
> fill-opacity="1" color-interpolation="auto" color-rendering="auto"
> text-rendering="auto" stroke="
<snip/>
>
> I don't think the problem lies within Fins, for when I use the svg2png or
> svg2jpeg transformer, I get a correct picture.
Unfortunately this doesn't prove anything.
Could you try putting a log transformer in your pipeline, like this:
<map:match name="wildcard" pattern="chart-minimal.svg">
<map:generate type="file" src="fins-samples/documents/charts/minimal.xml"/>
<map:transform type="chart"/>
<map:transform type="log">
<map:parameter name="logfile" value="out.txt"/>
</map:transform>
<map:serialize type="svgxml"/>
</map:match>
And then after executing your pipeline once, send the content of the
file out.txt (if its large, just send the first few lines, since it's
there where the error appears to be anyhow).
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org