Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 101

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="changes" page="s90" subpage="extensions90"/>
      <!--
           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>When an extension function has a declared return type of <code>java.lang.Object</code> in Java, or <code>System.Object</code>
in .NET, the inferred static type is now <code>xs:anyAtomicType</code> rather than <code>external object</code>. This means that
if the value actually returned at run-time is, say, an integer, and the value is used where an integer is required, then the call
will not be rejected as a compile-time type error.</p>
      <p>The extension function <code>saxon:transform()</code> has changed: in the third argument, which is used to pass parameters
to the stylesheet, the argument must now be a sequence of element nodes, attribute nodes, or document nodes. If a document
node is supplied, it is treated as equivalent to passing its element children.</p>
      <p>Two new extension functions <code>saxon:compile-query()</code> and <code>saxon:query()</code> are available.
They allow a query to be constructed dynamically as a string, compiled, and repeatedly executed. The input to the
function can (if required) be created using the new <code>saxon:xquery</code> output method.</p>
      <p>A new extension function <code>saxon:result-document()</code> is available in Saxon-SA, for the benefit of XQuery
users. Modelled on the <code>xsl:result-document</code> instruction, it allows a query to generate multiple
output documents and serialize them to filestore.</p>
      <p>The implementation of the EXSLT <code>math:power()</code> function has been extended to cater for numeric data types other
than xs:double. For example, the result of <code>math.power(2, 128)</code> is now calculated using integer rather than double
arithmetic, and the result is an integer. For the full rules, see <a class="bodylink" href="../../extensions/exslt.xml">EXSLT</a></p>
      <p>In Saxon's implementation of the EXSLT dates-and-times library, the current date/time that is used is now aligned with
the XPath 2.0 <code>current-dateTime()</code> function, and thus returns the same value for the duration of a query or transformation.</p>
      <p>The extension function <code>saxon:typeAnnotation()</code> now accepts any item. For a node it returns
the type annotation; for an atomic value it returns the type label.  The return type is now xs:QName (it was
previously a lexical QName returned as a string).</p>
      <p>The extension functions <code>yearMonthDurationFromMonths()</code> and <code>dayTimeDurationFromSeconds()</code>,
which have been undocumented since Saxon 8.1, have finally been dropped. The same effect can be achieved by
multiplying a duration of one month or one second by the appropriate integer.</p>
      <p>The extension function <code>saxon:tokenize()</code>, also undocumented since Saxon 8.1, has been dropped.
Use <code>fn:tokenize()</code> instead.</p>
      <p>Three new extension functions are available to find when a file was last modified. Two variants of <code>saxon:last-modified()</code>
test the last modified date of the file from which a node was obtained; the function <code>saxon:file-last-modified()</code> takes an
absolute URI as its argument.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="schema90.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>