In the following example the output of $var564_resultof_filter[fn:exists($var565_cur/NonExistingElement)] is empty.
Therefore there is nothing to loop through. Although Saxon is evaluating the inner statement which fails on xs:dateTime function. $var565_cur/NonExistingElement is not available and fn:string will return an empty string.
The underneath exception: Invalid dateTime value "T12:00:00Z" (Non-numeric year component) is thrown.
Saxon (9.4.0.7) is evaluating code in a loop that not meant to be hit because there are no items in the collection.
\<xsl:for-each select="$var564_resultof_filter[fn:exists($var565_cur/NonExistingElement)]">
\<ElementToGenerateForEachItemInLoop>
\<xsl:sequence select="xs:string(xs:dateTime(fn:concat(fn:string($var565_cur/NonExistingElement), 'T12:00:00Z')))"/>
\</ElementToGenerateForEachItemInLoop>
\</xsl:for-each>
Anonymous
Hi,
Thanks for contacting us in regards to the error you have hit.
Regardless of the not executing the for-loop the DateTime 'T12:00:00Z'
is not correct. You are missing the actual date part that is why it is
failing. E.g. 2014-02-01T12:00:00Z
I recommend using a developer site to report potential bugs:
https://saxonica.plan.io/projects/saxon
And forums:
https://saxonica.plan.io/projects/saxon/boards
On 04/02/2014 11:30, Ticket 66 wrote:
Related
Support Requests: #66
Hi,
My apologies you are correct the code in the for loop should not be
evaluated. The problem is the xsl:sequence in the loop is being pulled
out into a variable since it is not dependent on the for-loop. The
policy should be to do lazy evaluation of the variable to where it is
called in the loop, but this is not happening. We will investigate this
further and let you know.
Kind regards,
O'Neil
On 04/02/2014 14:51, oneil wrote:
Related
Support Requests: #66
The bug has been reported and fixed. See the bug entry at
https://saxonica.plan.io/issues/1997
On 04/02/2014 15:09, oneil wrote:
Related
Support Requests: #66
Hi oneil,
Thanks for fixing this bug so rapidly.
We will use an ugly workaround till the fix is released.
Can't stop saying it's great you fixed it this quick.
Thanks a million,
Wesley