[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Simple API for XSL?
> -----Original Message----- > From: Tim McCune [mailto:timm@xxxxxxxxxxxxxxxx] > > I went ahead and wrote an interface that lets us switch XSL > processors by changing one line of code. The interface is pretty simple so far: > > public String process(Document xml, String stylesheetName) throws > XSLProcessorImplException; > Well it looks simple but it raises several questions: - There are XSL processors such as xt that do not take a Document as input. Perhaps we should allow something like the SAX InputSource. Or extend InputSource so that as well as allowing a URL, a character stream, or a byte stream, it also allows a File, or a Document... - What is the String containing the stylesheetName? A URL? If so, why not specify it as a URL? Or, again, as a general InputSource? In fact, supplying a Document here is more useful than for the source XML file, since a likely scenario is to process lots of source documents using the same stylesheet, in which case you only want to parser the stylesheet once. - What is the output? XSL generates a tree, not a String. Should it be a Document? If we work on the assumption that the output tree will always be flattened to an XML character stream, supplying a Writer as a third parameter would be more flexible than getting a String as the result. 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
|