You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beyaNet Consultancy <be...@ntlworld.com> on 2004/02/17 16:39:45 UTC
SVG broken images.....HELP!!
Hi,
I have been having a problem serialized svg embedded images which are
broken when displayed to the screen. Can anybody tell me what I am
doing wrong?
1. Sitemap def:
<map:serializers default="html">
<map:serializer name="svg2jpeg"
src="org.apache.cocoon.serialization.SVGSerializer"
mime-type="image/jpeg" logger="sitemap.serializer.svg2jpeg"/>
</map:serializers>
......
<map:match pattern="frame/*.jpg">
<map:generate type="serverpages" src="xsp/artist-details.xsp" />
<map:serialize type="svg2jpeg"/>
</map:match>
2. XSL def:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
.........
<xsl:template match="artists-photo1">
<svg width="300" height="300">
<xsl:apply-templates />
</svg>
</xsl:template>
3. XSP def: (artist-details.xsp)
.......................
<artists-photo1>
<xsp:element name="image">
<xsp:attribute
name="xlink:href">data:image/jpeg;base64,<xsp:expr>newPhoto1</xsp:
expr></xsp:attribute>
<xsp:attribute name="width">300</xsp:attribute>
<xsp:attribute name="height">300</xsp:attribute>
</xsp:element>
</artists-photo1>
many thanks in advance