There is nothing like that in XSP. I'm sure most people here
will tell you to use transformers, actions, or better yet flow
from 2.1. Since I had XSPs left over from 1.x version and
I like having data access, logic and error handling in the same
place (the XSP) I developed my own logicsheet to that has several
control structures. There quite specific (in error handling) to
our product so it would take some work to make them generic.
Also don't know if the dev people would accept it since: "XSP
should at most be used to transfer data from request attributes
into to the SAX stream." 

Also you should be able to use the xslt control structues in your 
XSP (with its xsl: namespace and declaration in xsp:page)
but I haven't tried this.

Artur...

> -----Original Message-----
> From: Pierrick Brihaye [mailto:[EMAIL PROTECTED]] 
> Sent: January 18, 2003 4:31 AM
> To: [EMAIL PROTECTED]
> Subject: XSP : control structures
> 
> 
> Hi,
> 
> Are there control structures in XSP ? Here is what I mean (taken from
> http://xml.apache.org/cocoon/userdocs/xsp/logicsheet.html) :
> 
> <xsp:page xmlns:xsp="http://apache.org/xsp";>
>   <!-- replacement for :
>     <xsp:logic>
>       String msg = "Hello, world!";
>     </xsp:logic>
>    -->
>   <xsp:variable name="msg">Hello, world!</xsp:variable> <!-- 
> actually *not*
> a control structure :-) -->
>   <!-- replacement for :
>     <xsp:logic>
>        if (msg != null) {
>      </xsp:logic>
>    -->
>    <xsp:if select="$msg">
>      <greeting>
>         <xsp:expr><xsp:value-of select="$msg" /></xsp:expr>
>       </greeting>
>   <!-- replacement for :
>      <xsp:logic>
>        }
>      </xsp:logic>
>    -->
>    </xsp:if>
> </xsp:page>
> 
> Got it ? The like for <xsp:choose> / <xsp:when>, <xsp:for-each>...
> 
> Such things would be useful, wouldn't hey ?
> 
> Cheers,
> 
> p.b.
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]>

Reply via email to