xslt - How to call an external java function with Xalan processor -


i'm having trouble call external java function in xsl code xalan processor.

the error :

exception in thread "main" java.lang.runtimeexception: java.lang.nosuchmethodexception: extension function, not find method org.apache.xml.utils.nodevector.incrementpropertyid([expressioncontext,] ). 

i have java class named util.java in folder execute compile command.

in xsl file, i've declared namespace follow :

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"                           xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"                           xmlns:util="xalan://util"> 

and call function using :

<xsl:copy-of select="util:incrementpropertyid(blablabal)"/> 

so suppose problem comes namespace, wrong ?

also, it's xsl 1.0 stylesheet.

thanks help

edit :

in util.java file, have no package declared since i'm @ root... should add package util; definition class ?

probably problem haven't mentioned namespace when calling method try:

<xsl:copy-of select="util:incrementpropertyid()"/>     

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -