[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Date comparasions
The nature of the problem is that I need to do the date comparasions in the
xsl.
Any help with it will be greatly appreciated.
Thanks.
From: Steve <subsume@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: NEED XSLT HELP
Date: Thu, 6 Sep 2007 15:56:56 -0400
I've never done it. I avoid it, and prefer to perform date comparisons
(using, say, SQL) before transformation and simply include them in my
XML.
I've never gotten into it. Perhaps someone else on the list will chime in.
-Steve
On 9/6/07, Waqar Ali <waqarali_pk@xxxxxxxxxxx> wrote:
> Thanks Steve.
>
> Any help with the date comparasions in XSLT?
>
> >From: Steve <subsume@xxxxxxxxx>
> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >Subject: Re: NEED XSLT HELP
> >Date: Thu, 6 Sep 2007 15:23:55 -0400
> >
> >Incredibly vague but here goes:
> >
> ><xsl:template match="/">
> > <xsl:for-each select="Emp">
> > <xsl:choose>
> > <xsl:when test="TYPE='A'">
> > <xsl:choose>
> > <xsl:when test="*complicated date
> >logic*">FULL_NEW</xsl:when>
> > <xsl:otherwise>FULL</xsl:otherwise>
> > </xsl:choose>
> > </xsl:when>
> > <xsl:when test="TYPE='B'">PART_TIME</xsl:when>
> > <xsl:otherwise>-</xsl:otherwise>
> > </xsl:choose>
> > </xsl:for-each>
> ></xsl:template>
> >
> >On 9/6/07, Waqar Ali <waqarali_pk@xxxxxxxxxxx> wrote:
> > > Hi,
> > >
> > > XML:
> > > ====
> > > <EMP>
> > > <ID>1</ID>
> > > <TYPE>A</TYPE>
> > > <HIRE_DATE>2007-05-20</HIRE_DATE>
> > > </EMP>
> > > <EMP>
> > > <ID>2</ID>
> > > <TYPE>B</TYPE>
> > > <HIRE_DATE>2007-09-1</HIRE_DATE>
> > > </EMP>
> > > <EMP>
> > > <ID>3</ID>
> > > <TYPE>A</TYPE>
> > > <HIRE_DATE>2007-08-20</HIRE_DATE>
> > > </EMP>
> > >
> > >
> > > LOGIC I NEED IN XSLT:
> > > ==============
> > > IF TYPE = A
> > > IF HIRE IN LAST 60 DAYS
> > > 'FULL_NEW'
> > > ELSE
> > > 'FULL'
> > > ELSE IF TYPE = B
> > > 'PART_TIME'
> > > ELSE
> > > '-'
> > >
> > > Please help me out in this.
> > >
> > > Thanks,
> > > -Waqar
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|