BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Uncategorized
TreeMaker
XMLEditor - WebClipping
WDDX Parser
Templx: x++ IDE Released!
XppEngCOM: COM implementation of x++ interpreter
Backup Outlook mail as XML
Grouping and Summing the values in XML
WDDX Parser (updated bug)
DIME Parser and Generator (C#)
Flash menu using XML
Virtual Directory Utilities for IIS(C#)
ComSerialization
Re: Max() function
Stop Tailoring, Create Generic!!!
Introduction to WAP Push
Add xml binding to select list
Ontology Web Language
Wrapping multiple elements in a parent element
Anet XML Search Engine
Count Distinct


 
 

<< System.XMLWCF, WS, SOAP >>


By Pedro Gil
First Posted 05/10/2002
Times viewed 443

Sorting the results and use the Axis


Summary Sorting the output result tree and the use axis.

Hi,

When I was developing the snippet Table with more than one column

http://www.topxml.com/code/?p=3&id=v20020401101524

I was faced with the problem that this couln't be sorted, this is by specification.

Take a look at this http://www.w3.org/TR/xpath#axes, specially this

<qoute> the following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes </quote>

This was a prolem, so whenever you are using axis you are using document order, no matter what you have specified in the <xsl:sort> element.

OK, so I've made this small snippet to try and workarround this. The problem is that this is dependend of the processor specific node-set function, I've made the snippet that will work for any processor that use XSLT1.1 or above and for MSXML and Saxon, you can implement other, if they have a node-set function.

Hope you enjoy this...

Pedro Gil

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< System.XMLWCF, WS, SOAP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML