Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: using xslt axes [Thread Next] Re: using xslt axesTo: NULL Date: 5/28/2009 10:27:00 PM Thanks a ton.. Exactly what I needed... :-) Spent hours on this stupid thing... :-( On May 28, 5:38=A0pm, Martin Honnen <mahotr...@yahoo.de> wrote: > Manish wrote: > > Can anyone tell if this is the expected behaviour of 'preceding'axes. > > Yes. > > > And how to get the expected output. (usingxslt1.0) > > Use preceding-sibling instead of preceding, then you will get what you wa= nt: > > =A0 =A0 =A0<xsl:template match=3D"main" xml:space=3D"preserve"> > > =A0 =A0 =A0 =A0 =A0<xsl:for-each select=3D"root/test"> > =A0 =A0 =A0 =A0 =A0<xsl:for-each select=3D" *[not(preceding-sibling::*/@k= ey =3D @key) ]"> > =A0 =A0 =A0 =A0 =A0//<xsl:value-of select=3D"@key"/> > =A0 =A0 =A0 =A0 =A0</xsl:for-each> > =A0 =A0 =A0 =A0 =A0</xsl:for-each> > > =A0 =A0 </xsl:template> > > -- > > =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML > =A0 =A0 =A0 =A0http://msmvps.com/blogs/martin_honnen/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
