Hi all,
I have been working on an interface where the XSLT mapping has some issues regarding the date comparison.
I wanted to compare the end date greater than or equal to the current date. But it has some typecast error i guess.
The error is :
net.sf.saxon.trans.UncheckedXPathException: Cannot compare xs:untypedAtomic to xs:dateThe code snippet is :
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/queryCompoundEmployeeResponse">
<xsl:copy>
<xsl:copy-of select="CompoundEmployee[person/employment_information[(end_date) ge current-date()]]"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Can some one suggest what change needs to be done in code for comparing without errors. Thanks, Yogesh Kumar