I don't see any extension function get used in the second solution. A lot
of bugs got fixed since 2.4D1. Please try with XalanJ 2.5 to see if the
problem is still there. If you can still reproduce it, please open a bug in
Bugzilla (http://nagoya.apache.org/bugzilla) and attach the stylesheet and
xml file to reproduce the problem.

Regards,

Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: [EMAIL PROTECTED]



                                                                                
                                                  
                      "Karsten Theis"                                           
                                                  
                      <[EMAIL PROTECTED]        To:       "XALAN Mailing List 
(E-Mail)" <[EMAIL PROTECTED]>             
                      ostep.de>                cc:                              
                                                  
                                               Subject:  Two ways to call XSLT 
extension                                          
                      04/17/2003 02:44                                          
                                                  
                      AM                                                        
                                                  
                      Please respond to                                         
                                                  
                      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






Reply via email to