2014-07-10 3 views
1

OSB에서 xslt 변환을 실행 중입니다. 다음과 같이 현재-날짜 메소드를 호출 :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> 

답변

2

기능 현재 날짜 _ 시간은() XSLT 2.0에서 사용할 수 있지만 XSLT 1.0. 그래서 실패했을 때, 당신은 XSLT 1.0 프로세서를 사용하고있었습니다.

XSLT에서는 fn : 접두어가 필요하지 않습니다. 어떤 이유로 든 사용하고 싶다면 네임 스페이스를 선언해야하지만 절대적인 의미는 없습니다. 접두사없이 current-dateTime()을 씁니다.