XSLT 2.0 if then -
in xslt 2.0, can use if means no else clause. <employee><status><xsl:value-of select="if (tns:employee/tns:empid = 4) 'new' else 'old'"/></status></employee>
here if don't want else clause, means if empid not 4, not populate status field. xslt?
unless i'm reading question wrong, add empty string or empty sequence.
example...
if (tns:employee/tns:empid = 4) 'new' else ''
or
if (tns:employee/tns:empid = 4) 'new' else ()
Comments
Post a Comment