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

RE: Mixing XSL stylesheet and Java handlers in Saxon

Subject: RE: Mixing XSL stylesheet and Java handlers in Saxon
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 17 Dec 1999 17:02:37 -0000
saxon xsl java
> Thank you for these tips, but in fact what I would like, is loading
> a stylesheet in my Java program. This stylesheet would give me basic
> template rules. Then according to some parameters, my program would
> define some additional node handlers.

I think this will be reasonably easy in the next version, which is
undergoing final testing. This will allow you to use the logic:

PreparedStyleSheet ps = new PreparedStyleSheet();
ps.prepare(new InputSource("style.xsl"))
RuleManager rm = ps.getRuleManager();
Pattern p = Pattern.make("html");
rm.setHandler(p, new HtmlNodeHandler());
StyleSheetInstance ssi = ps.makeStyleSheetInstance();
ssi.renderSourceDocument(new InputSource("source.xml"));

I didn't design the interface with that in mind, but it comes out quite
nicely.

By the way, it might be a courtesy to others on this list if specialised
SAXON discussions are conducted on http://saxon.xsl.listbot.com

Mike Kay


 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.