left up right
Upgrading to XSLT 2.0
Don't
The new functionality in XPath 2.0 is mainly aimed at the XQuery user
Everything in XSLT 2.0 can be done with XSLT 1.0
Some things are easier in XSLT 2.0
Some things are much more difficult
Transition
Five possible approaches from IBM
First run existing XSLT 1.0 documents through an XSLT 2.0 transformer in XSLT 1.0 backward-compatible mode and see what happens
Massage away all the errors/incompatibilities
Bite the Bullet
Set the transformer to XSLT 2.0
Remove all the data casting that you take for granted
  • concat can only take string arguments
  • Never select more than one node if only one is intended
  • Make it explicit when working with the first node of a nodeset so sprinkle [1] everywhere!
    <xsl:value-of select="author | producer | creator"/>
    becomes
    <xsl:value-of select="(author | producer | creator)[1]"/>
    
  • Sprinkle the document with number(), string(), and boolean() wherever you think it might be necessary