You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Wade, John F. (MSFC-NAS902099)[TBE]" <Jo...@nasa.gov> on 2007/04/03 14:59:02 UTC

extension functions set up

I need to create an extension function.  I'm working off the example material on the http://xml.apache.org/xalan-j/extensions.html#ex-java page.  In the xalan:component script definition, I see src="xalan://MyCounter/".  Where do I put the MyCounter.java file?  I've tried everywhere I can think of and keep getting a "java class not found" error.
 
*********************************
John F. Wade, PE
TBE
EO20 - MSFC iPV Integration Lead

RE: extension functions set up

Posted by "Wade, John F. (MSFC-NAS902099)[TBE]" <Jo...@nasa.gov>.
Got some helpful words from Rus D. about ".java" versus ".class"   So, now I've got "MyTest.class" and still trying to figure out where to put it.  I've tried several folders and Xalan keeps giving me:
(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): java.lang.NoSuchMethodException: For extension function, could not find method java.lang.String.unescape([ExpressionContext,] ).
 
Head matter in the XSL reads, in part:
xmlns:xalan=http://xml.apache.org/xalan
xmlns:mytest="MyTest"
extension-element-prefixes="mytest"
version="1.0">

<xalan:component prefix="mytest" functions="unescape">
<xalan:script lang="javaclass" src="xalan://MyTest/"/>
</xalan:component>

and down in one of the templates I have:
<xsl:value-of select="mytest:unescape('test')" />

 
Anybody got a suggestion?
 
*********************************
John F. Wade, PE
TBE
EO20 - MSFC iPV Integration Lead