Hi Martin,
On Tue, Mar 31, 2020 at 1:34 PM Martin Honnen
martin(_dot_)honnen(_at_)gmx(_dot_)de <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
In general, if you want the difference in seconds, I would suggest to use
div xs:dayTimeDuration('PT1S')
for minutes
div xs:dayTimeDuration('PT1M')
or for hours
div xs:dayTimeDuration('PT1H')
I tried following with Saxon,
trf1.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="3.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:variable name="dt1" select="xs:dayTimeDuration('PT5H')"/>
<xsl:value-of select="$dt1 div xs:dayTimeDuration('PT2.5H')"/>
</xsl:template>
</xsl:stylesheet>
And I get following on running above stylesheet,
F:\>java -classpath f:\SaxonHE10-0J\saxon-he-10.0.jar
net.sf.saxon.Transform -s:trf1.xsl -xsl:trf1.xsl
Warning at char 28 in xsl:value-of/@select on line 10 column 69 of trf1.xsl:
SXWN9000 Evaluation will always throw a dynamic error: Invalid duration
value 'PT2.5H' (H
is out of sequence)
Error at char 28 in expression in xsl:value-of/@select on line 10 column 69
of trf1.xsl:
FORG0001 Invalid duration value 'PT2.5H' (H is out of sequence)
In template rule with match="/" on line 8 of trf1.xsl
Invalid duration value 'PT2.5H' (H is out of sequence)
What I'm not doing correctly?
--
Regards,
Mukul Gandhi
--~----------------------------------------------------------------
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
--~--