|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Filtering Child Elements Between Two Values
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
|
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
|

Cart








