I would read up at saxon.sourceforge.net.
Saxon is java, and has a clear description of binding a namespace to a
particular java function...also shows how you can write an extension etc.
gl, jim fuller
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of
Holmberg
Rick-ra0119
Sent: 13 September 2002 22:05
To: Xsl-List (E-mail)
Subject: [xsl] accessing Java method from xslt
I searched the archives and only found one example of this and it
does not really apply. I am hoping someone here can help me out
on this one. I am new to XML but not really new to Java.
I am trying to access a method in a java file from my xslt.
Below is a snippit of my xml file.
<myxml>
<RelatedId>Test11-Diagram</RelatedId>
</myxml>
Here is a snippit of my xslt file...
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:CollateralXML="class:../classes/xml/CollateralXML">
<xsl:template match="myxml">
<xsl:output method="html"/>
<xsl:apply-templates select="RelatedId" />
</xsl:template>
<xsl:template match="RelatedId">
<B>Categories:</B><br/>
<xsl:value-of select="CollateralXML:getUrl(.\),
<br/>
</xsl:template>
I am not sure what to put in the getUrl. I need the value of
Test11-Diagram to be sent to the method in CollateralXML called
getUrl. The method getUrl is static.
The only example I have run across has the values embeded in the
tag and that is not the format I have avail to me.
Any help is appreciated.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list