Change the Version to 2.0 and See What Happens
The simplest approach to migration is to change the version attribute of the <xsl:stylesheet> element to 2.0. If you have any static errors, the XSLT
2.0 processor will flag those immediately. You can then fix the errors
or use version="1.0" on specific
XSLT elements so the XSLT 2.0 processor will use backwards-compatible
mode.
If you use this approach, it’s important to check for the
dynamic errors we covered in the previous section. If you add version="2.0" to your stylesheet and it runs
with an XML document, that doesn’t mean it will run with every
document. As with any modified code, testing is crucial before you put
your stylesheet into production.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access