<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="conformance" page="serialization" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: Serialization</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: Serialization"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Serialization</h1>
      <p>The <a href="" class="bodylink">Serialization</a> specification does not define its own conformance rules, saying instead
that these are up to the host language to define.</p>
      <p>Saxon implements all the mandatory provisions of the serialization specification.</p>
      <p>The known non-conformances are:</p>
      <ul>
         <li content="para">
            <p>The serialization specification states that characters that can be natively encoded in the chosen
encoding must be natively encoded and must not be represented using character or entity references.
Saxon behaves this way by default, but provides an extension, <code>saxon:character-representation</code>,
which changes the behavior. Such extensions have recently been declared non-conformant, but this one
is retained in Saxon for backwards compatibility reasons.</p>
         </li>
      </ul>
      <p>The following page defines how Saxon interprets those aspects of the serialization specification
that are implementation-defined.</p>
      <p class="subhead">Implementation-defined aspects of Serialization</p>
      <p>This section defines how Saxon interprets those aspects of the serialization specification
that are implementation-defined. The list follows the numbering of 
<a href="http://www.w3.org/TR/xslt-xquery-serialization/#implementation-defined-features"
            class="bodylink">Appendix D</a> 
of the Serialization specification.</p>
      <ol>
         <li>
            <p><i>For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization)
</i></p>
            <p>Sequence normalization takes place for all output methods, including user-defined output methods.</p>
         </li>
         <li>
            <p><i>If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters)
</i></p>
            <p>In such cases the local name of the method must be the name of a Java class that implements one of the interfaces
org.xml.sax.ContentHandler, net.sf.saxon.event.Emitter, or net.sf.saxon.event.Receiver. The class is loaded from
the classpath and then takes responsibility for producing the serialized output (if any). The actual namespace URI is ignored.</p>
         </li>
         <li>
            <p><i>If the value of the normalization-form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none
 then the meaning of the value and its effect is implementation-defined. (See 4 Phases of Serialization)
</i></p>
            <p>Any value other than those listed is an error.</p>
         </li>
         <li>
            <p><i>The effect of providing an option that allows the encoding phase to be skipped,
 so that the result of serialization is a stream of Unicode characters, is implementation-defined.
  The serializer is not required to support such an option. (See 4 Phases of Serialization)
</i></p>
            <p>Saxon allows the serialized output to be written to a Java Writer, which is a character stream.
 In this case no encoding
takes place.</p>
         </li>
         <li>
            <p><i>A serializer may provide an implementation-defined mechanism to place CDATA
 sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter)
</i></p>
            <p>Saxon defines a factory class that enables Java applications to insert user-defined
classes into the serialization pipeline. This mechanism could be used to override the standard
CDATA processing.</p>
         </li>
      </ol>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="update.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>