This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Can I match multiple criteria in a select?
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Can I match multiple criteria in a select?
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Fri, 2 Mar 2001 09:01:32 +0000
- Organization: Jeni Tennison Consulting Ltd
- References: <a05001927b6c4820ce3fc@[63.44.250.40]>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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