Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 3103

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="xsl-elements" page="message" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: xsl:message</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: xsl:message"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>xsl:message</h1>
      <p>The <code>xsl:message</code> element causes a message to be displayed. The message
is the contents of the <code>xsl:message</code> element.</p>
      <p>There is an optional attribute <code>terminate</code> with permitted values 
<code>yes</code> and <code>no</code>; the default is no. If the
value is set to yes, processing of the stylesheet is terminated after issuing the message. This
attribute may be supplied as an attribute value template.</p>
      <p>By default the message is displayed on the standard error output stream. You can supply your
own message receiver if you want it handled differently. This must be a class that implements
the <a class="bodylink" href="../javadoc/net/sf/saxon/event/Receiver.html"><code>Receiver</code></a> interface. The content of the message is in general an
XML fragment. You can supply the Receiver using the -m option on the command line, or the
setMessageEmitter() method of the <a class="bodylink" href="../javadoc/net/sf/saxon/Controller.html"><code>Controller</code></a> class.</p>
      <p>The sequence of calls to this Receiver is as follows: there is a single <code>open()</code> call at
the start of the transformation, and a single <code>close()</code> call at the end; and each evaluation of an <code>xsl:message</code>
instruction starts with a <code>startDocument()</code> call and ends with <code>endDocument()</code>. The <code>startDocument()</code>
event has a <code>properties</code> argument indicating whether <code>terminate="yes"</code> was specified, and the
<code>locationId</code> on calls such as <code>startElement()</code> and <code>characters()</code> can be used to identify
the location in the stylesheet where the message data originated (this is achieved by passing the supplied <code>locationId</code>
in a call to <code>getPipelineConfiguration().getLocator().getSystemId(locationId)</code>, or to <code>getLineNumber()</code>
on the same object).</p>
      <p>Select the class <a class="bodylink" href="../javadoc/net/sf/saxon/serialize/MessageWarner.html"><code>MessageWarner</code></a> to have <code>xsl:message</code> output
notified to the JAXP <code>ErrorListener</code>, as described in the JAXP documentation.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="mode.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>