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

Re: Embedding java-command in XSL-stylesheet???

Subject: Re: Embedding java-command in XSL-stylesheet???
From: michael gruber <gruberm@xxxxxx>
Date: Mon, 07 Feb 2000 15:53:01 +0100
embed java in xslt
first you've got to declare a namespace:
xmlns:myns="http://www.jclark.com/xt/java/com.mycompany.Myclass"

the first part: http://www.jclark.com/xt/java is predefined by xt
in the second part you've got to type your full classname


to call your method type for example:

<xsl:value-of select="myns:mymethod()"/>

it's even possible to pass parameters, and many much more...

Other xslt-processor (saxon, xalan, ora,...) have similar mechanisms, they
use other namespace-uris, other syntax,...
See at the specific Web-Sites, they have all examples...

michael


David Hemmingsson wrote:

> If I Use XT or some other Java-based XSLT-parser, is it then possible to
> embed calls to java methods in other classes?
> Like:
> <xsl:template match="data">
>         <a_tag>
>                 (something like) com.bla.data.getMyData();
>         </a_tag>
> </xsl:template>
>
> ...to get:
> <a_tag> The Data </a_tag>
>
> If it works I?ll be the happiest programmer of the day!
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> David Hemmingsson
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>  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.