Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XSL with XML parameters [Thread Next] Re: XSL with XML parametersTo: NULL Date: 2/19/2009 5:11:00 AM I didn't close them for the shake of brevity, anyway it's not about the XML (which is perfectly correct) but the XSL predicate on the foreach. Th On 18 feb, 12:43, Martin Honnen <mahotr...@yahoo.de> wrote: > Guillermo C. wrote: > > I have an XML document like this: > > <doc> > > =A0 <item> > > =A0 =A0 <type1> > > =A0 =A0 <type2> > > Where are the closing tags e.g. </type1>? > > > > > =A0 =A0<item> > > =A0 =A0 <type1> > > =A0 =A0 <type2> > > =A0 .......... (N items) > > > =A0 <param> > > =A0 =A0 <key> > > =A0 =A0 <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: > > =A0 =A0 =A0 =A0 =A0<xsl:variable name=3D"key" select=3D"param/key" /> > > =A0 =A0 =A0 =A0 =A0<xsl:variable name=3D"value" select=3D"param/value" = /> > > > the expression i would like to generate is a <xsl:for-each select=3D"it= em > > [$key=3D$value]"> > > =A0 =A0<xsl:for-each select=3D"item[*[local-name() =3D $key] =3D $value]"= > > > -- > > =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML > =A0 =A0 =A0 =A0http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
