I am trying to conditional check on the input xml file and place the value.
input xml:
<workorder>
    <newwo>1</newwo>
</workorder>
If newwo is 1, then I have to set in my output as "NEW" else "OLD"
Expected output is:
newwo: "NEW"
my xslt is:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:xs="http://www.w3.org/2001/XMLSchema"  version="2.0">
<xsl:template match="/">
        <xsl:apply-templates select="NEWWO" />
</xsl:template>
<xsl:template match="/NEWWO">
    <xsl:text>{
      newwo:"
    </xsl:text>
        <xsl:choose>
            <xsl:when test="NEWWO != '0'">NEW</xsl:when>
            <xsl:otherwise>OLD</xsl:otherwise>
        </xsl:choose>
    <xsl:text>"
    }</xsl:text>
</xsl:template>
Please help me. Thanks in advance!
 
     
    