~singpolyma/asterisk

asterisk/doc/appdocsxml.xslt -rw-r--r-- 6.8 KiB
51af79b4Christopher Vollick Content Created By Initiator 2: Electric Boogaloo 2 months ago
                                                                                
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<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="pNewType" select="'myNewType'"/>

    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:for-each select="node()|@*">
                <xsl:sort select="@tech"/>
                <xsl:apply-templates select="."/>
            </xsl:for-each>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="configOptionToEnum">
        <xsl:for-each select="configOption">
            <xsl:element name="enum">
                <xsl:attribute name="name">
                    <xsl:value-of select="@name"/>
                </xsl:attribute>
                <xsl:element name="para">
                    <xsl:value-of select="synopsis"/>
                </xsl:element>
            </xsl:element>
        </xsl:for-each>
    </xsl:template>

    <xsl:template match="channel_snapshot">
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Channel')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'ChannelState')"/>
            </xsl:attribute>
            <para>A numeric code for the channel's current state, related to <xsl:value-of select="concat(@prefix,'ChannelStateDesc')"/></para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'ChannelStateDesc')"/>
            </xsl:attribute>
            <enumlist>
                <enum name="Down"/>
                <enum name="Rsrvd"/>
                <enum name="OffHook"/>
                <enum name="Dialing"/>
                <enum name="Ring"/>
                <enum name="Ringing"/>
                <enum name="Up"/>
                <enum name="Busy"/>
                <enum name="Dialing Offhook"/>
                <enum name="Pre-ring"/>
                <enum name="Unknown"/>
            </enumlist>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'CallerIDNum')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'CallerIDName')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'ConnectedLineNum')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'ConnectedLineName')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Language')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'AccountCode')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Context')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Exten')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Priority')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Uniqueid')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'Linkedid')"/>
            </xsl:attribute>
            <para>Uniqueid of the oldest channel associated with this channel.</para>
        </xsl:element>
    </xsl:template>

    <xsl:template match="bridge_snapshot">
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'BridgeUniqueid')"/>
            </xsl:attribute>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'BridgeType')"/>
            </xsl:attribute>
            <para>The type of bridge</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'BridgeTechnology')"/>
            </xsl:attribute>
            <para>Technology in use by the bridge</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix, 'BridgeCreator')"/>
            </xsl:attribute>
            <para>Entity that created the bridge if applicable</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix, 'BridgeName')"/>
            </xsl:attribute>
            <para>Name used to refer to the bridge by its BridgeCreator if applicable</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix,'BridgeNumChannels')"/>
            </xsl:attribute>
            <para>Number of channels in the bridge</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix, 'BridgeVideoSourceMode')" />
            </xsl:attribute>
            <enumlist>
                <enum name="none"/>
                <enum name="talker"/>
                <enum name="single"/>
            </enumlist>
            <para>The video source mode for the bridge.</para>
        </xsl:element>
        <xsl:element name="parameter">
            <xsl:attribute name="required">
                false
            </xsl:attribute>
            <xsl:attribute name="name">
                <xsl:value-of select="concat(@prefix, 'BridgeVideoSource')" />
            </xsl:attribute>
            <para>If there is a video source for the bridge, the unique ID of the channel that is the video source.</para>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>