cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From volker.schm...@basf-it-services.com
Subject Antwort: Tags, Was: RE: [Q] XScript...
Date Fri, 26 Jul 2002 16:04:46 GMT


Vadim,

>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
Cocoon-Transformer.

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
handling.

Volker




> From: volker.schmitt@basf-it-services.com
[mailto:volker.schmitt@basf-it-
>
>
> Hi,

Volker,


> I am using JXPath in my Taglib implementation, description is in
> http://www.mail-archive.com/cocoon-dev@xml.apache.org/msg16919.html
>
> 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
person
> is
> a Object the getName Method is called and the result is stored as a
session
> 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
variable.
> Look at org.apache.cocoon.taglib.jxpath.core.OutTag.
>
> session,request and application are predefined variables. The
Implementation
> of
> the variable management is already part of the scratchpad
> (org.apache.cocoon.jxpath). JXPathCocoonContexts.java 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
Tag
> 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
generic
> Avalon
> Component, so everyone and of course my taglib, can use it to access
variables
> 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?


Vadim


>
> Regards,
>
> Volker
>
...


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message