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

Calling java from xsl - with xml as parameter

Subject: Calling java from xsl - with xml as parameter
From: "richardtrans@xxxxxx" <richardtrans@xxxxxx>
Date: Thu, 6 Dec 2007 17:19:42 +0100 (CET)
 Calling java from xsl - with xml as parameter
Hi.

I hava a xml and a xsl which are being parsed.

In the xsl i want to call a java method with a parameter, which 
contains the source xml. The parameter can be of any type.
The java program returns a String.

The problem is to send the xml as parameter to the java method.

I have tried following:
Copy / Store the xml document in the variable xmlString.
<xsl:variable name="xmlString">
	<xsl:copy-of select="/*[local-name()='Invoice']" />
</xsl:variable>

Send the xmlString to the java method rtrtransform, but the problem 
is, that it only sends the values to the java method. When i want to 
send "<abc><d>hi</d><e>there<e></abd>", i only get "hithere". Tags are 
not send.
<xsl:variable name="myresult">
	<xsl:value-of select="transf:rtrtransform(string($xmlString))"/>
</xsl:variable>


I thought i could solve the problem by using xsl:copy-of select... , 
but that seems to be illegal:
	<xsl:value-of select="transf:rtrtransform(string(<xsl:copy-of select="
abc" />"/>
or
	<xsl:value-of select="transf:rtrtransform(string(&lt;xsl:copy-of 
select=&#034;abc&#034; /&gt;"/>


Any solutions to this?

Best regards
Richard Trans

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.