|
-
Mar 15th, 2004, 06:48 PM
#1
Thread Starter
Addicted Member
[Resolved]Xpath
hey, sorry for the non-descriptive subject, but this really can't be described in a few words or i'd have used google :-)
ok...given this XML as a simplified example:
Code:
<a>
<b>x</b>
<c>1</c>
</a>
<a>
<b>y</b>
<c>2</c>
</a>
<a>
<b>z</b>
<c>3</c>
</a>
<d>
<b>y</b>
</d>
For each d element, I want the value of c in the a element with a matching value of b.
Got that?
tia
-Martin
Last edited by Martin Wilson; Mar 15th, 2004 at 07:07 PM.
What is the answer to this question?
-
Mar 15th, 2004, 07:06 PM
#2
Thread Starter
Addicted Member
Fixed it my self, for those that want to know...
add something like:
<xsl:key name='a-search' match='a' use='b' />
before the <xsl:stylesheet> element.
then the XPath is:
key('a-search', b)/c
hope that helps someone
-Martin
What is the answer to this question?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|