Weave App |
|
An application for building websites using RiscLua.
Markup in text has four basic forms:
<tag />
<tag attributes />
<tag> stuff </tag>
<tag attributes> stuff </tag>
These would be denoted in Weave by
`.tag
?.tag (attributes)
!.tag (stuff)
?!.tag (attributes) (stuff)
Values in Weave are ropes (see LuaRopes). Attributes are tables.
To create a file named filename with type filetype from a rope stuff the Weave script is:
-- nostyle
mydoc = BEGIN(filename,filetype)
mydoc.DOC = stuff
END(mydoc)
The END function writes out the resulting rope to the file.
The comment inhibits the default loading of an HTML style prelude.
This prelude defines tags for HTML 4.01 Transitional.
For example:
BR = `.br
TD_ = ?.td
B = !.b
A_ = ?!.a
The underscore is used to accommodate tags that can have optional attributes.
Weave is useful for generating hundreds of pages at one stroke from databases - tables of lists of records together with display methods. The websites
[Kingston Village Parish Council]
[21-st International Byzantine Congress]
are both examples.