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

Re: Confused using a loop...

Subject: Re: Confused using a loop...
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 28 Mar 2007 17:59:15 +0200
Re:  Confused using a loop...
Austin, Darrel wrote:

<xsl:for-each select="//menuItem[ancestor-or-self::menuItem/pageID =
$pageID]"> <xsl:sort select="substring(lastUpdate,1,4)"
order="descending" /> <!-- year -->
<xsl:sort select="substring(lastUpdate,6,2)"
order="descending" /> <!-- month -->
<xsl:sort select="substring(lastUpdate,9,2)"
order="descending" /> <!-- day -->
<xsl:if test="position() &lt; $numberOfItemsToList">
<xsl:call-template name="createItem" />

Btw, from a previous thread you seemed to be using the much easier translate() version, suggested by Michael Kay: http://www.biglist.com/lists/xsl-list/archives/200703/msg00710.html , i.e.:

<!-- this -->
<xsl:sort select="translate(lastUpdate,'/','')" date-type="number" />

<!-- or this: -->
<xsl:sort select="translate(lastUpdate,'/ ','')" date-type="number" />

something like that.

Why did you change to the more verbose version you have above? Isn't having one xsl:sort statement instead of three easier?

-- Abel

Current Thread


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.
First Name
Last Name
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.