[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?

Subject: Re: Can I match multiple criteria in a select?
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 2 Mar 2001 09:01:32 +0000
index match with multiple criteria
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.