|
Subject: [xsl] passing element to function having an 'xs:anyAtomicType?' parameter From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sat, 23 Feb 2008 16:54:36 +0100 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:functx="http://www.functx.com">
<xsl:function name="functx:day-of-week" as="xs:integer?">
<xsl:param name="date" as="xs:anyAtomicType?"/> <xsl:sequence select="
if (empty($date))
then ()
else xs:integer((xs:date($date) - xs:date('1901-01-06'))
div xs:dayTimeDuration('P1D')) mod 7
"/> <xsl:template match="/">
<xsl:value-of
select="root/date-list/date/functx:day-of-week(.)"
separator=" "/>
</xsl:template><root>
<date-list>
<date>2008-02-18</date>
<date>2008-02-19</date>
<date>2008-02-20</date>
<date>2008-02-21</date>
<date>2008-02-22</date>
<date>2008-02-23</date>
<date>2008-02-24</date>
</date-list>
</root>Error in XPath 2.0 expression at as C:\path\sheet.xml Line 10, Character 29
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Mysterious 0utput Escapin, Marroc | Thread | Re: [xsl] passing element to functi, Colin Paul Adams |
| Re: [xsl] 0utput Escaping not behav, Joe Fawcett | Date | Re: [xsl] passing element to functi, Colin Paul Adams |
| Month |