Re: [xsl] What's your visual metaphor for XSL Transformations?

Subject: Re: [xsl] What's your visual metaphor for XSL Transformations?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 23 Mar 2007 12:39:38 +0100
Robert Koberg wrote:

1. There is no need to have any source XML document.
http://www.w3.org/TR/xslt20/#initiating

whatev... seriously, do you consider this an arguement? How do you transform nothing?



1. A short while ago, I put a UUID generator from XSLT to the list. It does not need any input and it will create any number of UUIDs.


2. One of our applications create a commands tree out of thin air. The XSLT is in 1.0 (it is browser based), but still doesn't need input (unfortunately, XSLT 1.0 did not provide such a means, so I use the simple-enough workaround to apply the XSLT on itself and discard the transformation). The commands are created by inputs and are provided with parameters. You could see it as a SOAP command generator, though the XML it generates is a bit simpler than that.

3. Another application we have generates a report of all kinds of system properties. This is handy for system administrators, it uses the system-property(xyz) with properties set in our application. Why XSLT? Because it is so easy to create XSL-FO from it and render it to a nice PDF or HTML page. No input there either.

4. If you take a look at FXSL you will see a lot of math there that does not require any input XML. It even has a random generator!

5. Most of my other transformations transform non-XML documents into XML. To do this, the XSLT is run without input document (-it for Saxon to start an initial template). The documents are read in with unparsed-text(). However, I do consider this input, albeit not XML.

I believe one can sail without wind, when you use a motorboat ;)

-- Abel

Current Thread