Definition of Whitebeam XML Tags

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
    authenticate
    block
    cachecontrol
    eval
    false
    header
    include
    insertblock
    insertdebug
    macrotag
    marksession
    nomacro
    noscript
    parser
    redirect
    repeatfor
    return
    script
    if
    test
    true
    xmp
    eval
    id
    marksession
    test
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Definition of Whitebeam XML Tags

rb:if

Simple inclusion of a section of XML

Body

The body of this tag contains any valid HTML/XML. The tag implementation evaluates the 'expr' attribute includes the body of the tag *only* if the expression evaluates to true

Attributes

Attribute Required Description

expr

required

The expression to be evaluated. The result is taken as 'true' according to the same behaviour as a JavaScript conditional expression.

Remarks

The <rb:if... tag was introduced in Whitebeam 0.9.28 onwards.

The 'rb:if' is a simplified version of the rb:test tag. In this case the expression is evaluated and if 'true' the body of the tag is included in the output document. Example:

<body>
   <h1>Customer Information</H1>
   <rb:if expr="hasInformation">
     <Table>
       <TR><TD>Name</TD>
           <TD><rb:eval expr="user.name"></TD>
       </TR>
       <TR><TD>DOB</TD>
           <TD><rb:eval expr="user.dob"/></TD>
       </TR>
     </Table>
   </rb:if>
   ...

In this example the value of 'hasInformation' is tested. If the value is non-zero there is a valid user and a description of that user is sent to the browser. If the value is zero then an error message is displayed.

Note that the 'rb:if' tag is executed when the output is being generated. The various XML within the tag may contain server side script which is only executed if that optional tag becomes part of the output of that page.

Whitebeam release 1.3.36
(loadtime : 20ms)