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]

Can I match multiple criteria in a select?


Date: Thu, 1 Mar 2001 13:42:53 -0500
Message-Id: <H0000071013ba125@MHS>
Subject: Can I match multiple criteria in a select?
MIME-Version: 1.0
TO: xsl-list@lists.mulberrytech.com


hello all,

I have a chunk of XML that looks like this:

<xml>
<IOS>
<responseset>
<response id=3D"r6">
       <generation code=3D"5" fieldcount=3D"3" description=3D"Operate Pow=
er =20
Voltage" verbosedescription=3D"">
             <validrevisions>
                   <rev ver=3D"3"/>
                   <rev ver=3D"4"/>
             </validrevisions>
             <field name=3D"Operate Voltage" description=3D"Voltage" =20
startbit=3D"8" endbit=3D"19"/>
             <field name=3D"POR" description=3D"Power on reset occurred" =
=20
startbit=3D"0" endbit=3D"0"/>
       </generation>
       <generation code=3D"6" fieldcount=3D"3" description=3D"Operate Pow=
er =20
Voltage" verbosedescription=3D"">
             <validrevisions>
                   <rev ver=3D"7"/>
                   <rev ver=3D"9"/>
             </validrevisions>
             <field name=3D"Operate Voltage" description=3D"Voltage" =20
startbit=3D"8" endbit=3D"19"/>
             <field name=3D"POR" description=3D"Power on reset occurred" =
=20
startbit=3D"0" endbit=3D"0"/>
       </generation>
</response>
       =20
<response id=3D"r7">
=2E.. same as above...
</response>
</responseset>
</IOS>
</xml>


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...


help, please...

TIA

Chris

 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]