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

Using a Java Function in XSLT

Subject: Using a Java Function in XSLT
From: Jeff Sese <jsese@xxxxxxxxxxxx>
Date: Thu, 25 Oct 2007 11:24:11 +0800
 Using a Java Function in XSLT
Hi,

I have a java application that hyphenates words based on a wordlist. This application accepts an XML file as input and then use a sax filer to hyphenate the words. However, there was a new requirement that ask if the application can be changed so that instead of applying the hyphenation to the whole XML file, it will only hyphenate chunks of the XML file based on an XPath expression.

Now as my application accepts XML file, I was thinking if it is possible if I can pass a chunk of the XML file that matches a certain xpath to my application via XSLT (I want to apply templates to the now hyphenated XML chunk). Something to this effect:

<xsl:template match="some.node">
<xsl:variable name="copy.of" as="node()" select="."/>
<!-- xsl instruction to call my java app (don't know the correct syntax)-->
<xsl:apply-templates select="my:java-app($copy.of)"/>
</xsl:template>


Is this possible?

Thanks,
Jeff

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.