File: modules-web.xsl

package info (click to toggle)
gwyddion 2.62-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 51,952 kB
  • sloc: ansic: 398,486; python: 7,877; sh: 5,492; makefile: 4,723; xml: 3,883; cpp: 1,969; pascal: 418; perl: 154; ruby: 130
file content (141 lines) | stat: -rw-r--r-- 5,450 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
  encoding="utf-8"
  omit-xml-declaration="yes"/>

<xsl:template match="modulelist">
  <table class="modulelist">
    <thead>
      <tr>
        <th>
          <xsl:choose>
            <xsl:when test="$lang = 'en'">Name</xsl:when>
            <xsl:when test="$lang = 'fr'">Nom</xsl:when>
            <xsl:when test="$lang = 'ru'">Имя</xsl:when>
            <xsl:otherwise>Name</xsl:otherwise>
          </xsl:choose>
        </th>
        <th>
          <xsl:choose>
            <xsl:when test="$lang = 'en'">Version</xsl:when>
            <xsl:when test="$lang = 'fr'">Version</xsl:when>
            <xsl:when test="$lang = 'ru'">Версия</xsl:when>
            <xsl:otherwise>Version</xsl:otherwise>
          </xsl:choose>
        </th>
        <th>
          <xsl:choose>
            <xsl:when test="$lang = 'en'">Authors</xsl:when>
            <xsl:when test="$lang = 'fr'">Auteurs</xsl:when>
            <xsl:when test="$lang = 'ru'">Авторы</xsl:when>
            <xsl:otherwise>Authors</xsl:otherwise>
          </xsl:choose>
        </th>
      </tr>
    </thead>
    <tbody>
    <xsl:for-each select="module">
      <tr>
        <td>
          <div>
            <p>
              <b>
                <xsl:choose>
                  <xsl:when test="$lang = 'en'">Module</xsl:when>
                  <xsl:when test="$lang = 'fr'">Module</xsl:when>
                  <xsl:when test="$lang = 'ru'">Модуль</xsl:when>
                  <xsl:otherwise>Module</xsl:otherwise>
                </xsl:choose>
                <xsl:text>:&#32;</xsl:text>
              </b>
              <xsl:value-of select="name"/>-<xsl:value-of select="version"/>
              <br/>
              <xsl:text>© </xsl:text>
              <xsl:value-of select="copyright"/>
              <xsl:text> </xsl:text>
              <xsl:value-of select="date"/>
            </p>
            <p><b>
              <xsl:choose>
                <xsl:when test="$lang = 'en'">Description</xsl:when>
                <xsl:when test="$lang = 'fr'">Description</xsl:when>
                <xsl:when test="$lang = 'ru'">Описание</xsl:when>
                <xsl:otherwise>Description</xsl:otherwise>
              </xsl:choose>
              <xsl:text>:&#32;</xsl:text>
            </b><xsl:value-of select="description"/></p>
            <xsl:if test="count(child::funclist/func) > 0">
              <table>
                <thead>
                  <tr><th colspan="3">
                   <xsl:choose>
                     <xsl:when test="$lang = 'en'">Functions</xsl:when>
                     <xsl:when test="$lang = 'fr'">Fonctions</xsl:when>
                     <xsl:when test="$lang = 'ru'">Функции</xsl:when>
                     <xsl:otherwise>Functions</xsl:otherwise>
                   </xsl:choose>
                   <xsl:text>:</xsl:text>
                  </th></tr>
                  <tr>
                    <th>
                       <xsl:choose>
                         <xsl:when test="$lang = 'en'">Type</xsl:when>
                         <xsl:when test="$lang = 'fr'">Type</xsl:when>
                         <xsl:when test="$lang = 'ru'">Тип</xsl:when>
                         <xsl:otherwise>Type</xsl:otherwise>
                       </xsl:choose>
                    </th>
                    <th>
                       <xsl:choose>
                         <xsl:when test="$lang = 'en'">Name</xsl:when>
                         <xsl:when test="$lang = 'fr'">Nom</xsl:when>
                         <xsl:when test="$lang = 'ru'">Имя</xsl:when>
                         <xsl:otherwise>Name</xsl:otherwise>
                       </xsl:choose>
                    </th>
                    <th>
                       <xsl:choose>
                         <xsl:when test="$lang = 'en'">Information</xsl:when>
                         <xsl:when test="$lang = 'fr'">Information</xsl:when>
                         <xsl:when test="$lang = 'ru'">Информация</xsl:when>
                         <xsl:otherwise>Information</xsl:otherwise>
                       </xsl:choose>
                    </th>
                  </tr>
                </thead>
                <tbody>
                <xsl:for-each select="funclist/func">
                  <tr>
                    <td><xsl:value-of select="class"/></td>
                    <td><xsl:value-of select="name"/></td>
                    <td><xsl:value-of select="info"/></td>
                  </tr>
                </xsl:for-each>
                </tbody>
              </table>
            </xsl:if>
          </div>
          <p>
            <xsl:choose>
              <xsl:when test="count(child::userguide) > 0">
                <a><xsl:attribute name="href">/documentation/user-guide-<xsl:value-of select="$lang"/>/<xsl:value-of select="userguide"/></xsl:attribute>
                  <xsl:value-of select="name"/>
                </a>
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="name"/>
              </xsl:otherwise>
            </xsl:choose>
          </p>
        </td>
        <td><xsl:value-of select="version"/></td>
        <td><xsl:value-of select="author"/></td>
      </tr>
    </xsl:for-each>
    </tbody>
  </table>
</xsl:template>

</xsl:stylesheet>