Subject: Re: [xsl] Filtering Child Elements Between Two Values From: "Alexander Gutman" <gutman@xxxxxxxxxxxxxxx> Date: Tue, 14 Aug 2001 11:43:55 +0700 |
Hello, John. Sendrey, John wrote: > I'm using the following: > > <xsl:for-each select="students/student[($stopdate >= > certifications/certification/date) and (certifications/certification/date >= > $startdate)]"> Use this instead: <xsl:for-each select="students/student[ certifications/certification/date[$stopdate>=. and .>=$startdate]]"> > to locate all students who have a certification date between $startdate and > $stopdate, inclusive ( YYYYMMDD format ) > > <students> > <student> > <certifications> > <certification> > <date>20010701</date> > <name>MCP</name> > </certification> > <certification> > <date>20010801</date> > <name>MCSE</date> > </certification> > </certifications> > </student> > . > . > . > </students> > > However, in my results, I get the student returned if I choose $startdate = > '20010708' and $stopdate = '20010721' even though neither of the two dates > in the sample data above appears between this date range. It appears to be > selecting the student because at least one date is greater than '20010708' > and at least one date is less than '20010721' even though neither date falls > in between the two date values. How can I select a student only if he/she > has at least one certification date that falls in between $startdate and > $stopdate? -- Alexander E. Gutman XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Filtering Child Elements , Jarno . Elovirta | Thread | RE: [xsl] Filtering Child Elements , Sendrey, John |
Re: [xsl] Encoding issue, Mike Brown | Date | RE: [xsl] Filtering Child Elements , Sendrey, John |
Month |