EXSLT was created in 2001 to address limitations in XSLT 1.0 by defining common extension functions. It was developed openly with input from the community and aimed to provide cross-platform compatibility. While successful overall, issues included a lack of software development practices, broken imports, and underestimating the power of templates. EXSLT informed and helped XSLT 2.0, which obviated the need for EXSLT by providing more robust functionality. Going forward, EXSLT's role as a specification is fulfilled but some functions could potentially be reused in XSLT 2.0 libraries.
2. Overview Jim Fuller (jim.fuller@webcomposite.com) Problem: Year 2000, portability, functionality in XSLT Solution: EXSLT Where we got it right/wrong Benefit Open Source Specification Future for EXSLT
3. Problem in XSLT, around the Year 2000 XSLT 1.0 processors were implementing extension functionality XSLT becoming dependent on underlying processor Reduced compatibility Other problems: XSLT was limited, basic usage was being hampered by RTF
4. History April 2000 Stephen Meunch Don Park XTECH2000 and David Megginson (of SAX fame) W3C reacted with XSLT1.1 e.g. xsl:script Early 2001, Uche Ogbuji generated a petition Dr. Jeni Tennison formulated a set of draft specs
5. Solution: Extensions for XSLT March 2001, Dr. Tennison and small subset of community went about defining EXSLT EXSLT defines functions grouped into modules Where possible we created implementations either in pure XSLT 1.0 or using javascript Created documentation to assist users and implementators It was hoped that XSLT processor implementators would create native implementations
6. EXSLT Modules Common: Dramatically simplified stylesheets through providing a node-set(), object-type(), and document() (as per XSLT 1.1) function definitions Date and Time: A full range of date and time handling functions. Dynamic: Enables dynamic evaluation of XPATH Sets: Encapsulated functions which make it easy to perform set type operations on XML. Functions: Enabled the creation of functions Math: Enables basic math operations within XSLT Random: Added facilities to generate random numbers Regular Expressions: Enabled regular expression handling Strings: Contains string handling functions such as tokenize() and find() / replace().
8. Where we got it wrong No one uses Function module Didnt follow Software development practices Module and function level imports fundamentally broken
9. Function Module Underestimated the power of templates Lots of energy went into the discussion Originally intended to provide an EXSLT Function implementation of every extension
10. Lack of Rigor Placing EXSLT with sourceforge would have been smart from the beginning Heavyweight XML markup allowed us to get away with standard software development practice Having no continuous integration or source control in place, very bad and paying the price today
11. Import XSLT Importing was brokenwas no easy way for users to use module level imports Due to the fact of importing all implementations e.g. if msxsl:script element was encountered by XSLT processor that didnt understand the element.
12. Other Nagging Issues Interdependencies Function Submission process Missed opportunities Licensing Namespaces
13. Getting things right Catering to users, implementators and eventually specification Having individuals like Jeni Tennison and Michael Kay involved Extensive documentation Inclusion of use cases
14. Lessons Learned managing a large XML distribution Large XML distributions benefit from the re-use of existing markup/vocabularies like RDF and Dublin Core Just because its markup doesnt mean give up software development practices! RDF made revision easy everywhere Didnt need typing / XML Schemathough next time around
15. Some Ruminations EXSLT was created by the entire XML community As with success on software projects, having individuals who are highly experienced and skilled has a major impact (Jeni Tennison, Uche O., Michael Kay) Synchronicity with XSLT UK 2001
16. EXSLT informed XSLT 2.0 Working with RTF XSLT is not a programming language Abstracted complex XSLT (grouping) Multiple Documents String Handling Evaluating XPATH?
17. EXSLT informed XSLT 2.0 Working with Result Tree Fragments XSLT is not a programming language Abstracted complex XSLT Outputting Multiple Documents String Handling Evaluating XPATH ???
18. Benefits to XSLT 2.0 Allowed XSLT 2.0 to take a bit longer Provided W3C Working Group with real world evidence (e.g. XSLT 2.0 functions are not 1st class) XSLT 2.0 and the suite of linked specifications puts EXSLT as we know it out of business
19. EXSLT Future EXSLT as a specification has done its job and should die a natural death XSLT 1.0 usage will peak, which is why I have submitted a complete build based on Ant which generates site document, platform specific module imports, and reports on XSLT processor compatibility; up to the rest of the EXSLT gang to review Possible XSLT 2.0 function library? Does EXSLT have application beyond XSLT ?
20. Facilitation EXSLT came from the whole XSLT community EXSLT was a bridge between groups like the W3C and the community EXSLT goals were constrained and focused on what was important rather then completeness Why are there not more of these style efforts bridging the problem gap e.g. etc..
21. Open Source Specification Micah Dubinko recent open letter to WHATWG illustrates the point Are there tools that can help us (developers)? working on schema enabled wiki with annotation
22. Conclusion Suggestionsuse cases, informal spec review, early implementation Linking in XML, XML Schema, Xform, WS*, Binary XML, What to do with XML Namespaces. Thank you
Editor's Notes
Working with Result Tree Fragments The exsl:node-set function returns a node-set from a result tree fragment, allowing for single stylesheets to perform multiple pass type processing. Many developers were tearing their hair out working around this limitation of XSLT 1.0. Specifically an RTF is what gets returned when using xsl:variable and since no further operation could be performed on an RTF it was necessary to convert to a first class node-set using third party functionality. The reason for such a limitation on xsl:variable was mainly implementator driven who argued that it would make their XSLT Processor development more difficult. Unsurprisingly most major XSLT processors already had their own extension functions for this, albeit with different signatures. EXSLT normalised node-set function usage, making stylesheets portable as well as to refactor complex transformations into sequences of simpler transformations. This approach was so successful that XSLT 2.0 eschews with the need of node-set function, by introducing the concept of sequences. XSLT is not a programming language XSLT 1.0 lacked a lot of functionality which one would expect from a programming language, though of course.... it was and still is never meant to be a full blown computer language. EXSLT Date and Time and Math modules provided a lot of missing functionality for developers. A lot of this common functionality has been refactored out of XSLT 2.0 all together and placed into a separate specification all together, e.g. XQuery 1.0 and XPath 2.0 Functions and Operators; keeping XSLT focused on what it was meant to be, whilst providing developers with much needed functionality. Abstracted complex XSLT The EXSLT Set module was one of the few Modules which could be implemented fully using pure XSLT 1.0 templates. The templates themselves are quite arcane and a good example of XSLT that most new users have problems with. XSLT 2.0 does a great job at getting rid of this type of 'black magic'. By encapsulating templates into callable functions, developers stylesheets become more readable and easier to understand. Early on in capturing XSLT 2.0 requirements it was obvious the need for simplifying grouping and set manipulation, which has reflected an host of features in XSLT 2.0. Outputting Multiple Documents XSLT 1.1 included some useful functionality, for example, in section 16.4 Multiple Output Documents it defined a method of allowing a single stylesheet transform to generate multiple documents. Having the ability to generate several output documents was something developers definitely wanted. Though with the August 2001 release of XSLT 1.1 stating that the W3C no longer supported that draft it was clear that this was a good function to be included into EXSLT. XSLT 2.0 supports this natively with the xsl:result-document instruction. Evaluating XPATH EXSLT also solved another nagging problem in XSLT 1.0, that of dynamically evaluating XPATH statements. The Dynamic module let developers create XPATH expressions from strings, allowing them to be constructed 'on the fly'. Controversially, XSLT 2.0 does not include this functionality, though the ability to use more sophisticated FLWR type expressions meant one didn't have to resort to dynamic evaluation techniques quite as often. String Handling XSLT 1.0 had anaemic string handling facilities; the EXSLT String and Regular Expression modules went some way to giving tools to developers to perform sophisticated string manipulation operations. XSLT 2.0 directly adopted regular expression handling and a whole spectrum of new string handling functions were defined for use by XSLT 2.0.