" xsl:stylesheet"的错误是无效的

时间:2016-07-01 14:35:06

标签: xml xslt wix

我正在为某些安装程序使用WIX,需要过滤掉某些exe文件。不是xsl文件的专家,但我从之前的一些项目中复制了它,并假设语法是正确的。但是,我总是得到这个错误说:"文档元素名称:' xsl:stylesheet'是无效的。 Windows Installer XML源文件必须使用' Wix'作为文档元素名称。"

这是xsl文件:

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:wi="http://schemas.microsoft.com/wix/2006/wi">


<xsl:output method="xml"
            indent="yes"
            encoding="utf-8"/>

<!--List of files which are defined statically in the solution-->
<xsl:key name="kCompsToRemove"
         match="wi:Component[wi:File/@Source='$(var.StageDirXFire)\ServerComponents\Commend.Common.Server.DriverService.exe']"                  
         use="@Id" />

<xsl:template match="@* | node()">
    <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
</xsl:template>

<xsl:template match="*[self::wi:Component or self::wi:ComponentRef]
                    [key('kCompsToRemove', @Id)]" />

</xsl:stylesheet>

0 个答案:

没有答案
相关问题