<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="conformance" page="xquery" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: XQuery 1.0 Conformance</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: XQuery 1.0 Conformance"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>XQuery 1.0 Conformance</h1>
      <p>This release of Saxon implements
the full XQuery 1.0 language as defined in the 
Second Edition <a href="http://www.w3.org/TR/xquery/" class="bodylink">Recommendation</a> of 14 December 2010.
The <a class="bodylink" href="../conformance/xpath20.xml">restrictions</a> noted with respect to XPath 2.0 apply equally to Saxon's support for
XQuery 1.0.</p>
      <p>XQuery conformance levels are described in
<a href="http://www.w3.org/TR/xquery/#id-xquery-conformance" class="bodylink">Section 5 of the XQuery specification</a>.</p>
      <p>Saxon-HE and Saxon-PE provide <b>Minimal Conformance</b> plus the following <b>Optional Features</b>:</p>
      <ul>
         <li content="para">
            <p>Full Axis Feature</p>
         </li>
         <li content="para">
            <p>Module Feature</p>
         </li>
         <li content="para">
            <p>Serialization Feature</p>
         </li>
      </ul>
      <p>Saxon-EE provides <b>Minimal Conformance</b> plus the following <b>Optional Features</b>:</p>
      <ul>
         <li content="para">
            <p>Schema Import Feature</p>
         </li>
         <li content="para">
            <p>Schema Validation Feature</p>
         </li>
         <li content="para">
            <p>Full Axis Feature</p>
         </li>
         <li content="para">
            <p>Module Feature</p>
         </li>
         <li content="para">
            <p>Serialization Feature</p>
         </li>
      </ul>
      <p>Neither Saxon product supports the Static Typing Feature, and there are no plans to do so.</p>
      <p>There are some known non-conformances if the product is used in particular ways:</p>
      <ul>
         <li content="para">
            <p>In pull mode (-pull on the command line) there is a restriction that namespace undeclaration
is not supported; this means that the query prolog option "copy-namespaces no-inherit" has no effect.</p>
         </li>
         <li content="para">
            <p>Under .NET, if the <code>System.Xml</code> parser is selected, attributes declared in the DTD as being
of type <code>ID</code> are not accessible using the <code>id()</code> function. This is because the
<code>System.Xml</code> parser does not make the DTD-defined attribute type available to the application. </p>
         </li>
      </ul>
      <p class="subhead">Conformance Tests</p>
      <p>Saxonica has submitted results for the published 
<a href="http://www.w3.org/XML/Query/test-suite/" class="bodylink">W3C XQuery Test suite</a>. W3C has published
have generated both <a href="http://www.w3.org/XML/Query/test-suite/XQTSReportSimple.html"
            class="bodylink">summary</a> 
and <a href="http://www.w3.org/XML/Query/test-suite/XQTSReport.html" class="bodylink">detail</a> reports from the results;
at the time of submission Saxon-EE was the only product to achieve a 100% pass rate.</p>
      <p>The test driver used to measure these results is included in the Saxon distribution
as part of the <code>saxon-resources-9.n</code> download.</p>
      <p class="subhead">Checklist of Implementation-Defined Items</p>
      <p>Appendix D of the XQuery specification lists a number of features whose behavior is implementation-defined.
For Saxon, the behavior is as follows:</p>
      <ol>
         <li>
            <p><i>The version of Unicode that is used to construct expressions.</i></p>
            <p>For details of Saxon Unicode support, see <a class="bodylink" href="../conformance/xslt20.xml">XSLT 2.0 Conformance</a></p>
         </li>
         <li>
            <p><i>The statically-known collations.</i></p>
            <p>Collation URIs of the form <code>http://saxon.sf.net/collation?<i>param=value;param=value...</i></code>
are always available: these map to the collations offered by the locales available within the Java VM
in use. Additional collation URIs may be implemented by users and registered with the Saxon configuration
via the Java API.</p>
         </li>
         <li>
            <p><i>The implicit timezone.</i></p>
            <p>The implicit timezone is normally taken from the system clock. This may, however, be overridden
via the Java API.</p>
         </li>
         <li>
            <p><i>The circumstances in which warnings are raised, and the ways in which warnings are handled.</i></p>
            <p>Warnings are raised for a variety of conditions. Compile time warnings include:</p>
            <ul>
               <li content="para">
                  <p>Use of a path expression that can never select anything (for example <code>@a/@b</code>)</p>
               </li>
               <li content="para">
                  <p>Use of an expression that can only succeed if one or more operands are empty sequences</p>
               </li>
               <li content="para">
                  <p>Use of a string literal in a PITest that is not a valid NCName</p>
               </li>
            </ul>
            <p>Warnings may also be raised at run-time, for example if the <code>collection()</code> function
fails to load a document and recovery has been requested.</p>
            <p>Compile-time warnings are sent to the JAXP <code>ErrorListener</code> registered with the <code>Configuration</code>;
the default <code>ErrorListener</code> displays them as messages on <code>System.err</code>. Run-time
warnings are sent to the JAXP <code>ErrorListener</code> registered with the <code>Controller</code>;
the default is the same.</p>
         </li>
         <li>
            <p><i>The method by which errors are reported to the external processing environment.</i></p>
            <p>Compile-time errors are sent to the JAXP <code>ErrorListener</code> registered with the <code>Configuration</code>;
the default <code>ErrorListener</code> displays them as messages on <code>System.err</code>. Run-time
errors are sent to the JAXP <code>ErrorListener</code> registered with the <code>Controller</code>;
the default is the same. When queries are invoked from a Java application, any error will also be
notified by throwing an exception.</p>
         </li>
         <li>
            <p><i>Whether the implementation is based on the rules of [XML 1.0] and [XML Names]
