Sindbad~EG File Manager

Current Path : /proc/2714585/root/usr/share/doc/docbook-style-xsl/doc/lib/
Upload File :
Current File : //proc/2714585/root/usr/share/doc/docbook-style-xsl/doc/lib/comment-escape-string.html

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>comment-escape-string</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.2"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference&nbsp;Documentation"><link rel="up" href="generallibrary.html" title="General Library Templates"><link rel="prev" href="xpath.location.html" title="xpath.location"><link rel="next" href="comment-escape-string.recursive.html" title="comment-escape-string.recursive"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">comment-escape-string</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="xpath.location.html">Prev</a>&nbsp;</td><th width="60%" align="center">General Library Templates</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="comment-escape-string.recursive.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="comment-escape-string"></a><div class="titlepage"></div><div class="refnamediv"><h2>comment-escape-string</h2><p>comment-escape-string &#8212; Prepare a string for inclusion in an XML comment</p></div><div class="refsect1"><a name="d0e33442"></a><h2>Description</h2><p>The <code class="function">comment-escape-string</code> template returns a string
that has been transformed so that it can safely be output as an XML comment.
Internal occurrences of "--" will be replaced with "- -" and a leading and/or
trailing space will be added to the string, if necessary.</p><a name="comment-escape-string.frag"></a><pre class="programlisting">
&lt;xsl:template name="comment-escape-string"&gt;
  &lt;xsl:param name="string" select="''"&gt;&lt;/xsl:param&gt;

  &lt;xsl:if test="starts-with($string, '-')"&gt;
    &lt;xsl:text&gt; &lt;/xsl:text&gt;
  &lt;/xsl:if&gt;

  &lt;xsl:call-template name="comment-escape-string.recursive"&gt;
    &lt;xsl:with-param name="string" select="$string"&gt;&lt;/xsl:with-param&gt;
  &lt;/xsl:call-template&gt;

  &lt;xsl:if test="substring($string, string-length($string), 1) = '-'"&gt;
    &lt;xsl:text&gt; &lt;/xsl:text&gt;
  &lt;/xsl:if&gt;
&lt;/xsl:template&gt;
</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="xpath.location.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="generallibrary.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="comment-escape-string.recursive.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">xpath.location&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;comment-escape-string.recursive</td></tr></table></div></body></html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists