<?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="extensions91"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Extensions</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: Extensions"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Extensions</h1>
      <p>An optional second argument is available for <code>saxon:expression()</code>. This allows the namespace context
for the XPath expression to be supplied explicitly (by default, it is taken from the namespace context of the 
calling query or stylesheet). The namespace context is supplied in the form of an element node, whose in-scope
namespace bindings are used to declare namespace prefixes available for use within the expression. One way to use
this is to supply the element node that actually contains the XPath expression; another way is to construct an
element specially for the purpose.</p>
      <p>A new extension function <code>saxon:in-summer-time()</code> is available. It determines whether a given date/time
is in summer time (daylight savings time) in a given country or named timezone, to the extent that this information
is available in the Java timezone database.</p>
      <p>Saxon's support for XOM is extended: there is now a <code>net.sf.saxon.xom.XOMWriter</code> class that allows the output
of a query or transformation to be captured directly in the form of a XOM document. The class implements <code>Receiver</code>
and <code>Result</code>; an instance of this class can therefore be used directly as an argument to the JAXP
<code>Transformer.transform()</code> method or the <code>XQueryExpression.run()</code> method.</p>
      <p>A new extension function <code>saxon:unparsed-entities()</code> is available, allowing the application to obtain
a list of the names of the unparsed entities declared in a document.</p>
      <p>The elements in the SQL extension now by default use the namespace <code>xmlns:sql="http://saxon.sf.net/sql"</code>.
 They can however be registered under a different namespace if required. The extension is not available unless it is registered
 with the Configuration, either using the API <code>Configuration.setExtensionElementNamespace()</code>, or using
 a configuration file. Either way, Saxon-PE or higher is required (although the extension itself is open source code).</p>
      <p>The implementation of the <code>sql:insert</code> and <code>sql:update</code> extension instructions
has been simplified. This may result in some error conditions being detected that were not detected before. The names
of tables and columns supplied to these instructions are now validated against SQL rules; if the names are not valid
against SQL rules and are not already quoted then they will be enclosed in double-quotation marks. </p>
      <p>The <code>saxon:path()</code> extension function now accepts a node as an argument. Previously it worked only on the context node.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="trace91.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>