File: //usr/share/doc/docbook-style-xsl-1.69.1/doc/lib/lib.html
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>XSL Library Template Reference</title><meta name="generator" content="DocBook XSL Stylesheets V1.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="d0e1"></a>XSL Library Template Reference</h1></div><div><h3 class="corpauthor">DocBook Open Repository Team</h3></div><div><p class="releaseinfo">$Id: lib.xweb,v 1.13 2005/07/08 10:35:55 xmldoc Exp $
</p></div><div><p class="copyright">Copyright © 1999, 2000, 2001, 2002, 2005 Norman Walsh</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#d0e22">Introduction</a></span></dt><dt><span class="reference"><a href="#d0e37">I. General Library Templates</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="#dot.count">dot.count</a></span><span class="refpurpose"> - Returns the number of . characters in a string</span></dt><dt><span class="refentrytitle"><a href="#copy-string">copy-string</a></span><span class="refpurpose"> - Returns count copies of a string</span></dt><dt><span class="refentrytitle"><a href="#string.subst">string.subst</a></span><span class="refpurpose"> - Substitute one text string for another in a string</span></dt><dt><span class="refentrytitle"><a href="#xpointer.idref">xpointer.idref</a></span><span class="refpurpose"> - Extract IDREF from an XPointer</span></dt><dt><span class="refentrytitle"><a href="#length-magnitude">length-magnitude</a></span><span class="refpurpose"> - Return the unqualified dimension from a length specification</span></dt><dt><span class="refentrytitle"><a href="#length-units">length-units</a></span><span class="refpurpose"> - Return the units from a length specification</span></dt><dt><span class="refentrytitle"><a href="#length-spec">length-spec</a></span><span class="refpurpose"> - Return a fully qualified length specification</span></dt><dt><span class="refentrytitle"><a href="#length-in-points">length-in-points</a></span><span class="refpurpose"> - Returns the size, in points, of a specified length</span></dt><dt><span class="refentrytitle"><a href="#pi-attribute">pi-attribute</a></span><span class="refpurpose"> - Extract a pseudo-attribute from a PI</span></dt><dt><span class="refentrytitle"><a href="#lookup.key">lookup.key</a></span><span class="refpurpose"> - Retrieve the value associated with a particular key in a table</span></dt><dt><span class="refentrytitle"><a href="#xpath.location">xpath.location</a></span><span class="refpurpose"> - Calculate the XPath child-sequence to the current node</span></dt><dt><span class="refentrytitle"><a href="#comment-escape-string">comment-escape-string</a></span><span class="refpurpose"> - Prepare a string for inclusion in an XML comment</span></dt><dt><span class="refentrytitle"><a href="#comment-escape-string.recursive">comment-escape-string.recursive</a></span><span class="refpurpose"> - Internal function used by comment-escape-string</span></dt><dt><span class="refentrytitle"><a href="#prepend-pad">prepend-pad</a></span><span class="refpurpose"> - Right-pad a string out to a certain length</span></dt><dt><span class="refentrytitle"><a href="#str.tokenize.keep.delimiters">str.tokenize.keep.delimiters</a></span><span class="refpurpose"> - Tokenize a string while preserving any delimiters</span></dt><dt><span class="refentrytitle"><a href="#apply-string-subst-map">apply-string-subst-map</a></span><span class="refpurpose"> - Apply a string-substitution map</span></dt><dt><span class="refentrytitle"><a href="#apply-character-map">apply-character-map</a></span><span class="refpurpose"> - Apply an XSLT character map</span></dt><dt><span class="refentrytitle"><a href="#read-character-map">read-character-map</a></span><span class="refpurpose"> - Read in all or part of an XSLT character map</span></dt></dl></dd><dt><span class="reference"><a href="#d0e586">II. Relative URI Functions</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="#count.uri.path.depth">count.uri.path.depth</a></span><span class="refpurpose"> - Count the number of path components in a relative URI</span></dt><dt><span class="refentrytitle"><a href="#trim.common.uri.paths">trim.common.uri.paths</a></span><span class="refpurpose"> - Trim common leading path components from a relative URI</span></dt></dl></dd><dt><span class="appendix"><a href="#d0e640">A. The Stylesheet</a></span></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e22"></a>Introduction</h2></div></div></div><p>This is technical reference documentation for the DocBook XSL
Stylesheets; it documents (some of) the parameters, templates, and
other elements of the stylesheets.</p><p>This is not intended to be “<span class="quote">user</span>” documentation.
It is provided for developers writing customization layers for the
stylesheets, and for anyone who's interested in “<span class="quote">how it
works</span>”.</p><p>Although I am trying to be thorough, this documentation is known
to be incomplete. Don't forget to read the source, too :-)</p></div><div class="reference" lang="en"><a name="d0e37"></a><div class="titlepage"><div><div><h1 class="title"><a name="d0e37"></a>General Library Templates</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="#dot.count">dot.count</a></span><span class="refpurpose"> - Returns the number of . characters in a string</span></dt><dt><span class="refentrytitle"><a href="#copy-string">copy-string</a></span><span class="refpurpose"> - Returns count copies of a string</span></dt><dt><span class="refentrytitle"><a href="#string.subst">string.subst</a></span><span class="refpurpose"> - Substitute one text string for another in a string</span></dt><dt><span class="refentrytitle"><a href="#xpointer.idref">xpointer.idref</a></span><span class="refpurpose"> - Extract IDREF from an XPointer</span></dt><dt><span class="refentrytitle"><a href="#length-magnitude">length-magnitude</a></span><span class="refpurpose"> - Return the unqualified dimension from a length specification</span></dt><dt><span class="refentrytitle"><a href="#length-units">length-units</a></span><span class="refpurpose"> - Return the units from a length specification</span></dt><dt><span class="refentrytitle"><a href="#length-spec">length-spec</a></span><span class="refpurpose"> - Return a fully qualified length specification</span></dt><dt><span class="refentrytitle"><a href="#length-in-points">length-in-points</a></span><span class="refpurpose"> - Returns the size, in points, of a specified length</span></dt><dt><span class="refentrytitle"><a href="#pi-attribute">pi-attribute</a></span><span class="refpurpose"> - Extract a pseudo-attribute from a PI</span></dt><dt><span class="refentrytitle"><a href="#lookup.key">lookup.key</a></span><span class="refpurpose"> - Retrieve the value associated with a particular key in a table</span></dt><dt><span class="refentrytitle"><a href="#xpath.location">xpath.location</a></span><span class="refpurpose"> - Calculate the XPath child-sequence to the current node</span></dt><dt><span class="refentrytitle"><a href="#comment-escape-string">comment-escape-string</a></span><span class="refpurpose"> - Prepare a string for inclusion in an XML comment</span></dt><dt><span class="refentrytitle"><a href="#comment-escape-string.recursive">comment-escape-string.recursive</a></span><span class="refpurpose"> - Internal function used by comment-escape-string</span></dt><dt><span class="refentrytitle"><a href="#prepend-pad">prepend-pad</a></span><span class="refpurpose"> - Right-pad a string out to a certain length</span></dt><dt><span class="refentrytitle"><a href="#str.tokenize.keep.delimiters">str.tokenize.keep.delimiters</a></span><span class="refpurpose"> - Tokenize a string while preserving any delimiters</span></dt><dt><span class="refentrytitle"><a href="#apply-string-subst-map">apply-string-subst-map</a></span><span class="refpurpose"> - Apply a string-substitution map</span></dt><dt><span class="refentrytitle"><a href="#apply-character-map">apply-character-map</a></span><span class="refpurpose"> - Apply an XSLT character map</span></dt><dt><span class="refentrytitle"><a href="#read-character-map">read-character-map</a></span><span class="refpurpose"> - Read in all or part of an XSLT character map</span></dt></dl></div><div class="refentry" lang="en"><a name="dot.count"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dot.count — Returns the number of “<span class="quote">.</span>” characters in a string</p></div><div class="refsect1" lang="en"><a name="d0e49"></a><h2>Description</h2><pre class="programlisting"><a name="dot.count.frag"></a><pre class="programlisting">
<xsl:template name="dot.count">
<!-- Returns the number of "." characters in a string -->
<xsl:param name="string"></xsl:param>
<xsl:param name="count" select="0"></xsl:param>
<xsl:choose>
<xsl:when test="contains($string, '.')">
<xsl:call-template name="dot.count">
<xsl:with-param name="string" select="substring-after($string, '.')"></xsl:with-param>
<xsl:with-param name="count" select="$count+1"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$count"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="copy-string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>copy-string — Returns “<span class="quote">count</span>” copies of a string</p></div><div class="refsect1" lang="en"><a name="d0e64"></a><h2>Description</h2><pre class="programlisting"><a name="copy-string.frag"></a><pre class="programlisting">
<xsl:template name="copy-string">
<!-- returns 'count' copies of 'string' -->
<xsl:param name="string"></xsl:param>
<xsl:param name="count" select="0"></xsl:param>
<xsl:param name="result"></xsl:param>
<xsl:choose>
<xsl:when test="$count>0">
<xsl:call-template name="copy-string">
<xsl:with-param name="string" select="$string"></xsl:with-param>
<xsl:with-param name="count" select="$count - 1"></xsl:with-param>
<xsl:with-param name="result">
<xsl:value-of select="$result"></xsl:value-of>
<xsl:value-of select="$string"></xsl:value-of>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="string.subst"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>string.subst — Substitute one text string for another in a string</p></div><div class="refsect1" lang="en"><a name="d0e76"></a><h2>Description</h2><p>The <code class="function">string.subst</code> template replaces all
occurances of <em class="parameter"><code>target</code></em> in <em class="parameter"><code>string</code></em>
with <em class="parameter"><code>replacement</code></em> and returns the result.
</p><pre class="programlisting"><a name="string.subst.frag"></a><pre class="programlisting">
<xsl:template name="string.subst">
<xsl:param name="string"></xsl:param>
<xsl:param name="target"></xsl:param>
<xsl:param name="replacement"></xsl:param>
<xsl:choose>
<xsl:when test="contains($string, $target)">
<xsl:variable name="rest">
<xsl:call-template name="string.subst">
<xsl:with-param name="string" select="substring-after($string, $target)"></xsl:with-param>
<xsl:with-param name="target" select="$target"></xsl:with-param>
<xsl:with-param name="replacement" select="$replacement"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat(substring-before($string, $target), $replacement, $rest)"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="xpointer.idref"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xpointer.idref — Extract IDREF from an XPointer</p></div><div class="refsect1" lang="en"><a name="d0e102"></a><h2>Description</h2><p>The <code class="function">xpointer.idref</code> template returns the
ID portion of an XPointer which is a pointer to an ID within the current
document, or the empty string if it is not.</p><p>In other words, <code class="function">xpointer.idref</code> returns
“<span class="quote">foo</span>” when passed either <code class="literal">#foo</code>
or <code class="literal">#xpointer(id('foo'))</code>, otherwise it returns
the empty string.</p><pre class="programlisting"><a name="xpointer.idref.frag"></a><pre class="programlisting">
<xsl:template name="xpointer.idref">
<xsl:param name="xpointer">http://...</xsl:param>
<xsl:choose>
<xsl:when test="starts-with($xpointer, '#xpointer(id(')">
<xsl:variable name="rest" select="substring-after($xpointer, '#xpointer(id(')"></xsl:variable>
<xsl:variable name="quote" select="substring($rest, 1, 1)"></xsl:variable>
<xsl:value-of select="substring-before(substring-after($xpointer, $quote), $quote)"></xsl:value-of>
</xsl:when>
<xsl:when test="starts-with($xpointer, '#')">
<xsl:value-of select="substring-after($xpointer, '#')"></xsl:value-of>
</xsl:when>
<!-- otherwise it's a pointer to some other document -->
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="length-magnitude"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>length-magnitude — Return the unqualified dimension from a length specification</p></div><div class="refsect1" lang="en"><a name="d0e133"></a><h2>Description</h2><p>The <code class="function">length-magnitude</code> template returns the
unqualified length ("20" for "20pt") from a dimension.
</p><pre class="programlisting"><a name="length-magnitude.frag"></a><pre class="programlisting">
<xsl:template name="length-magnitude">
<xsl:param name="length" select="'0pt'"></xsl:param>
<xsl:choose>
<xsl:when test="string-length($length) = 0"></xsl:when>
<xsl:when test="substring($length,1,1) = '0' or substring($length,1,1) = '1' or substring($length,1,1) = '2' or substring($length,1,1) = '3' or substring($length,1,1) = '4' or substring($length,1,1) = '5' or substring($length,1,1) = '6' or substring($length,1,1) = '7' or substring($length,1,1) = '8' or substring($length,1,1) = '9' or substring($length,1,1) = '.'">
<xsl:value-of select="substring($length,1,1)"></xsl:value-of>
<xsl:call-template name="length-magnitude">
<xsl:with-param name="length" select="substring($length,2)"></xsl:with-param>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="length-units"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>length-units — Return the units from a length specification</p></div><div class="refsect1" lang="en"><a name="d0e150"></a><h2>Description</h2><p>The <code class="function">length-units</code> template returns the
units ("pt" for "20pt") from a length. If no units are supplied on the
length, the <em class="parameter"><code>defauilt.units</code></em> are returned.</p><pre class="programlisting"><a name="length-units.frag"></a><pre class="programlisting">
<xsl:template name="length-units">
<xsl:param name="length" select="'0pt'"></xsl:param>
<xsl:param name="default.units" select="'px'"></xsl:param>
<xsl:variable name="magnitude">
<xsl:call-template name="length-magnitude">
<xsl:with-param name="length" select="$length"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="units">
<xsl:value-of select="substring($length, string-length($magnitude)+1)"></xsl:value-of>
</xsl:variable>
<xsl:choose>
<xsl:when test="$units = ''">
<xsl:value-of select="$default.units"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$units"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="length-spec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>length-spec — Return a fully qualified length specification</p></div><div class="refsect1" lang="en"><a name="d0e170"></a><h2>Description</h2><p>The <code class="function">length-spec</code> template returns the
qualified length from a dimension. If an unqualified length is given,
the <em class="parameter"><code>default.units</code></em> will be added to it.
</p><pre class="programlisting"><a name="length-spec.frag"></a><pre class="programlisting">
<xsl:template name="length-spec">
<xsl:param name="length" select="'0pt'"></xsl:param>
<xsl:param name="default.units" select="'px'"></xsl:param>
<xsl:variable name="magnitude">
<xsl:call-template name="length-magnitude">
<xsl:with-param name="length" select="$length"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="units">
<xsl:value-of select="substring($length, string-length($magnitude)+1)"></xsl:value-of>
</xsl:variable>
<xsl:value-of select="$magnitude"></xsl:value-of>
<xsl:choose>
<xsl:when test="$units='cm' or $units='mm' or $units='in' or $units='pt' or $units='pc' or $units='px' or $units='em'">
<xsl:value-of select="$units"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = ''">
<xsl:value-of select="$default.units"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Unrecognized unit of measure: </xsl:text>
<xsl:value-of select="$units"></xsl:value-of>
<xsl:text>.</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="length-in-points"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>length-in-points — Returns the size, in points, of a specified length</p></div><div class="refsect1" lang="en"><a name="d0e190"></a><h2>Description</h2><p>The <code class="function">length-in-points</code> template converts a length
specification to points and returns that value as an unqualified
number.
</p><div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Caution</h3><p>There is no way for the template to infer the size of an
<code class="literal">em</code>. It relies on the default <em class="parameter"><code>em.size</code></em>
which is initially <code class="literal">10</code> (for 10pt).</p><p>Similarly, converting pixels to points relies on the
<em class="parameter"><code>pixels.per.inch</code></em> parameter which is initially
<code class="literal">90</code>.
</p></div><pre class="programlisting"><a name="length-in-points.frag"></a><pre class="programlisting">
<xsl:template name="length-in-points">
<xsl:param name="length" select="'0pt'"></xsl:param>
<xsl:param name="em.size" select="10"></xsl:param>
<xsl:param name="pixels.per.inch" select="90"></xsl:param>
<xsl:variable name="magnitude">
<xsl:call-template name="length-magnitude">
<xsl:with-param name="length" select="$length"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="units">
<xsl:value-of select="substring($length, string-length($magnitude)+1)"></xsl:value-of>
</xsl:variable>
<xsl:choose>
<xsl:when test="$units = 'pt'">
<xsl:value-of select="$magnitude"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'cm'">
<xsl:value-of select="$magnitude div 2.54 * 72.0"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'mm'">
<xsl:value-of select="$magnitude div 25.4 * 72.0"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'in'">
<xsl:value-of select="$magnitude * 72.0"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'pc'">
<xsl:value-of select="$magnitude * 12.0"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'px'">
<xsl:value-of select="$magnitude div $pixels.per.inch * 72.0"></xsl:value-of>
</xsl:when>
<xsl:when test="$units = 'em'">
<xsl:value-of select="$magnitude * $em.size"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Unrecognized unit of measure: </xsl:text>
<xsl:value-of select="$units"></xsl:value-of>
<xsl:text>.</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="pi-attribute"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pi-attribute — Extract a pseudo-attribute from a PI</p></div><div class="refsect1" lang="en"><a name="d0e227"></a><h2>Description</h2><p>The <code class="function">pi-attribute</code> template extracts a pseudo-attribute
from a processing instruction. For example, given the PI
“<span class="quote"><code class="literal"><?foo bar="1" baz='red'?></code></span>”,</p><pre class="programlisting"><xsl:call-template name="pi-attribute">
<xsl:with-param name="pis" select="processing-instruction('foo')"/>
<xsl:with-param name="attribute" select="'baz'"/>
</xsl:call-template></pre><p>will return “<span class="quote">red</span>”. This template returns the first matching
attribute that it finds. Presented with processing instructions that
contain badly formed pseudo-attributes (missing or unbalanced quotes,
for example), the template may silently return erroneous results.</p><pre class="programlisting"><a name="pi-attribute.frag"></a><pre class="programlisting">
<xsl:template name="pi-attribute">
<xsl:param name="pis" select="processing-instruction('BOGUS_PI')"></xsl:param>
<xsl:param name="attribute">filename</xsl:param>
<xsl:param name="count">1</xsl:param>
<xsl:choose>
<xsl:when test="$count>count($pis)">
<!-- not found -->
</xsl:when>
<xsl:otherwise>
<xsl:variable name="pi">
<xsl:value-of select="$pis[$count]"></xsl:value-of>
</xsl:variable>
<xsl:variable name="pivalue">
<xsl:value-of select="concat(' ', normalize-space($pi))"></xsl:value-of>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($pivalue,concat(' ', $attribute, '='))">
<xsl:variable name="rest" select="substring-after($pivalue,concat(' ', $attribute,'='))"></xsl:variable>
<xsl:variable name="quote" select="substring($rest,1,1)"></xsl:variable>
<xsl:value-of select="substring-before(substring($rest,2),$quote)"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="pi-attribute">
<xsl:with-param name="pis" select="$pis"></xsl:with-param>
<xsl:with-param name="attribute" select="$attribute"></xsl:with-param>
<xsl:with-param name="count" select="$count + 1"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="lookup.key"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>lookup.key — Retrieve the value associated with a particular key in a table</p></div><div class="refsect1" lang="en"><a name="d0e255"></a><h2>Description</h2><p>Given a table of space-delimited key/value pairs,
the <code class="function">lookup.key</code> template extracts the value associated
with a particular key.</p><pre class="programlisting"><a name="lookup.key.frag"></a><pre class="programlisting">
<xsl:template name="lookup.key">
<xsl:param name="key" select="''"></xsl:param>
<xsl:param name="table" select="''"></xsl:param>
<xsl:if test="contains($table, ' ')">
<xsl:choose>
<xsl:when test="substring-before($table, ' ') = $key">
<xsl:variable name="rest" select="substring-after($table, ' ')"></xsl:variable>
<xsl:choose>
<xsl:when test="contains($rest, ' ')">
<xsl:value-of select="substring-before($rest, ' ')"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$rest"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="lookup.key">
<xsl:with-param name="key" select="$key"></xsl:with-param>
<xsl:with-param name="table" select="substring-after(substring-after($table,' '), ' ')"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="xpath.location"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xpath.location — Calculate the XPath child-sequence to the current node</p></div><div class="refsect1" lang="en"><a name="d0e272"></a><h2>Description</h2><p>The <code class="function">xpath.location</code> template calculates the
absolute path from the root of the tree to the current element node.
</p><pre class="programlisting"><a name="xpath.location.frag"></a><pre class="programlisting">
<xsl:template name="xpath.location">
<xsl:param name="node" select="."></xsl:param>
<xsl:param name="path" select="''"></xsl:param>
<xsl:variable name="next.path">
<xsl:value-of select="local-name($node)"></xsl:value-of>
<xsl:if test="$path != ''">/</xsl:if>
<xsl:value-of select="$path"></xsl:value-of>
</xsl:variable>
<xsl:choose>
<xsl:when test="$node/parent::*">
<xsl:call-template name="xpath.location">
<xsl:with-param name="node" select="$node/parent::*"></xsl:with-param>
<xsl:with-param name="path" select="$next.path"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:text>/</xsl:text>
<xsl:value-of select="$next.path"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="comment-escape-string"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comment-escape-string — Prepare a string for inclusion in an XML comment</p></div><div class="refsect1" lang="en"><a name="d0e289"></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><pre class="programlisting"><a name="comment-escape-string"></a><pre class="programlisting">
<xsl:template name="comment-escape-string">
<xsl:param name="string" select="''"></xsl:param>
<xsl:if test="starts-with($string, '-')">
<xsl:text> </xsl:text>
</xsl:if>
<xsl:call-template name="comment-escape-string.recursive">
<xsl:with-param name="string" select="$string"></xsl:with-param>
</xsl:call-template>
<xsl:if test="substring($string, string-length($string), 1) = '-'">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="comment-escape-string.recursive"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comment-escape-string.recursive — Internal function used by comment-escape-string</p></div><div class="refsect1" lang="en"><a name="d0e306"></a><h2>Description</h2><p>The <code class="function">comment-escape-string.recursive</code> template is used
by <code class="function">comment-escape-string</code>.</p><pre class="programlisting"><a name="comment-escape-string.recursive"></a><pre class="programlisting">
<xsl:template name="comment-escape-string.recursive">
<xsl:param name="string" select="''"></xsl:param>
<xsl:choose>
<xsl:when test="contains($string, '--')">
<xsl:value-of select="substring-before($string, '--')"></xsl:value-of>
<xsl:value-of select="'- -'"></xsl:value-of>
<xsl:call-template name="comment-escape-string.recursive">
<xsl:with-param name="string" select="substring-after($string, '--')"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="prepend-pad"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>prepend-pad — Right-pad a string out to a certain length</p></div><div class="refsect1" lang="en"><a name="d0e326"></a><h2>Description</h2><p>This function takes string <em class="parameter"><code>padVar</code></em> and
pads it out to the string-length <em class="parameter"><code>length</code></em>, using
string <em class="parameter"><code>padChar</code></em> (a space character by default)
as the padding string (note that <em class="parameter"><code>padChar</code></em> can be
a string; it is not limited to just being a single character).</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is a copy of Nate Austin's
<code class="function">prepend-pad</code> function in the <a href="http://www.dpawson.co.uk/xsl/sect2/padding.html" target="_top">Padding
Content</a> section of Dave Pawson's <a href="http://www.dpawson.co.uk/xsl/index.html" target="_top">XSLT
FAQ</a>.</p></div><pre class="programlisting"><a name="prepend-pad.frag"></a><pre class="programlisting">
<xsl:template name="prepend-pad">
<!-- recursive template to right justify and prepend-->
<!-- the value with whatever padChar is passed in -->
<xsl:param name="padChar" select="' '"></xsl:param>
<xsl:param name="padVar"></xsl:param>
<xsl:param name="length"></xsl:param>
<xsl:choose>
<xsl:when test="string-length($padVar) < $length">
<xsl:call-template name="prepend-pad">
<xsl:with-param name="padChar" select="$padChar"></xsl:with-param>
<xsl:with-param name="padVar" select="concat($padChar,$padVar)"></xsl:with-param>
<xsl:with-param name="length" select="$length"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($padVar,string-length($padVar) - $length + 1)"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="str.tokenize.keep.delimiters"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>str.tokenize.keep.delimiters — Tokenize a string while preserving any delimiters</p></div><div class="refsect1" lang="en"><a name="d0e364"></a><h2>Description</h2><p>Based on the occurrence of one or more delimiter characters,
this function breaks a string into a list of tokens and delimiters,
marking up each of the tokens with a <code class="sgmltag-element">token</code> element
and preserving the delimiters as text nodes between the tokens.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is a very slightly modified version of a
function from the <a href="http://www.exslt.org/" target="_top">EXSLT
site</a>. The original is available at:
</p><div class="blockquote"><blockquote class="blockquote"><p><a href="http://www.exslt.org/str/functions/tokenize/str.tokenize.template.xsl" target="_top">http://www.exslt.org/str/functions/tokenize/str.tokenize.template.xsl</a></p></blockquote></div><p>
The <code class="function">str.tokenize.keep.delimiters</code> function
differs only in that it preserves the delimiters instead of
discarding them.</p></div><pre class="programlisting"><a name="str.tokenize.keep.delimiters.frag"></a><pre class="programlisting">
<xsl:template name="str.tokenize.keep.delimiters">
<xsl:param name="string" select="''"></xsl:param>
<xsl:param name="delimiters" select="' '"></xsl:param>
<xsl:choose>
<xsl:when test="not($string)"></xsl:when>
<xsl:when test="not($delimiters)">
<xsl:call-template name="str.tokenize.keep.delimiters-characters">
<xsl:with-param name="string" select="$string"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
<xsl:with-param name="string" select="$string"></xsl:with-param>
<xsl:with-param name="delimiters" select="$delimiters"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="str.tokenize.keep.delimiters-characters">
<xsl:param name="string"></xsl:param>
<xsl:if test="$string">
<token><xsl:value-of select="substring($string, 1, 1)"></xsl:value-of></token>
<xsl:call-template name="str.tokenize.keep.delimiters-characters">
<xsl:with-param name="string" select="substring($string, 2)"></xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="str.tokenize.keep.delimiters-delimiters">
<xsl:param name="string"></xsl:param>
<xsl:param name="delimiters"></xsl:param>
<xsl:variable name="delimiter" select="substring($delimiters, 1, 1)"></xsl:variable>
<xsl:choose>
<xsl:when test="not($delimiter)">
<token><xsl:value-of select="$string"></xsl:value-of></token>
</xsl:when>
<xsl:when test="contains($string, $delimiter)">
<xsl:if test="not(starts-with($string, $delimiter))">
<xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
<xsl:with-param name="string" select="substring-before($string, $delimiter)"></xsl:with-param>
<xsl:with-param name="delimiters" select="substring($delimiters, 2)"></xsl:with-param>
</xsl:call-template>
</xsl:if>
<!-- output each delimiter -->
<xsl:value-of select="$delimiter"></xsl:value-of>
<xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
<xsl:with-param name="string" select="substring-after($string, $delimiter)"></xsl:with-param>
<xsl:with-param name="delimiters" select="$delimiters"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="str.tokenize.keep.delimiters-delimiters">
<xsl:with-param name="string" select="$string"></xsl:with-param>
<xsl:with-param name="delimiters" select="substring($delimiters, 2)"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="apply-string-subst-map"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>apply-string-subst-map — Apply a string-substitution map</p></div><div class="refsect1" lang="en"><a name="d0e394"></a><h2>Description</h2><p>This function applies a "string substitution" map. Use it when
you want to do multiple string substitutions on the same target
content. It reads in two things: <em class="parameter"><code>content</code></em>, the
content on which to perform the substitution, and
<em class="parameter"><code>map.contents</code></em>, a node set of
elements (the names of the elements don't matter), with each element
having the following attributes:
</p><div class="itemizedlist"><ul type="disc"><li><code class="sgmltag-attribute">oldstring</code>, a string to
be replaced</li><li><code class="sgmltag-attribute">newstring</code>, a string with
which to replace <code class="sgmltag-attribute">oldstring</code></li></ul></div><p>
The function uses <em class="parameter"><code>map.contents</code></em> to
do substitution on <em class="parameter"><code>content</code></em>, and then
returns the modified contents.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is a very slightly modified version of Jeni
Tennison's <code class="function">replace_strings</code> function in the
<a href="http://www.dpawson.co.uk/xsl/sect2/StringReplace.html#d9351e13" target="_top">multiple string replacements</a> section of Dave Pawson's
<a href="http://www.dpawson.co.uk/xsl/index.html" target="_top">XSLT
FAQ</a>.</p><p>The <code class="function">apply-string-subst-map</code> function is
essentially the same function as the
<code class="function">apply-character-map</code> function; the only
difference is that in the map that
<code class="function">apply-string-subst-map</code> expects, <code class="sgmltag-attribute">oldstring</code> and <code class="sgmltag-attribute">newstring</code> attributes are used instead of
<code class="sgmltag-attribute">character</code> and <code class="sgmltag-attribute">string</code> attributes.</p></div><pre class="programlisting"><a name="apply-string-subst-map.frag"></a><pre class="programlisting">
<xsl:template name="apply-string-subst-map">
<xsl:param name="content"></xsl:param>
<xsl:param name="map.contents"></xsl:param>
<xsl:variable name="replaced_text">
<xsl:call-template name="string.subst">
<xsl:with-param name="string" select="$content"></xsl:with-param>
<xsl:with-param name="target" select="$map.contents[1]/@oldstring"></xsl:with-param>
<xsl:with-param name="replacement" select="$map.contents[1]/@newstring"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$map.contents[2]">
<xsl:call-template name="apply-string-subst-map">
<xsl:with-param name="content" select="$replaced_text"></xsl:with-param>
<xsl:with-param name="map.contents" select="$map.contents[position() > 1]"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$replaced_text"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="apply-character-map"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>apply-character-map — Apply an XSLT character map</p></div><div class="refsect1" lang="en"><a name="d0e469"></a><h2>Description</h2><p>This function applies an <a href="http://www.w3.org/TR/xslt20/#character-maps" target="_top">XSLT character
map</a>; that is, it cause certain individual characters to be
substituted with strings of one or more characters. It is useful
mainly for replacing multiple "special" chararacters or symbols in
the same target content. It reads in two things:
<em class="parameter"><code>content</code></em>, the content on which to perform the
substitution, and <em class="parameter"><code>map.contents</code></em>, a
node set of elements (the names of the elements don't matter), with
each element having the following attributes:
</p><div class="itemizedlist"><ul type="disc"><li><code class="sgmltag-attribute">character</code>, a character to
be replaced</li><li><code class="sgmltag-attribute">string</code>, a string with
which to replace <code class="sgmltag-attribute">character</code></li></ul></div><p>
This function uses <em class="parameter"><code>map.contents</code></em> to
do substitution on <em class="parameter"><code>content</code></em>, and then returns
the modified contents.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is a very slightly modified version of Jeni
Tennison's <code class="function">replace_strings</code> function in the
<a href="http://www.dpawson.co.uk/xsl/sect2/StringReplace.html#d9351e13" target="_top">multiple string replacements</a> section of Dave Pawson's
<a href="http://www.dpawson.co.uk/xsl/index.html" target="_top">XSLT
FAQ</a>.</p><p>The <code class="function">apply-string-subst-map</code> function is
essentially the same function as the
<code class="function">apply-character-map</code> function; the only
difference is that in the map that
<code class="function">apply-string-subst-map</code> expects, <code class="sgmltag-attribute">oldstring</code> and <code class="sgmltag-attribute">newstring</code> attributes are used instead of
<code class="sgmltag-attribute">character</code> and <code class="sgmltag-attribute">string</code> attributes.</p></div><pre class="programlisting"><a name="apply-character-map.frag"></a><pre class="programlisting">
<xsl:template name="apply-character-map">
<xsl:param name="content"></xsl:param>
<xsl:param name="map.contents"></xsl:param>
<xsl:variable name="replaced_text">
<xsl:call-template name="string.subst">
<xsl:with-param name="string" select="$content"></xsl:with-param>
<xsl:with-param name="target" select="$map.contents[1]/@character"></xsl:with-param>
<xsl:with-param name="replacement" select="$map.contents[1]/@string"></xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$map.contents[2]">
<xsl:call-template name="apply-character-map">
<xsl:with-param name="content" select="$replaced_text"></xsl:with-param>
<xsl:with-param name="map.contents" select="$map.contents[position() > 1]"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$replaced_text"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="read-character-map"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>read-character-map — Read in all or part of an XSLT character map</p></div><div class="refsect1" lang="en"><a name="d0e547"></a><h2>Description</h2><p>The XSLT 2.0 specification describes <a href="http://www.w3.org/TR/xslt20/#character-maps" target="_top">character
maps</a> and explains how they may be used to allow a specific
character appearing in a text or attribute node in a final results
tree to be substituted by a specified string of characters during
serialization. The <code class="function">read-character-map</code> function
provides a means for reading and using character maps with XSLT
1.0-based tools.</p><p>It reads the character-map contents from
<em class="parameter"><code>uri</code></em> (in full or in part, depending on the value
of the <em class="parameter"><code>use.subset</code></em> parameter), then passes those
contents to the <code class="function">apply-character-map</code> function,
along with <em class="parameter"><code>content</code></em>, the data on which to
perform the character substition.</p><p>Using the character map "in part" means that it uses only those
<code class="sgmltag-element">output-character</code> elements that match the XPATH expression
given in the value of the <em class="parameter"><code>subset.profile</code></em>
parameter. The current implementation of that capability here relies
on the <code class="function">evaluate</code> extension XSLT function.</p><pre class="programlisting"><a name="read-character-map.frag"></a><pre class="programlisting">
<xsl:template name="read-character-map">
<xsl:param name="use.subset"></xsl:param>
<xsl:param name="subset.profile"></xsl:param>
<xsl:param name="uri"></xsl:param>
<xsl:choose>
<xsl:when test="$use.subset != 0">
<!-- use a subset of the character map instead of the full map -->
<xsl:choose>
<!-- xsltproc and Xalan both support dyn:evaluate() -->
<xsl:when test="function-available('dyn:evaluate')">
<xsl:copy-of select="document($uri)//*[local-name()='output-character'] [dyn:evaluate($subset.profile)]"></xsl:copy-of>
</xsl:when>
<!-- Saxon has its own evaluate() & doesn't support dyn:evaluate() -->
<xsl:when test="function-available('saxon:evaluate')">
<xsl:copy-of select="document($uri)//*[local-name()='output-character'] [saxon:evaluate($subset.profile)]"></xsl:copy-of>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
Error: To process character-map subsets, you must use an XSLT engine
that supports the evaluate() XSLT extension function. Your XSLT engine
does not support it.
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- value of $use.subet is non-zero, so use the full map -->
<xsl:copy-of select="document($uri)//*[local-name()='output-character']"></xsl:copy-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div></div><div class="reference" lang="en"><a name="d0e586"></a><div class="titlepage"><div><div><h1 class="title"><a name="d0e586"></a>Relative URI Functions</h1></div></div><hr></div><div class="partintro" lang="en"><div><div><div><h1 class="title"><a name="d0e589"></a>Introduction</h1></div></div></div><p>These functions manipulate relative URI references.</p><p>The following assumptions must hold true:</p><div class="orderedlist"><ol type="1"><li><p>All URIs are relative.</p></li><li><p>No URI contains the “<span class="quote"><code class="literal">../</code></span>” sequence
which would effectively move “<span class="quote">up</span>” the hierarchy.</p></li></ol></div><p>If these assumptions do not hold, the results are unpredictable.</p><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="#count.uri.path.depth">count.uri.path.depth</a></span><span class="refpurpose"> - Count the number of path components in a relative URI</span></dt><dt><span class="refentrytitle"><a href="#trim.common.uri.paths">trim.common.uri.paths</a></span><span class="refpurpose"> - Trim common leading path components from a relative URI</span></dt></dl></div></div><div class="refentry" lang="en"><a name="count.uri.path.depth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>count.uri.path.depth — Count the number of path components in a relative URI</p></div><div class="refsect1" lang="en"><a name="d0e618"></a><h2>Description</h2><p>This function counts the number of path components in a relative URI.</p><pre class="programlisting"><a name="count.uri.path.depth.frag"></a><pre class="programlisting">
<xsl:template name="count.uri.path.depth">
<xsl:param name="filename" select="''"></xsl:param>
<xsl:param name="count" select="0"></xsl:param>
<xsl:choose>
<xsl:when test="contains($filename, '/')">
<xsl:call-template name="count.uri.path.depth">
<xsl:with-param name="filename" select="substring-after($filename, '/')"></xsl:with-param>
<xsl:with-param name="count" select="$count + 1"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$count"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div><div class="refentry" lang="en"><div class="refentry.separator"><hr></div><a name="trim.common.uri.paths"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>trim.common.uri.paths — Trim common leading path components from a relative URI</p></div><div class="refsect1" lang="en"><a name="d0e632"></a><h2>Description</h2><p>This function trims common leading path components from a relative URI.</p><pre class="programlisting"><a name="trim.common.uri.paths.frag"></a><pre class="programlisting">
<xsl:template name="trim.common.uri.paths">
<xsl:param name="uriA" select="''"></xsl:param>
<xsl:param name="uriB" select="''"></xsl:param>
<xsl:param name="return" select="'A'"></xsl:param>
<xsl:choose>
<xsl:when test="contains($uriA, '/') and contains($uriB, '/') and substring-before($uriA, '/') = substring-before($uriB, '/')">
<xsl:call-template name="trim.common.uri.paths">
<xsl:with-param name="uriA" select="substring-after($uriA, '/')"></xsl:with-param>
<xsl:with-param name="uriB" select="substring-after($uriB, '/')"></xsl:with-param>
<xsl:with-param name="return" select="$return"></xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$return = 'A'">
<xsl:value-of select="$uriA"></xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$uriB"></xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</pre></pre></div></div></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="d0e640"></a>Appendix A. The Stylesheet</h2></div></div></div><p>The <code class="filename">lib.xsl</code> stylesheet is just a wrapper
around these functions.</p><a name="top"></a><pre class="programlisting">
<!-- ********************************************************************
$Id: lib.xweb,v 1.13 2005/07/08 10:35:55 xmldoc Exp $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
See ../README or http://nwalsh.com/docbook/xsl/ for copyright
and other information.
This module implements DTD-independent functions
******************************************************************** -->
<xsl:stylesheet exclude-result-prefixes="src" version="1.0">
<src:fragref linkend="dot.count.frag"></src:fragref>
<src:fragref linkend="copy-string.frag"></src:fragref>
<src:fragref linkend="string.subst.frag"></src:fragref>
<src:fragref linkend="xpointer.idref.frag"></src:fragref>
<src:fragref linkend="length-magnitude.frag"></src:fragref>
<src:fragref linkend="length-units.frag"></src:fragref>
<src:fragref linkend="length-spec.frag"></src:fragref>
<src:fragref linkend="length-in-points.frag"></src:fragref>
<src:fragref linkend="pi-attribute.frag"></src:fragref>
<src:fragref linkend="lookup.key.frag"></src:fragref>
<src:fragref linkend="xpath.location.frag"></src:fragref>
<src:fragref linkend="comment-escape-string"></src:fragref>
<src:fragref linkend="comment-escape-string.recursive"></src:fragref>
<src:fragref linkend="prepend-pad.frag"></src:fragref>
<src:fragref linkend="str.tokenize.keep.delimiters.frag"></src:fragref>
<src:fragref linkend="apply-string-subst-map.frag"></src:fragref>
<src:fragref linkend="apply-character-map.frag"></src:fragref>
<src:fragref linkend="read-character-map.frag"></src:fragref>
<src:fragref linkend="count.uri.path.depth.frag"></src:fragref>
<src:fragref linkend="trim.common.uri.paths.frag"></src:fragref>
</xsl:stylesheet>
</pre></div></div></body></html>