HOME COMMUNITY BLOG

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

endDateThe last day in the list.

REturned value

Code Block
titleReturned Value
linenumberstrue
languagexml
<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

Code Block
titleSource XML
linenumberstrue
languagexml
<ROOT/>
Code Block
titleStylesheet
linenumberstrue
languagexml
<?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>