<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="changes" page="intro93" subpage="dot-net-93"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Saxon on .NET changes</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Saxon on .NET changes"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Saxon on .NET changes</h1>
      <p>The <code>XsltExecutable</code> object has a new <code>Explain()</code> method that gives a diagnostic representation of the compiled code (as an XML document).</p>
      <p>The <code>Equals()</code> and <code>GetHashCode()</code> methods on <code>XdmNode</code> are now defined so that two <code>XdmNode</code> instances are
equal if and only if they represent the same node (that is, they reflect the XPath "is" operator).</p>
      <p>The <code>XPathCompiler</code> object now has the ability to maintain a cache of compiled XPath expressions. If this feature is enabled, any attempt to compile
an expression first causes a lookup in the cache to see whether the same expression has already been compiled. The cache is cleared
if any changes to the static context are made (for example, changing the namespace declarations in force).</p>
      <p>The <code>XPathCompiler</code> object has two new convenience methods, <code>Evaluate()</code> and <code>EvaluateSingle()</code>, allowing
an expression to be compiled and executed with a single call. This works especially well when the compiler is also caching compiled expressions.</p>
      <p>The error handling in the XPath API has been improved so that static and dynamic errors occurring during XPath
evaluation now result in a <code>Saxon.Api.StaticError</code> or <code>Saxon.Api.DynamicError</code> being thrown,
rather than exposing the underlying Java exceptions.</p>
      <p>The <code>XQueryEvaluator</code> has a new method <code>CallFunction</code> that allows any user-declared function within the
compiled query to be called directly from the Java application. This in effect enables the creation of a query library containing
multiple functions that can be invoked from the calling application. Note that to compile a query, it must still have a "main query"
to satisfy the syntax rules of the XQuery language.</p>
      <p>There is a new overload of <code>DocumentBuilder.Build()</code> that allows the XML document to be supplied from a <code>TextReader</code>
rather than a stream (including a <code>StringReader</code>, which makes it easier to build from XML held as a string literal).</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="serialization-93.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>