【发布时间】:2018-01-15 08:51:08
【问题描述】:
我有两个输入文件,例如:
a.xml
<a>
<data>...</data>
</a>
b.xml
<b>
<data>...</data>
</b>
我的 xslt
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
我想检查第一个根元素,如果它是<a> 而不是<xsl:output> 是
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
其他
<xsl:output method="xml" encoding="us-ascii" indent="no"/>
提前致谢。
【问题讨论】:
标签: xslt-2.0 xsl-output