1

次の 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 で使用できるようにするための回避策はありますか?

答えを期待しています。ありがとうアビジット

4

2 に答える 2

0

最新のWSO2ESB(v4.5.0)は、Saxsonを介してXSLT2.0[1]をサポートします。

[1] http://mail.wso2.org/mailarchive/announce/2012-September/000026.html

よろしく、/ Nuwan

于 2012-09-11T09:57:22.820 に答える
0

WSO2 ESB 4.0.3のブログ ソリューションに記載されているように、標準の XSLT プロセッサを XSLT 2.0 を処理できる新しいプロセッサに置き換える必要があります。

  1. ESB_HOME/lib/endorsed/ にある xalan-2.7.0.wso2v1.jar を削除します
  2. ESB_HOME/repository/components/plugins から saxon-8.9.0.wso2v1.jar を削除します
  3. saxon9he.jar を lib/endorsed にコピーし、サーバーを起動します。

ここからダウンロードできるSAXON 9

SOAP エンベロープと本文も XSLT への入力として取得することに注意してください。これらの要素にも xsl:template が必要になる場合があります。

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
<xsl:output method="xml" encoding="utf-8" indent="yes"/>

<xsl:template match="/soapenv:Envelope|soapenv:Body">
  <xsl:copy>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>

...
于 2012-09-11T07:31:12.410 に答える