Solved

XSL: obtain attribute value when another attribute value is matching

Posted on 2013-11-21
3
181 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 500 total points
Comment Utility
<xsl:variable name="Key"    select= "$viewServRef[@Doc=$Tkt]/@Key" />
0
 

Author Closing Comment

by:badtz7229
Comment Utility
thank u
0
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
welcome
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now