Re: [xsl] XSLT vs Perl

Subject: Re: [xsl] XSLT vs Perl
From: Terence Kearns <terencek@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Feb 2004 16:26:43 +1100
Sorry I'm late. Been away from this list for a while but I've read this entire thread and found it quite interesting (response below).

David Tolpin wrote:
But the way they are added is far from being perfect. The string regular
expressions of XSLT 2.0 is the only place where regular syntax is used,
XML matching is not expressed in terms of regular expresions.

Further on, the regexps in XSLT 2.0 are a mix of those from XML Schema
and perl 5, fit into the XML syntax XSLT 2.0, but without capabilities
of perl to compose and manipulate them.

While in perl one can generate, compute, concatenate and split regular
expressions, as well as manipulate their results freely, in XSLT 2.0
the operations are limited to a few built-in commands.

I understand that it is a difficult task to design a regular expression
language to match attribute values and character data; but when there is
no good solution inside XSLT, it should be left out of it -- tool chains
can be long; otherwise the glue must be powerful and flexible. XSLT does
not provide a powerful and flexible glue; it is still XML-oriented.

In RenderX XEP, an XSL FO formatter, the preprocessor is written in XSLT;
it is a complex stylesheet of moderate size, and it does what is best to
do in XML manipulation language.

Regular parsing and type manipulations are done in a different language, because a different language is more suitable.

Instead of providing means for interaction, XSLT 2.0 is going to provide
inferior solutions for problems that can better be handled in other parts
of toolkits.

David, the subject title of this thread seems unfortunate given that primarily you seem to be raising discussion (taking issue with) some of the functionality that is included in XPATH 2.0 which is seen by you as extraneous or badly implemented.

On the face of it, the simple answer would appear to be "Well why not just use the good bits of XSLT2 and ignore all the bits you don't like". Well if the answer to your queries was just for you, the individual, then that would indeed by my advice.

However, in the interests of "improving the technology", I think the debate so far has been very useful on the whole (apart from people misinterpreting your questionings as a need to "defend XSLT").

I encourage anyone who has the fortitude to get in amoungst a particular group and shake the tree a bit. The worst thing that could happen is that either your ideas a misguided or your contribution is discarded and not put to use. I think in this case, your questions have been useful and have forced readers of this thread to at least considder the aspects of XSLT that you touched on.

It's pretty amazing when you think of how important all the work being done with XML related standards is right now. In fact, it is importnant enough for people to poke and prod every minor detail and aspect just to make sure people have really thought it through.

Anyway, I enjoyed reading this thread. Good work.

PS. I can understand some of the committee members being a bit sensitive when they all do their best to listen to all as well as balance all the factors. I don't imagine it would be an easy or even thankful task. Go easy on using negative contexts when using the word "committee", it could quite rightly be interpreted as an attack on the real people and individuals who give their time to said committee.

XSL-List info and archive:

Current Thread