xsl-list
[Top] [All Lists]

Re: [xsl] difference between an integer and current-dateTime()

2020-04-02 05:02:41
Am 02.04.2020 um 11:35 schrieb Mukul Gandhi 
gandhi(_dot_)mukul(_at_)gmail(_dot_)com:
On Thu, Apr 2, 2020 at 12:46 PM Michael Kay mike(_at_)saxonica(_dot_)com
<mailto:mike(_at_)saxonica(_dot_)com> 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com
<mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>> wrote:


    Surely the error message is pretty clear?

    See https://www.w3.org/TR/xmlschema-2/#duration

    §3.2.6.1 The values of the Year, Month, Day, Hour and Minutes
    components are not restricted but allow an arbitrary unsigned
    integer, i.e., an integer that conforms to the pattern |[0-9]+|


The reference from spec you're citing might be explaining the error I
got. But I'm surprised, that

<xsl:variable name="dt1" select="xs:dayTimeDuration('PT5H')"/>
<xsl:value-of select="$dt1 div xs:dayTimeDuration('PT2H')"/>

doesn't give me an error.

but, following

<xsl:variable name="dt1" select="xs:dayTimeDuration('PT5H')"/>
<xsl:value-of select="$dt1 div xs:dayTimeDuration('PT2.5H')"/>

gives me an error.

Do you consider 2.5 an unsigned integer? It is not.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>