<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title> Practical PostgreSQL</title>
    <meta name="keywords" content="postgresql, support, recovery, design, software, hosting, expterise, programming, postgres, pgsql, replication, mysql, firebird, database, sql, free, open source, software" />
    <meta name="description" content="Command Prompt, Inc. is the largest and oldest US based commercial PostgreSQL support provider. We provide the only commercially viable integrated PostgreSQL replication solution, but also custom programming, and support. We authored the book Practical PostgreSQL, the procedural language plPHP, and adding trigger capability to plPerl. " />
    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="../css/layout.css" />
    <link rel="stylesheet" type="text/css" href="../css/cmd4.css" />
    <script language="javascript" type="text/javascript"><!--
      greymenuhomewideLit = new Image();
      greymenuhomewideLit.src = "/images/greymenu_homewide_lit.gif";
      greymenuaboutLit = new Image();
      greymenuaboutLit.src = "/images/greymenu_about_lit.gif";
      greymenuproductsLit = new Image();
      greymenuproductsLit.src = "/images/greymenu_products_lit.gif";
      greymenuservicesLit = new Image();
      greymenuservicesLit.src = "/images/greymenu_services_lit.gif";
      greymenusupportLit = new Image();
      greymenusupportLit.src = "/images/greymenu_support_lit.gif";
      greymenucommunityLit = new Image();
      greymenucommunityLit.src = "/images/greymenu_community_lit.gif";
    //--></script>
  </head>
  <body>
      <div align="center">
       <div id="widecontainer">
         <div id="widetop">
           <div class="throwleft" style="width: 300px; text-align: left;"><a href="http://www.commandprompt.com/"><img src="../images/cmd4logo_wide.gif" border="0" alt="Command Prompt, Inc." /></a></div>
           <div class="throwright" style="width: 400px; text-align: right;">
             <div id="topright">
               <form action="index.html" name="cmdform" method="post">
                 <ul>
                   <li><input type="text" name="search" value="" /></li>
                   <li><input type="submit" name="action" value="Search Book" /></li>
                 </ul>
               </form>
             </div>
           </div>
         </div>
          <ul id="greymenu_wide">
            <li><a href="http://www.commandprompt.com/home/"><img onmouseover="this.src = greymenuhomewideLit.src;" onmouseout="this.src = '/images/greymenu_homewide.gif';" src="../images/greymenu_homewide.gif" border="0" height="22" title="" alt="" /></a></li><li><img src="../images/greymenu_divider.gif" border="0" width="2" height="22" alt="|" /></li><li><a href="http://www.commandprompt.com/about/"><img onmouseover="this.src = greymenuaboutLit.src;" onmouseout="this.src = '/images/greymenu_about.gif';" src="../images/greymenu_about.gif" border="0" height="22" title="" alt="" /></a></li><li><img src="../images/greymenu_divider.gif" border="0" width="2" height="22" alt="|" /></li><li><a href="http://www.commandprompt.com/products/"><img onmouseover="this.src = greymenuproductsLit.src;" onmouseout="this.src = '/images/greymenu_products.gif';" src="../images/greymenu_products.gif" border="0" height="22" title="" alt="" /></a></li><li><img src="../images/greymenu_divider.gif" border="0" width="2" height="22" alt="|" /></li><li><a href="http://www.commandprompt.com/services/"><img onmouseover="this.src = greymenuservicesLit.src;" onmouseout="this.src = '/images/greymenu_services.gif';" src="../images/greymenu_services.gif" border="0" height="22" title="" alt="" /></a></li><li><img src="../images/greymenu_divider.gif" border="0" width="2" height="22" alt="|" /></li><li><a href="http://www.commandprompt.com/support/"><img onmouseover="this.src = greymenusupportLit.src;" onmouseout="this.src = '/images/greymenu_support.gif';" src="../images/greymenu_support.gif" border="0" height="22" title="" alt="" /></a></li><li><img src="../images/greymenu_divider.gif" border="0" width="2" height="22" alt="|" /></li><li><a href="http://www.commandprompt.com/community/"><img onmouseover="this.src = greymenucommunityLit.src;" onmouseout="this.src = '/images/greymenu_community.gif';" src="../images/greymenu_community.gif" border="0" height="22" title="" alt="" /></a></li>          </ul>

  
        <div style="padding-left: 16px; width: 96%;">
          <HTML
