xsl-list
[Top] [All Lists]

xslt component

2003-06-23 10:51:04
Greeting,

     I want to generate xsl-fo tags dynamically by calling java methods from 
xsl templates.

     a) main xsl file:

            <xsl:import href="getsvg.xsl"/>
             ......
            <xsl:template match="...">
              ..
              <fo:block>
                 <fo:instream-foreign-object>
                    <xsl:call-template name="getsvg">
                         <xsl:with-param name="data" select="@b64Image"/>
                    </xsl:call-template>
                </fo:instream-foreign-object>
              </fo:block>

    b) the getsvg.xsl

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

    c> the getSVG method returns a string of svg tags, e.g.
         <svg xmlns="http://www.w3.org/2000/svg"; height="200" width="100" 
<g><circle cx="25" cy="25" r="20" fill="red"/></g></svg>

     However, this approach does not work and I am not sure what went wrong!

     Any help will be appreciated!

Larry

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>