Topic
  • No replies
SystemAdmin
SystemAdmin
76 Posts

Pinned topic XSL:Getting value based on a attribute

‏2004-02-24T22:06:50Z |
XSL Question:

Hello All,
I am having trouble getting XSL to grab the value of a tag whose parent's attribute matches a certain value.Here is an example:

This is the source XML:

<item name='jpTitleCT'><text>080:Service Delivery Manager</text></item>
<item name='fNameET'><text>XYZ</text></item>
<item name='lNameET'><text>ABC</text></item></document></database>

I would like to grab the value of the text tag in each case example 080:service Delivery Manager,ABC,XYZ.The important thing is, I want to get these values seperately.

I am trying to do a template match on item . I know I could do it by saying <xsl:template match itemposition()=1 or 2 or 3.

But I would like get it done such that when the value of the attribute tag equals jpTitleET or fNameET or lNameET then grab the corresponding value between the text tags.

I would appreciate if someone could help me with the XSL commands to achieve this.

I look forward to hear from you.I can be reached at sreeni78@yahoo.com

Thanks in advance,
Sreeni.