[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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.
[xsl] Date comparasions
Subject: [xsl] Date comparasions From: "Waqar Ali" <waqarali_pk@xxxxxxxxxxx> Date: Thu, 06 Sep 2007 16:12:21 -0400 |
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: [xsl] 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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] NEED XSLT HELP, Steve | Thread | Re: [xsl] Date comparasions, David Carlisle |
Re: [xsl] NEED XSLT HELP, Steve | Date | [xsl] Multi-column Text floating ar, rolf |
Month |
Keywords