You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2002/07/25 22:11:48 UTC

Tags, Was: RE: [Q] XScript...

> 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