How to combine two value-of selects?
Hi,
Anyone know how to do this? I have the following XML file...
<recipients>
<item no="1">
<phone>0046123456</phone>
</item>
<item no="2">
<phone>0046987654</phone>
</item>
</recipients>
<sendlog>
<step no="1">
<sent as_item="1">
<status>STATUS 3</status>
</sent>
<sent as_item="2">
<status>STATUS 1</status>
</sent>
</step>
</sendlog>
...and what I want to do is check if a phone number is listed, and if so, get the sendlog status of that number (a phone numbers @no is the same as the sendlogs @as_item).
I can get a phone numbers @no attribute like so:
<xsl:value-of select="//item[phone='0046123456']/./@no" />
And I can get the status of a @as_item number like so:
<xsl:value-of select="//sent[@as_item='2']/status" />
But I need to combine them. How do I use the result in the first value-of select in the second value-of select statement?
Any help on this is highly appreciated :)
|