On Tue, 2004-05-25 at 10:27, DaniÃl Mantione wrote:
> On Tue, 25 May 2004, Tom Jackson wrote:
>
> > On Tue, 2004-05-25 at 08:20, DaniÃÂl Mantione wrote:
> >
> > > To those unknown to the OpenACS compiler; OpenACS has its own adp parser
> > > which is way more powerfull than the AOLserver adp parser.
> >
> > Actually the OpenACS parser doesn't exist, ATS uses ns_register_adptag
> > and ns_adp_parse. One big problem with this setup is that recusion is
> > difficult, making it difficult to extend the templating system, but it
> > works great for tags which do not need to parse their content.
>
> Hmmm. Are we looking at the same code? I'm quite sure it converts the
> .adp & .tcl into a Tcl script, which it then evaluates. That would be
> contradictory with ns_adp_parse. Well, time to take a closer look at it,

The templating system registers templating tags using
ns_register_adptag. It also does a few other things at the same time,
but the essence of adding a tag is to use the built in command.

The registered tag (a procedure which takes args 'string tagset')
returns text. It also has to arrange for recursively calling
ns_adp_parse on the 'string' argument. Note that the text returned is
the text of a script to evaluate. Because of the design, tag
implementation is amazingly complicated and almost impossible to debug.
Fortunately it works, so debugging isn't usually an issue, and only
presents a problem when you want to add something, or make a small
change. There is also a problem if the template writer makes a small
error. For instance <if ...> </if><else>. That is, leaving off the
closing </else> leads to incorrect results, but still produces a result.
In other words, ATS doesn't parse, there is no syntax checking involved.
Complicated templates are hard to debug.

But note that ATS does many other things, following the traditional
OpenACS "everything including the kitchen sink" design style.

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to