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

Re: how to handle structured data from Java

Subject: Re: how to handle structured data from Java
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Wed, 13 Oct 2004 16:55:23 -0700
structured data in java
Kevin Rodgers wrote:

I need to pass an attribute value to a Java method implemented by a
co-worker and save the resulting object in a variable (since it's a
relatively expensive operation), then access the object's string
components.  Should I write an extension function in Java to call his
method and convert the object into a DOM Node that would be stored via
<xsl:value-of name="variable" select="extension:function(@attribute)">?
How would I then access its subnodes -- via select="$variable/component-x"?

You really don't want to use extensions.

Or is there a better way?

I think so. Have your co-worker create a class that implements javax.ml.transform.URIResolver. It should check for the value coming in as an href. When the resolver sees your attribute value, have him return an appropriate XML Source. Then you can do the following in your XSL:

<xsl:variable name="myvar" select="document(@myattr)"/>


I'm using Xalan, but would like to implement
this in as portable a fashion as possible -- will EXSLT help?


Current Thread


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.
First Name
Last Name
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.