- Mark Up
SiteLite 3.0

Mark Up

Thinking XML ] [ Thinking HTML ] [ Technical summary ]

The strategy for tagging in SiteLite is a compromise between the ideal and the practical. It is fairly obviuos that later versions of SiteLite will be a true XML-oriented tool. This will among other things imply enhanced control and precision in description of templates, scripts and contentblocks. The limited general knowledge of XML and the lack of good XML-editors is the reason for SiteLite's halfhearted approach to XML.

The present version of SiteLite, version 3, opens up for a a lot of the possibilities inherent in a true XML-world, but does at the same time allow for a traditional HTML-based thinking. The major drawback of the compromise is a vague control of document structures and a lack of editing support.

Thinking XML

Think of the templates and the blockfiles as XML-files. SiteLite is in this context a tool for moving blocks among XML-files, merging, rearranging and splitting. The resulting files may or may not appear as XML-files. That is the tags may or may not be preserved, se bottom of page.

As a XML-tool SiteLite does not reckognize a full DOM-structure, and it does not bother about other namespaces than its own inherent namespace. It simply moves elements which it knows and produce a set of new elements (tocs, trails, indexs etc.). This of course limits the functionality, but it simplifies the basic operations it is designed for considerably.

If you like you may use any XML-tool to produce contentfiles, and you may use any XML-tool on the resulting pages. You may for instance make a dtd and use a dtd-sensible editor to produce blockfiles, and you may make a XSL-transform on the resulting pages.

Some browsers reckognise XML as legal content and together with a stylesheet they produce readable pages. Other browsers demand HTML. Most browsers will ignore tags in a HTML-page that is not defined HTML. It will however be a problem to validate such pages.

Thinking HTML

Think of the templates as HTML-files and the blockfiles as text/html. SiteLite was originally, and is still, foremost a tool for producing structures of HTML-pages where the layout and the content of each page may be prepared separately.

SiteLite 3 offers a lot of flexibility in tagging style to allow users to validate templates, resulting pages and even blockfiles at the level wanted. To achieve this SiteLite allows tagging as commented tags, se below.

Technical summary

Element may appear in comments or as pure elements, as short elements or complete elements with starttag and endtag.

Uncommented Commented

The scriptline


tells SiteLite to expect commented tags. This yields all material in the site.

Most of the elements in the templates are "receiving" elements and in most cases the two forms, short or complete has the same effect, unless you use the APPEND property. Elements of the former short form are removed by SiteLite when the element is "filled". Elements of the second form are preserved. If the tags are in commented style the difference is not important from a validating point of view. The script line


stops the unconditionally removal of all traces of SiteLite in the resulting file.

November 30, 2004
http://www.ia.hiof.no/~borres/sitelite/ver30/ http://www.ia.hiof.no/~borres/sitelite/ver30/ http://www.ia.hiof.no/~borres/sitelite/ver30/