<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="changes" page="intro91" subpage="xslt91"/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: XSLT 2.0</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: XSLT 2.0"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>XSLT 2.0</h1> <p>The warning that is issued when a stylesheet that specifies <code>version="1.0"</code> is now suppressed by default when the transformation is run via an API rather than from the command line. The default can be changed by calling <code>Configuration.setVersionWarning(true)</code>. User feedback suggests that this warning is often an irritant and there are environments where it is hard to suppress it. The XSLT specification says that the warning SHOULD be produced unless the user has requested otherwise; therefore be informed that calling the Saxon API without setting this switch counts as "requesting otherwise".</p> <p>Tail call optimization is now implemented for <code>xsl:next-match</code> as well as <code>xsl:call-template</code> and <code>xsl:apply-templates</code>. This caters for mutual recursion involving a mixture of these three instructions.</p> <p>The <code>type-available()</code> function can now be used to check for the availability of Java classes. For example <code>type-available('jt:java.util.HashMap')</code> returns true, where the prefix <code>jt</code> is bound to the URI <code>http://saxon.sf.net/java-type</code>.</p> <p>The system property <code>xsl:supports-namespace-axis</code>, introduced in erratum E14, is now recognized (and returns the value "yes").</p> <p>In <code>xsl:number</code>, the specification classifies characters as alphanumeric if they are in one of the Unicode categories Nd, Nl, No, Lu, Ll, Lt, Lm or Lo. Saxon was previously using the Java method <code>Character.isLetterOrDigit()</code> which turns out not to be precisely equivalent to this definition. This has been corrected.</p> <p>An additional option <code>-xsd:schemadoc1.xsd;schemadoc2.xsd...</code> is available on the command line. This supplies a list of additional schema documents to be loaded. These are not automatically available in the static context of the stylesheet, but they are available for use when validating input documents (or result documents). The argument can also be used to supply the schema location of a schema document imported by the stylesheet, in the case where the <code>xsl:import-schema</code> declaration refers only to the target namespace of the schema and not to its location.</p> <p>An additional command line option <code>-traceout</code> allows the output from the <code>trace()</code> function to be directed to a file, or to be discarded. A corresponding option is available in the API (classes <code>Controller</code> and <code>XsltTransformer</code>).</p> <p>A new extension instruction <code>saxon:iterate</code> is available experimentally, with subsidiary instructions <code>saxon:continue</code>, <code>saxon:break</code>, and <code>saxon:finally</code>. This is designed partly for easier coding of operations that otherwise require explicit recursion, but mainly to enable streamed processing of input files. For details see <a class="bodylink" href="../../extensions/instructions/iterate.xml">saxon:iterate</a>.</p> <p>The code supporting the creation and testing of patterns, as defined in XSLT, has now been decoupled from the XSLT engine, allowing patterns to be used in a non-XSLT environment (for example, in an XProc processor). Java APIs for invoking this functionality have been added to the <code>sxpath.XPathEvaluator</code> and <code>s9api.XPathCompiler</code> classes. These APIs compile the pattern into an object that masquerades as an XPath expression; when evaluating this expression, the result is true if the pattern matches the context node, false if it does not.</p> <p>The AntTransform task, a customized Ant task for invoking Saxon XSLT transformations, is no longer issued as an intrinsic part of the Saxon product, but can be downloaded as a separate package from SourceForge: see <a href="https://sourceforge.net/project/showfiles.php?group_id=29872" class="bodylink">https://sourceforge.net/project/showfiles.php?group_id=29872</a>.</p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="xquery91.xml">Next</a></p> </td> </tr> </table> </body> </html>