根据以下URL,我启用了XSLT 2.0支持,当我这样做时,TryIt服务看起来不起作用 .
我尝试使用TryIt服务时出现以下错误 .
[2012-09-10 11:47:03,491] INFO - CarbonAuthenticationUtil 'admin' logged in at [2012-09-10 11:47:03,0491] from IP address 0:0:0:0:0:0:0:1%0
Warning: at xsl:stylesheet on line 32 of :
Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Warning: on line 286 of :
The attribute axis starting at a namespace() node will never select anything
Error on line 1603 of :
XPTY0004: Required item type of second operand of '|' is node(); supplied value has item
type xs:string
[2012-09-10 11:47:09,515] ERROR - Util Required item type of second operand of '|' is node(); supplied value has item type xs:string
; SystemID: ; Line#: 1603; Column#: -1
net.sf.saxon.trans.DynamicError: Required item type of second operand of '|' is node(); supplied value has item type xs:string
有没有解决方法,以便我们可以使用XSLT 2.0和TryIt与WSO2 ESB 4.0.3 .
希望得到答案 . 谢谢Abhijit
2 回答
您需要更新标准的XSLT处理器,以便能够处理XSLT 2.0,如博客_1343342中所述:
在ESB_HOME / lib / endorsed /中删除xalan-2.7.0.wso2v1.jar
从ESB_HOME / repository / components / plugins中删除saxon-8.9.0.wso2v1.jar
将saxon9he.jar复制到lib / endorsed并启动服务器 .
SAXON 9 you can download here
请注意,您将获取SOAP信封和正文也作为XSLT的输入,因此您可能需要为这些元素使用xsl:template:
最新的WSO2 ESB(v4.5.0)通过Saxson支持XSLT 2.0 [1] .
[1] http://mail.wso2.org/mailarchive/announce/2012-September/000026.html
此致,/ Nuwan