[Home] [By Thread] [By Date] [Recent Entries]
On 3/23/07, bryan rasmussen <rasmussen.bryan@xxxxxxxxx> wrote:
Okay 2 things here; You are not saying exactly which "these things". There are plenty of XSLT 1.0 examples of useful transformations that do not need/use a source xml document. Take for example Jeni's famous stylesheets that you have to double-click on their names in Windows Explorer in order to get them going. Jeni is one of the most brilliant people I have met and I do miss her presence in this list.
To return back to examples, in April 2002 I did publish an example of an XSLT 1.0 transformation that can potentially run for as long as needed. It also is not something artificially contrived and actually produces useful results for its end user. It is very easy to explain what this transformation does, how it performs its work and why it can perform for an unlimited time, as long as its services are needed. One can read the details here: http://fxsl.sourceforge.net/articles/xslCalculator/The%20FXSL%20Calculator.html however the essentials are just in the following few lines of code, quoted from this source: <!-- This template gets back every new request from the calculator. A request has the form: <calc>
<op>+</op>
<arg>3</arg>
<arg>5</arg>
</calc>When the value of <op> is "q", then this template does nothing and simply returns, which ends the dialog. Otherwise, every known operation is evaluated using the math functions of FXSL. The template calls itself recursively with the result of
displaying the result to the user (done via an method of
an external object). This result is either a new request
for calculation, or the quit-op ("q").
--><xsl:template name="keepDialog"> <xsl:param name="pInput" select="/.."/> <xsl:variable name="vOp" select="$pInput/calc/op"/> <xsl:if test="not($vOp = 'q')">
<xsl:variable name="vResult">
<xsl:call-template name="evalOp">
<xsl:with-param name="pOp" select="$vOp"/>
<xsl:with-param name="pArg1"
select="$pInput/calc/arg[1]"/>
<xsl:with-param name="pArg2"
select="$pInput/calc/arg[2]"/>
</xsl:call-template>
</xsl:variable> <xsl:call-template name="keepDialog">
<xsl:with-param name="pInput"
select="myObj2:dispResult(string($vResult))"/>
</xsl:call-template>
</xsl:if>
</xsl:template>This was 5 years ago. Since then XSLT 2.0 has made it even more natural and easier to express such transformations. Abel mentioned the unparsed-text() function and I have been referring to the possibilities provided by the <xsl:result-document .../> instruction. So, there's nothing new about the real and practical possibility to use XSLT for any kind of processing that comes to mind. The usefulness of saying this once more is that people, who somehow missed this, are now better informed. Did you know that there were people who wrote an operating system using DSSSL ? :o) -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
|

Cart



