-
Notifications
You must be signed in to change notification settings - Fork 1
/
FragmentTransfom.xslt
46 lines (36 loc) · 1.48 KB
/
FragmentTransfom.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns="http://schemas.microsoft.com/wix/2006/wi"
exclude-result-prefixes="xsl wix">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="wix:Wix">
<xsl:copy>
<xsl:processing-instruction name="include">..\filebeat.wxi</xsl:processing-instruction>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- ### Adding the Win64-attribute to all Components -->
<xsl:template match="wix:Component">
<xsl:copy>
<xsl:apply-templates select="@*" />
<!-- Adding the Win64-attribute as we have a x64 application -->
<xsl:attribute name="Win64">yes</xsl:attribute>
<!-- Now take the rest of the inner tag -->
<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>
<xsl:key name="ExeToRemove"
match="wix:Component[contains(wix:File/@Source, '.exe')]"
use="@Id" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- Remove the exe files -->
<xsl:template match="*[self::wix:Component or self::wix:ComponentRef]
[key('ExeToRemove', @Id)]" />
</xsl:stylesheet>