cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: sitemap, jx and flow design (was: servicemanager and jxtg)
Date Tue, 25 Jan 2005 07:02:27 GMT
BURGHARD √Čric wrote:

> WAIMS (where am i missing something ? :-)

XSP was designed to achieve exactly what you are describing. Sure it has 
some limitations and the use of xslt to generate java code is not 
exactly appealing, but it supports exactly that programmatic model. 
Still everybody seems to hate it (I still use it, but only as a faster 
way to write custom generators, not as a template language).

I think the reason is that what you want to achieve seems practical, but 
it normally turns out in hell.

Example: the difference between <get-users/> and ${get-users} is that 
the first invoques a function (thus could trigger an exception) the 
second refers to a variable, which, at worst, might be unset or empty or 
contain a wrong value.

As soon as you realize this, you also realize that you need conditionals 
in your language semantics... and if you hit the <if> tag, you are dead.

What you are asking for are not taglibs but functional macros... the 
ability to invoque a function/service/method instead of just reference a 
variable... this allows you to drive the control directly from the 
template, instead of having the control inverted by the flow controller.

I think this is a reasonable request and I see nothing wrong in it, but 
these have nothing to do with taglibs, are more similar to what input 
modules are for a sitemap.

-- 
Stefano.


Mime
View raw message