For illustration, I have assumed the following XML --
<?xml version="1.0" encoding="UTF-8"?>
<root>
<ruledef pageeject="yes">1</ruledef>
<ruledef pageeject="no">2</ruledef>
<ruledef pageeject="yes">3</ruledef>
<ruledef pageeject="no">4</ruledef>
</root>
I hope, you are thinking about an XML of a similar
nature..
The following template tries to illustrate the answer
--
<xsl:template match="/root">
<xsl:for-each select="ruledef">
<xsl:if test="@pageeject = 'yes' ">
Yes
</xsl:if>
<xsl:if test="@pageeject = 'no' ">
No
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
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..
Regards,
Mukul
--- Ronald Kent Gibson <Kent(_dot_)Gibson(_at_)icongmbh(_dot_)de>
wrote:
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:
http://www.mulberrytech.com/xsl/xsl-list
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list