forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: MOTD template match query
Date Wed, 04 Jul 2007 01:15:55 GMT
Gav.... wrote:
> In site-to-xhtml.xsl we have tests which to me say :-
> 
> when:
> if test = x then do z
> otherwise:
> if test = y then do z
> 
> In other words, the below code snippet confuses me
> Why not combine it to say
> 
> if test = x or test = y then do z
> 
> Or is there more to it than I have glimpsed at so far?

Would you please give me more clues as to which parts
that you cannot understand.

-David

> <xsl:if test="$config/motd">
>       <xsl:for-each select="$config/motd/motd-option">
>         <xsl:choose>
>           <xsl:when test="@starts-with='true'">
>             <xsl:if test="starts-with($path, @pattern)">
>               <xsl:if test="motd-page/@location='page' or
> motd-page/@location='both'">
>                 <div id="motd-area">
>                   <xsl:value-of select="motd-page"/>
>                   <xsl:if test="motd-page-url">
> <xsl:text> (</xsl:text><a>
>                     <xsl:attribute name="href">
>                       <xsl:value-of select="motd-page-url"/>
>                     </xsl:attribute>
> <xsl:text>More</xsl:text></a>
> <xsl:text>)</xsl:text>
>                   </xsl:if>
>                 </div>
>               </xsl:if>
>             </xsl:if>
>           </xsl:when>
>           <xsl:otherwise>
>             <xsl:if test="contains($path, @pattern)">
>               <xsl:if test="motd-page/@location='page' or
> motd-page/@location='both'">
>                 <div id="motd-area">
>                   <xsl:value-of select="motd-page"/>
>                   <xsl:if test="motd-page-url">
> <xsl:text> (</xsl:text><a>
>                     <xsl:attribute name="href">
>                       <xsl:value-of select="motd-page-url"/>
>                     </xsl:attribute>
> <xsl:text>More</xsl:text></a>
> <xsl:text>)</xsl:text>
>                   </xsl:if>
>                 </div>
>               </xsl:if>
>             </xsl:if>
>           </xsl:otherwise>
>         </xsl:choose>
>       </xsl:for-each>
>     </xsl:if>
> 

Mime
View raw message