Re: [xsl] problem with handling conditional for loops

Subject: Re: [xsl] problem with handling conditional for loops
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 28 Apr 2005 01:15:27 +0000
Rahil, in the post below I was merely pointing out that the 'choose' should be inside the variable definition if it is to work; I didn't mean to vet or endorse the approach. Again, please post samples of your input, and required output.

--A



You probably want:


<xsl:variable name="nodeToProcess">
   <xsl:choose>
   ...
  </xsl:choose>
</xsl:variable>

The choose should be inside the variable definition; else the variable goes out of scope when the choose finishes.


Sorry trouble already. $nodeToProcess now correctly contains values found in either the <xsl:when> or <xsl:otherwise> statement.

However how can I also add the value of the 'id' attribute to $nodeToProcess so that I can look for references to the result based on its id at a later stage ?

E.g. <Value id="1234">Hello</Value>

So I want that $nodeToProcess contains both 'Hello' and '1234' say of the form 'Hello,1234' or 'Hello 1234'.

I tried out a few ways of doing it but none worked!

Suggestions
Rahil

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Current Thread