[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] different evaluations on sibling elements ...

Subject: Re: [xsl] different evaluations on sibling elements ...
From: Raimund Kammering <raimund.kammering@xxxxxxx>
Date: Tue, 27 Aug 2013 19:18:48 +0200

okay I tried this but mixed up the relative path expressions and the location

But still puzzling:
The change brought me to:
"XPTY0004: A sequence of more than one item is not allowed as the first
argument of"

So I changed the lines to be:

>>> <xsl:variable name="next"
<xsl:variable name="next"
to only get the first following-sibling. Which brought me the following
"XPTY0004: Cannot divide two durations of different type"

pointing to the line
>>> <xsl:sequence select="($next - $this) div xs:duration('PT1H')"/>

Here I have a hard time understanding the formats - especially since I did not
use the XSLT 2.0 dataTime so far. Is't $this, $next simply in ISO8601 date
format of the form YYYY-MM-DDTHH:mm:ss - if so the subtraction already should
already not be okay?

Raimund Kammering

On 27.08.2013, at 18:37, Michael Kay <mike@xxxxxxxxxxxx> wrote:

> Yes, sorry, a mistake I often make: within the function, all the relative
path expressions should start with $entry. So
>>> <xsl:variable name="this" select="dateTime($entry/isodate,
>>> <xsl:variable name="next"
> Michael Kay
> Saxonica

Current Thread