[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: get Data BETWEEN FromDate and ToDate
> now i want how to get particular employees covered between > two different > date of join date(example Fromdate and Todate ). > > please tell the me Xpath / XSL expression. If the source documents have a schema, and the attributes are defined in the schema as being of type xs:date, and you are using a schema-aware XSLT 2.0 processor, then you can just write employee[@FromDate le $d and @ToDate ge $d] If you are not using a schema, but you are using XSLT 2.0, and your dates are stored in the ISO 8601 format that XML Schema uses, then you can still do the same kind of comparison but you need to do a little more work: employee[xs:date(@FromDate) le $d and xs:date(@ToDate) ge $d] If you are not using a schema and your dates are in some other format, or if you are using XSLT 1.0, then you will need to do even more work, but this then depends entirely on the format you are starting with. Michael Kay http://www.saxonica.com/
|
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
|