Reputation: 1599
i am currently using xslt1.0 and jdk1.6.0_10 for converting xml to html..but i couldnt use some inbuilt-functions of xslt2.0 in xslt1.0. How to migrate from xslt1.0 to xslt2.0.what are all the change i have to do. please help me... Thanks in advance..
Upvotes: 0
Views: 285
Reputation: 167401
You need to move to an XSLT 2.0 processor like Saxon 9 (http://saxon.sourceforge.net/). Then you can start to use the XPath and XSLT 2.0 functions, even when using version="1.0"
in your stylesheet, as then the processor uses backwards compatible http://www.w3.org/TR/xslt20/#backwards processing. Whether you want to keep version as 1.0 in your stylesheet depends on whether you are using any constructs that would evaluate differently with 2.0. The main problem could be <xsl:value-of select="foo"/>
where foo selects more than one element as that way an XSLT 1.0 processor and an XSLT 2.0 in backwards compatible mode outputs the string value of the first foo element while with 2.0 the string value of all foo elements is concatenated and output.
Upvotes: 1