This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How powerful is this XSLT?




On Sat, 19 Feb 2000, Jeff Lansing wrote:

> In response to the question " How powerful is this XSLT?" David Carlisle
> writes:
> 
> > it's Turing complete (bar memory limits) so you could in principle
> code
> > a simulation of a JVM and then run the xt classes in saxon, or vice
> > versa. Might not be particularly fast though.
> 
> Not quite. For we would still have to write the XSL for whatever it was
> that we were trying to accomplish in the first place. And it's the
> possiblity
> of *that* that the question seems to be addressing.
> Jeff

   No, that's not true, assuming that the claim of Turing completeness is
true (I haven't seen the proof, but I'm willing to take David Carlisle's
word on it), at least from a theoretical standpoint. You could implement,
say, a c or c++ or Perl or SML compiler or interpreter in it. Or
Fortran. Or any other programming language you choose to name. Then you
could just write your transformation (or say database, or 3D modeling, or
any other application) in that language. It might be kind of slow... and
of course it would need the appropriate hooks into your platform specific
environment. 

   The real issue isn't power, at least in a theoretical sense. It's
practicality. Pretty much every language I've ever programmed in has been
Turing complete. And my scientific calculator is also "Turing
complete". In theory it can solve the same problems that the fastest Cray
machine built can solve (bar memory limits). Some languages are still
better for some purposes than others.

   So the question is, for what sorts of problems is XSLT
easier/more efficient/more interoperable than say, a Perl script. From
what I've seen (and I'm certainly not an expert on XSLT) it's the
interoperability and declarative syntax that make XSLT potentially
useful. It also seems that some operations on xml will be better
done in some other way. Mr. Carlisle's word count stylesheets make that
really clear (congratulations for coming up with that- I'd rather not
work that hard).

Tagore Smith 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]