W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2003

dynamic external svg images

From: Ai, Larry <lai@cas.org>
Date: Fri, 30 May 2003 15:01:28 -0400
Message-ID: <0DBCFBC9A19A294DA1F7128209329BED010730D5@ntexch02.intra.cas.org>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>

I need to generate svg xml document on the fly.

Here is what I have done so far:

In the ConvertSVG.Java file:

// the svg image is hardcoded for testing

 StringBuffer svg = new StringBuffer();
 svg.append("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"400\">");
 svg.append("<g style=\"fill:red; stroke:#000000\">");
 svg.append("<rect x=\"0\" y=\"0\" width=\"15\" height=\"15\"/>");
 return svg.toString();

In the getsvg.xsl file:

    <lxslt:component prefix="convert" functions="ConvertSVG">
        <lxslt:script lang="javaclass" src="ConvertSVG"/>

    <xsl:template name="getsvg">
        <xsl:value-of select="convert:getSVG()"/>

in the xsl-fo file:

    <xsl:import href="getsvg.xsl"/>
	<xsl:call-template name="getsvg"/>

It does not work!

Anyone knows what I did wrong?


Received on Friday, 30 May 2003 15:02:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:27 UTC