"FORG0001: Invalid dateTime value" on valid dateTime

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

"FORG0001: Invalid dateTime value" on valid dateTime

Cary Millsap
I'm getting unexpected behavior with xs:dateTime($t) when using microsecond
resolution in $t. When $t has a microsecond portion that's less than
999499, the last three digits are elided from the return value. When $t has
a microsecond portion that's greater than .999499, the transformation fails
with a run-time error. I'm hoping this is a bug in either Java or Saxon
since http://www.w3.org/TR/xmlschema-2/#dateTime appears to permit 6-digit
precision in the fractional seconds portion of an xs:dateTime. ?


I'm of course hoping not to have to work around this, but if I do, I'll have
to figure out how to compute the semantic equivalent of $elapsed = $t1 -
$t0, where each of the three operands requires microsecond precision.


Please see the test case below.



$ "%P5_JAVA%" -version

java version "1.5.0_04"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)

Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)


$ "%P5_JAVA%" -jar "%P5_SAXON%" -?

Saxon 8.5 from Saxonica

Usage: java net.sf.saxon.Transform [options] source-doc style-doc