XSLT Function ListDays

Returns the list of days within specified range. The list is returned in the form of xml structure.

NAMESPACE

xmlns:AS="http://schema.advantages.cz/AsapFunctions"

SYNTAX

string ListDays(string startDate, string endDate)

PARAMETERS

Name Description
startDate The first day in the list.
endDate The last day in the list.

RETURNED VALUE

Returned Value

<list>
    <item>2008-10-01T00:00:00.000000+02:00</item>
    <item>2008-10-02T00:00:00.000000+02:00</item>
    <item>2008-10-03T00:00:00.000000+02:00</item>
</list>

EXAMPLE

Source XML

<ROOT/>

Stylesheet

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:AS="http://schema.advantages.cz/AsapFunctions"
    xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="AS date">
    <xsl:template match="/">
        <ROOT>
            <xsl:for-each select="AS:ListDays('2008-10-01', '2008-11-01')/list/item">
                <day><xsl:value-of select="."/></day>
            </xsl:for-each>
        </ROOT>
    </xsl:template>
</xsl:stylesheet>