Project

Profile

Help

How to connect?
Download (20.9 KB) Statistics
| Branch: | Tag: | Revision:

he / tools / feature-matrix / feature-matrix-to-overview-chart.xsl @ 01d6fdb6

1
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="http://local-functions/"
3
    exclude-result-prefixes="xs f" version="2.0">
4

    
5
    <xsl:output method="xhtml" indent="yes"/>
6
    
7
    <xsl:param name="major-version"/>
8
    <xsl:variable name="version" select="featureMatrix/@version"/>
9

    
10
    <xsl:template match="featureMatrix">
11
        <xsl:processing-instruction name="xml-stylesheet">href="../make-menu.xsl" type="text/xsl"</xsl:processing-instruction>
12
        <xsl:variable name="documentation-version">
13
            <xsl:choose>
14
                <xsl:when test="$version = $major-version">                    
15
                    <xsl:value-of select="'documentation'"/>
16
                </xsl:when>
17
                <xsl:otherwise>
18
                    <xsl:value-of select="concat('documentation',$version)"/>
19
                </xsl:otherwise>
20
            </xsl:choose>
21
        </xsl:variable>
22
        <xsl:variable name="page" select="concat('feature-matrix-',replace($version,'\.','-'))"/>
23
        <html>
24
            <head>
25
                <xsl:choose>
26
                    <xsl:when test="$version = $major-version">
27
                        <this-is section="products" page="{$page}" subpage=""/>                        
28
                    </xsl:when>
29
                    <xsl:otherwise>
30
                        <this-is section="products" page="{concat('feature-matrix-',replace($major-version,'\.','-'))}" subpage="{$page}"/>
31
                    </xsl:otherwise>
32
                </xsl:choose>
33
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
34
                <title>Saxonica: Saxon Product/Feature Matrix</title>
35
            </head>
36
            <body class="main">
37
                <h1>Saxon <xsl:value-of select="$version"/> product comparison (Feature Matrix)</h1>
38
                <xsl:if test="number($version) ge 10">
39
                    <p>
40
                        <i>For features in version 9.9 products, see the <a class="bodylink"
41
                            href="feature-matrix-9-9.xml">Saxon 9.9 Feature Matrix</a>.</i>
42
                    </p>
43
                </xsl:if>
44
                <xsl:if test="number($version) ge 9.9">
45
                    <p>
46
                        <i>For features in version 9.8 products, see the <a class="bodylink"
47
                            href="feature-matrix-9-8.xml">Saxon 9.8 Feature Matrix</a>.</i>
48
                    </p>
49
                </xsl:if>
50
                <xsl:if test="number($version) ge 9.8">
51
                    <p>
52
                        <i>For features in version 9.7 products, see the <a class="bodylink"
53
                            href="feature-matrix-9-7.xml">Saxon 9.7 Feature Matrix</a>.</i>
54
                    </p>
55
                </xsl:if>
56
                <xsl:if test="number($version) ge 9.7">
57
                    <p>
58
                        <i>For features in version 9.6 products, see the <a class="bodylink"
59
                            href="feature-matrix-9-6.xml">Saxon 9.6 Feature Matrix</a>.</i>
60
                    </p>
61
                </xsl:if>
62
                    <p>The table below lists product features and indicates which features are
63
                        present in which product package.</p>
64
                    <table class="feature-matrix" id="overview">
65
                        <xsl:if test="number($version) le 9.7">
66
                        <thead>
67
                            <tr class="feature-heading">
68
                                <td style="text-align:left;">
69
                                    <xsl:value-of select="'Language Support'"/> 
70
                                </td>
71
                                <td>HE</td>
72
                                <td>PE</td>
73
                                <td>EE</td>
74
                                <td>EE&#8209;T</td>
75
                                <td>EE&#8209;Q</td>
76
                                <td>EE&#8209;V</td>
77
                                <xsl:if test="number($version) ge 9.8 and number($version) lt 10">
78
                                    <td>JS</td>
79
                                </xsl:if>
80
                                <xsl:if test="number($version) ge 10">
81
                                    <td>JS2</td>
82
                                </xsl:if>
83
                            </tr>
84
                        </thead>
85
                        </xsl:if>
86
                        <tbody>
87
                            <xsl:for-each select="feature">
88
                                <xsl:variable name="feature-desc" select="description"/>
