cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BORGES Charles <charles.borges.prestata...@cegetel.fr>
Subject Problem using SVG serialializer after a transformation
Date Fri, 10 Oct 2003 10:25:16 GMT

Hi,

I run into the following problem when serializing to svg after a xsl
transformation:

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"/>
</map:match>


Turn the debug on and check for the SVGSerializer logging.
You see that serialization of the xsl transformation output produces the
massage:
"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="fr.cegetel.dsco.gi.svg.serialization.SVGSerializer"
                  mime-type="image/png"
                  base-url="context://sample/batik"/>
3.using the sourceresolver to find out the uri to set in the document
locator.
2.making the SVGBuilder no more Recyclable.
 
Charles

Mime
View raw message