|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: firing on more than one match
Hello Kent,
Ronald Kent Gibson wrote:
> 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>
Taken literally, there can't be more than one node "/ruledef" in
an XML document, since there can only be one document node.
But assuming there are multiple ruledef nodes somewhere, the test
<xsl:when test="ruledef/@pageeject = 'yes'>
[Result]
</xsl:when>
will do what it seems you want: it will generate the [Result]
whenever *any* element (child of the current node in this case)
named "ruledef" has a "pageeject" attribute with the value "yes".
You don't need a loop; XPath semantics are like a database query,
with the "does any such thing exist" idea built in.
> I don't thinkr recursion will help, either. So can anyone
> kindly give me
> some suggestions, thanks and enjoy the weekend.
You too!
Lars
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








