html templating advice.

From: lloyd christopher (lloyd_at_slow30.com)
Date: 10/22/03


Date: Wed, 22 Oct 2003 17:15:59 GMT

im developing a template based web application in perl and need some
guidance. currently its all pretty simple stuff, we tell the designers
place holders to use and then &username; or %USERNAME% or <MYusername/>
would be replaced by the value. basically what the perl cookbook uses in a
few examples iirc.

however more and more we have to deal with more complex data. variable
length lists of data. say for example a list of new products per day, one
day might have 4, one might have 7. so far we tell them to put %TABLE% and
it gets replaced with a preformatted table with lots of id's and classes so
they can customize the look of it.

what i really would like to do though is give them more power. something
along the lines of:

<table>
<mytable>
   <tr><td>&product;</td><td>&description;</td></tr>
</mytable>
</table>

and then i can loop through the <mytable>..</mytable> for each one. i can
do this easily enough using regular expressions, but what i'd like to know
is if there are any standards for this sort of thing that already exist, any
modules etc. obviously i'd rather not reinvent the wheel. HTML::Parser?
DOM?

(yes i know i keep jumping between styles of placeholders, trying to decide
on whats the best / standard if their is one).

thanks alot sorry for the rambling post.

lloyd christopher
SLOW30



Relevant Pages

  • html templating advice.
    ... im developing a template based web application in perl and need some ... however more and more we have to deal with more complex data. ... length lists of data. ... is if there are any standards for this sort of thing that already exist, ...
    (comp.lang.perl.modules)
  • Reg. Directory listing program
    ... I am new to this mailing list and I am very new to PERL. ... I wrote a code that lists files in a directory with the permissions. ... Directory listing program ...
    (perl.beginners)
  • Emulating Generators: Iterators for Lists (Newbie)
    ... achieving various things in Perl. ... What would be a good way to do an iterator for a sequence of values to be ... sub-routine, and declare the state you need to maintain between sub calls ... lists which might be the answer. ...
    (comp.lang.perl.misc)
  • FAQ 4.46 How do I handle linked lists?
    ... comes with the standard Perl distribution. ... How do I handle linked lists? ... Both pop and shift are both Ooperations on ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)
  • FAQ 4.46 How do I handle linked lists?
    ... comes with the standard Perl distribution. ... How do I handle linked lists? ... Both pop and shift are both Ooperations on ... The perlfaq-workers, a group of volunteers, maintain the perlfaq. ...
    (comp.lang.perl.misc)