Thank you, Michael. Yes, the moving will impact a lot. But I meet the problem which I can not figure out in Version 1.0, which in version 2.0 can easily be solved(see the post Can xsl check specific type, I need to check the data type, for example 6th, 293th, 2nd, I only need to check this contains number+th|nd, and just get the number part. If it is"Wath", returns "Wath".). I have change the stylesheet attribute to version 2.0:
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" exclude-result-prefixes="xs" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
, but it does not work as 2.0.
Can we run 1.0 and 2.0 together for different files? Like for 1.xsl we run version 1.0, but for 2.xsl we run version 2.0.
Thank you so much.
Quote:
Originally Posted by mhkay
Typically if you move from XSLT 1.0 to 2.0 you will be moving to a different XSLT processor, and that will usually have more impact than any difference in the standards - for example differences in APIs and vendor extensions.
The other thing that varies immensely is regression testing. If you have a large suite of regression tests, then put them through a 2.0 processor and see what happens. If you don't have a large set of regression tests, then you need to think about how else to manage the risks - which are small, but not ignorable, as with any software configuration change.
XSLT 2.0 has a "backwards compatibility mode" enabled by leaving the version number set to 1.0. If you have a good test suite, change this to 2.0 and see whether it causes any problems (sometimes it will reveal errors in your stylesheets that have gone undetected for years). If you don't have a good test suite, a more cautious approach is to leave the version attribute set to 1.0.
|