Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 3019

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="sourcedocs" page="xml11" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Saxon and XML 1.1</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: Saxon and XML 1.1"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Saxon and XML 1.1</h1>
      <p>XML 1.1 (with XML Namespaces 1.1) originally extended XML 1.0 in three ways:</p>
      <ul>
         <li content="para">
            <p>The set of valid characters is increased</p>
         </li>
         <li content="para">
            <p>The set of characters allowed in XML Names is increased</p>
         </li>
         <li content="para">
            <p>Namespace undeclarations are permitted.</p>
         </li>
      </ul>
      <p>The second change has subsequently been retrofitted to XML 1.0 Fifth Edition (XML 1.0e5). Saxon now uses
      the XML 1.1 and XML 1.0e5 rules unconditionally for all validation of XML names.</p>
      <p>Saxon is capable of working with XML 1.1 input documents. If you want to use Saxon with XML 1.1, you
should set the option "-xmlversion:1.1" on the Saxon command line, or call the method 
<a class="bodylink"
            href="../javadoc/net/sf/saxon/Configuration.html#setXMLVersion"><code>configuration.setXMLVersion(Configuration.XML11)</code></a> or, in the case of XSLT,
<code>transformerFactory.setAttribute(FeaturesKeys.XML_VERSION, "1.1")</code></p>
      <p>This configuration setting affects:</p>
      <ul>
         <li content="para">
            <p>the characters considered valid in the source of an XQuery query</p>
         </li>
         <li content="para">
            <p>the characters considered valid in the result of the functions <code>codepoints-to-string()</code> and <code>unparsed-text()</code></p>
         </li>
         <li content="para">
            <p>the characters considered valid in the result of certain Saxon extension functions</p>
         </li>
         <li content="para">
            <p>the way in which line endings in XQuery queries are normalized</p>
         </li>
         <li content="para">
            <p>the default version used by the serializer (with output method XML)</p>
         </li>
      </ul>
      <p>Since Saxon 9.4, the configuration setting no longer affects:</p>
      <ul>
         <li content="para">
            <p>validation of names used in XQuery and XPath expressions, including names of elements, attributes,
                     functions, variables, and types</p>
         </li>
         <li content="para">
            <p>validation of names of constructed elements,
                     attributes, and processing instructions in XQuery and XSLT</p>
         </li>
         <li content="para">
            <p>schema validation of values of type <code>xs:NCName</code>, <code>xs:QName</code>, <code>xs:NOTATION</code>, and <code>xs:ID</code></p>
         </li>
         <li content="para">
            <p>the permitted names of stylesheet objects such as keys, templates, decimal-formats, output declarations, 
                     and output methods</p>
         </li>
      </ul>
      <p>Note that if you use the default setting of "1.0", then supplying an XML 1.1 source document as input
may cause undefined errors.</p>
      <p>It is advisable to use an XML parser that supports XML 1.1 when the configuration is set to "1.1", and
an XML parser that does not support XML 1.1 when the configuration is set to "1.0". However, Saxon does
not enforce this.</p>
      <p>You can set the configuration to allow XML 1.1, but still serialize result documents as XML 1.0 by
specifying the output property <code>version="1.0"</code>. In this case Saxon will check while serializing
the document that it conforms to the XML 1.0 constraints (note that this check can be expensive). These checks
are not performed if the configuration default is set to XML 1.0.</p>
      <p>If you want the serializer to output namespace undeclarations, use the output property 
<code>undeclare-namespaces="yes"</code> as well as <code>version="1.1"</code>.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="jaxpsources.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>