Link to home
Start Free TrialLog in
Avatar of tesmc
tesmcFlag for United States of America

asked on

XSL: obtain attribute value when another attribute value is matching

I have the following 3 items stored in a variable $viewServRef:

<ServRef Key="333" Doc="1076">
<ServRef Key="336" Doc="1079">
<ServRef Key="339" Doc="1082">

how do i then proceed to grab the one instance of Key where Doc is found
I was trying to do something like below. but that returned nothing.
<xsl:variable name="Key"    select= "$viewServRef/@Key[@Doc=$Tkt]" />

such that $Key = 333 bc $Tkt =1076
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tesmc

ASKER

thank u