><HEAD
><TITLE
>Branching Logic</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.72
"><LINK
REL="HOME"
TITLE="Practical PostgreSQL"
href="book1"><LINK
REL="UP"
TITLE="LXP"
href="lxp"><LINK
REL="PREVIOUS"
TITLE="Tag Parsing"
href="x21718"><LINK
REL="NEXT"
TITLE="Loop Iteration"
href="x22084"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Practical PostgreSQL</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
href="x21718"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 13. LXP</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
href="x22084"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="USINGLOGIC"
>Branching Logic</A
></H1
><P
>A simple method of conditionally rendering content lies in LXP's native support for a small set of branching logic
    tags. These allow you to either display or hide regions of markup by performing equivalence checks on variables or cookies.
    LXP's basic branching logic tags include:</P
><P
>       <P
></P
><UL
><LI
><P
><TT
CLASS="LITERAL"
>&#60;if&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;ifcookie&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;ifnotcookie&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;else&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;elseif&#62;</TT
></P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>&#60;elseifnot&#62;</TT
></P
></LI
></UL
>
    </P
><P
>The <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tags operate on LXP
    variables (or object variable values), whereas the &#60;ifcookie&#62; and &#60;ifnotcookie&#62; tags operate on stored cookies
    for the current domain. In other words, the logical functions of <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and
    <TT
CLASS="LITERAL"
>&#60;ifcookie&#62;</TT
> are the same; only the sources for logical evaluation differ.</P
><P
>The <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> tag is more generalized, and implements subsequent, inverted logic
    evaluations on any of the previously mentioned tags. The <TT
CLASS="LITERAL"
>&#60;elseif&#62;</TT
> and
    <TT
CLASS="LITERAL"
>&#60;elseifnot&#62;</TT
> tags are actually just shortcut tags with the same result as nesting an
    <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> or <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tag within an
    <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> region.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN21921"
>The &#60;if&#62; and &#60;ifnot&#62; Tags</A
></H2
><P
>When used without any accompanying attributes, the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and
      <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tags perform no useful function. However, with meaningful attributes, these
      tags can be used to quickly and simply flag regions of mark-up for display under specific circumstances.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN21926"
>Using &#60;if&#62;</A
></H3
><P
>The <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag examines its defined attributes through equivalence comparisons
        to variables whose names match the attribute names. If the specified attribute's value matches the variable's value
        exactly, the region of mark-up between that <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and its associated
        <TT
CLASS="LITERAL"
>&#60;/if&#62;</TT
> closing tag will be processed by LXP. Otherwise, that region (between
        <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;/if&#62;</TT
>) will be completely ignored
        (including any LXP mark-up) up to its closing tag.</P
><P
>You may include in the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag either an attribute name, a complete
        attribute pair, or a series of attribute pairs, depending on the intended logical assessment you wish to make.</P
><P
>Providing only an attribute name (e.g., <TT
CLASS="LITERAL"
>&#60;if test&#62;</TT
>) causes LXP to check only
        for the existence of <SPAN
><I
CLASS="EMPHASIS"
>any</I
></SPAN
> characters assigned to the variable value with that name. In this case, if
        the variable is set to an empty value (or not set at all), the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> match fails,
        and its defined region is <SPAN
><I
CLASS="EMPHASIS"
>muted</I
></SPAN
> (not displayed). Otherwise, if a value is found, the region is
        processed as it would be normally.</P
><P
>Providing one or more attribute pairs results in each attribute value being compared to the variable with the
        specified attribute name. When more than one attribute is specified in the tag, <SPAN
