> Here are some thing I thought might make XScript a little more powerful: > > - <xscript:get name="a-variable" xpath="/top//client[1]" /> > > Uses XPath to search the variable. [Does this require a DOM > representation?] > > - <xscript:if test="xpath-expression"> > </xscript:if> > Only builds the content between if the xpath-expression returns true (or > non-null?).
A mistake, I meant: <xscript:if name="a-variable" test="xpath-expression"> </xscript:if> The original looks as if I'm testing an expression against the current output XML, which might also be interesting but I'd imagine difficult to do with SAX. What I was trying to get at was testing for a value within a previous XScript variable. > > - <xscript:switch name="" xpath=""> > <xscript:when test="constant"> > </xscript:when> > <xscript:otherwise> > </xscript:otherwise> > </xscript:switch> > > I mention these because I feel like the XSP taglibs are missing tags that > allow branching and decisions. If there were some, then people who don't > know Java might be able to write XSP. > > I know that it seems similar to processing that can be done with a > Transformer step but it seems to me that there is no other way to do > conditional aggregation without conditionally generating either content, > <cinclude> or <xinclude> statements. > > Does this sound useful to anyone else? > > Per > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>