or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied
 consistently by all aspects of the implementation.</i></p>
            <p>Saxon gives the user the choice: see <a class="bodylink" href="../sourcedocs/xml11.xml">Saxon and XML 1.1</a>.
 Note that since Saxon allows the user to select which XML parser to use on a per-document basis,
 achievement of consistency across "all aspects of the implementation" is in part a user
 responsibility. Saxon will not reject any attempt to use an XML 1.1 parser in a 1.0 configuration,
 or vice versa.</p>
            <p>Since Saxon 9.4, all operations in Saxon itself (as distinct from the underlying parser) that
            depend on the rules for XML Names use the rules that are defined in XML 1.0 fifth edition and in
            XML 1.1, rather than the rules defined in earlier XML 1.0 editions.</p>
         </li>
         <li>
            <p><i>Any components of the static context or dynamic context that are overwritten or augmented
by the implementation.</i></p>
            <p>The following table shows the components of the static context. For each component, the second column
shows whether the component is overwritten or augmented by Saxon itself. The third columns shows whether
it may be overwritten or augmented by an application, through facilities in the Java API.</p>
            <table>
               <tr>
                  <td content="para">
                     <p>Component</p>
                  </td>
                  <td content="para">
                     <p>Overritten or augmented by Saxon?</p>
                  </td>
                  <td content="para">
                     <p>Can be set from Java API?</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>XPath 1.0 Compatibility Mode</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Statically known namespaces</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Default element/type namespace</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Default function namespace</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>In-scope schema types</p>
                  </td>
                  <td content="para">
                     <p>yes: types corresponding to Java classes for use in extension functions</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>In-scope element declarations</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>In-scope attribute declarations</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>In-scope variables</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Context item static type</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Function signatures</p>
                  </td>
                  <td content="para">
                     <p>yes: any Java method on the classpath can be referenced</p>
                  </td>
                  <td content="para">
                     <p>yes: there is a plug-in mechanism</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Statically known collations</p>
                  </td>
                  <td content="para">
                     <p>yes: collations of the form http://saxon.sf.net/collation?<i>params</i>
                  </p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Default collation</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Construction mode</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Ordering mode</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Default order for empty sequences</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Boundary-space policy</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Copy-namespaces mode</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Base URI</p>
                  </td>
                  <td content="para">
                     <p>yes: inferred from the location of the query</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Statically known documents</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Statically known collections</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Statically known default collection type</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
            </table>
            <p>For the dynamic context, the corresponding settings are:</p>
            <table>
               <tr>
                  <td content="para">
                     <p>Context item</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Context position</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Context size</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Variable values</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>only for declared external variables</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Function implementations</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes (extension functions)</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Current dateTime</p>
                  </td>
                  <td content="para">
                     <p>yes (from system clock)</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Implicit timezone</p>
                  </td>
                  <td content="para">
                     <p>yes (from system clock)</p>
                  </td>
                  <td content="para">
                     <p>yes</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Available documents</p>
                  </td>
                  <td content="para">
                     <p>yes (all documents reachable using Java URL connections)</p>
                  </td>
                  <td content="para">
                     <p>yes (URIResolver)</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Available collections</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes (CollectionResolver/catalog)</p>
                  </td>
               </tr>
               <tr>
                  <td content="para">
                     <p>Default collection</p>
                  </td>
                  <td content="para">
                     <p>no</p>
                  </td>
                  <td content="para">
                     <p>yes (CollectionResolver/catalog)</p>
                  </td>
               </tr>
            </table>
         </li>
         <li>
            <p><i>Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported.</i></p>
            <p>The Full-Axis features is supported.</p>
         </li>
         <li>
            <p><i>The default handling of empty sequences returned by an ordering key
(sortspec) in an order by clause (empty least or empty greatest).</i></p>
            <p>Empty least</p>
         </li>
         <li>
            <p><i>The names and semantics of any extension expressions (pragmas) recognized by the implementation.</i></p>
            <p>Saxon-EE recognizes one pragma: <code>saxon:validate-type</code>. For details, see
<a class="bodylink" href="../using-xquery/extensions.xml">XQuery extensions</a>.</p>
         </li>
         <li>
            <p><i>The names and semantics of any option declarations recognized by the implementation.</i></p>
            <p>See <a class="bodylink" href="../using-xquery/extensibility.xml">XQuery Extensibility</a>.</p>
         </li>
         <li>
            <p><i>Protocols (if any) by which parameters can be passed to an external function, and the
result of the function can be returned to the invoking query.</i></p>
            <p>Java methods can be called as <a class="bodylink" href="../extensibility/functions.xml">Extension Functions</a></p>
         </li>
         <li>
            <p><i>How the implementation handles location hints in module imports,
if the Module Feature is supported.</i></p>
            <p>The location hint is interpreted as a relative URI, relative to the base URI of the referencing
module. It is then dereferenced using the Java URL mechanisms, unless the user has nominated a
<code>ModuleURIResolver</code>, in which case the interpretation is under user control.</p>
         </li>
         <li>
            <p><i>Any static typing extensions supported by the implementation,
 if the Static Typing Feature is supported.</i></p>
            <p>Not applicable.</p>
         </li>
         <li>
            <p><i>The means by which serialization is invoked, if the Serialization Feature is supported.</i></p>
            <p>Serialization may be invoked from the command line or from the Java or .NET API. Serialization parameters
 may be supplied on the command line, from the Java or .NET API, or through option declarations in the query
 prolog.</p>
         </li>
         <li>
            <p><i>The default values for the byte-order-mark, encoding, media-type, normalization-form,
 omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported.</i></p>
            <p>As specified in Appendix C.3 of the XQuery specification.</p>
         </li>
      </ol>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="xquery30.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>