><I
CLASS="EMPHASIS"
>each</I
></SPAN
> condition must
        match exactly for the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> conditions to be considered a match as a whole, and for
        the region to be processed.</P
><P
><A
href="x21880#USINGTHEIFTAG"
>Example 13-13</A
> uses the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag to check for the existence
        of any variable value named <TT
CLASS="LITERAL"
>name</TT
>, and compares the variable named
        <TT
CLASS="LITERAL"
>access</TT
> to the value of 1.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGTHEIFTAG"
></A
><P
><B
>Example 13-13. Using the &#60;if&#62; tag</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;if name access="1"&#62;
    &#60;strong&#62;Success!&#60;/strong&#62;&#60;br /&#62;
    A &#60;em&#62;name&#60;/em&#62; is set, and &#60;em&#62;access&#60;/em&#62; is set to 1.&#60;br /&#62;
  &#60;/if&#62;
&#60;/lxp&#62;</PRE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN21956"
>Using &#60;ifnot&#62;</A
></H3
><P
>The <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tag logically performs the opposite of the
        <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag in every respect. For example, when multiple attributes are passed, each
        equivalence comparison must <SPAN
><I
CLASS="EMPHASIS"
>fail</I
></SPAN
> for the <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> region to be
        processed.</P
><P
><A
href="x21880#USINGTHEIFNOTTAG"
>Example 13-14</A
> uses the <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tag to test for the lack
        of a variable called <TT
CLASS="LITERAL"
>error</TT
>, as well as to check that a variable named
        <TT
CLASS="LITERAL"
>access</TT
> is not set to the value of <TT
CLASS="LITERAL"
>0</TT
>.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGTHEIFNOTTAG"
></A
><P
><B
>Example 13-14. Using the &#60;ifnot&#62; tag</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;ifnot error access="0"&#62;
    &#60;strong&#62;Success!&#60;/strong&#62;&#60;br /&#62;
    An &#60;em&#62;error&#60;/em&#62; is not set, and &#60;em&#62;access&#60;/em&#62; is not set to 0.&#60;br /&#62;
  &#60;/ifnot&#62;
&#60;/lxp&#62;</PRE
></DIV
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>You may not define two attributes with the same name in a single LXP tag (e.g., <TT
CLASS="LITERAL"
>&#60;ifnot access="0" access="2"&#62;</TT
>
          is not valid). Therefore, two logical assessments on one variable requires the use of two logic tags.</P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN21979"
>Nesting logic</A
></H3
><P
>The term <SPAN
><I
CLASS="EMPHASIS"
>nesting</I
></SPAN
> refers to placing tags within regions marked-up by other tags. You may safely
        nest logical tags as much as you like, provided you carefully keep track of where they open and close.</P
><P
>In some cases, you may have to nest logic tags in order to perform multiple checks on a single variable. This is
        because you can only place a variable's name inside of a logic tag once.</P
><P
><A
href="x21880#USINGNESTEDLOGIC"
>Example 13-15</A
> nests several logic tags within one top-level
        <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGNESTEDLOGIC"
></A
><P
><B
>Example 13-15. Using nested logic</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;if answer&#62;
    &#60;strong&#62;You have supplied an answer!&#60;/strong&#62;&#60;br /&#62;
    
    &#60;if answer="12"&#62;
      Your answer is correct!&#60;br /&#62;
    &#60;/if&#62;
    
    &#60;ifnot answer="12"&#62;
      Your answer of &#60;putvar name="answer"&#62;, though, is incorrect.&#60;br /&#62;
    &#60;/ifnot&#62;
    
    &#60;if answer="12" cheatcode&#62;
      You appear to be cheating, however.
    &#60;/if&#62;
  &#60;/if&#62;
&#60;/lxp&#62;</PRE
></DIV
><P
>In <A
href="x21880#USINGNESTEDLOGIC"
>Example 13-15</A
>, the first <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag checks to see if an
        argument titled <TT
