cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Problem using SVG serialializer after a transformation
Date Fri, 10 Oct 2003 13:10:27 GMT
BORGES Charles wrote:

>I run into the following problem when serializing to svg after a xsl
>Start with a sitemap including something like this
><map:match pattern="*.png">
>  <map:generate src="{1}.svg"/>
>  <map:transform src="xsl/{1}.xsl" type="xslt"/>
>  <map:serialize type="svg2png"/>
>Turn the debug on and check for the SVGSerializer logging.
>You see that serialization of the xsl transformation output produces the
>"setDocumentLocator was not called, will use http://localhost/ as base URI".
>This means that if i have a href in my svg to a css for instance, it won't
>be located and the serialization will fail!
>I fixed it (somehow) by: 
>1.introducing a base-url attribute in the SVGSerializer configuration:
><map:serializer logger="sitemap.serializer.svg2png" 
>                  name="svg2png"
>                  src=""
>                  mime-type="image/png"
>                  base-url="context://sample/batik"/>

Be careful: the convention in configurations is that attributes are 
container-related data. Component-related data should be better located 
as child elements. So the following should be better:

<map:serializer ....>

>3.using the sourceresolver to find out the uri to set in the document locator.

So do you really need the base-url? Isn't the uri of 
SourceResolver.resolveURI("") just what you need? Or at least it can be 
a fallback if base-url is not present.

>2.making the SVGBuilder no more Recyclable.

Why can it no more be Recyclable?


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message