Jon Paal
2006-02-23 06:55:36 UTC
getting error message of:
'year-from-date()' is an unknown XSLT function
can anyone help with getting date parts from "$sortFieldName" before sorting.
<xsl:template match="level2">
<xsl:variable name="sortYear" select="year-from-date('$sortFieldName')"/>
<xsl:variable name="sortMonth" select="month-from-date('$sortFieldName')"/>
<xsl:variable name="sortDay" select="day-from-date('$sortFieldName')"/>
<xsl:for-each select="level2">
<xsl:sort select="$sortYear" order="ascending"/>
<xsl:sort select="$sortMonth" order="ascending"/>
<xsl:sort select="$sortDay" order="ascending"/>
<level2>
......
</level2>
</xsl:for-each>
</xsl:template>
'year-from-date()' is an unknown XSLT function
can anyone help with getting date parts from "$sortFieldName" before sorting.
<xsl:template match="level2">
<xsl:variable name="sortYear" select="year-from-date('$sortFieldName')"/>
<xsl:variable name="sortMonth" select="month-from-date('$sortFieldName')"/>
<xsl:variable name="sortDay" select="day-from-date('$sortFieldName')"/>
<xsl:for-each select="level2">
<xsl:sort select="$sortYear" order="ascending"/>
<xsl:sort select="$sortMonth" order="ascending"/>
<xsl:sort select="$sortDay" order="ascending"/>
<level2>
......
</level2>
</xsl:for-each>
</xsl:template>