Re: [xsl] What types of programming problems is XSLT designed for?

Subject: Re: [xsl] What types of programming problems is XSLT designed for?
From: "rik@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Nov 2024 13:21:51 -0000
It's more about what the data says than the fact that it is in XML. 
In some cases reading the XML is trivial, but doing the work is not
something suited to XSLT.

For example when XML is used to express a program, XSLT is not the best
program interpreter.
If the XML was a list of email addresses and messages, maybe XSLT, not being
good at I/O, may not be the best way to send the emails.

There are human factors too. What tool you use has to be influenced by the
people you have. 
Even if an XSLT team beats a Java one, that doesn't help if you don't have
an XSLT team.
It may not be efficient to train a Java programmer to learn XSLT, to parse
one file.
Even if it is less efficient to do it in Java, using the tool you know has
advantages. 

A Java programmer can do more or less anything, to varying degrees of
efficiency. 
An XSLT one can only really do data manipulation ones, which is a subset of
all programming tasks (without getting too philosophical that everything is
data). 

Rik

-----Original Message-----
From: Roger L Costello costello@xxxxxxxxx
(xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx)
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> 
Sent: 04 November 2024 13:03
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] What types of programming problems is XSLT designed for?

Yesterday Michael Kay wrote:
----------------------------------------------
XSLT has always been designed as a special-purpose programming language
rather than a general-purpose language, and writing compilers is not one of
those special purposes.
----------------------------------------------
I understand that XSLT is a special-purpose programming language and not a
general-purpose language.  But I always thought that "special-purpose" meant
that XSLT was designed to efficiently process XML-formatted data, whereas a
"general-purpose language" can process data in any format (albeit without
much efficiency).  

I always thought, "If the input is formatted as XML, then use XSLT. Period.
It doesn't matter what the application is."

But Michael says that is not correct. He says that, for certain
applications, even though the input is formatted as XML, XSLT is not
suitable. For instance, if the application is an XSLT processor (such as
SAXON), then XSLT is not a suitable language.

Assuming the input is formatted as XML, what types of programming problems
is XSLT designed for and what types of programming problems is XSLT not
designed for?

Current Thread