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?).

- <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]>

Reply via email to