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

Reply via email to