源xml文件:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Inbound Message -->
<Sales xmlns="abc:org.xcbl:schemas/xcbl/v4/xcbl4.xsd" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding">
</Sales>
代码:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/Sales">
</xsl:template>
查询:在源xml中,Sales根节点标记包含以下值 . xmlns =“abc:org.xcbl:schemas / xcbl / v4 / xcbl4.xsd”xmlns:SOAPENV =“http://www.w3.org/2003/05/soap-envelope”xmlns:xsi =“http:/ /www.w3.org/2001/XMLSchema-instance“xmlns:SOAP-ENC =”http://www.w3.org/2003/05/soap-encoding如何启动模板?
<xsl:template match="/Sales'>
<xsl:template match="/'>
以上代码无效 . 请帮我解决这个问题
.
1 回答
在XSLT中声明名称空间,然后使用限定名称,例如: