1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Library Template Reference</title>
<link rel="stylesheet" href="../reference.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.49+">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="reference"><a name="d0e1"></a><div class="titlepage">
<div>
<h1 class="title"><a name="d0e1"></a>Library Template Reference
</h1>
</div>
<div>
<div class="author">
<h3 class="author">Norman Walsh</h3>
</div>
</div>
<div>
<p class="releaseinfo">
$Id: lib.xsl,v 1.7 2002/03/18 13:39:43 nwalsh Exp $
</p>
</div>
<div>
<p class="copyright"><a href="../copyright.html">Copyright</a> © 19992000 by Norman Walsh. <a href="../warranty.html">No Warranty</a>.
</p>
</div>
<hr>
</div>
<div class="partintro">
<div></div>
<div class="section">
<div class="titlepage">
<div>
<h2 class="title" style="clear: both"><a name="d0e24"></a>Introduction
</h2>
</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 “user” documentation.
It is provided for developers writing customization layers for the
stylesheets, and for anyone who's interested in “how it
works”.
</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="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><a href="#template.string.subst">string.subst</a> - Substitute one text string for another in a string
</dt>
<dt><a href="#template.xpointer.idref">xpointer.idref</a> - Extract IDREF from an XPointer
</dt>
<dt><a href="#template.length-magnitude">length-magnitude</a> - Return the unqualified dimension from a length specification
</dt>
<dt><a href="#template.length-units">length-units</a> - Return the units from a length specification
</dt>
<dt><a href="#template.length-spec">length-spec</a> - Return a fully qualified length specification
</dt>
<dt><a href="#template.pi-attribute">pi-attribute</a> - Extract a pseudo-attribute from a PI
</dt>
<dt><a href="#template.lookup.key">lookup.key</a> - Retrieve the value associated with a particular key in a table
</dt>
<dt><a href="#template.xpath.location">xpath.location</a> - Calculate the XPath child-sequence to the current node
</dt>
</dl>
</div>
</div>
<div class="refentry"><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="string.subst">
<xsl:param name="string"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e48"></a>
<p>The <tt>string.subst</tt> template replaces all
occurances of <i><tt>target</tt></i> in <i><tt>string</tt></i>
with <i><tt>replacement</tt></i> and returns the result.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="xpointer.idref">
<xsl:param name="xpointer">http://...</xsl:param>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e74"></a>
<p>The <tt>xpointer.idref</tt> 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, <tt>xpointer.idref</tt> returns
“foo” when passed either <tt>#foo</tt>
or <tt>#xpointer(id('foo'))</tt>, otherwise it returns
the empty string.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="length-magnitude">
<xsl:param name="length" select="'0pt'"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e106"></a>
<p>The <tt>length-magnitude</tt> template returns the
unqualified length ("20" for "20pt") from a dimension.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="length-units">
<xsl:param name="length" select="'0pt'"/>
<xsl:param name="default.units" select="'pt'"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e123"></a>
<p>The <tt>length-units</tt> template returns the
units ("pt" for "20pt") from a length. If no units are supplied on the
length, the <i><tt>defauilt.units</tt></i> are returned.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="length-spec">
<xsl:param name="length" select="'0pt'"/>
<xsl:param name="default.units" select="'pt'"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e143"></a>
<p>The <tt>length-spec</tt> template returns the
qualified length from a dimension. If an unqualified length is given,
the <i><tt>default.units</tt></i> will be added to it.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="pi-attribute">
<xsl:param name="pis" select="processing-instruction('')"/>
<xsl:param name="attribute">filename</xsl:param>
<xsl:param name="count">1</xsl:param>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e163"></a>
<p>The <tt>pi-attribute</tt> template extracts a pseudo-attribute
from a processing instruction. For example, given the PI
“<tt><?foo bar="1" baz='red'?></tt>”,
</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 “red”. 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>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="lookup.key">
<xsl:param name="key" select="''"/>
<xsl:param name="table" select="''"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e193"></a>
<p>Given a table of space-delimited key/value pairs,
the <tt>lookup.key</tt> template extracts the value associated
with a particular key.
</p>
</div>
</div>
<div class="refentry">
<div class="refentry.separator">
<hr>
</div><a name="template.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="refsynopsisdiv">
<h2>Synopsis</h2><pre class="synopsis"><xsl:template name="xpath.location">
<xsl:param name="node" select="."/>
<xsl:param name="path" select="''"/>
...
</xsl:template></pre></div>
<div class="refdescription"><a name="d0e210"></a>
<p>The <tt>xpath.location</tt> template calculates the
absolute path from the root of the tree to the current element node.
</p>
</div>
</div>
</div>
</body>
</html>
|