1<html> 2 <head> 3 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 4 5 <title>Library Template Reference</title> 6 <link rel="stylesheet" href="/reference.css" type="text/css"> 7 <meta name="generator" content="DocBook XSL Stylesheets V1.37"> 8 </head> 9 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 10 <div class="reference"> 11 <div class="titlepage"> 12 <div> 13 <h1 class="title"><a name="d41e1"></a>Library Template Reference 14 </h1> 15 </div> 16 <div> 17 <h3 class="author">Norman Walsh</h3> 18 </div> 19 <div> 20 <p class="releaseinfo"> 21 $Id$ 22 23 </p> 24 </div> 25 <div> 26 <p class="copyright"><a href="/copyright.html">Copyright</a> © 1999, 2000 by Norman Walsh. <a href="/warranty.html">No Warranty</a>. 27 </p> 28 </div> 29 <hr> 30 </div> 31 <div class="partintro"> 32 <div></div> 33 <div class="section"><a name="d41e24"></a><div class="titlepage"> 34 <div> 35 <h2 class="title" style="clear: all"><a name="d41e24"></a>Introduction 36 </h2> 37 </div> 38 </div> 39 <p>This is technical reference documentation for the DocBook XSL 40 Stylesheets; it documents (some of) the parameters, templates, and 41 other elements of the stylesheets. 42 </p> 43 <p>This is not intended to be “user” documentation. 44 It is provided for developers writing customization layers for the 45 stylesheets, and for anyone who's interested in “how it 46 works”. 47 </p> 48 <p>Although I am trying to be thorough, this documentation is known 49 to be incomplete. Don't forget to read the source, too :-) 50 </p> 51 </div> 52 <div class="toc"> 53 <p><b>Table of Contents</b></p> 54 <dl> 55 <dt><a href="#template.string.subst">string.subst</a></dt> 56 <dt><a href="#template.xpointer.idref">xpointer.idref</a></dt> 57 <dt><a href="#template.length-magnitude">length-magnitude</a></dt> 58 <dt><a href="#template.length-spec">length-spec</a></dt> 59 </dl> 60 </div> 61 </div> 62 <hr> 63 <div class="refentry"> 64 <h1 class="title"><a name="template.string.subst"></a>string.subst 65 </h1> 66 <div class="refnamediv"><a name="d41e40"></a><h2>Name</h2>string.subst — Substitute one text string for another in a string 67 </div> 68 <div class="refsynopsisdiv"><a name="d41e45"></a><h2>Synopsis</h2><pre class="synopsis"><xsl:template name="string.subst"> 69<xsl:param name="string"/> 70<xsl:param name="target"/> 71<xsl:param name="replacement"/> 72 ... 73</xsl:template></pre></div> 74 <div class="refdescription"><a name="d41e48"></a> 75 76 77 <p>The <tt>string.subst</tt> template replaces all 78 occurances of <i><tt>target</tt></i> in <i><tt>string</tt></i> 79 with <i><tt>replacement</tt></i> and returns the result. 80 81 </p> 82 83 84 </div> 85 </div> 86 <hr> 87 <div class="refentry"> 88 <h1 class="title"><a name="template.xpointer.idref"></a>xpointer.idref 89 </h1> 90 <div class="refnamediv"><a name="d41e66"></a><h2>Name</h2>xpointer.idref — Extract IDREF from an XPointer 91 </div> 92 <div class="refsynopsisdiv"><a name="d41e71"></a><h2>Synopsis</h2><pre class="synopsis"><xsl:template name="xpointer.idref"> 93<xsl:param name="xpointer">http://...</xsl:param> 94 ... 95</xsl:template></pre></div> 96 <div class="refdescription"><a name="d41e74"></a> 97 98 99 <p>The <tt>xpointer.idref</tt> template returns the 100 ID portion of an XPointer which is a pointer to an ID within the current 101 document, or the empty string if it is not. 102 </p> 103 104 105 106 <p>In other words, <tt>xpointer.idref</tt> returns 107 “foo” when passed either <tt>#foo</tt> 108 or <tt>#xpointer(id('foo'))</tt>, otherwise it returns 109 the empty string. 110 </p> 111 112 113 </div> 114 </div> 115 <hr> 116 <div class="refentry"> 117 <h1 class="title"><a name="template.length-magnitude"></a>length-magnitude 118 </h1> 119 <div class="refnamediv"><a name="d41e98"></a><h2>Name</h2>length-magnitude — Return the unqualified dimension from a length specification 120 </div> 121 <div class="refsynopsisdiv"><a name="d41e103"></a><h2>Synopsis</h2><pre class="synopsis"><xsl:template name="length-magnitude"> 122<xsl:param name="length" select="'0pt'"/> 123 ... 124</xsl:template></pre></div> 125 <div class="refdescription"><a name="d41e106"></a> 126 127 128 <p>The <tt>length-magnitude</tt> template returns the 129 unqualified length ("20" for "20pt") from a dimension. 130 131 </p> 132 133 134 </div> 135 </div> 136 <hr> 137 <div class="refentry"> 138 <h1 class="title"><a name="template.length-spec"></a>length-spec 139 </h1> 140 <div class="refnamediv"><a name="d41e115"></a><h2>Name</h2>length-spec — Return a fully qualified length specification 141 </div> 142 <div class="refsynopsisdiv"><a name="d41e120"></a><h2>Synopsis</h2><pre class="synopsis"><xsl:template name="length-spec"> 143<xsl:param name="length" select="'0pt'"/> 144<xsl:param name="default.units" select="'pt'"/> 145 ... 146</xsl:template></pre></div> 147 <div class="refdescription"><a name="d41e123"></a> 148 149 150 <p>The <tt>length-spec</tt> template returns the 151 qualified length from a dimension. If an unqualified length is given, 152 the <i><tt>default.units</tt></i> will be added to it. 153 154 </p> 155 156 157 </div> 158 </div> 159 </div> 160 </body> 161</html>