I'm trying to do a transformation that compare Dates using xpath
Here is a sample of my XML:
<?xml version="1.0" encoding="UTF-8"?><shop xmlns="http://www.dei.isep.ipp.pt/lprog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lprog="http://www.dei.isep.ipp.pt/lprog" xsi:schemaLocation="http://www.dei.isep.ipp.pt/lprog TraXSD.xsd">
<Category nome="Fish">
<Article id="1" nome="fish1">
<ProdDate>2018-10-02</ProdDate>
</Article>
</Category >
</shop>
And here is the Sample of a xslt with a
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:lprog="http://www.dei.isep.ipp.pt/lprog">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>List of Products out of Time</title>
</head>
<body>
<table border="1">
<tr bgcolor="#9acd32">
<th style="text-align:left">Category</th>
</tr>
<tr>
<td>
<xsl:apply-templates select="//lprog:Category/lprog:Article"/>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="lprog:Category/lprog:Articleo">
<xsl:value-of select="@nome"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="lprog:ProdDate[xs:date(lprog:ProdDate) le xs:date('2016-06-03')]"/> ERROR HERE
<xsl:text disable-output-escaping="yes">
<p></p>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
**Error in this line ** lprog:ProdDate[xs:date(lprog:ProdDate) le xs:date('2016-06-03')]"/>
Thank you!