This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]