Two ways to call XSLT extension 2003-04-17 - By Karsten Theis
Hi,
I'he done my first own XSTL extension function. It's a function with one String parameter. It works fine if I call it this way:
... <xsl:variable name="reflexionMatrix"> <xsl:call-template name="getReflexionMatrix"> <xsl:with-param> <xsl:text>1 0 0 0 1 0 0 0 1</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> ...
<xsl:template name="getReflexionMatrix"> <xsl:param name="matrix"/> <xsl:value-of select="qmatrix:extractReflectionMatrix($matrix)" /> </xsl:template>
But it doen's work if I call it this way:
<xsl:variable name="MatrixRef"> <xsl:call-template name="MatrixRef"> <xsl:with-param> <xsl:value-of select="concat('1, ' ', '0', ' ', '0', ' ', '0', ' ', '1', ' ', '0', ' ', '0', ' ', '0', ' ', '1')"/> </xsl:with-param> </xsl:call-template> </xsl:variable>
I get the error: (Location of error unknown)XSLT-Fehler (javax.xml.transform.TransformerException ): java.lang.NullPointerException ... finished
In my understanding of XSLT, both ways to call the function are exactly the same! But there must be a difference!
I'm using xalan-j_2_4_D1
the java-function is declared as follows: public static String extractReflectionMatrix(String p0)
Thanks for your help,
Karsten
|
|