cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Antwort: Tags, Was: RE: [Q] XScript...
Date Fri, 26 Jul 2002 16:04:46 GMT


>How your Tags are relate/compare to Jelly tags? Can this be unified in
>one approach?

Jelly is an XML-Scripting engine (posible to implemented as a generator), so it
is more a alternative to XSP.
My Taglib implemenation is more a library/framework to write custom

Writing custom transformer using Jelly will may be run into a performance
problem, because Jelly compiles a XML-Script to a internal representation an
then runs this script. Building this script use a lot of memory allocation. A
Jelly Tag is not able to consume it's content as SAX events, it is only posible
to send out SAX.

The benefit of my Tag implementation is, that a Tag can work as a XMLProducer,
XMLConsumer or a Transformer implemented as pooled Avalon-Components and is
designed for performance. You only need one transformer in the pipeline
(TagTransformer) to use diffent functionality. You don't need to write a lot of
"if then else if else" in start or endElement.

I will try to implement a JellyTag which make it possible to use Jelly Tags
inside my Tag implementation.

After my vacation (starts on Sunday), I will also look at XScript
implementation. I think we have some common functionality like variable


> From:
> Hi,


> I am using JXPath in my Taglib implementation, description is in
> I have written a out Tag which can be used to get/set variables in
> request/session or context like
> <jxpath:out var="$session/name" value="$request/person/name" />
> The first step is selection of the person attribute on the request, if
> is
> a Object the getName Method is called and the result is stored as a
> attribute. It is also possible that the person attribute is a
DOM-Node, then
> the
> content of the name Element is selected.
> If you write:
> <jxpath:out value="$request/person/name" />
> The value is written to the SAX-Pipeline instead of putting it to a
> Look at org.apache.cocoon.taglib.jxpath.core.OutTag.
> session,request and application are predefined variables. The
> of
> the variable management is already part of the scratchpad
> (org.apache.cocoon.jxpath). is a
> RequestLifecycleComponent which manages the different variable
context. This
> Component can be used independant of the taglib implementation.
> In September (after my vacation in August) I plan to implement a
> "ExpressionFactory" to make it posible to plugin different Expression
> languages
> to Cocoon like JSTL, JXPath or Jexl (commons-sandbox). In my current
> implementation the variable management is impl. in the
> org.apache.cocoon.taglib.VarTagSupport class, which itself uses
> JXPathCocoonContexts. I plan to implement this functionality as a
> Avalon
> Component, so everyone and of course my taglib, can use it to access
> from session/request/applicationcontext .... using diffent expression
> languages.
> What do you think?

How your Tags are relate/compare to Jelly tags? Can this be unified in
one approach?


> Regards,
> Volker

To unsubscribe, e-mail:
For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message