次のようなイベントに関する説明と日付を含む XML ファイルがあります。
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="timedate.xsl"?>
<catalog>
<event>
<name>AAA Festival</name>
<place>New York</place>
<country>USA</country>
<date>19/11/2013</date>
</event>
<event>
<name>BBB Festival</name>
<place>Paris</place>
<country>France</country>
<date>11/10/2013</date>
</event>
<event>
<name>CCC Festival</name>
<place>London</place>
<country>UK</country>
<date>29/09/2013</date>
</event>
</catalog>
および XSL ファイル:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<h2>Upcoming events</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Name</th>
<th>Place</th>
<th>Country</th>
<th>Date</th>
</tr>
<xsl:for-each select="catalog/event">
<xsl:sort select="date" order="descending"/>
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="place"/></td>
<td><xsl:value-of select="country"/></td>
<td><xsl:value-of select="date"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
今後のイベント (今日の日付を含む) のみを並べ替えて一覧表示するページを作成したいと考えています。日付が適切にフォーマットされておらず、現在の日付を取得してそれらを比較し、将来のイベントを印刷できるため、これを行うことができません。うまくいく例で解決策を教えてください。あなたの返信と助けを前もって感謝します。よろしく!