Re: Rescuing XSLT from Niche Status
David Carlisle wrote: > I can see it's useful if pulling bits of data out of databases etc > (which is one main use of the ASP on the web pages here, as a matter > of fact) Where almost the entire page is static and you just want to > "fill in the blanks". > > But if you are converting a document format of any complexity down > to HTML (for example) the template rule driven approach is far more > natural and easier to code in XSLT as the output is driven by the > input, you don't need to sketch out the entire format of the > document; If you come across a list in the input, convert it to an > HTML list, and carry on etc.. I think what's coming out here is not that it's a matter of the document vs. data orientation of the source, but rather the match between the source and the result. If the result follows the structure of the source, then a push method is more natural - the source drives the process. If the result has a substantially different structure from the source, then a pull method is more natural - the result drives the process. Documents *tend* to be transformed to documents (hence usually use push) but you could imagine a document-analysis stylesheet with a result structure totally different from the document - an index perhaps. There, a pull approach is easier. Similarly, while you *tend* to be pulling information out of data-oriented XML for presentation, there are other times when the result structure is very similar - a translation, perhaps. There, push is more natural. And of course it's not a matter of 'this stylesheet uses pull' and 'this stylesheet uses push'. Different bits of the same stylesheet can use a different method depending on the match between that particular bit of the source and the result that you need from it. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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