Sophie

Sophie

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

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="intro92" subpage="xslt92"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: XSLT</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: XSLT"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>XSLT</h1>
      <p>Static type checking is now implemented for non-tunnel parameters on <code>xsl:call-template</code> in the same way as for function
calls: that is, the supplied value is compared against the required type, conversion code is generated if necessary, and errors are 
reported if the static type of the supplied value is incompatible with the required type. Tunnel parameters and parameters for
<code>xsl:apply-templates</code> are checked dynamically as before. One effect of this change is that declaring the required type
of parameters on named templates now gives a performance benefit as well as improving debugging and robustness.</p>
      <p>In <code>&lt;xsl:number level="any"&gt;</code>, the rules have been changed for the case where the node being numbered
matches the pattern given in the <code>from</code> attribute: such a node is now numbered 1, whereas previously it was
numbered according to its distance from the previous node that matched the <code>from</code> pattern, if any. This implements
the change defined in <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=5849" class="bodylink">W3C bug 5849</a>.</p>
      <p>For the three serialization parameters <code>doctype-system</code>, <code>doctype-public</code>, and <code>saxon:next-in-chain</code>,
supplying "" (a zero-length string) as the value of the parameter is taken as setting the parameter to "absent". This is equivalent
to omitting the parameter, except that it overrides any setting that would otherwise be used. For example, this allows a value set
in <code>&lt;xsl:output&gt;</code> to be overridden in an importing stylesheet, in an <code>&lt;xsl:result-document&gt;</code>
instruction, in the JAXP <code>setOutputProperties()</code> method, or from the command line (where the syntax is simply
<code>!doctype-system=</code>). (Note that this takes a slight liberty with the W3C and JAXP specifications.)</p>
      <p>The <code>doc-available()</code> function, when it returns false, now ensures that the document remains unavailable
for the rest of the transformation: previously, if called repeatedly it would check repeatedly, and therefore could
return different results on different calls. Also, once <code>doc-available()</code> has returned false, subsequent
calls on <code>doc()</code> or <code>document()</code> are now guaranteed to fail. A call on <code>doc-available()</code>
that returns false does not prevent the document being created using <code>xsl:result-document</code>, but any such
document will not be available during the same transformation.</p>
      <p>The new function <code>element-with-id()</code>, introduced in the errata for Functions and Operators, is available.
It behaves the same as the <code>id()</code> function, except in the case of ID-valued elements, where it returns the
parent of the element having the <code>is-ID</code> property, rather than the element itself.</p>
      <p>For <code>&lt;xsl:number&gt;</code>, numbering sequences have been added for format tokens x2460 (circled digits),
x2474 (parenthesized digits), and x2488 (digit followed by full stop). In each case the numbering sequence only handles 
numbers in the range 1-20; numbers outside this range are formatted using the format token "1" (that is, as conventional decimal
numbers).</p>
      <p>The option <code>input-type-annotations="strip"</code> is now honoured for a document supplied in the form of a pre-built
 tree, by creating a view of the tree in which all nodes appear as untyped. Previously it was honoured only when the tree
 was built by the XSLT processor.</p>
      <p>The <code>TimedTraceListener</code>, used for timer profiling, is now capable of writing the profile output to a destination other than 
<code>System.err</code>. This option cannot however be enabled from the command line, only from the Java API.</p>
      <p>A stylesheet that does not use an <code>xsl:import-schema</code> declaration is now (by default) compiled with
schema-awareness disabled. This means that it will not be able to handle schema-typed input documents, or to
validate temporary trees created within the stylesheet, though it can still validate the final output tree. This
is for performance reasons: generating code to handle typed input data when it will not be encountered
adds to the execution cost. It is possible to override this setting from the s9api API on Java or from the Saxon.Api
on .NET. From the command line, schema-awareness is set automatically if the -sa option or any other option
implying schema-awareness is used (for example -val:strict). From JAXP, schema-awareness is set automatically
if the schema-aware TransformerFactory is used.</p>
      <p>The amount of compile-time checking when schema-awareness is used has been further increased. In particular, if the expected
type of a constructed element is known, Saxon now attempts to check (a) that the sequence constructor delivering the content
of the element is capable of delivering a sequence of elements that matches the content model (previously it only checked
that each child element could legitimately belong to the content model), and (b) that the sequence constructor is
capable of creating each mandatory attribute required by the complex type of the element.</p>
      <p>In the interests of performance, the decision whether to treat an ambiguous template rule match as a fatal error,
a warning, or as fully recoverable, is now made at stylesheet compile time rather than at run-time.</p>
      <p>The extension attribute <code>saxon:allow-all-built-in-types</code> is no longer recognized.</p>
      <p class="subhead">Command line changes</p>
      <p>If the filename specified in the -o option is in a directory that does not exist, the directory is now created.</p>
      <p>A new option <code>-config:filename</code> is available. This refers to a configuration file in which many
configuration options can be specified. Options specified directly on the command line override corresponding options
in the configuration file. The format of the configuration file is given in <a class="bodylink" href="../../configuration/configuration-file.xml">The Saxon configuration file</a>.</p>
      <p><i>Configuration files are not currently supported on .NET</i></p>
      <p>Saxon-defined serialization parameters can now be defined on the command line using a lexical QName, for example
<code>!saxon:indent-spaces=3</code> as an alternative to the Clark-format expanded name.</p>
      <p>The command line interface (<code>net.sf.saxon.Transform</code>) now allows a stylesheet parameter to be supplied as the value
of an XPath expression. For example, <code>java net.sf.saxon.Transform -xsl:style.xsl ?p=current-dateTime()</code> sets the stylesheet
parameter <code>p</code> to the value of the current date and time (as an instance of <code>xs:dateTime</code>). The fact that the value
needs to be evaluated as an XPath expression is signalled by the leading "?" before the parameter name. Note that the context for evaluating
the expression includes only the "standard" namespaces, no context item, and no variables.</p>
      <p>A new option is available (<code>-dtd:recover</code> on the command line) to perform DTD validation but treat the error
as non-fatal if it fails.</p>
      <p>A new option <code>-now</code> is available on the command line to set the current date and time (and the implicit 
timezone). This is designed for testing, to enable repeatable results to be obtained.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="xquery1092.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>