我有一个XML并使用XSLT进行转换。但结果转换了包含不必要的名称空间的XML文件。XSLT转换后的WSO2 ESB中的命名空间问题
修订
如何使XSLT不具备的xmlns:soapenv = “http://schemas.xmlsoap.org/soap/envelope/” 的结果XML文件。
我有一个XML并使用XSLT进行转换。但结果转换了包含不必要的名称空间的XML文件。XSLT转换后的WSO2 ESB中的命名空间问题
修订
如何使XSLT不具备的xmlns:soapenv = “http://schemas.xmlsoap.org/soap/envelope/” 的结果XML文件。
添加属性“排除对结果的前缀”关于XSL:样式表节点并列出要排除
样品
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn">
<xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no"/>
<xsl:template match="@*|*|comment()">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
呀命名空间!
Jean-Michel是对的,你必须使用exclude-result-prefixe =“soapenv”,这对我很有用。使用排除对结果prefixe = “soapenv” 的XSLT不工作 How to remove namespace from the output xml?
:
这个问题在这里aswered。不知道是什么问题。日志中介者还打印没有命名空间的xml,但是当ESB发送xml到结束点时,命名空间即将到来。有没有人遇到过这个。 – storia321
您正在使用哪个版本的wso2esb?你可以发布你的代理代码吗? –