Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Problem retrieving value [Thread Next] Re: Problem retrieving valueTo: NULL Date: 12/1/2004 8:05:00 AM That does make the XSL considerably cleaner. Thanks for the suggestion,
Oleg.
"Oleg Tkachenko [MVP]" wrote:
> AlBruAn wrote:
>
> > I finally figured out how to retrieve the values by defining an <xsl:key>,
> > keyed on the Field name attribute and pulling back the value for the Field
> > value attribute.
> >
> > Using
> > <xsl:key name="fetch-value" match="Field" use=".//@name"/>,
> > I was able to retrieve the value of 30 for the BranchPlant by executing
> > <xsl:for-each select="key('fetch-value', 'BranchPlant')">
> > <xsl:value-of select="@value"/>
> > </xsl:for-each>
>
> If you need a single value, why not just
>
> <xsl:value-of select="key('fetch-value', 'BranchPlant')/@value"/>
>
> --
> Oleg Tkachenko [XML MVP]
> http://blog.tkachenko.com
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