CLASS="LITERAL"
>answer</TT
> is set at all. If it is not, the entire region it
        encapsulates is muted. </P
><P
>The second <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag evaluates the passed
        <TT
CLASS="LITERAL"
>answer</TT
> argument to see if it is equal to 12. If it is,
        that <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag's region is processed. Otherwise, that region will be muted.</P
><P
>The <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tag then checks to see if the passed argument named
        <TT
CLASS="LITERAL"
>answer</TT
> is <SPAN
><I
CLASS="EMPHASIS"
>not</I
></SPAN
> equal to 12. If it
        is not, the region that the <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> encapsulates will be processed.</P
><P
>Lastly, the final <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag in <A
href="x21880#USINGNESTEDLOGIC"
>Example 13-15</A
> checks to
        see if the passed value for <TT
CLASS="LITERAL"
>answer</TT
> is equal to 12, and
        for the existence of a passed argument called <TT
CLASS="LITERAL"
>cheatcode</TT
>. If the variable
        <TT
CLASS="LITERAL"
>answer</TT
> is found to equal 12, and the variable
        <TT
CLASS="LITERAL"
>cheatcode</TT
> is found at all, the region encapsulated by the last
        <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> tag will be processed (meaning, in this case, that it is merely
        displayed).</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN22011"
>Using &#60;ifcookie&#62; and &#60;ifnotcookie&#62;</A
></H2
><P
>The <TT
CLASS="LITERAL"
>&#60;ifcookie&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;ifnotcookie&#62;</TT
> tags
      behave identically to the <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
>
      tags, with the notable exception being that they derive the source of their logical evaluations from the cookies stored in
      the browser for the domain being accessed by the web browser, rather than from stored variables.</P
><P
><A
href="x21880#USINGIFCOOKIEANDIFNOTCOOKIE"
>Example 13-16</A
> welcomes a user with a personalized message if they have a cookie stored
      in their browser named <TT
CLASS="LITERAL"
>username</TT
>.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGIFCOOKIEANDIFNOTCOOKIE"
></A
><P
><B
>Example 13-16. Using ifcookie and ifnotcookie</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;ifcookie username&#62;
    Welcome back, &#60;putcookie name="username"&#62;.&#60;br /&#62;
  &#60;/ifcookie&#62;
  &#60;ifnotcookie username&#62;
    &#60;include src="login.php" /&#62;
  &#60;/ifnotcookie&#62;
