私が抱えている xslt の問題について、誰かが何らかのガイダンスを提供してくれることを願っています。一般的な XML メッセージをプロキシ サービスに受信しています。次に、xml を SOAP メッセージでラップし、それを axis2 jms サービスに転送する必要があります。
saxon と xalan の両方のエンジンを使用して xml に対して stylehseet をテストしましたが、どちらも期待どおりに動作しますが、wso2 はそれを受け入れません。エラー WstxParsingException: String ']]>' not allowed in textual content if I have the CDATA section (私が必要とする)。
ポールに感謝します。
スタイルシートは以下の通り
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:klr="http://klr.com">
<xsl:output method="xml" indent="yes" encoding="UTF-8" cdata-section-elements="klr:legaldocument"/>
<xsl:template match="/">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:klr="http://klr.com">
<SOAP-ENV:Body>
<klr:Hypertext>
<klr:legaldocument>
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
<xsl:apply-templates select="*"/>
<xsl:text disable-output-escaping="yes">]]></xsl:text>
</klr:legaldocument>
</klr:Hypertext>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</xsl:template>
<xsl:template match="node()">
<xsl:element name="{local-name(.)}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()|*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>