XML Prague 2005 EXSLT
Upcoming SlideShare
Loading in...5
×
 

XML Prague 2005 EXSLT

on

  • 703 views

about EXSLT what we did right / wrong

about EXSLT what we did right / wrong

Statistics

Views

Total Views
703
Views on SlideShare
698
Embed Views
5

Actions

Likes
0
Downloads
1
Comments
0

3 Embeds 5

http://www.linkedin.com 2
https://www.linkedin.com 2
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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.

XML Prague 2005 EXSLT XML Prague 2005 EXSLT Presentation Transcript

  • EXSLT Facilitating the Standards Process
  • 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
  • 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
  • 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
  • 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
  • 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().
  • EXSLT Implementations
    • Saxon
    • 4suite
    • Libxslt
    • Xalan
    • EXSLT.NET (now in Mvp.Xml)
    • sablotron
  • Where we got it wrong
    • No one uses Function module
    • Didn’t follow Software development practices
    • Module and function level imports fundamentally broken
  • 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
  • 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
  • Import XSLT
    • Importing was ‘broken’…was 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 didn’t understand the element….
  • Other Nagging Issues
    • Interdependencies
    • Function Submission process
    • Missed opportunities
    • Licensing
    • Namespaces
  • 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
  • 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 doesn’t mean ‘give up software development practices’!
    • RDF made revision easy everywhere
    • Didn’t need typing / XML Schema…though next time around…
  • 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
  • EXSLT informed XSLT 2.0
    • Working with RTF
    • XSLT is not a programming language
    • Abstracted complex XSLT (grouping)
    • Multiple Documents
    • String Handling
    • Evaluating XPATH?
  • 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 ???
  • 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’
  • 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 ?
  • 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..
  • 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
  • Conclusion
    • Suggestions…use cases, informal spec review, early implementation
    • Linking in XML, XML Schema, Xform, WS*, Binary XML, What to do with XML Namespaces….
    • Thank you