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

Selecting entries by date

Subject: Selecting entries by date
From: Charles Muller <acmuller@xxxxxxx>
Date: Sun, 03 Aug 2003 11:10:50 +0900 (JST)
charles muller
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 &gt; $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

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.