【问题标题】:xslt current-dateTime errorxslt 当前日期时间错误
【发布时间】:2014-08-31 20:57:18
【问题描述】:

我正在 OSB 中运行 xslt 转换。它调用 current-dateTime 方法如下:

<db:lastupdate>
    <xsl:value-of select="fn:current-dateTime()"/>
</db:lastupdate>

它返回以下错误:

<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-382513</con:errorCode>
<con:reason>
    OSB Replace action failed updating variable "body": 
    javax.xml.transform.TransformerException: Instance method call 
    to method current-dateTime requires an Object instance as first argument
</con:reason>
...
</con:fault>

【问题讨论】:

    标签: xslt osb oracle-service-bus


    【解决方案1】:

    函数 current-dateTime() 在 XSLT 2.0 中可用,但在 XSLT 1.0 中不可用。所以很有可能当它失败时,您使用的是 XSLT 1.0 处理器。

    请注意,在 XSLT 中永远不需要 fn: 前缀。如果出于某种原因你想使用它,你必须声明命名空间——但绝对没有意义。只写 current-dateTime() 不带前缀。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-14
      • 2011-11-29
      • 2016-04-15
      • 2019-11-19
      • 1970-01-01
      • 2014-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多