[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL for non-XML input (Was: Re: XML Hangover)
On 07-13-2005 4:25 AM, Pete Cordell wrote: > Does that imply that XSL could be used on any hierarchical text based > data input with a suitable front end that can extract events that mirror > XML's elements and attributes etc? > > Going further, observing the idea of using out of band data (e.g. > schema) to provide extra information to complete 'binary XML', could XSL > (with suitable front ends) work on say an ASN.1 encoded X.509 > certificate (and ASN.1 message definition) and produce, say, a PDF output? > > Not that I have a need to do that right now! I'm just interested to > know whether XSL can be used as a kind of universal data translator. It's possible in several ways: 1. Michael Kay has pointed out already that XSLT 2.0 includes unparsed-text() 2. Brian Goetz wrote an article that showed how to use the JTidy toolkit to run XQuery against HTML, by converting it on-the-fly to XML. This same idea could work with XSLT. See http://www-128.ibm.com/developerworks/java/library/j-jtp03225.html 3. It is already fairly common to output PDF files from XSLT via post-processing. This is what Apache's FOP and RenderX's XEP, among others, already do very well. See http://xml.apache.org/fop/ and http://www.renderx.com/tools/ 4. Stylus Studio (disclaimer: our product) uses a similar idea to provide a host of adapters for converting non-XML formats to or from XML. The very simplest let you run XSLT (1.0 or 2.0) or XQuery against a comma-separated-value file, and the more complex allow transparent operation against EDI files or relational databases. See http://www.stylusstudio.com/docs/v62/d_flatfileconversion10.html I just gave a presentation on this very topic at one of our sister division's annual conferences. The entire presentation is at http://www.stylusstudio.com/exchange/transforming.html - including slides and audio. -- Sincerely, Tony Lavinio Stylus Studio Principal Software Architect http://www.stylusstudio.com/
|
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
|