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 Shane Curcuru/CAM/Lotus <sh...@us.ibm.com> on 2002/06/24 14:50:36 UTC

Fwd: XSLTC Extension functions

The appropriate place to ask Xalan questions is on one of the Xalan mailing
lists, perhaps in this case xalan-j-users@xml.apache.org.  That way, the
best volunteer developer who has experience in this area might be able to
answer your question.

----- Forwarded by Shane Curcuru on 06/24/2002 08:48 AM -----
"Ferdinand O Sahagun" <aj...@sg.systemaccess.com>

Hi Shane,

      Let me introduce myself, im Ferdinand and im currently working on
XSLT. I had to admit im very new to the technology. We're currently
evaluating different transformer engine and we have opted to use XSLTC base
from the user's feedback. Most of us here are newbies
on XSLTC. Our problem involves calling our own extension functions from
within an XSL. Base on the Bug Report, 3994 that you solved, XSLTC provides
a way of calling external functions. If we understand it correctly, it
works  like an extension function in Xalan or Saxon, but it only caters to
static methods. We have also used the namespaces that were mentioned on the
release notes and in the Apache Bug Database.
      We tried it but it always throwing as an error "unable to resolve
function call.. <our extension function>"

were declaring the namespace either this
      xmlns:java="http://xml.apache.org./xalan/xsltc/java"
or   this
      xmlns:someclass="http://xml.apache.org/xalan/xsltc/java/someclass"
but to no avail.


Here is an piece of our xsl

<xsl:stylesheet version="1.0" xmlns:xsl
="http://www.w3.org/1999/XSL/Transform"
                  xmlns:xsltc-extension
="http://xml.apache.org/xalan/xsltc/java>
.
.
<xsl:variable name="node" select="/" />
. <xsl:variable name="retValue" select
="xsltc-extension:me.and.my.extension.MyExtension.processXSLT(xsltc-extension:nodeset


$node),'filename','parm1',param2')">


public static org.w3c.dom.Node processXSLT(org.w3c.dom.Node req,String
xslFilename, String param1, String param2){
 do something..
 return node;
}

This program fragment works when we run it using saxon 6.5 and xalan
version 2.4.d1.

Can you please help us on these things?

Thanks in advance..

Regards,
Ferdinand


System Access Pte. Ltd
System Analyst
Singapore
DID (065) -3353-652
http:// www.systemaccess.com