[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: AW: Selecting entries by date
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, '-', '') < $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
|
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
|