1

有两个安装了 MarkLogic v10.0-6 的系统(比如说系统 A 和系统 B)。

我想在系统 A 和系统 B 中执行这个功能,

declare function local:dateTimeCompare($documentURI as xs:string) as xs:boolean {
  let $firstDateTime := doc($documentURI)/firstDateTimeXpath
  let $secondDateTime := doc($documentURI)/secondDateTimeXpath
  return $firstDateTime > $secondDateTime 
};

local:dateTimeCompare("/sample.xml")

当前行为: 给定查询在系统 A 中正确执行,但在系统 B 中未正确执行

这意味着,如果我想在系统 B 中正确执行上述查询,那么我必须显式地强制转换$firstDateTime 并且它开始工作。$secondDateTime xs:dateTime

预期行为: 相同的查询应该在两台机器上执行,而不是强制转换为xs:dateTime.

我的问题是- 为什么我看到两种不同的行为?这意味着系统 B 不应期望显式转换为 xs:dateTime。

任何帮助表示赞赏。

4

0 回答 0