xsl-list
[Top] [All Lists]

[xsl] Not able to render image generated by Java Extension Function when called from XSL

2008-01-08 12:01:05
Hi,

I'm using createImage() method of transformer.util.DrawSignature class
in my application to generate an image in a temporary location.
Signature of method is as follows:

public static void createImage(String signature) {
......
}

I need to display this image on a pdf file generated using xsl
stylesheets. Below is the snapshot of the stylesheet. It calls
createImage method which generates image in temp location; the image
is picked up from the temp location and displayed using
<fo:external-graphic>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    version="1.0"
    xmlns:drawSign="transformer.util.DrawSignature">

<xsl:template name="signature">
        <xsl:value-of select="drawSign:createImage(//sign)"/>
        <fo:block>
            <fo:external-graphic src="out/sign.gif"
content-height="0.7in" vertical-align="middle"/>
        </fo:block>

    </xsl:template>

</xsl:stylesheet>

Heres the problem description:

When I run my transformer through the above stylesheets, it throws the
following error:

(Location of error unknown)java.lang.NoSuchMethodException: For
extension function, could not find method
org.apache.xml.utils.NodeVector.createImage([ExpressionContext,] ).

I'm really not sure why it is looking createImage not in the correct
path even though the jar containing DrawSignature class  is properly
set in the classpath. Is my xsl incorrect or there is some issue with
the JVM not able to locate jar? please note that when I run the
drawSignature program standalone, image is generated in the desired
location but I'm not able to pick the same and render it through
stylesheets. Any help in this regard is greatly appreciated.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Not able to render image generated by Java Extension Function when called from XSL, Charanpreet Arora <=