简体   繁体   中英

xs:date function is not defined in xslt2.0

I'm currently having problem with xslt transform in bpel process. In my xslt file, I used xs:date function to convert a string to date format. However, when I run the bpel processed, the following error returned:

"The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerConfigurationException: oracle.xml.xpath.XPathException: date function under namespace http://www.w3.org/2001/XMLSchema is not defined. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. ".

More Info:

I used stylesheet version 2.0

I declared the namespace xs already.

I also tried to used xs:dateTime...

Does anyone know what is the problem?

Thank you so much.

You need to use an XSLT processor that supports XSLT 2.0. Specifying version="2.0" on the stylesheet isn't going to help if your XSLT processor only recognizes version="1.0". Although 2.0 came out in 2007, there are many processors (such as the default processors in Java, .NET, and in browsers) that still haven't been updated.

The exception oracle.xml.xpath.XPathException suggests to me that you are probably using the XSLT processor in the Oracle XDK. This has a somewhat peculiar status, IIRC, in that it was partially updated towards XSLT 2.0 but (because of Oracle's acquisition of Sun) the upgrade was never finished, so it supports some XSLT 2.0 features but not all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM