Subject: [xsl] EXSLT user-defined function question From: "Sanjeeb Basak" <sbasak@xxxxxxxxx> Date: Thu, 11 Nov 2004 01:02:24 -0800 |
Hi all, I'm trying to call an user-defined exslt function, and strangely I get this error. Can somebody quickly suggest something? Thanks in advance, -Sanjeeb Error: } java.lang.RuntimeException: java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xalan.lib.ExsltStrings.replace([ExpressionContext,] #STRING, #STRING, #STRING). Checked both static and instance methods. My xsl: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:date="http://exslt.org/dates-and-times" xmlns:ns="..." xmlns:str="http://exslt.org/strings" xmlns:func="http://exslt.org/functions" xmlns:xalan="http://xml.apache.org/xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="func date str" str:doc="http://www.exslt.org/str" version="1.0"> <!--$Revision: #2 $--> <xsl:import href="import-file.xsl"/> <xsl:output indent="yes" xalan:indent-amount="4"/> <xsl:template match="/"> ... <result-tag> <xsl:value-of select="str:replace('ns:field','\r\n',' ')"/> </result-tag> Import-file.xsl: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" xmlns:func="http://exslt.org/functions" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="str exsl func"> <func:function name="str:replace"> <xsl:param name="string" select="''" /> <xsl:param name="search" select="/.." /> <xsl:param name="replace" select="/.." /> <xsl:choose> <xsl:when test="not($string)"> <func:result select="/.." /> </xsl:when> <xsl:when test="function-available('exsl:node-set')"> ...
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XPath to match attribute , George James | Thread | Re: [xsl] EXSLT user-defined functi, Geert Josten |
Re: [xsl] build a select clause or , Geert Josten | Date | [xsl] XSL and uPortal, Aaron Johnson |
Month |