This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Extension Functions
- To: XSL-List at mulberrytech dot com
- Subject: Extension Functions
- From: Allen Haws <joeshmoe at unicon dot net>
- Date: Mon, 12 Jun 2000 09:17:35 -0700
- Reply-To: xsl-list at mulberrytech dot com
Listers,
First of all, Thanks for all the good information that you all post on
the List. This is my first posting, but I seem to have hit a wall. I'm
trying to
write my own extension function. I'm using Xalan, but the documentation
for
extension functions is next to nil; everything I've found on the list
and books has to do
with XT or Saxon. Am I barking up the wrong tree? Does Xalan support
extension
functions? If so is there any tricks to get them to work.
My machine is a webserver and I'm using my address/URL for the
namespace...
xmlns:db="http://mymachine.unicon.net/~ahaws/ExtensionTest"
ExtensionTest is the name of my class. (I've added my public_html
directory to my CLASSPATH)
The static method that I call is getID and it returns a String datatype
and I make the call as follows...
<xsl:template match="question"
xmlns:db="http://mymachine.unicon.net/~ahaws/ExtensionTest">
<xsl:param name="fakeID"/>
<xsl:variable name="oldID" select="@id"/>
<some-item>
<xsl:attribute name="ordering">
<xsl:number level="any"/>
</xsl:attribute>
--> <xsl:variable name="newID" select="db:getID($fakeID, $oldID)"/>
<si>
<xsl:attribute name="id">
<xsl:value-of select="$newID"/>
</xsl:attribute>
<comment>N/A</comment>
<question>
<xsl:value-of select="question/text"/>
</question>
</si>
</some-item>
</xsl:template>
I hope I'm not in left field with this.
When I process my .xml and .xsl I get the error
Call to extension function failed:
http://mymachine.unicon.net/~ahaws/ExtensionTest
Is there any help for me??
Thanks in advance,
Allen Haws
Unicon, Inc.
joeshmoe@unicon.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list