cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierrick Brihaye" <pierrick.brih...@wanadoo.fr>
Subject XSP : control structures
Date Sat, 18 Jan 2003 09:31:05 GMT
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message