Sophie

Sophie

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

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="intro" subpage="spi-94"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Changes to system programming interfaces</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Changes to system programming interfaces"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Changes to system programming interfaces</h1>
      <p><i>"System programming" interfaces are those interfaces that might be used by advanced applications, perhaps
     by code integrating Saxon within other products, but are unlikely to be used by typical user-written application code.
     </i></p>
      <p>The <a class="bodylink" href="../../javadoc/net/sf/saxon/event/Receiver.html"><code>Receiver</code></a> interface (widely used internally within
                     Saxon) has changed to reduce the dependency on the <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NamePool.html"><code>NamePool</code></a>.
                     On the <code>startElement()</code> and <code>attribute()</code> calls, the names and types of elements and attributes are now
                     passed as object references rather than integer codes. Similarly on the <code>namespace()</code> call, the
                     integer namespace code is replaced with a reference to a <code>NamespaceBinding</code> object.</p>
      <p>Integer namespace codes allocated from the name pool are no longer used. They have been replaced with
                     the <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NamespaceBinding.html"><code>NamespaceBinding</code></a> 
                     object which contains the prefix and URI as strings. The purpose of this change is
                     to reduce the number of synchronized calls on the <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NamePool.html"><code>NamePool</code></a>, 
                     and hence to reduce contention; the performance
                     benefit from avoiding string comparisons did not justify the overhead caused by synchronization. This change
                     results in small changes to both the <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NodeInfo.html"><code>NodeInfo</code></a> and 
                     <a class="bodylink" href="../../javadoc/net/sf/saxon/event/Receiver.html"><code>Receiver</code></a> 
                     interfaces.</p>
      <p>A new method <code>getSchemaType()</code> is added to the <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NodeInfo.html"><code>NodeInfo</code></a>
                     interface, returning the type annotation as a <a class="bodylink" href="../../javadoc/net/sf/saxon/type/SchemaType.html"><code>SchemaType</code></a>
                     object. The existing <code>getTypeAnnotation()</code> method which returns the same information as an integer fingerprint
                     remains available for the time being.</p>
      <p>The mechanism for injecting trace calls into expressions has been generalised so that an arbitrary 
                     <a class="bodylink"
            href="../../javadoc/net/sf/saxon/expr/parser/CodeInjector.html"><code>CodeInjector</code></a> can
                     be supplied. This can be selective about what kind of expression it inserts into the parse tree, and where. This
                     gives a lot more flexibility for tools that add debugging or performance monitoring capabilities to the product.
            For XQuery this can be controlled at the level of the <a class="bodylink"
            href="../../javadoc/net/sf/saxon/query/StaticQueryContext.html"><code>StaticQueryContext</code></a>, for XSLT using the
            <a class="bodylink" href="../../javadoc/net/sf/saxon/trans/CompilerInfo.html"><code>CompilerInfo</code></a> object.</p>
      <p>In the expression tree, the representation of path expressions and axis expressions has changed. The class
                     <code>PathExpression</code> has disappeared; instead, the class <code>SlashExpression</code>
                     is used, wrapped in a <code>DocumentSorter</code> if sorting into document order and elimination
                     of duplicates is required. A subclass of <code>SlashExpression</code>, the <code>SimpleSlashExpression</code>,
                     is used for expressions of the form <code>$p/title</code> where the left-hand side selects a singleton and the
                     right-hand side is an axis expression; this optimization reduces the number of context objects that need
                     to be created, especially in XQuery where such constructs are very common.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="../intro93.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>