Project

Profile

Help

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

he / tools / feature-matrix / feature-matrix-to-html.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

    
9
    <xsl:template match="featureMatrix">
10
        <xsl:processing-instruction name="xml-stylesheet">href="../make-menu.xsl" type="text/xsl"</xsl:processing-instruction>
11
        <xsl:variable name="version" select="@version"/>
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
                <div id="fullpage">
38
                    <h1>Saxon <xsl:value-of select="@version"/> Product comparison (Feature Matrix), Server
39
                        processing</h1>
40
                    <xsl:if test="@version ge '9.6'">
41
                        <p>
42
                            <i>For features in version 9.5 products, see the <a class="bodylink"
43
                                    href="feature-matrix-9-5.xml">Saxon 9.5 Feature Matrix</a>.</i>
44
                        </p>
45
                    </xsl:if>
46
                    <xsl:variable name="terms">
47
                        <xsl:choose>
48
                            <xsl:when test="./@version eq '9.5'">Basic, Adv (Advanced), SA (Schema
49
                                Aware)</xsl:when>
50
                            <xsl:otherwise>Basic, Adv (Advanced), Strm (Streaming), HOF
51
                                (Higher-Order Functions), SA (Schema Aware)</xsl:otherwise>
52
                        </xsl:choose>
53
                    </xsl:variable>
54
                    <p>The table below lists product features and indicates which features are
55
                        present in which product package. This may simply be indicated with a tick
56
                        or check-mark, or alternatively abbreviations are used to describe the level
57
                        of support for the feature. The terms used are: <xsl:value-of
58
                            select="$terms"/>.</p>
59
                    <p>The product packages referred to are:</p>
60
                    <ul>
61
                        <li><b>HE: </b>Saxon Home Edition (open source)</li>
62
                        <li><b>PE: </b>Saxon Professional Edition</li>
63
                        <li><b>EE: </b>Saxon Enterprise Edition</li>
64
                        <li><b>EE-T: </b>Saxon Enterprise Edition, Transformation package 
65
                            (restricted license allowing XSLT
66
                            and Schema processing only)</li>
67
                        <li><b>EE-Q: </b>Saxon Enterprise Edition, Query package
68
                            (restricted license allowing
69
                            XQuery and Schema processing only)</li>
70
                        <li><b>EE-V: </b>Saxon Enterprise Edition, Validation package
71
                            (restricted license allowing
72
                            Schema processing only)</li>
73
                    </ul>
74
                    <table class="feature-matrix">
75
                        <thead>
76
                            <tr>
77
                                <th>HE</th>
78
                                <th>PE</th>
79
                                <th>EE</th>
80
                                <th>EE-T</th>
81
                                <th>EE-Q</th>
82
                                <th>EE-V</th>
83
                                <th>Feature &amp; Description; link to documentation for more details</th>
84
                            </tr>
85
                        </thead>
86
                        <tbody>
87
                            <xsl:for-each select="feature">
88
                                <xsl:choose>
89
                                    <xsl:when test="./@class = 'heading'">
90
                                        <tr class="feature-heading">
91
                                            <td colspan="7" style="text-align:left;">
92
                                                <p>
93
                                                  <b>
94
                                                  <xsl:value-of select="shortName"/>
95
                                                  </b>
96
                                                </p>
97
                                            </td>
98
                                        </tr>
99
                                    </xsl:when>
100
                                    <xsl:otherwise>
101
                                        <tr>
102
                                            <td>
103
                                                <p>
104
                                                  <xsl:sequence
105
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'HE'])"/>
106
                                                </p>
107
                                            </td>
108
                                            <td>
109
                                                <p>
110
                                                  <xsl:sequence
111
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'PE'])"/>
112
                                                </p>
113
                                            </td>
114
                                            <td>
115
                                                <p>
116
                                                  <xsl:sequence
117
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'EE'])"/>
118
                                                </p>
119
                                            </td>
