/usr/share/doc/htp/use.html is in htp 1.16-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>htp on-line reference
: USE, $
</TITLE>
<link rel="stylesheet" type="text/css" href="styles.css">
<meta name="Generator" content="htp 1.16">
</HEAD>
<body bgcolor="#b0b080">
<table border="0" cellspacing="5" cellpadding="15" width="100%">
<tr>
<td colspan="2" bgcolor="white">
<img src="pic/logo.png" alt="HTP" width="171" height="105">
<h1>
htp on-line reference
: USE, $
</h1>
</td>
</tr>
<tr>
<td width="20%" bgcolor="white" valign="top">
<div style="align:top">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="toc" colspan="3" width="100%">
<a class="noline" href="index.html">Table of Contents</a></td>
</tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="intro.html">Introduction</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="license.html">License</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="tutorial.html">Tutorial</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="usage.html">Usage</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
HTP Tags</td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="alttext.html">ALTTEXT</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="block.html">BLOCK</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="blockdef.html">BLOCKDEF</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="def.html">DEF</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="file.html">FILE</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="if.html">IF</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="inc.html">INC</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="img.html">IMG</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="imageurl.html">IMAGEURL</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="opt.html">OPT</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="output.html">OUTPUT</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="quote.html">QUOTE</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="set.html">SET</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="undef.html">UNDEF</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="unset.html">UNSET</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
<img src="pic/arrow.png" alt=">" width="10" height="10">
</td><td class="toc"><a class="noline" href="use.html">USE, $</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="while.html">WHILE</a></td></tr>
<tr><td class=tocf width="12"> </td><td class=tocf width="12">
</td><td class="toc"><a class="noline" href="comment.html"><!---</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="history.html">History</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="wishlist.html">Wish list</a></td></tr>
<tr><td class=tocf width="12">
</td><td class="toc" colspan="2">
<a class="noline" href="bugs.html">Bugs</a></td></tr>
</table>
</div>
</td>
<td bgcolor="#f0f0d0" rowspan="2" valign="top">
<h2>syntax</h2>
<p><code>
<span class="htp-tag"><<a href="use.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">use</a> <span class="htp-attrib">macroname</span> <span class="ebnf">[</span><span class="htp-attrib">parameters</span> <span class="htp-attrib">...</span><span class="ebnf">]</span> <span class="ebnf">[</span><span class="htp-attrib">noexpand</span><span class="ebnf">]</span>></span><br>
<span class="htp-tag"><... <span class="htp-attrib"><span class="htp-macro">$macroname</span></span> <span class="htp-attrib">...</span>></span><br>
<span class="htp-tag"><... <span class="htp-attrib"><span class="htp-macro">${macroname}</span></span> <span class="htp-attrib">...</span>></span><br>
<br>
</code></p>
<h2>synopsis</h2>
<strong>USE</strong> will expand macros that have been previously
declared with either <A HREF="set.html">SET</A> or <A
HREF="block.html">BLOCK</A>. USE can only be used outside of other
markup tags.
<p> If you USE a block macro the value of expanded block macros will
be further parsed by htp. This is maybe not what you want, for
example, if the use is inside a block which <a
href="expand.html">expands</a> itself. You can use the noexpand
attribute to prevent further expansion. </p>
<p> USE will accept additional parameters, which are "local" macros
for the expanded macro. This is only valid for <A
HREF="block.html">BLOCK</A> macros. Macros created using <A
HREF="set.html">SET</A> cannot have parameters passed. For
example:</p>
<p><code>
<font size="-2"> 1. </font><span class="htp-tag"><<a href="block.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">block</a> <span class="htp-attrib">stuff</span>></span><br>
<font size="-2"> 2. </font> <span class="htp-tag"><a <span class="htp-attrib">href</span>=<span class="htp-value"><span class="htp-macro">$email</span></span>></span>send email<span class="htp-tag"></a></span><br>
<font size="-2"> 3. </font><span class="htp-tag"><<a href="block.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">/block</a>></span><br>
<font size="-2"> 4. </font><br>
<font size="-2"> 5. </font><span class="htp-tag"><<a href="set.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">set</a> <span class="htp-attrib">morestuff</span>=<span class="htp-value"><span class="htp-macro">$email</span></span>></span><br>
<font size="-2"> 6. </font><br>
<font size="-2"> 7. </font>This works: <span class="htp-tag"><<a href="use.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">use</a> <span class="htp-attrib">stuff</span> <span class="htp-attrib">email</span>=<span class="htp-string">"jnelson@crl.com"</span>></span><br>
<font size="-2"> 8. </font>But this fails: <span class="htp-tag"><<a href="use.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">use</a> <span class="htp-attrib">email</span>></span><br>
<font size="-2"> 9. </font>And this fails: <span class="htp-tag"><<a href="use.html" ><img src="pic/manual.png" border=0 alt="[ref]" width="10" height="10">use</a> <span class="htp-attrib">morestuff</span> <span class="htp-attrib">email</span>=<span class="htp-string">"jnelson@crl.com"</span>></span><br>
</code></p>
<P>
(See below for a description of the '$' operator.) The example on
line 7 works because "stuff" has been declared as a block macro, and
the tag is passing the "email" macro to the "stuff" macro. Line 8
fails because the "email" macro is unavailable once the block macro is
completely expanded, and cannot be passed to a SET macro.
<P>
Note that the "email" macro is available to other macros or included
files called within the "stuff" block.
<P>
Inside a markup tag, like <a href="img.html">IMG</a>, A (anchor), or
any other standard HTML or htp tag, the '$' operator must be used.
The '$' should be immediately followed by the macro name, which may or
may not be surrounded by curly braces. When htp encounters this it
replaces the macro name by the contents of the macro without further
processing the contents.
<p><code>
<font size="-2"> 1. </font><span class="htp-tag"><a <span class="htp-attrib">href</span>=<span class="htp-string">"mailto:<span class="htp-macro">$email</span>"</span>></span>mailto hyperlink<span class="htp-tag"></a></span><br>
<font size="-2"> 2. </font><span class="htp-tag"><a <span class="htp-attrib">href</span>=<span class="htp-string">"http://<span class="htp-macro">$domain</span>/~<span class="htp-macro">${username}</span>/"</span>></span>another hyperlink<span class="htp-tag"></a></span><br>
</code></p>
<P>
The use of curly braces is encouraged, since it is more robust and
should never cause confusion with surrounding text. If no curly
braces are used the macro name consists either of a single punctuation
character or the maximum sequence of letters, digits, "-"
and "_" that follows it.
<P>
If a '$' character needs to be kept in the final output, and not
interpreted as a macro name, it must be escaped by another '$'
character. This is especially true for PHP code.
<P>
If the '$' macro is the only text in the attribute's value, htp will
automatically surround it with quotation marks to prevent spaces from
delimiting the text as if it were additional markup attributes.
If the '$' macro is surrounded by other text (as in the two examples above),
quotation marks are not automatically supplied.
<P>
Note that a '$' macro can be placed anywhere in a markup tag and can
be nested. This is valid:
<p><code>
<span class="htp-tag"><<span class="htp-macro">${tagName}</span> <span class="htp-attrib"><span class="htp-macro">${attrName}</span></span>=<span class="htp-value"><span class="htp-macro">${value$ctr}</span></span>></span><br>
</code></p>
<P> The tagName macro can contain any tag name, even a self-defined
metatag. Note that <code>$ctr</code> is expanded before the valueX
macro is expanded, so assuming that ctr was set to 1 it will expand
value1.
<p>
</td>
</tr>
<tr>
<td width="20%" bgcolor="white" valign="bottom">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="tocf" width=10>
<img src="pic/source.png" alt="" width="13" height="16">
</td><td class="toc">
<a href="http://htp.sourceforge.net/cgi-bin/source.cgi/ref/use.htp">page source</a>
</td></tr>
<tr><td class="tocf" width=10>
<img src="pic/sficon.png" alt="" width="16" height="16">
</td><td class="toc">
<a href="http://sourceforge.net/projects/htp/">htp project</a>
</td></tr>
<tr><td class="tocf">
<img src="pic/htpicon.png" alt="" width="16" height="16">
</td><td class="toc">
<a href="http://htp.sourceforge.net/">htp homepage</a>
</td></tr>
<tr><td colspan="2">
hosted by<br />
<a href="http://sourceforge.net/"><img
src="http://sourceforge.net/sflogo.php?group_id=41382&type=1"
width="88" height="31" border="0" alt="SourceForge.net"></a><br />
HTML coding
<a href="http://htp.sourceforge.net/"><img
src="pic/poweredbyhtp.png" alt="Powered by htp" width="88" height="31"></a>
</td></tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="white">
<div style="font-size:small">
<address>
htp on-line reference / <A HREF="http://htp.sourceforge.net/ref/">http://htp.sourceforge.net/ref/</A><br />
Authors: Jim Nelson, <a href="http://sourceforge.net/users/hoenicke">Jochen Hoenicke</a>, <a href="http://sourceforge.net/users/mcmoe">Michael Möller</a>.<br />
Maintainers:
<a href="http://sourceforge.net/users/hoenicke">Jochen Hoenicke</a>.<br />
</address>
<p>
Copyright © 1995-96 Jim Nelson.<BR>
Copyright © 2001-2003 <a href="http://sourceforge.net/users/hoenicke">Jochen Hoenicke</a>.<BR>
Permission to reproduce and distribute this hypertext document granted
according to terms described in the
<A HREF="license.html">License section</A>.
</p>
<p>
last updated Fri Aug 31, 2007
</p>
</div>
</td>
</tr>
</table>
</body>
</html>
|