[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Want serialized (rather than DOM-tree) output from XSL t
"Duffy, Bruce" <Bruce.Duffy@xxxxxxxxxxxxx> writes: > My question is this: At West, we want to apply an XSL style sheet to > an XML document to produce a result that *is not a tree*, but is > instead a string or stream in West's "WestPro" data stream format. And Henry S. Thompson <ht@xxxxxxxxxxxxxxx> answered: > >Sorry, won't happen. XSL is a companion standard to XML. The draft >recommendation makes clear that serialisation of the output is >allowed, but not required. By definition the output is XML, >whether tree or character sequence. Here's a technical issue wrt. transformation vs. formatting language :-) XSL as it stands today can be used to generate arbitrary text - almost. The only lack I'm aware of is that the output is littered with XML character markup (e.g., "<" is always emitted as "<"). If there was a markup='none' modifier to <xsl:text> and <xsl:value-of>, you could generate anything at all. This is marginally useful for readability of things like generated JavaScript code in normal XSL-to-XML transformations, so theoretically it could become part of the standard. Don't hold your breath, though :-) There's a simple workaround - all you need to do today is pass the output through an XML character markup interpreter. If you are using any Java based XSL processor, for example, you could write a filtering output stream doing the job and give that to the processor; your program would then emit the exact text you want. Is there some transformation problem you encountered at West which couldndn't be resolved this way? Share & Enjoy, Oren Ben-Kiki. 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
|