<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="xsl-elements" page="lre" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Literal Result Elements</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Literal Result Elements"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Literal Result Elements</h1>
      <p>Any elements in the style sheet other than those listed above are
assumed to be literal result elements, and are copied to the current output stream at the
position in which they occur.</p>
      <p>Attribute values within literal result elements are treated as attribute value templates:
they may contain string expressions enclosed between curly braces. For the syntax of 
string expressions, see <b><a class="bodylink" href="../xsl-elements/value-of.xml">xsl:value-of</a></b> above.</p>
      <p>Where the output is HTML, certain formatting elements are recognised as empty
 elements: these are AREA, BASEFONT, BR, COL, FRAME, HR, IMG, INPUT, ISINDEX,
 LINK, META, and SYSTEM (in either upper or lower case, and optionally with attributes, of course).
 These should be written as empty
XML elements in the stylesheet, and will be written to the HTML output stream without a
closing tag.</p>
      <p>With HTML output, if the attribute name is the same as its value, the abbreviated form
of output is used: for example if &lt;OPTION SELECTED="SELECTED"&gt; appears in the stylesheet,
it will be output as &lt;OPTION SELECTED&gt;.</p>
      <p>A simple stylesheet may be created by using a literal result element as the top-level
element of the stylesheet. This implicitly defines a single template with a match pattern
of "/". In fact, an XHTML document constitutes a valid stylesheet which will be output as a copy
of itself, regardless of the contents of the source XML document.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="patterns.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>