![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - RE: Beginner working around variables Beginner working around variablesTo: NULL Date: 8/2/2007 1:14:00 PM
I want to populate a "variable" depending on what a for-each loop
finds. Something like this:
<xsl:template match='dict'>
<xsl:for-each select='key'>
<xsl:if test='. = "Name"'>
<xsl:variable name="MyName"
select='../string[position() = 1]'/>
</xsl:if>
</xsl:for-each><br/>
Then display
<xsl:value-of select="MyName" /> :
Except obviously this doesn't work. I suspect I may need a parm
instead. (My actual for-each code needs to create a bunch of
variables depending on more complex logic).
What is the correct way to do that incorrect code segment?
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
