xsl-list
[Top] [All Lists]

RE: Multi-part search XPath expressions.

2004-09-11 02:27:00
Or even better, put the condition in the match pattern:

  <xsl:template 
   match="Species[Extinct='False' and Genus_Name='Casuarius']">       
      <p>species name is <xsl:value-of select="Species_Name"/></p>      
  </xsl:template>

  <xsl:template match="Species"/>

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Agnes Kielen [mailto:agnes(_dot_)kielen(_at_)home(_dot_)nl] 
Sent: 11 September 2004 08:43
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Multi-part search XPath expressions.

Hi,
Bruce wrote:

<xsl:template match="Species">
   <xsl:choose>
     <xsl:when test="Extinct='False' and Genus_Name='Casuarius'">
       <p>species name is <xsl:value-of select="Species_Name"/></p>
     </xsl:when>
     <xsl:otherwise></xsl:otherwise>
   </xsl:choose>
</xsl:template>

Why don't you use xsl:if. 

 <xsl:template match="Species">
      <xsl:if test="Extinct='False' and Genus_Name='Casuarius'">
        <p>species name is <xsl:value-of select="Species_Name"/></p>
      </xsl:if>
 </xsl:template>

Regards,
Agnes


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--