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 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Mixing XSL stylesheet and Java , Yannick Nicolas | Thread | XSL sheet to output to a plain text, Dylan Walsh |
RE: CharSet conversions, Jeremy Quinn | Date | RE: XML DOM Q: understanding namesp, Khun Yee Fung |
Month |