-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.xslt
48 lines (40 loc) · 1.46 KB
/
configure.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
47
48
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="source_pwd"></xsl:param>
<xsl:param name="hostname"></xsl:param>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="icecast/security/changeowner/user/text()">icecast</xsl:template>
<xsl:template match="icecast/security/changeowner/group/text()">icecast</xsl:template>
<xsl:template match="icecast/paths/logdir/text()">/icecast/log</xsl:template>
<xsl:template match="icecast/paths/webroot/text()">/icecast/web</xsl:template>
<xsl:template match="icecast/paths/adminroot/text()">/icecast/admin</xsl:template>
<xsl:template match="icecast/authentication/source-password/text()">
<xsl:choose>
<xsl:when test="$source_pwd">
<xsl:value-of select="$source_pwd"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="icecast/hostname/text()">
<xsl:choose>
<xsl:when test="$hostname">
<xsl:value-of select="$hostname"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>