commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <knut.wannhe...@paranor.ch>
Subject RE: [Jelly] jelly script in an Object's String attribute
Date Thu, 06 Mar 2003 12:26:36 GMT
James,

> 
>  I've added a first cut of a <j:parse> tag that can be used 
> to parse a Jelly
> script from a string or from the output of its body. e.g.
> 
> <j:parse text="${foo}"/>
> 
> or
> 
> <j:parse>
>     <!-- something that generates XML events like XSLT or 
> something -->
> </j:parse>
> 
> if a var attribute is specified then the Scirpt is output as 
> a variable -
> otherwise its just executed.
> 

I guess you will call it nit-picking, but I don't quite see the value of the
"var" attribute.  First, it gives the tags two modes of operation: parsing
and executing (with implicit parsing).  Further the Script interface only
provides the methods compile() and run(JellyContext, XMLOutput), which I
can't see any direct value of in the context of a Jelly script.  So why not
just leave out the parsing functionality?  You can still have a piece of
Jelly script as unparsed text or XML.  E.g.

	<j:set var="x">
		<!-- something that generates XML events -->
	</j:set>

And then evaluate it with:

	<j:eval>
		${x}
	</j:eval>

If the code won't be used in other places the <j:set/> can even be
skipped...

Cheers,

--
knut

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message