Subject: [xsl] Selecting entries by date From: Charles Muller <acmuller@xxxxxxx> Date: Sun, 03 Aug 2003 11:10:50 +0900 (JST) |
I administer an e-mail list, for which I maintain a subscriber list that includes their main research areas and topics. At the end of each month, I send out a list of new subscribers for that month, including research information, but not their e-mail addresses. Up to now, I had been selecting this month's new subscribers manually, but now I want to select them via XSLT using <xsl:if> with their <dateofentry> node. I am getting stuck. When I use the date form 2003.07.01 the parser (Saxon, in Emacs) says its not a valid number. When I change the form to 20030701, the code below generates the entire list, regardless of date. The format of the XSL entries is: <hlist> <entry> <e-mail>johndoe@xxxxxxx</e-mail> <firstname>John</firstname> <lastname>Doe</lastname> <affiliation>This University</affiliation> <dateofentry>2003.08.03</dateofentry> <area>His Country</area> <topic>His favorite topics</topic> </entry> <entry> <e-mail>acmuller@xxxxxxxxx</e-mail> <firstname>Charles</firstname> <lastname>Muller</lastname> <affiliation>Toyo Gakuen University</affiliation> <dateofentry>1999.05.14</dateofentry> <area>Korea</area> <topic>Korean Seon; Woenhyo, Gihwa; East Asian Yogaacaara; Confucianism and Daoism</topic> </entry> <hlist> The below style is intended to output John Doe, but not Charles Muller, but apparently has an error or two (I've left out prior code in the sheet that was already functioning correctly before I tried to add this date selector): <xsl:variable name="entrydate" select="hbuddhism/entry/dateofentry"/> <xsl:variable name="thismonth" select="2003.07.01"/> <xsl:if test="$entrydate > $thismonth"> <xsl:for-each select="hbuddhism/entry"> <xsl:sort select="lastname"/> <xsl:value-of select="position()"/> <xsl:text>. </xsl:text> <xsl:value-of select="firstname"/> <xsl:text> </xsl:text> <xsl:value-of select="lastname"/> <xsl:text>, </xsl:text> <xsl:value-of select="affiliation"/> <xsl:text>. Area: </xsl:text> <xsl:value-of select="area"/> <xsl:text>. Topic(s): </xsl:text> <xsl:value-of select="topic"/> <xsl:value-of select="$newline"/> <xsl:value-of select="$newline"/> </xsl:for-each> </xsl:if> Thanks for looking at this. 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] for-each, Markus Abt | Thread | [xsl] Re: Selecting entries by date, Charles Muller |
Re: [xsl] How to speed up parsing ?, Mike Brown | Date | [xsl] Re: Selecting entries by date, Charles Muller |
Month |