[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Nested xsl:sort problems

Subject: RE: Nested xsl:sort problems
From: "Fred Wells" <Fred.Wells@xxxxxxxxxxxxxxxx>
Date: Tue, 09 Dec 2003 09:59:13 -0600
fred wells
That was the exact problem I sent myself down the wrong path try to deal
with the entry element. It is a bit repetitive, but that's for another
day.
thanks.


I believe the problem was that you were off by one level when doing
your sorts. Here is a cut down version of the XSL...

    <!-- Sorted primary elements -->
    <xsl:for-each select="/indices/index/entry/primary">
        <xsl:sort data-type="text" select="@name"/>
        <block><xsl:value-of select="@name"/></block>
        <!-- Sorted secondary elements -->
        <xsl:for-each select="secondary">
            <xsl:sort data-type="text" select="@name"/> 
            <block><xsl:value-of select="@name"/></block>
            <!-- Sorted tertiary elements -->
            <xsl:for-each select="tertiary">
                <xsl:sort data-type="text" select="@name"/> 
                <block><xsl:value-of select="@name"/></block>
            </xsl:for-each>
        </xsl:for-each>
    </xsl:for-each>

This is repetitive, and could probably be replaced with something
recursive...

Does this solve your problem?
Josh

Frederick Wells
Capps Digital
35 W Wacker
30th Fl.
Chicago, IL
312.220.3056
www.cappsdigital.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.