How about:
<xsl:template match="EMP[TYPE='A']">
<xsl:text>FULL</xsl:text>
<xsl:variable name="within-60-days" select=" ... "/>
<xsl:if test="$within-60-days">_NEW</xsl:if>
</xsl:template>
<xsl:template match="EMP[TYPE='B']">
<xsl:text>PART_TIME</xsl:text>
</xsl:template>
<xsl:template match="EMP">
<xsl:text>-</xsl:text>
</xsl:template>
I've left out the assignment of the $within-60-days variable since
how best to do that depends on things you haven't told us, primarily
on whether you can use XSLT 2.0. But that problem can be isolated.
I hope this helps,
Wendell
At 03:15 PM 9/6/2007, you 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
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--