Re. Extension Functions

Subject: Re. Extension Functions
From: Donald_Leslie@xxxxxxxxx
Date: Mon, 12 Jun 2000 16:29:43 -0400
Allen,

Please take a look at http://xml.apache.org/xalan/extensions.html. That
document provides the basics for writing and using extension functions and
extension components. Several of the examples include extension functions,
and you can get these by downloading the latest Xalan distribution from
http://xml/apache/org/dist/xalan-j. The extension examples are in
samples/extensions. Hope this is helpful.  -- Don Leslie

                                                                                                                      
                    Allen Haws                                                                                        
                    <joeshmoe@xxxxxxxxxx>        To:     XSL-List@xxxxxxxxxxxxxxxx                                    
                    Sent by:                     cc:     (bcc: Scott Boag/CAM/Lotus)                                  
                    owner-xsl-list@mulber        Subject:     Extension Functions                                     
                    rytech.com                                                                                        
                                                                                                                      
                                                                                                                      
                    06/12/2000 12:17 PM                                                                               
                    Please respond to                                                                                 
                    xsl-list                                                                                          
                                                                                                                      
                                                                                                                      



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@xxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread