[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
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|