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

RE: JAXP Saxon Extensions and Java Objects

Subject: RE: JAXP Saxon Extensions and Java Objects
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sun, 26 May 2002 16:19:57 +0100
instance objects parameters saxon
> I've got several java objects I'd like to hand to an extension behind 
> the scenes. In theory I could hand them as parameters to the 
> transformer 
> and set them in attributes of my extension element. But a 
> more elegant 
> solution would be to get them somehow into the 
> Context.getController().getUserData(...) hash via some method 
> I'm hoping 
> is available in Saxon for this. Or a method that might exist 
> in JAXP as 
> well? Please, any tips would be great.
> 
There are various ways you can do this. Certainly, you can use the
setUserData() and getUserData() methods on the Controller object to pass
data into extensions. Or you could simply pass a Java object to the
stylesheet as a parameter, and then pass the parameter as an argument to
an extension function. Or you could initialize an instance of your
extension class before starting the transformation, pass this instance
as a parameter, and then invoke instance-level methods on the class by
passing the instance as the first argument to the extension function
call.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 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.