|
Subject: Re: [xsl] Re: If XSLT is declarative, why doesn't it feel that way? From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 21 Apr 2026 08:51:52 -0000 |
On Mon, 20 Apr 2026 12:48:32 -0000 "Martynas JuseviD ius martynas@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > In other words, although I cannot formally prove it, XSLT offers > fewer ways to manipulate XML data than a general-purpose language > such as Java -- and that is a good thing :) > Formally, XSLT is turing-complete, as is e.g. Java, and the set of computations they can perform (ignoring e.g. memory limits) is identical, i think. In the XSLT courses i run, we do some timings. People are often surprised to see that e.g. Saxon gets 3 minutes of CPU time in 1 minute of elapsed time - Saxon has seen an opportunity to use multiple threads and optimized automatically. I donbt know what about XSLT does not feel declarative. For example, you canbt assign to variables, we donbt have looping (no, for-each is not a loop in the procedural sense), and a named template is equivalent in many ways to a function, but not to a procedure. It canbt change its argumentsb values, it canbt change global variables, and calling the same template or function with the same arguments will under most circumstances return the same result - the processor can even cache the result and not call the function more than once. Strictly speaking functional, non-procedural, declarative, are not synonyms, but there is a lot of overlap, and XSLT sits in the middle of these. liam -- Liam Quin: Delightful Computing - Training and Consultancy in XSLT / XML Markup / Typography / CSS / Accessibility / and more... Outreach for the GNU Image Manipulation Program Vintage art digital files - fromoldbooks.org
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Re: If XSLT is declarativ, Martynas Jusevičius | Thread | Re: [xsl] If XSLT is declarative, w, Michael Kay mike@xxx |
| [xsl] The future of and relevance o, Andre Cusson akhu01@ | Date | Re: [xsl] If XSLT is declarative, w, Michael Kay mike@xxx |
| Month |