Class WbzChoose

Object
   |
   +--WbzChoose

class WbzChoose

This component can be used for conditional processing. The configuration is according to the XSLT-Specifications of xsl:choose and xsl:if.

Sample configuration for wbz:if :

  <wbz:if test="string-length(name) = 0">
    <html:span class="warning">No name</html:span>
  </wbz:if>
 

Sample configuration for wbz:choose :

    <wbz:choose>
     <wbz:when test="string-length($title)<10">
      <html:span class="errorMessage">Title too short!</html:span>
     </wbz:when>
     <wbz:when test="string-length($title)<20">
      <html:span class="warningMessage">This is a short title!</html:span>
     </wbz:when>
     <wbz:otherwise>
       !A good title!
     </wbz:otherwise>
 

Requires:
wobzilla_xpath
wobzilla_componentFactory