in reply to Laying out a web page
An approach you might look into is using generating the page content as XML and then transforming that XML using some kind of stylesheeting system; AxKit is an XML publishing application that runs under mod_perl; it can use different kinds of XML stylesheets, including the most popular, XSLT. The basic idea is that the XSLT instructions take XML content and transform it into HTML (or XML, or plain text, or PDF, or ...)
The beauty of XML stylesheets is that you have complete control over the resulting HTML; not only can you control colors, background images, etc. as you can with CSS, but you can control the order of appearance of elements (or even whether a given element will appear at all). You can customize the HTML you produce for different browsers (i.e. you don't have to write HTML that degrades gracefully; you can use all the bells and whistles supported by IE 5.5 for users with IE 5.5, and you can output straightforward HTML 3.2 for users with Netscape 3.0). And of course you can define different stylesheets for different themes.
It's a really flexible system. The drawback is that it's pretty complex. The big plus, other than the flexibility, is that you can achieve a *very high* degree of separation between content and presentation.
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
|
|---|