Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
The Development of XSLT 2.0 and XPath 2.0
The requirements for XSLT 2.0 and XPath 2.0 were published on February 14, 2001. In the case of the XPath 2.0 requirements, the document was written jointly by the two working groups. You can find the documents at the following URLs:
http://www.w3.org/TR/2001/WD-xslt20req-20010214
http://www.w3.org/TR/2001/WD-xpath20req-20010214
Broadly, the requirements fall into three categories:
The development of XSLT 2.0, culminating in the Recommendation of January 23, 2007, proved to be a long drawn out process. There were early delays getting agreement with the XQuery group on the details of XPath 2.0. This took a long time firstly, because of the number of people involved; secondly, because of the very different places where people were coming from (the database community and the document community have historically been completely isolated from each other, and it took a lot of talking before people started to understand each others' positions); and finally, because of the sheer technical difficulty of finding a workable design that offered the right balance between backwards compatibility and rigorous, consistent semantics. Later, when the specification appeared to be all but finished, it still took a couple of years to get through the public reviews demanded by the W3C process, which generated thousands of detailed comments.
But that's all history now. Let's look next at the essential characteristics of XSLT 2.0 as a language.
XSLT 2.0 as a Language
What are the most significant characteristics of XSLT as a language, which distinguish it from other languages? In this section I shall pick five of the most striking features: the fact that it is written in XML syntax, the fact that it is a language free of side effects, the fact that processing is described as a set of pattern-matching rules, the fact that it has a type system based on XML Schema, and the fact that it is a two-language system in which one language (XPath) is embedded in another (XSLT).
Use of XML Syntax
As we've seen, the use of SGML syntax for stylesheets was proposed as long ago as 1994, and it seems that this idea gradually became the accepted wisdom. It's difficult to trace exactly what the overriding arguments were, and when you find yourself writing something like:
to express what in other languages would be written as
y = f(x);
, then you may find yourself wondering how such a decision came to be made.
The most obvious arguments for expressing XSLT stylesheets in XML are perhaps as follows: