diff options
author | dakkar <dakkar@luxion> | 2008-03-02 15:57:32 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2008-03-02 15:57:32 +0000 |
commit | 0a3bf3ce5a0877c1729442754e0856a87344061f (patch) | |
tree | 3146d11b827d260c2fb2513f13ea0255221e17fe /SW/sitemake/document.en.rest.txt | |
parent | re-import del sito, in ReST, da ritoccare parecchio (diff) | |
download | thenautilus-0a3bf3ce5a0877c1729442754e0856a87344061f.tar.gz thenautilus-0a3bf3ce5a0877c1729442754e0856a87344061f.tar.bz2 thenautilus-0a3bf3ce5a0877c1729442754e0856a87344061f.zip |
git-svn-id: svn://luxion/repos/thenautilus@332 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'SW/sitemake/document.en.rest.txt')
-rw-r--r-- | SW/sitemake/document.en.rest.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/SW/sitemake/document.en.rest.txt b/SW/sitemake/document.en.rest.txt new file mode 100644 index 0000000..c947412 --- /dev/null +++ b/SW/sitemake/document.en.rest.txt @@ -0,0 +1,55 @@ +Web Generator +============= + +Motivations +----------- + +Ever since I discovered `XML`_ and `XSLT`_, I've been looking for an easy and +confortable way to keep content and presentation totally separate. I started +using `XWeb`_, which is a good program, but with some problems: + +* it's written in Java (OK, OK, this is personal taste) + +* it "tweaks" files to add (navigational) information, and I thought it was + not necessary + +* it does (did?) not have dependency control functionalities (like make) + +Shortly after version 0.3 I lost sync with the official codebase because of +some modifications of mine, and I did not follow later developments. + +Given the high level of correctness attained by the `Gnome XSLT library`_, I +decided to try and look if it was possible to use just xsltproc and make to +obtain the same results. + +So I developed a DTD to describe the structure of the site, a stylesheet to +convert this structure into a makefile, and retouched the stylesheets to keep +them working after the modifications. + +How it works +------------ + +Given a description of the site's structure in the file sitemap.xml, the +stylesheet compile.xsl generates a Makefile containing rules for the +transformation of every page, along with their prerequisites. + +In this way calling make causes the regenaration of only those files whose +source have actually been modified. Moreover, each stylesheet implicitly gets +two parameters: sitemapuri containing the URI of the sitemap relative to the +stylesheet, and active which is an XPath expression indicating, inside the +sitemap, the node corresponding to the page being transformed. This way the +stylesheets can access all relevant navigational information. + +You can consult the site's sources. + +.. _`xml`: + http://www.w3.org/TR/REC-xml + +.. _`gnome xslt library`: + http://xmlsoft.org/XSLT + +.. _`xweb`: + http://xweb.sourceforge.net + +.. _`xslt`: + http://www.w3.org/TR/xslt |