-
Notifications
You must be signed in to change notification settings - Fork 1
/
genInstallUISeq.xsl
32 lines (32 loc) · 1.04 KB
/
genInstallUISeq.xsl
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
<?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" indent="yes" />
<xsl:template match="/msi/table[@name='InstallUISequence']">
<UI>
<InstallUISequence>
<xsl:for-each select="row">
<xsl:choose>
<!--NON CUSTOM ACTIONS HAVE COMMENTS COLUMN-->
<xsl:when test="td[4] != ''">
<xsl:element name="{td[1]}">
<xsl:attribute name="Sequence">
<xsl:value-of select="td[3]"/>
</xsl:attribute>
</xsl:element>
</xsl:when>
<!--CUSTOM ACTIONS-->
<xsl:otherwise>
<Custom>
<xsl:attribute name="Action">
<xsl:value-of select="td[1]" />
</xsl:attribute>
<xsl:attribute name="Sequence">
<xsl:value-of select="td[3]"/>
</xsl:attribute><xsl:if test="td[2] != ''"><![CDATA[<![CDATA[]]><xsl:value-of select="td[2]"/><![CDATA[]]]]><![CDATA[>]]></xsl:if></Custom>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</InstallUISequence>
</UI>
</xsl:template>
</xsl:stylesheet>