Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: variables >Thread Next - Re: variables Re: variablesTo: NULL Date: 4/3/2007 6:58:00 AM On 3 Apr, 14:12, Martin Honnen <mahotr...@yahoo.de> wrote: > RedLars wrote: > > It's almost working now, just one small problem, the xml data I'm > > working on is not sorted. By doing <xsl:sort .. I'm able to sort the > > list but it seems that following.sibling::node()[1] doesn't select the > > next sorted element but the next element. So for instance when dealing > > with computer element with number equals 1, it looks to the next > > sibling element which in the xml file is computer element with number > > equals 161 and not the element with number equal 2. See the 'problem'? > > You would need to sort into a result tree fragment and convert that to a > node set with the MSXML extension function msxsl:node-set, see > <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmls...> > Or you need to chain two transformations, the first does the sorting, > the second then the sibling check. > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ Thanks for the feedback. I'm struggling a bit with your latest comments. Could you possibly show me a code example (or pseudo code) of how you'd solve this problem. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