89
                                <xsl:choose>
90
                                    <xsl:when test="./@class = 'heading'">
91
                                        <tr class="feature-heading">
92
                                            <td style="text-align:left;">
93
                                                <xsl:value-of select="shortName"/> 
94
                                            </td>
95
                                            <td>HE</td>
96
                                            <td>PE</td>
97
                                            <td>EE</td>
98
                                            <td>EE&#8209;T</td>
99
                                            <td>EE&#8209;Q</td>
100
                                            <td>EE&#8209;V</td>
101
                                            <xsl:if test="number($version) ge 9.8 and number($version) lt 10">
102
                                                <td>JS</td>
103
                                            </xsl:if>
104
                                            <xsl:if test="number($version) ge 10">
105
                                                <td>JS2</td>
106
                                            </xsl:if>
107
                                        </tr>
108
                                    </xsl:when>
109
                                    <xsl:otherwise>
110
                                        <xsl:variable name="topic-shortName" select="shortName"/>
111
                                        <xsl:variable name="details" select="details"/>
112
                                        <xsl:variable name="spec" select="spec"/>
113
                                        <xsl:for-each select="products/product[@editions and (not(exists(@level)) or @level ne 'Open')]">
114
                                            <xsl:variable name="editions" as="xs:string*">
115
                                                <xsl:choose>
116
                                                    <xsl:when test="exists(@level)">
117
                                                        <xsl:variable name="level" as="xs:string" select="tokenize(@level, '\s')[position() = last()]"/>                                                        
118
                                                        <xsl:for-each select="ancestor::products/product[$level = tokenize(@level, '\s')]">
119
                                                            <xsl:sequence select="tokenize(@editions, '\s')"/>
120
                                                        </xsl:for-each>
121
                                                    </xsl:when>
122
                                                    <xsl:otherwise>
123
                                                        <xsl:sequence select="tokenize(@editions, '\s')"/>
124
                                                    </xsl:otherwise>
125
                                                </xsl:choose>
126
                                            </xsl:variable>
127
                                        <tr>
128
                                            <td class="topic">
129
                                                <xsl:variable name="feature-with-level" as="xs:string" 
130
                                                    select="concat($topic-shortName, if (exists(@level) and @level ne 'Inc') then concat(' (',f:prod-desc-level(@level),')') else '')"/>
131
                                                <div class="{if (number($version) ge 9.8) then 'popup2' else 'popup'}"> 
132
                                                    <xsl:value-of select="$feature-with-level"/>  
133
                                                    <span>
134
                                                        <h2><xsl:value-of select="$feature-with-level"/></h2>
135
                                                        <xsl:choose>
136
                                                            <xsl:when test="exists(./*)">
137
                                                                <xsl:copy-of select="./*"/>
138
                                                            </xsl:when>
139
                                                            <xsl:otherwise>
140
                                                                <xsl:copy-of select="$feature-desc/*"/>
141
                                                            </xsl:otherwise>
142
                                                        </xsl:choose>
143
                                                        <xsl:if test="exists($details)">
144
                                                            <p>
145
                                                                <xsl:text>Further info: </xsl:text>
146
                                                                <xsl:for-each
147
                                                                    select="$details">
148
                                                                    <a
149
                                                                        href="{concat('../', $documentation-version, '/#!', @link)}"
150
                                                                        class="bodylink {@subpages}">
151
                                                                        <xsl:value-of select="@name"/>
152
                                                                    </a>
153
                                                                    <xsl:if test="not(position()=last())">
154
                                                                        <xsl:text>, </xsl:text>
155
                                                                    </xsl:if>
156
                                                                </xsl:for-each>
157
                                                            </p>
158
                                                        </xsl:if> 
159
                                                        <xsl:if test="exists($spec)">
160
                                                            <p><a href="{$spec/@link}" target="_blank">
161
                                                                <i><xsl:value-of
162
                                                                    select="concat(($spec/@name, $topic-shortName)[1],
163
                                                                    ' ', $spec/@level, ' (', $spec/@date, ')')"/></i>
164
                                                            </a>
165
                                                            </p>                                                               
166
                                                        </xsl:if>
167
                                                    </span>                                                    
168
                                                </div>                                                
169
                                            </td>
170
                                            <td>
171
                                                <p>                                                    
172
                                                  <xsl:sequence select="f:dot($editions,'HE')"/>
