[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

XSL: obtain attribute value when another attribute value is matching

Posted on 2013-11-21
3
Medium Priority
?
195 Views
Last Modified: 2013-11-21
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
0
Comment
Question by:badtz7229
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 total points
ID: 39666555
<xsl:variable name="Key"    select= "$viewServRef[@Doc=$Tkt]/@Key" />
0
 

Author Closing Comment

by:badtz7229
ID: 39666782
thank u
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 39666951
welcome
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question