[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: NEED XSLT HELP

Subject: Re: NEED XSLT HELP
From: Steve <subsume@xxxxxxxxx>
Date: Thu, 6 Sep 2007 15:56:56 -0400
Re:  NEED XSLT HELP
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.