Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 371

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="extensions" page="output-extras" subpage="character-representation"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: The saxon:character-representation attribute</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: The saxon:character-representation attribute"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>The saxon:character-representation attribute</h1>
      <p>This attribute allows greater control
                     over how non-ASCII characters will be represented on output.</p>
      <p>With method="xml", two values are supported: "decimal" and "hex". These control whether
                     numeric character references are output in decimal or hexadecimal when the character
                     is not available in the selected encoding. </p>
      <p>With HTML, the value
                     may hold two strings, separated by a semicolon. The first string defines how non-ASCII
                     characters within the character encoding will be represented, the values being "native",
                     "entity", "decimal", or "hex". The second string defines how characters outside the
                     encoding will be represented, the values being "entity", "decimal", or "hex". Here "native"
                     means output the character as itself; "entity" means use a defined entity reference (such
                     as "&amp;eacute;") if known; "decimal" and "hex" refer to numeric character references.
                     For example "entity;decimal" (the default) means that with encoding="iso-8859-1",
                     characters in the range 160-255 will be represented using standard HTML entity
                     references, while Unicode characters above 255 will be represented as decimal character
                     references.</p>
      <div class="boxed"
           style="border: solid thin; background-color: #B1CCC7; padding: 2px">This attribute is retained for the time being in the interests of backwards
                     compatibility. However, the XSLT 2.0 specification makes it technically a non-conformance
                     to provide attributes that change serialization behavior except in cases where the behavior
                     is implementation-defined; and this is not such a case (the specification, at least in the case
                     of the XML output method, does not allow a character to be substituted with a character reference
                     in cases where the character is present in the chosen encoding). The best way of ensuring that non-ASCII
                     characters are output using character references is to use <code>encoding="us-ascii"</code>.</div>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="double-space.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>