<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
oXygen eclipse plugin do not valid my query because of :<br>
<b>Axis step child::element(false) cannot be used here: the context
item is undefined</b><br>
<br>
Any ideas ?<br>
<br>
<br>
declare function local:isTimeOverlaped( $foo as element(FOO), <br>
$dateTimeRequest as xs:dateTime
, <br>
$timeSpanRequest as xs:integer)<br>
as xs:boolean {<br>
let $analysisTime as xs:dateTime :=
xs:dateTime($foo/gml:timePosition)<br>
let $forecastTime as xs:dayTimeDuration :=
xs:dayTimeDuration(concat("PT",$foo/forecastTime, "M"))<br>
let $validityPeriod as xs:dayTimeDuration :=
xs:dayTimeDuration(concat("PT",$foo/validityPeriod, "M"))<br>
<br>
let $timeSpan as xs:dayTimeDuration :=
xs:dayTimeDuration(concat("PT",$timeSpanRequest, "M"))<br>
<br>
let $v1 as xs:dateTime := $analysisTime + $forecastTime<br>
let $v2 as xs:dateTime := $v1 + $validityPeriod<br>
<br>
let $r1 as xs:dateTime := $dateTimeRequest<br>
let $r2 as xs:dateTime := $dateTimeRequest + $timeSpan<br>
<br>
return<br>
if ($r1 <= $v1) then <br>
<b> if ($r2 <= $v1) then xs:boolean(false)</b><br>
else xs:boolean(true)<br>
else<br>
if ($r1 <= $v2) then xs:boolean(true)<br>
else xs:boolean(false)<br>
<br>
};<br>
<br>
<br>
<br>
Geindre Sébastien a écrit :
<blockquote cite="mid:ermus8$evp$1@sea.gmane.org" type="cite">hi all,
<br>
<br>
is there any date comparison function in xquery ?
<br>
<br>
thanks
<br>
<br>
_______________________________________________
<br>
<a class="moz-txt-link-abbreviated" href="mailto:talk@x-query.com">talk@x-query.com</a>
<br>
<a class="moz-txt-link-freetext" href="http://x-query.com/mailman/listinfo/talk">http://x-query.com/mailman/listinfo/talk</a>
<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Sébastien Geindre
DPREVI/AERO/DEV
<a class="moz-txt-link-abbreviated" href="mailto:sebastien.geindre@meteo.fr">sebastien.geindre@meteo.fr</a>
05 61 07 84 93
</pre>
</body>
</html>