|Welcome to AHTS|
AHTS tries to mimic the designer side (i.e. the tags) of the ACS templating system as close as possible.
An example ACS-template looks like this (ex1.tml):
<html> <head> <title>[ahts] @title@</title> </head> <body> <h1>@title@</h1> <slave> </body> </html>
The @...@ tags are identifiers (variables). They will be filled in whenever the template is parsed. The <slave> is something strange: it tells AHTS that this is a master-template, and the <slave> is the place where the content of the slave is to be filled in.
To use this master, you provide a slave-template (ex2.tml):
<master src="ex1.tml"> <property name="title">Welcome to AHTS</property> <p>AHTS stands for An HTML Templating System.</p>
The <master>-tag tells AHTS that this is a slave (I know, bad naming, but I didn't invent these tags). The <property>-tag means: define the variable named title as "Welcome to AHTS" in the master. When AHTS encounters a <master>-tag, it embeds the slave into the master automagically.
The result will look something like:
<html> <head> <title>[ahts] Welcome to AHTS</title> </head> <body> <h1>Welcome to AHTS</h1> <p>AHTS stands for An HTML Templating System.</p> </body> </html>
To produce this result you need a little python glue (ex.py):
#!/usr/bin/python import ahts ahts.write('ex2.tml', None)
That's all folks!
At this moment, there's only a Python implementation. I would like it to see a PHP, Perl, Java, ... implementation, so if you're a programmer fluently in one of these languages, go ahead. Perhaps we can have a P-language contest:-)
|$Id: index.tml,v 1.4 2001/04/10 15:38:36 benderydt Exp $|