[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Well-balanced fragments as input to XSLT 2.0?
I would like to propose that XSLT 2.0 should be able to accept the same kind of "well-balanced" fragments as it can output. The exact details of what it can output are slightly complex (see The XSLT Tree Model and XSL:Output sections in Mike Kay's XSLT Programmer's Reference for a good explanation) but the basic attraction is that it includes options of outputting XML with no root element (pure text or CDATA), one root element (the traditional well-formed XML) or multiple root elements (an XML hedge?), though in all cases every open tag must have a close tag in the usual way. For me, this is great. It really adds to the utility of that otherwise slightly confusing distinction between the root element and the root node (I know, the root node can also hold root comments and PIs) and I think it would add to the power and simplicity of XSLT if you could apply XSLT to any well-balanced XML fragment that you could acquire. I see one problem - you can create these well-balanced fragments programmatically, through DOM operations (or through XSLT returning DOM objects) but you may not be able to parse them directly with XML parsers since they may not be well-formed. People may find this discrepency disturbing, but I find this to be outweighed by the attraction of achieving symmetry between XSLT's input and output models. Any other pros or cons? Francis. 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
|