Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Specify an element in a nodeset directly >Thread Next - Re: Specify an element in a nodeset directly Re: Specify an element in a nodeset directlyTo: NULL Date: 10/5/2006 11:22:00 PM Your problem is that $rates/rate[position()=thingcode]/myrate is looking for a thingcode child of rate -- but of course the thingcode is child of thing. You're crossing contexts. The easy way around this is a variable: <td> <xsl:value-of select="short_description"/>-<xsl:value-of select="thingcode"/>-<xsl:value-of select="$rates/rate[1]/org_id"/> <!-- This does not work because rate has no thingcode--> test1<xsl:value-of select="$rates/rate[position()=thingcode]/myrate"/> <!-- This works--> test2<xsl:value-of select="$rates/rate[position()=1]/myrate"/> <!-- This works because we're asking for thingcode in the right context--> <xsl:variable name="code" select="thingcode"/> test3<xsl:value-of select="$rates/rate[position()=$code]/myrate"/> </td> -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
