[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can I match multiple criteria in a select?
Hi Chris, > What I want to do is get the generation node that has a code of "6" > and = =20 the validrevisions/rev/@ver =3D "7". Can this be done in a > select =20 statement? I have done many, many variations of the > following: > > <xsl:apply-templates =20 > select=3D"/xml/IOS/responseset/response/generation[@code=3D'6'/validrevi= > sion s/rev/@ver=3D$rev]" mode=3D"html" /> > > My thought are that I may need to do two passes - get all the =20 > generations that are code 6 then all the correct revs... No need for two passes: you just need the operator 'and': /xml/IOS/responseset/response/generation [@code = '6' and validrevisions/rev/@ver = '7'] Or you can use two predicates if you prefer: /xml/IOS/responseset/response/generation [@code = '6'] [validrevisions/rev/@ver = '7'] I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|