|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sibling sort order
> Does anyone know how to select the previous/next sibling while maintaining > the sort order the faq for this list has lots of examples of this. It is hard to do in xsl without using extensions, but not so easy and its harder in msxsl which hasnt implemented the sibling axes yet. Easiest is first just sort the original and save the srted list in a variable (which is a result tree fragment) then you can select the nodes in that variable and they are in sorted order. According to te spec you should have to use an extension function (xt and saxon at least, provide one called node-set) but in msxsl you can directly treat the result tree fragment as a node set. so in other words you can go (but once msxsl becomes conformant you will have to modify slightly) <xsl:variable name="x"> <xsl:apply-templates select="*"> <xsl:sort select="@f1"/> </xsl:apply-templates> </xsl:variable> then use <xsl:apply-templates select="$x/*"/> rather than <xsl:apply-templates select="*"> David David David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








