Subject: Re: RE: Are there things missing in XSLT which force people to use, say, Java to process XML?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 29 Oct 2010 22:34:19 +0100
|
(1) XSLT is a complete programming language, but doesn't support
most things most developers need to do.
Correct. XSLT is a special-purpose language, it's designed for
transforming XML. If you want to transform XML, it's the right tool for
the job. If you want to write an urban traffic simulator, it probably isn't.
(2) Java (and others) were also designed to be enterprise-class programming
languages. This means the assumption that many programmers will collaborate
around a large project. Encapsulation and complexity hiding are very important.
A strongly typed, compiled language (not interpreted) is also important.
In short, XSLT wasn't designed for "programming in the large".
It's hard to see how your last sentence follows from what went before.
There are plenty of examples of XSLT being used successfully for
programming in the large. One of the important aspects of this is that
it is designed to handle data on a wide spectrum from unstructured to
structured. Handling data whose structure is not known at compile time
needs a different approach to typing. This is one of the reasons why
manipulating XML in Java (through interfaces like the DOM) is so painful.
Though there are still areas for improvement; one of them is separate
compilation, and we hope to make progress on this soon.
Michael Kay
Saxonica
|