YstokHTML is a collection of Common Lisp libraries for generating and parsing HTML and XHTML documents. YstokHTML is based on:
All the libraries are based on effective algorithms not relying on regular expression functions.
Both the YstokHTML generator and parser support the LHTML, the S-expression language used by the Franz's HTMLGen facility. Recently, Peter Seibel has described the FOO HTML, a similar generator syntax, in his book Practical Common Lisp.
htm(a la Edi Weitz's CL-WHO).
(htm :hr)can produce '<hr>' or '<hr />' depending on
print-html-...functions produce XHTML termination '/>' also depends on
(htm ((:p class 'a)))produces '<p class="a"></p>'.
:include, :nbsp, :jscript, :format, :format-safe, :!doctype, :?xml.
:escape, which invokes full-fledged
html-template:escape-stringand escapes not only four characters, but all satisfying
:optional, which is similar to
if*macro from the htmlgen.lisp source code.
uri-attrsspecifying a list of attributes of type URI.
prin1-safe-http-stringreplaced by generic
def-std-htmlnow defines a macro named as follows:
"), produced by the Franz's HTMLGen.
html-standard-printgenerates HTML close to what is produced by the
YstokHTML is available from http://lisp.ystok.ru/yhtml/yhtml-0-3-006.zip. The distribution package contains both the ASDLite/ASDF file yhtml.asd and the LispWorks system definition file defsys.lisp.
Here is change.log.
Currently, there is no documentation on YstokHTML other than for the HTMLGen and PHTML mentioned above. However, the source code is instructive and there are the demonstration file html-examples.lisp and the test cases file phtml-test.lisp in the distribution package.
If you fail to grab the original documentation at Franz's website, try our local copies htmlgen.html and phtml.htm.
(html:with-html-stream (*standard-output*) ((:table :border 2) (:tr ((:th :colspan 2) (:i "The square of four integers"))) (dotimes (i 4) (html:htm (:tr (:td (:princ i)) (:td (:b (:princ (* i i))))))))