[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: JD and Java Extension

Subject: Re: JD and Java Extension
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Mon, 17 Feb 2003 10:03:46 +0100
jd.xml.xslt.xsltexception
If you want to call a Java method from jd.xslt then you need a namespace declaration to direct the processor to the java class.

<xsl:stylesheet xmlns:math="java:java.lang.Math" ...>
        ...
        <xsl:value-of select="math:sin(3.14)"/>
        ...
</xsl:stylesheet>

Feel free to mail me if you experience more problems.

Johannes Döbler


Hi All

First of all, sorry if this has been sent more than once.

I am using the JD xsl Parser to parse my xsl documents.  The primary reason
that we are using JD is so that we can chain transformations efficiently and
with little fuss.

However we also have a set of Java Extensions that we wrote to add
functionality to our stylesheets.  When we were parsing through xalan then
"xalan://JavaExtension" worked fine.  However, we can not get any of our
extensions to work through the jd parser.

When we try to define the name space for our extensions, an error message is
displayed:

jd.xml.xslt.XsltException: no extension function
'xalan://JavaExtension:setContent' defined
        at jd.xml.xslt.XsltContext.getExtensionFunction(Unknown Source)
        at jd.xml.xslt.extension.ExtensionFunctionCall.toXObject(Unknown
Source)
        at jd.xml.xpath.expr.Expression.toStringValue(Unknown Source)
        at jd.xml.xslt.template.ValueOf.instantiate(Unknown Source)
        at jd.xml.xslt.template.TemplateRule.applyTemplate(Unknown Source)
        at jd.xml.xslt.Stylesheet.transform(Unknown Source)
        at jd.xml.xslt.AbstractStylesheet.transform(Unknown Source)

etc.

We have tried putting our own classes in different folders, changing
namespaces such as removing the "xalan" part etc but to no avail.

Can anyone tell us how to correctly call Home-made Java Extensions from the
JD parser?

Thanks a lot

Spencer Bruce


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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.