sconemad

technology, scones, nonsense

Loading...

Profiles

Twitter

GitHub

Launchpad

Subscribe to my RSS Feed

Admin

Introduction

Posted on Mon 19 Oct 2009

wmg is a Perl-based system primarily aimed at generating documents in XHTML format, together with any supporting data (e.g. images). Typical uses include generating web sites and product documentation (including the document you are reading now). The system is driven by a set of templates, which pick sections from input articles to produce output documents. By default these are in XHTML format, but, by using different sets of templates, anything is possible.

                |---------|   
                | ARTICLE | 
                | -XML    |
                | -images |
                |         |
                |---------|   
                | ARTICLE | 
                |  -XML   |
                 \       /
                  \-----/
                   \   /
      TEMPLATES     \ /       OUTPUT
      XML+perl ---- wmg ----> XHTML...

Source

This lives under the src directory, and contains:

There are two ways in which articles can be stored - in hierarchical format and in chronological format. These can be used together if required. In hierarchical format, an article specifies

Templates

These live in the tpl directory, and contain instructions for transforming the source articles into the output documents. If an article does not specify which template to use, "default.wmg" is selected. Template files can include other template files, which allow common page elements to be maintained. A set of standard templates are supplied with wmg, which are used if one is not found in the site's tpl directory.

Output

This is placed under the html directory, and contains the output documents and data produced by wmg.

Updated on 2009-10-21 14:00:57 +0000 | Requested on 2019-03-18 15:27:17 +0000