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 2:12:00 PM 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/xmlsdk/html/87b6b3f4-16f4-4fa3-8103-d62a679ac2a7.asp> 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
