emacs.d/clones/lisp/www.cliki.net/YHTML-Template.html
2022-10-07 15:47:14 +02:00

96 lines
No EOL
5.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: YHTML-TEMPLATE</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=YHTML-TEMPLATE">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - YHTML-TEMPLATE</span>
<div id="content"><div id="content-area"><div id="article-title">YHTML-TEMPLATE</div><div id="article">YHTML-Template is an <a href="HTML&#32;template.html" class="category">HTML template</a> library based on Edi Weitz's <a href="HTML-TEMPLATE.html" class="internal">HTML-TEMPLATE</a>. It was written by <a href="Dmitri&#32;Ivanov.html" class="internal">Dmitri Ivanov</a>.<p>License: <a href="LLGPL.html" class="internal">LLGPL</a><p>Homepage: <a href="http://lisp.ystok.ru/yhtml/html-template.html">http://lisp.ystok.ru/yhtml/html-template.html</a>.<p> YHTML-Template is a part of <a href="YstokHTML.html" class="internal">YstokHTML</a> collection. It accepts more "Lispy" expressions and provides the following extensions to the original <a href="HTML-TEMPLATE.html" class="internal">HTML-TEMPLATE</a> code. <p><ol>
<li>A Lisp form in place of "plane attribute" is allowed.
Forms are read by the standard read function.
All starting tags (except </li>
</ol><code>TMPL_INCLUDE</code>) accept forms
instead of "old style" attributes.<br><p> The <code>*attributes-are-lisp-forms*</code> special variable was introduced.
Bind or set it to NIL to treating those tags in the compatibility mode.<p><li>Symbols follow standard Lisp syntax: a package specifier is allowed
in front of the name. By default, symbols are interned into the
package stored in *template-package*, a new special variable.
</li>
<li>To interpret the forms in run-time, the </li><code>template-eval</code> was introduced.
It is a simple evaluator akin to the standard <code>eval</code> function except for:
<ul>
<li>A limited number of special-forms is supported, namely:
</li>
</ul><code>IF WHEN UNLESS AND OR NOT QUOTE</code>.
<li>The symbol with a name like *var* is treated as a dynamic variable
and is retrieved via </li><code>symbol-value</code>.
<li>The values of other symbols are looked up via *value-access-function*.
</li><li>The </li><code>TMPL_EVAL</code> tag and create-eval-printer were introduced;
the former should be used instead of the <code>TMPL_VAR</code> tag.<p><li>The value of </li><code>*format-non-strings*</code> has got an additional meaning.
If it equals to <code>T</code>, the result is produced by means of
<code>princ-to-string</code>, i.e. <code>(format nil &quot;~A&quot; ...)</code>.<br>
If it is true but not equals to T, the value must be a single-parameter
function, which returns two values:<br>
(1) a string resulted from its argument, and optionally<br>
(2) <var>do-not-modify</var> flag controlling whether <code>*string-modifier*</code>
is applied afterwards.<br>
The truth as second value can prevent the result of converting
from predefined format, e.g. LHTML, from further escaping.<p><li>Tag </li><code>TMPL_ELSE</code> and all ending tags <code>/TMPL_...</code> can
embed an optional text
between the tag name and the closing marker "--&gt;". This text is intended
for readability only and completely ignored by the template parser.
For example: <code>&lt;!-- /TMPL_LOOP rows --&gt;</code><p><li>The </li><code>TMPL_ELIF</code> tag was introduced to allow
a more concise code. In full, now the "if" pattern looks like:
<pre class="samp">
!-- TMPL_IF condition_1 --
text_1
!-- TMPL_ELIF condition_2 --
text_2
...
!-- TMPL_ELSE --
text_else
!-- /TMPL_IF --
</pre><p></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="YHTML-TEMPLATE.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=YHTML-TEMPLATE">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=YHTML-TEMPLATE">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=YHTML-TEMPLATE&amp;from-revision=3599962913">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>