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

67 lines
No EOL
4.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: htout</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=htout">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - htout</span>
<div id="content"><div id="content-area"><div id="article-title">htout</div><div id="article">htout is an <a href="HTML&#32;generator.html" class="category">HTML generator</a> written by Tim Bradshaw. It can be found at <a href="https://github.com/tfeb/interim-lisp/blob/master/htout.lisp">https://github.com/tfeb/interim-lisp/blob/master/htout.lisp</a>. Here's some more info from Tim Bradshaw's website:<p>Lisp's syntax can be used to express the structure of
SGML/XML-based documents very concisely:<p><pre>&lt;doc&gt;
&lt;heading&gt;Foo&lt;/heading&gt;
&lt;para&gt;this is a paragraph&lt;/para&gt;
&lt;/doc&gt;</pre><p>Becomes<p> <div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><span class="keyword">:doc</span>
<span class="paren2">(<span class="nonparen"><span class="keyword">:heading</span> <span class="string">"Foo"</span></span>)</span>
<span class="paren2">(<span class="nonparen"><span class="keyword">:para</span> <span class="string">"This is a paragraph"</span></span>)</span></span>)</span></span></div><p> Because <a href="Lisp.html" class="internal">Lisp</a> is also a programming language it is possible to
mingle Lisp code and SGML/XML markup in Lisp syntax to
programmatically generate <a href="document.html" class="internal">documents</a>.<p> In order to do this `right' for <a href="XML.html" class="category">XML</a> you need to deal with
issues of <a href="character&#32;encoding.html" class="internal">Unicode</a>, case, namespaces and so on.
But almost all documents don't need to worry about this complexity. This code
provides a simple way to mix <a href="HTML.html" class="category">HTML</a> markup with Lisp code. It does
not enforce anything except the matching of tags, so it knows
nothing about document types or anything like that. In fact the
only thing you need to tell it is which elements have empty
content models, so it generates <code>&lt;br&gt;</code> rather than
<code>&lt;br&gt;&lt;/br&gt;</code>.</div></div>
<div id="footer" class="buttonbar"><ul><li><a href="htout.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=htout">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=htout">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=htout&amp;from-revision=3799259134">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>