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

Re: AW: Selecting entries by date

Subject: Re: AW: Selecting entries by date
From: Charles Muller <acmuller@xxxxxxx>
Date: Mon, 04 Aug 2003 12:54:02 +0900 (JST)
a w muller
Markus Abt wrote:

> Put the variable and the <xsl:if> inside the <xsl:for-each> loop to get only the
> wanted entries:

Yes, this does the trick.
 
> Further, you can eleminate the variable and maybe also the <xsl:if>, simply write:
> 
>  <xsl:for-each select="hbuddhism/entry[translate(dateofentry, '-', '') &lt; $thismonth]">
>   <xsl:sort select="lastname"/>

But this is even better, because, as you say, it resolves the next
problem I was going to have to deal with -- making sure the numbering
was being done on the output data only as opposed to the entire data set:

> In this case, however, the selected entries are numbered 1, 2, 3, ... by the position()
> function, since only the selected ones are looped through the <xsl:for-each>.
> In the first case above, all entries are looped through and numbered with their
> position, and then only the ones with the right date are outputted, so numbers
> look like 2, 5, 6, 8, ..., for example.

Thank you!

Chuck

---------------------------
Charles Muller  <acmuller@xxxxxxx>
Faculty of Humanities,  Toyo Gakuen University
Digital Dictionary of Buddhism and CJKV-English Dictionary [http://www.acmuller.net]
H-Buddhism List Editor [http://www.h-net.org/~buddhism/]
Mobile Phone: 090-9310-1787

 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.