&#60;/lxp&#62;</PRE
></DIV
><P
>In <A
href="x21880#USINGIFCOOKIEANDIFNOTCOOKIE"
>Example 13-16</A
>, if the <TT
CLASS="LITERAL"
>username</TT
> cookie doesn't
      exist, the user will see a login screen provided by a PHP document. This document is rendered through an Apache sub-request
      inclusion (see <A
href="x22143#INCLUDINGNONLXP"
>the Section called <I
>Including External Content Types</I
></A
>").</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN22036"
>The &#60;else&#62;, &#60;elseif&#62;, and &#60;elseifnot&#62; Tags</A
></H2
><P
>The <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
>, <TT
CLASS="LITERAL"
>&#60;elseif&#62;</TT
>, and
       <TT
CLASS="LITERAL"
>&#60;elseifnot&#62;</TT
> tags aid in the creation of more involved conditional logic than a
       single <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> or <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> statement.</P
><P
>The <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> tag marks a region to be displayed only if the last logical
       evaluation (at the same logical <SPAN
><I
CLASS="EMPHASIS"
>depth</I
></SPAN
>, if working with nested logic tags) was
       <TT
CLASS="LITERAL"
>false</TT
>. If the last logical evaluation was <TT
CLASS="LITERAL"
>true</TT
>, the
       <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> region will be muted.</P
><P
><A
href="x21880#USINGTHEELSETAG"
>Example 13-17</A
> creates a simple <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> condition to check for
       the existence of a variable called <TT
CLASS="LITERAL"
>answer</TT
>. If it is not found, the region marked up by
       the <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;/else&#62;</TT
> tags will be
       displayed; otherwise, that region will be muted.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGTHEELSETAG"
></A
><P
><B
>Example 13-17. Using the &#60;else&#62; tag</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;if answer&#62;
    Thank you for supplying an answer.
  &#60;/if&#62;
  &#60;else&#62;
    You have not yet supplied an answer.&#60;br /&#62;
    &#60;include src="forms/question.lxp" /&#62;
  &#60;/else&#62;
&#60;/lxp&#62;</PRE
></DIV
><P
>As mentioned earlier in this section, the <TT
CLASS="LITERAL"
>&#60;elseif&#62;</TT
> and
       <TT
CLASS="LITERAL"
>&#60;elseifnot&#62;</TT
> tags are just shortcuts. They behave exactly as the
       <TT
CLASS="LITERAL"
>&#60;if&#62;</TT
> and <TT
CLASS="LITERAL"
>&#60;ifnot&#62;</TT
> tags do, respectively, if
       they were nested within an <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> region. For example, the following two blocks of
       markup are functionally identical:</P
><PRE
CLASS="SCREEN"
>  &#60;if condition1="true"&#62;
    Condition 1 is True.
  &#60;/if&#62;
  &#60;else&#62;
    &#60;if condition2="true"&#62;
      Condition 2 is true.
    &#60;/if&#62;
  &#60;/else&#62;

...
  
  &#60;if condition1="true"&#62;
    Condition 1 is True.
  &#60;/if&#62;
  &#60;elseif condition2="true"&#62;
    Condition 2 is true.
  &#60;/elseif&#62;</PRE
><P
>Using <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> tags streamlines both the maintainability and efficiency of the
       conditional logic. By using <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
>, you can rely on LXP to keep track of whether or
       not the last condition was or was not met, and not have to re-evaluate the same conditions with the opposite logic
       tag.</P
><P
><A
href="x21880#USINGNESTEDLOGICWITHELSETAGS"
>Example 13-18</A
> re-implements the same logic that was used in <A
href="x21880#USINGNESTEDLOGIC"
>Example 13-15</A
> earlier in this section, but improves it with the use of the
       <TT
CLASS="LITERAL"
>&#60;else&#62;</TT
> tag.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="USINGNESTEDLOGICWITHELSETAGS"
></A
><P
><B
>Example 13-18. Using nested logic with &#60;else&#62; tags</B
></P
><PRE
CLASS="SCREEN"
>&#60;lxp&#62;
  &#60;if answer&#62;
    &#60;strong&#62;You have supplied an answer!&#60;/strong&#62;&#60;br /&#62;
    
    &#60;if answer="12"&#62;
      Your answer is correct!&#60;br /&#62;
      &#60;if cheatcode&#62;
        You appear to be cheating, however.
      &#60;/if&#62;
      &#60;else&#62;
        Congratulations for not cheating!
      &#60;/else&#62;
    &#60;/if&#62;
    &#60;else&#62;
      Your answer of &#60;putvar name="answer"&#62;, though, is incorrect.&#60;br /&#62;
    &#60;/else&#62;
  
  &#60;/if&#62;
  &#60;else&#62;
    You have not yet supplied an answer.&#60;br /&#62;
    &#60;include src="forms/question.lxp" /&#62;
  &#60;/else&#62;
&#60;/lxp&#62;</PRE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
href="x21718"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
href="book1"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
href="x22084"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Tag Parsing</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
href="lxp"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Loop Iteration</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
        </div>
        <br />
        

          <div id="thefineprint">
            <a href="http://www.commandprompt.com/products/mammothpostgresql/"><img src="../images/powered_by_mammoth.gif" alt="Powered by Mammoth PostgreSQL" title="Powered by Mammoth PostgreSQL" border="0" /></a>
                        <br />
            Copyright &copy; 2000-2007 Command Prompt, Inc. All Rights Reserved. All trademarks property of their respective owners.
          </div>
        </div>
      </div>
  </body>
</html>