-
Notifications
You must be signed in to change notification settings - Fork 1
/
set_service_suspendOnFault.xsl
36 lines (30 loc) · 1.16 KB
/
set_service_suspendOnFault.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
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sfd="http://schemas.active-endpoints.com/appmodules/screenflow/2010/10/avosScreenflow.xsd"
version="2.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<!-- Tracing suspend on can be true/false
-->
<xsl:param name="suspendOnFault">true</xsl:param>
<!-- General template copies all xml nodes -->
<xsl:template match="@*|node()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="sfd:deployment/@suspendOnFault">
<xsl:attribute name="suspendOnFault">
<xsl:value-of select="$suspendOnFault"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="sfd:deployment[not(@suspendOnFault)]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="suspendOnFault">
<xsl:value-of select="$suspendOnFault"/>
</xsl:attribute>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>