|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: get Data BETWEEN FromDate and ToDate
Hi Amburose,
I was thinking how to solve this problem rightly..
Before you try my stylesheet, please study Michael
Kay's answer (it will surely be better than mine :)
)..
Here is the XSLT stylesheet -
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:variable name="date1" select="'04-03-2005'" />
<xsl:variable name="date2" select="'04-05-2005'" />
<xsl:template match="/Employees">
<result>
<xsl:for-each select="Employee">
<xsl:variable name="doj"
select="concat(substring(@DOJ,4,2),'-',substring(@DOJ,1,2),'-',substring(@DOJ,7,4))"
/>
<xsl:if test="($doj >= $date1) and
($doj >= $date1)">
<xsl:copy-of select="." />
</xsl:if>
</xsl:for-each>
</result>
</xsl:template>
</xsl:stylesheet>
This is an XSLT 2.0 stylesheet , and tested with Saxon
8.4 XSLT processor.
Regards,
Mukul
--- Amburose <ambrose@xxxxxxxxxxxxx> wrote:
>
> hi,
>
> i have one xml file. that contain number of
> employess records with basic
> informations like name, age, date of joining ....
>
> 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.
>
>
> Best Wishes,
> amburose
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.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
|

Cart








