Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Refer to an element using a variable [Thread Next] Re: Refer to an element using a variableTo: NULL Date: 4/7/2005 11:11:00 AM John Smith wrote: > What I REALLY want to do is following: > > With this xml: > > <nameList> > <name1/> > <name2/> > </nameList> > > <phoneList> > <phone1/> > <phone2/> > </phoneList> > > When I am processing <name1>, I would like to get <phone1> and when <name2>, > get <phone2>. > > I tried position() but it doesn't seem to work. Try something like <xsl:variable name="position" select="position()"/> <xsl:apply-templates select="$phonelist/*[$position]"/> -- Oleg Tkachenko [XML MVP, MCP] http://blog.tkachenko.com | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