120
                                            <td>
121
                                                <p>
122
                                                  <xsl:sequence
123
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'EE-T'])"/>
124
                                                </p>
125
                                            </td>
126
                                            <td>
127
                                                <p>
128
                                                  <xsl:sequence
129
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'EE-Q'])"/>
130
                                                </p>
131
                                            </td>
132
                                            <td>
133
                                                <p>
134
                                                  <xsl:sequence
135
                                                      select="f:tick(products/product[tokenize(@editions, '\s') = 'EE-V'])"/>
136
                                                </p>
137
                                            </td>
138
                                            <td class="feature-description">
139
                                                <table class="feature-title-details-link">
140
                                                  <tr>
141
                                                  <td style="text-align:left">
142
                                                  <b>
143
                                                  <xsl:value-of select="shortName"/>
144
                                                  <xsl:if test="ends-with(shortName, '3.0')"
145
                                                  >*</xsl:if>
146
                                                  </b>
147
                                                      <xsl:if test="spec">
148
                                                          <i><xsl:value-of select="concat(' (', spec/@level, ', ', spec/@date, ')')"/></i>
149
                                                      </xsl:if>                                                  
150
                                                  </td>
151
                                                  <xsl:if test="details">
152
                                                  <td style="text-align:right">
153
                                                  <p><xsl:for-each
154
                                                  select="details">
155
                                                  <a
156
                                                  href="{concat('../', $documentation-version, '/#!', @link)}"
157
                                                  class="bodylink {@subpages}">
158
                                                  <xsl:value-of select="@name"/>
159
                                                  </a>
160
                                                  <xsl:if test="not(position()=last())">
161
                                                  <xsl:text>, </xsl:text>
162
                                                  </xsl:if>
163
                                                  </xsl:for-each>
164
                                                  </p>
165
                                                  </td>
166
                                                  </xsl:if>
167
                                                  </tr>
168
                                                </table>
169
                                                <xsl:copy-of select="description/*"/>
170
                                            </td>
171
                                        </tr>
172
                                    </xsl:otherwise>
173
                                </xsl:choose>
174
                            </xsl:for-each>
175
                        </tbody>
176
                        <tfoot>
177
                            <tr>
178
                                <th>HE</th>
179
                                <th>PE</th>
180
                                <th>EE</th>
181
                                <th>EE-T</th>
182
                                <th>EE-Q</th>
183
                                <th>EE-V</th>
184
                                <th/>
185
                            </tr>
186
                        </tfoot>
187
                    </table>
188
                    <p>* <i> NB: W3C specification version 3.0 was formerly known as version
189
                        2.1</i></p>
190
                </div>
191
            </body>
192
        </html>
193
    </xsl:template>
194

    
195
    <xsl:function name="f:tick">
196
        <xsl:param name="node" as="node()?"/>
197
        <xsl:choose>
198
            <xsl:when test="exists($node)">
199
                <xsl:choose>
200
                    <xsl:when test="$node/@level eq 'Inc'">
201
                        <img border="0" src="../img/tick-dark-blue-white-bkgd.png" width="25px"/>
202
                    </xsl:when>
203
                    <xsl:when test="$node/@level eq 'Open'">
204
                        <xsl:value-of select="'&#xa0;'"/>
205
                    </xsl:when>
206
                    <xsl:when test="exists($node/@level)">
207
                        <xsl:value-of select="$node/@level"/>
208
                    </xsl:when>
209
                    <xsl:otherwise>
210
                        <img border="0" src="../img/tick-dark-blue-white-bkgd.png" width="25px"/>
211
                    </xsl:otherwise>
212
                </xsl:choose>
213
            </xsl:when>
214
            <xsl:otherwise>
215
                <xsl:value-of select="'&#xa0;'"/>
216
            </xsl:otherwise>
217
        </xsl:choose>
218
    </xsl:function>
219

    
220
</xsl:stylesheet>
(1-1/3)