173
                                                </p>
174
                                            </td>
175
                                            <td>
176
                                                <p>
177
                                                    <xsl:sequence select="f:dot($editions,'PE')"/>
178
                                                </p>
179
                                            </td>
180
                                            <td>
181
                                                <p>
182
                                                    <xsl:sequence select="f:dot($editions,'EE')"/>
183
                                                </p>
184
                                            </td>
185
                                            <td>
186
                                                <p>
187
                                                    <xsl:sequence select="f:dot($editions,'EE-T')"/>
188
                                                </p>
189
                                            </td>
190
                                            <td>
191
                                                <p>
192
                                                    <xsl:sequence select="f:dot($editions,'EE-Q')"/>
193
                                                </p>
194
                                            </td>
195
                                            <td>
196
                                                <p>
197
                                                    <xsl:sequence select="f:dot($editions,'EE-V')"/>
198
                                                </p>
199
                                            </td>
200
                                            <xsl:if test="number($version) ge 9.8 and number($version) lt 10">
201
                                                <td>
202
                                                    <p>
203
                                                        <xsl:sequence select="f:dot($editions,'JS')"/>
204
                                                    </p>
205
                                                </td>
206
                                            </xsl:if>
207
                                            <xsl:if test="number($version) ge 10">
208
                                                <td>
209
                                                    <p>
210
                                                        <xsl:sequence select="f:dot($editions,'JS2')"/>
211
                                                    </p>
212
                                                </td>
213
                                            </xsl:if>
214
                                        </tr>
215
                                        </xsl:for-each>
216
                                    </xsl:otherwise>
217
                                </xsl:choose>
218
                            </xsl:for-each>
219
                        </tbody>
220
                    </table>
221
                
222
                <xsl:call-template name="aside"/>
223
                
224
                    
225
                    
226
            </body>
227
        </html>
228
    </xsl:template>
229
    
230
    <xsl:template name="aside">
231
        <div id="aside">
232
            <xsl:choose>
233
                <xsl:when test="$version = ('9.6', '9.7', '9.8', '9.9', '10')">
234
                    <h2>View the full product descriptions</h2>
235
                    <ul>
236
                        <li><a class="title" target="_blank"
237
                            href="http://www.saxonica.com/products/PD{$version}/HE.pdf">
238
                            <b>HE: </b>Saxon Home Edition (open source)</a></li>
239
                        <li><a class="title" target="_blank" href="http://www.saxonica.com/products/PD{$version}/PE.pdf">
240
                            <b>PE: </b>Saxon Professional Edition</a></li>
241
                        <li><a class="title" target="_blank" href="http://www.saxonica.com/products/PD{$version}/EE.pdf">
242
                            <b>EE: </b>Saxon Enterprise Edition</a></li>
243
                        <li><a class="title" target="_blank" href="http://www.saxonica.com/products/PD{$version}/EE-T.pdf">
244
                            <b>EE-T: </b>Saxon Enterprise Edition, Transformation package 
245
                            (restricted license allowing XSLT
246
                            and Schema processing only)</a></li>
247
                        <li><a class="title" target="_blank" href="http://www.saxonica.com/products/PD{$version}/EE-Q.pdf">
248
                            <b>EE-Q: </b>Saxon Enterprise Edition, Query package
249
                            (restricted license allowing
250
                            XQuery and Schema processing only)</a></li>
251
                        <li><a class="title" target="_blank" href="http://www.saxonica.com/products/PD{$version}/EE-V.pdf">
252
                            <b>EE-V: </b>Saxon Enterprise Edition, Validation package
253
                            (restricted license allowing
254
                            Schema processing only)</a></li>
255
                        <xsl:if test="number($version) ge 9.8 and number($version) lt 10">
256
                            <li><a class="title" href="../saxon-js/archive.xml"><b>JS: </b>Saxon-JS, JavaScript run-time</a></li>
257
                        </xsl:if>
258
                        <xsl:if test="number($version) ge 10">
259
                            <li><a class="title" href="../saxon-js/index.xml"><b>JS2: </b>Saxon-JS 2, JavaScript processor</a></li>
260
                        </xsl:if>
261
                    </ul>
262
                </xsl:when>
263
                <xsl:otherwise>
264
                    <h2>Product packages</h2>
265
                    <ul>
266
                        <li>
