Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL with XML parameters >Thread Next - Re: XSL with XML parameters Re: XSL with XML parametersTo: NULL Date: 2/18/2009 12:44:00 PM Guillermo C. wrote: > I have an XML document like this: > <doc> > <item> > <type1> > <type2> Where are the closing tags e.g. </type1>? > <item> > <type1> > <type2> > .......... (N items) > > <param> > <key> > <value> > </doc> > > Ok, in param (which will be a unique record), i'll pass in key the > name of the attribute (which will be an attribute of item) and the > value is the value to be searched. > So i.e. <param><key>type1</key><value>ToSearch</value></param> > > I bind variables values as: > <xsl:variable name="key" select="param/key" /> > <xsl:variable name="value" select="param/value" /> > > the expression i would like to generate is a <xsl:for-each select="item > [$key=$value]"> <xsl:for-each select="item[*[local-name() = $key] = $value]"> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
