Subject:Error in using functions Author:Dhivya J Date:17 Dec 2008 03:31 AM
Hi All,
I am using the below function :
<xsl:function name="functx:index-of-string-last" as="xs:integer?" xmlns:functx="http://www.functx.com" >
<xsl:param name="arg" as="xs:string?"/>
<xsl:param name="substring" as="xs:string"/>
<xsl:sequence select="functx:index-of-string($arg, $substring)[last()] "/>
</xsl:function>
I am getting the below mentioned error while using functions :
javax.xml.transform.TransformerException: xsl:function is not allowed in this position in the stylesheet!
at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:951)
at org.apache.xalan.processor.StylesheetHandler.getProcessorFor(StylesheetHandler.java:428)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:662)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)