267
                            <b>HE: </b>Saxon Home Edition (open source)</li>
268
                        <li>
269
                            <b>PE: </b>Saxon Professional Edition</li>
270
                        <li>
271
                            <b>EE: </b>Saxon Enterprise Edition</li>
272
                        <li>
273
                            <b>EE-T: </b>Saxon Enterprise Edition, Transformation package 
274
                            (restricted license allowing XSLT
275
                            and Schema processing only)</li>
276
                        <li>
277
                            <b>EE-Q: </b>Saxon Enterprise Edition, Query package
278
                            (restricted license allowing
279
                            XQuery and Schema processing only)</li>
280
                        <li>
281
                            <b>EE-V: </b>Saxon Enterprise Edition, Validation package
282
                            (restricted license allowing
283
                            Schema processing only)</li>
284
                        <xsl:if test="number($version) ge 9.8 and number($version) lt 10">
285
                            <li>
286
                                <b>JS: </b>Saxon-JS, JavaScript run-time</li>
287
                        </xsl:if>
288
                        <xsl:if test="number($version) ge 10">
289
                            <li>
290
                                <b>JS2: </b>Saxon-JS 2, JavaScript processor</li>
291
                        </xsl:if>
292
                    </ul>
293
                </xsl:otherwise>
294
            </xsl:choose>
295
        </div>
296
    </xsl:template>
297
    
298
    <xsl:function name="f:dot">
299
        <xsl:param name="editions" as="xs:string*"/>
300
        <xsl:param name="product" as="xs:string"/>
301
        <xsl:choose>
302
            <xsl:when test="$product = $editions">                
303
                <xsl:value-of select="'&#x25cf;'"/> <!-- &#8729; bullet operator. &#x25cf; black circle-->
304
                <!--<img border="0" src="../img/tick-dark-blue-white-bkgd.png" width="25px"/>-->                
305
            </xsl:when>            
306
            <xsl:otherwise>
307
                <xsl:value-of select="'&#xa0;'"/>
308
            </xsl:otherwise>
309
        </xsl:choose>
310
    </xsl:function>
311

    
312
    <xsl:function name="f:tick">
313
        <xsl:param name="node" as="node()?"/>
314
        <xsl:choose>
315
            <xsl:when test="exists($node)">
316
                <xsl:choose>
317
                    <xsl:when test="$node/@level eq 'Inc'">
318
                        <img border="0" src="../img/tick-dark-blue-white-bkgd.png" width="25px"/>
319
                    </xsl:when>
320
                    <xsl:when test="$node/@level eq 'Open'">
321
                        <xsl:value-of select="'&#xa0;'"/>
322
                    </xsl:when>
323
                    <xsl:when test="exists($node/@level)">
324
                        <xsl:value-of select="$node/@level"/>
325
                    </xsl:when>
326
                    <xsl:otherwise>
327
                        <img border="0" src="../img/tick-dark-blue-white-bkgd.png" width="25px"/>
328
                    </xsl:otherwise>
329
                </xsl:choose>
330
            </xsl:when>
331
            <xsl:otherwise>
332
                <xsl:value-of select="'&#xa0;'"/>
333
            </xsl:otherwise>
334
        </xsl:choose>
335
    </xsl:function>
336
    
337
    <xsl:function name="f:prod-desc-level" as="xs:string">
338
        <xsl:param name="level" as="xs:string?"/>
339
        <xsl:choose>
340
            <xsl:when test="contains($level, 'Adv')">Advanced</xsl:when>
341
            <xsl:when test="contains($level, 'SA') and contains($level, 'Strm')">Schema Aware &amp; Streaming</xsl:when>
342
            <xsl:when test="contains($level, 'SA')">Schema Aware</xsl:when>
343
            <xsl:when test="contains($level, 'HOF')">Higher-Order Functions</xsl:when>
344
            <xsl:when test="contains($level, 'Basic')">Basic</xsl:when>
345
            <xsl:when test="contains($level, 'Open')">not included, but open source</xsl:when>
346
            <xsl:when test="contains($level, 'Inc')">Included</xsl:when>
347
            <xsl:otherwise>
348
                <xsl:value-of select="'&#xa0;'"/>
349
            </xsl:otherwise>
350
        </xsl:choose>
351
    </xsl:function>
352

    
353
</xsl:stylesheet>
(2-2/3)