WIX:XmlFile / XmlConfig无法在XSLT文件中找到节点(命名空间问题?)

时间:2016-12-02 12:51:01

标签: xml xslt xpath wix

我试图在安装过程中更改xslt文件。

xslt文件如下所示:

<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:outcome="http://www.test.co.uk/schemas" xmlns:func="http://www.test.co.uk/core/functions">

    <xsl:import href="someFile.xslt" />
    <xsl:import href="someFile2.xslt" />

    <xsl:template name="someName" match="/outcome:client">
        ...
    </xsl:template>

</xsl:stylesheet>

我必须在安装过程中更改导入节点的href属性。

我尝试将XmlFile和XmlConfig与以下元素路径一起使用:

//*[\[]namespace-uri()='http://www.w3.org/1999/XSL/Transform' and local-name()='import' and contains(@href, 'someFile.xslt')[\]]

//xsl:stylesheet/xsl:import[\[]@href='someFile.xslt'[\]]

//xsl:import[\[]@href='someFile.xslt'[\]]

但是没有成功,在安装过程中会出现错误,指出它无法找到节点。 (在线xpath测试人员,它应该正常工作)

0 个答案:

没有答案
相关问题