Re: [xsl] firing on more than one match

Subject: Re: [xsl] firing on more than one match
From: Mukul Gandhi <mukulgw3@xxxxxxxxx>
Date: Fri, 17 Oct 2003 10:07:07 -0700 (PDT)
For illustration, I have assumed the following XML --

<?xml version="1.0" encoding="UTF-8"?>
  <ruledef pageeject="yes">1</ruledef>
  <ruledef pageeject="no">2</ruledef>
  <ruledef pageeject="yes">3</ruledef>
  <ruledef pageeject="no">4</ruledef>    

I hope, you are thinking about an XML of a similar

The following template tries to illustrate the answer

   <xsl:template match="/root">
       <xsl:for-each select="ruledef">
	   <xsl:if test="@pageeject = 'yes' ">
	   <xsl:if test="@pageeject = 'no' ">

The above XSL prints, 'Yes' or 'No', depending if the
pageeject attribute is 'yes' or 'no' in the XML..

I hope, I am able to explain correctly..


--- Ronald Kent Gibson <Kent.Gibson@xxxxxxxxxxx>
> Dear All 
> I have something like this, ie there are more is
> more than one node that is
> named ruledef, and I want my condition to fire when
> any of these things are
> equal to the condition.
> <xsl:when test="/ruledef[1]/@pageeject = 'yes'">
> </xsl:when>
> Seems like a loop would be good here, but no loops
> in xslt.
> I don't thinkr recursion will help, either. So can
> anyone kindly give me
> some suggestions, thanks and enjoy the weekend.
> kent
>  XSL-List info and archive: 

Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

 XSL-List info and archive:

Current Thread