1 | <?xml version="1.0"?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1">
|
---|
3 |
|
---|
4 | <!-- stuff specified to comments authored in DDUEXML -->
|
---|
5 |
|
---|
6 |
|
---|
7 | <xsl:include href="htmlBody.xsl"/>
|
---|
8 | <xsl:include href="utilities_reference.xsl" />
|
---|
9 |
|
---|
10 | <xsl:variable name="summary" select="normalize-space(/document/comments/summary)" />
|
---|
11 | <xsl:variable name="abstractSummary" select="/document/comments/summary" />
|
---|
12 | <xsl:variable name="hasSeeAlsoSection" select="boolean((count(/document/comments//seealso | /document/reference/elements/element/overloads//seealso) > 0) or
|
---|
13 | ($group='type' or $group='member' or $group='list'))"/>
|
---|
14 | <xsl:variable name="examplesSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)"/>
|
---|
15 | <xsl:variable name="languageFilterSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)" />
|
---|
16 |
|
---|
17 | <xsl:template name="body">
|
---|
18 |
|
---|
19 | <!-- auto-inserted info -->
|
---|
20 | <!-- <xsl:apply-templates select="/document/reference/attributes" /> -->
|
---|
21 | <xsl:apply-templates select="/document/comments/preliminary" />
|
---|
22 | <xsl:apply-templates select="/document/comments/summary" />
|
---|
23 | <xsl:if test="$subgroup='overload'">
|
---|
24 | <xsl:apply-templates select="/document/reference/elements" mode="overloadSummary" />
|
---|
25 | </xsl:if>
|
---|
26 | <!-- assembly information -->
|
---|
27 | <xsl:if test="not($group='list' or $group='root' or $group='namespace')">
|
---|
28 | <xsl:call-template name="requirementsInfo"/>
|
---|
29 | </xsl:if>
|
---|
30 | <!-- syntax -->
|
---|
31 | <xsl:if test="not($group='list' or $group='namespace')">
|
---|
32 | <xsl:apply-templates select="/document/syntax" />
|
---|
33 | </xsl:if>
|
---|
34 |
|
---|
35 | <!-- members -->
|
---|
36 | <xsl:choose>
|
---|
37 | <xsl:when test="$group='root'">
|
---|
38 | <xsl:apply-templates select="/document/reference/elements" mode="root" />
|
---|
39 | </xsl:when>
|
---|
40 | <xsl:when test="$group='namespace'">
|
---|
41 | <xsl:apply-templates select="/document/reference/elements" mode="namespace" />
|
---|
42 | </xsl:when>
|
---|
43 | <xsl:when test="$subgroup='enumeration'">
|
---|
44 | <xsl:apply-templates select="/document/reference/elements" mode="enumeration" />
|
---|
45 | </xsl:when>
|
---|
46 | <xsl:when test="$group='type'">
|
---|
47 | <xsl:apply-templates select="/document/reference/elements" mode="type" />
|
---|
48 | </xsl:when>
|
---|
49 | <xsl:when test="$group='list'">
|
---|
50 | <xsl:choose>
|
---|
51 | <xsl:when test="$subgroup='overload'">
|
---|
52 | <xsl:apply-templates select="/document/reference/elements" mode="overload" />
|
---|
53 | </xsl:when>
|
---|
54 | <xsl:when test="$subgroup='DerivedTypeList'">
|
---|
55 | <xsl:apply-templates select="/document/reference/elements" mode="derivedType" />
|
---|
56 | </xsl:when>
|
---|
57 | <xsl:otherwise>
|
---|
58 | <xsl:apply-templates select="/document/reference/elements" mode="member" />
|
---|
59 | </xsl:otherwise>
|
---|
60 | </xsl:choose>
|
---|
61 | </xsl:when>
|
---|
62 | </xsl:choose>
|
---|
63 | <!-- remarks -->
|
---|
64 | <xsl:apply-templates select="/document/comments/remarks" />
|
---|
65 | <!-- example -->
|
---|
66 | <xsl:apply-templates select="/document/comments/example" />
|
---|
67 | <!-- other comment sections -->
|
---|
68 | <!-- permissions -->
|
---|
69 | <xsl:call-template name="permissions" />
|
---|
70 | <!-- exceptions -->
|
---|
71 | <xsl:call-template name="exceptions" />
|
---|
72 | <!-- inheritance -->
|
---|
73 | <xsl:apply-templates select="/document/reference/family" />
|
---|
74 | <xsl:apply-templates select="/document/comments/threadsafety" />
|
---|
75 | <!--versions-->
|
---|
76 | <xsl:if test="not($group='list' or $group='namespace' or $group='root' )">
|
---|
77 | <xsl:apply-templates select="/document/reference/versions" />
|
---|
78 | </xsl:if>
|
---|
79 | <!-- see also -->
|
---|
80 | <xsl:call-template name="seealso" />
|
---|
81 |
|
---|
82 | </xsl:template>
|
---|
83 |
|
---|
84 | <xsl:template name="getParameterDescription">
|
---|
85 | <xsl:param name="name" />
|
---|
86 | <xsl:apply-templates select="/document/comments/param[@name=$name]" />
|
---|
87 | </xsl:template>
|
---|
88 |
|
---|
89 | <xsl:template name="getReturnsDescription">
|
---|
90 | <xsl:param name="name" />
|
---|
91 | <xsl:apply-templates select="/document/comments/param[@name=$name]" />
|
---|
92 | </xsl:template>
|
---|
93 |
|
---|
94 | <xsl:template name="getElementDescription">
|
---|
95 | <xsl:apply-templates select="summary[1]" />
|
---|
96 | </xsl:template>
|
---|
97 |
|
---|
98 | <xsl:template name="getOverloadSummary">
|
---|
99 | <xsl:apply-templates select="overloads" mode="summary"/>
|
---|
100 | </xsl:template>
|
---|
101 |
|
---|
102 | <xsl:template name="getOverloadSections">
|
---|
103 | <xsl:apply-templates select="overloads" mode="sections"/>
|
---|
104 | </xsl:template>
|
---|
105 |
|
---|
106 | <xsl:template name="getInternalOnlyDescription">
|
---|
107 |
|
---|
108 | </xsl:template>
|
---|
109 |
|
---|
110 |
|
---|
111 | <!-- block sections -->
|
---|
112 |
|
---|
113 | <xsl:template match="summary">
|
---|
114 | <div class="summary">
|
---|
115 | <xsl:apply-templates />
|
---|
116 | </div>
|
---|
117 | </xsl:template>
|
---|
118 |
|
---|
119 | <xsl:template match="overloads" mode="summary">
|
---|
120 | <xsl:choose>
|
---|
121 | <xsl:when test="count(summary) > 0">
|
---|
122 | <xsl:apply-templates select="summary" />
|
---|
123 | </xsl:when>
|
---|
124 | <xsl:otherwise>
|
---|
125 | <div class="summary">
|
---|
126 | <xsl:apply-templates/>
|
---|
127 | </div>
|
---|
128 | </xsl:otherwise>
|
---|
129 | </xsl:choose>
|
---|
130 | </xsl:template>
|
---|
131 |
|
---|
132 | <xsl:template match="overloads" mode="sections">
|
---|
133 | <xsl:apply-templates select="remarks" />
|
---|
134 | <xsl:apply-templates select="example"/>
|
---|
135 | </xsl:template>
|
---|
136 |
|
---|
137 | <xsl:template match="value">
|
---|
138 | <xsl:call-template name="subSection">
|
---|
139 | <xsl:with-param name="title">
|
---|
140 | <include item="fieldValueTitle" />
|
---|
141 | </xsl:with-param>
|
---|
142 | <xsl:with-param name="content">
|
---|
143 | <xsl:apply-templates />
|
---|
144 | </xsl:with-param>
|
---|
145 | </xsl:call-template>
|
---|
146 | </xsl:template>
|
---|
147 |
|
---|
148 | <xsl:template match="returns">
|
---|
149 | <xsl:call-template name="subSection">
|
---|
150 | <xsl:with-param name="title">
|
---|
151 | <include item="methodValueTitle" />
|
---|
152 | </xsl:with-param>
|
---|
153 | <xsl:with-param name="content">
|
---|
154 | <xsl:apply-templates />
|
---|
155 | </xsl:with-param>
|
---|
156 | </xsl:call-template>
|
---|
157 | </xsl:template>
|
---|
158 |
|
---|
159 | <xsl:template match="templates">
|
---|
160 | <xsl:call-template name="section">
|
---|
161 | <xsl:with-param name="toggleSwitch" select="'templates'" />
|
---|
162 | <xsl:with-param name="title">
|
---|
163 | <include item="templatesTitle" />
|
---|
164 | </xsl:with-param>
|
---|
165 | <xsl:with-param name="content">
|
---|
166 | <dl>
|
---|
167 | <xsl:for-each select="template">
|
---|
168 | <xsl:variable name="templateName" select="@name" />
|
---|
169 | <dt>
|
---|
170 | <span class="parameter">
|
---|
171 | <xsl:value-of select="$templateName"/>
|
---|
172 | </span>
|
---|
173 | </dt>
|
---|
174 | <dd>
|
---|
175 | <xsl:apply-templates select="/document/comments/typeparam[@name=$templateName]" />
|
---|
176 | </dd>
|
---|
177 | </xsl:for-each>
|
---|
178 | </dl>
|
---|
179 | </xsl:with-param>
|
---|
180 | </xsl:call-template>
|
---|
181 | </xsl:template>
|
---|
182 |
|
---|
183 | <xsl:template match="remarks">
|
---|
184 | <xsl:call-template name="section">
|
---|
185 | <xsl:with-param name="toggleSwitch" select="'remarks'"/>
|
---|
186 | <xsl:with-param name="title"><include item="remarksTitle" /></xsl:with-param>
|
---|
187 | <xsl:with-param name="content"><xsl:apply-templates /></xsl:with-param>
|
---|
188 | </xsl:call-template>
|
---|
189 | </xsl:template>
|
---|
190 |
|
---|
191 | <xsl:template match="example">
|
---|
192 | <xsl:call-template name="section">
|
---|
193 | <xsl:with-param name="toggleSwitch" select="'example'" />
|
---|
194 | <xsl:with-param name="title"><include item="examplesTitle" /></xsl:with-param>
|
---|
195 | <xsl:with-param name="content">
|
---|
196 | <xsl:choose>
|
---|
197 | <xsl:when test="code/@language">
|
---|
198 | <xsl:variable name="codeId" select="generate-id()" />
|
---|
199 | <div name="snippetGroup">
|
---|
200 | <table class="filter">
|
---|
201 | <tr id="curvedTabs_{$codeId}">
|
---|
202 | <xsl:for-each select="code">
|
---|
203 | <td class="leftTab" x-lang="{@language}"> </td>
|
---|
204 | <td class="middleTab" x-lang="{@language}"> </td>
|
---|
205 | <td class="rightTab" x-lang="{@language}"> </td>
|
---|
206 | </xsl:for-each>
|
---|
207 | </tr>
|
---|
208 | <tr class="tabs" id="ct_{$codeId}">
|
---|
209 | <xsl:for-each select="code">
|
---|
210 |
|
---|
211 | <xsl:variable name="style">
|
---|
212 | <xsl:call-template name="languageCheck">
|
---|
213 | <xsl:with-param name="codeLanguage" select="@language" />
|
---|
214 | </xsl:call-template>
|
---|
215 | </xsl:variable>
|
---|
216 |
|
---|
217 | <xsl:variable name="languageEvent">
|
---|
218 | <xsl:choose>
|
---|
219 | <xsl:when test="$style != ''">
|
---|
220 | <xsl:text>changeLanguage(data, '</xsl:text><xsl:value-of select="@language"/>
|
---|
221 | <xsl:text>', '</xsl:text><xsl:value-of select="$style" />
|
---|
222 | <xsl:text>');</xsl:text>
|
---|
223 | </xsl:when>
|
---|
224 | <xsl:otherwise>
|
---|
225 | <xsl:text>toggleClass('ct_</xsl:text><xsl:value-of select="$codeId" />
|
---|
226 | <xsl:text>','x-lang','</xsl:text><xsl:value-of select="@language"/>
|
---|
227 | <xsl:text>','activeTab','tab'); curvedToggleClass('curvedTabs_</xsl:text><xsl:value-of select="$codeId"/>
|
---|
228 | <xsl:text>','x-lang','</xsl:text><xsl:value-of select="@language"/>
|
---|
229 | <xsl:text>'); toggleStyle('cb_</xsl:text><xsl:value-of select="$codeId"/>
|
---|
230 | <xsl:text>', 'x-lang','</xsl:text><xsl:value-of select="@language"/>
|
---|
231 | <xsl:text>','display','block','none');</xsl:text>
|
---|
232 | </xsl:otherwise>
|
---|
233 | </xsl:choose>
|
---|
234 | </xsl:variable>
|
---|
235 |
|
---|
236 | <td class="leftGrad" x-lang="{@language}"> </td>
|
---|
237 | <td class="tab" x-lang="{@language}" onclick="{$languageEvent}">
|
---|
238 | <include item="{@language}Label" />
|
---|
239 | </td>
|
---|
240 | <td class="rightGrad" x-lang="{@language}"> </td>
|
---|
241 | </xsl:for-each>
|
---|
242 | </tr>
|
---|
243 | </table>
|
---|
244 | <div id="cb_{$codeId}">
|
---|
245 | <xsl:for-each select="code">
|
---|
246 | <div class="code" x-lang="{@language}">
|
---|
247 | <xsl:call-template name="codeSection" />
|
---|
248 | </div>
|
---|
249 | </xsl:for-each>
|
---|
250 | </div>
|
---|
251 | </div>
|
---|
252 | </xsl:when>
|
---|
253 | <xsl:otherwise>
|
---|
254 | <xsl:apply-templates />
|
---|
255 | </xsl:otherwise>
|
---|
256 | </xsl:choose>
|
---|
257 | </xsl:with-param>
|
---|
258 | </xsl:call-template>
|
---|
259 | </xsl:template>
|
---|
260 |
|
---|
261 | <xsl:template match="para">
|
---|
262 | <p><xsl:apply-templates /></p>
|
---|
263 | </xsl:template>
|
---|
264 |
|
---|
265 | <xsl:template match="code">
|
---|
266 | <div class="code">
|
---|
267 | <xsl:call-template name="codeSection" />
|
---|
268 | </div>
|
---|
269 | </xsl:template>
|
---|
270 | <xsl:template name="exceptions">
|
---|
271 | <xsl:if test="count(/document/comments/exception) > 0">
|
---|
272 | <xsl:call-template name="section">
|
---|
273 | <xsl:with-param name="toggleSwitch" select="'exceptions'"/>
|
---|
274 | <xsl:with-param name="title"><include item="exceptionsTitle" /></xsl:with-param>
|
---|
275 | <xsl:with-param name="content">
|
---|
276 | <div class="listSection">
|
---|
277 | <table class="members" width="100%" cellspacing="0" frame="lhs" >
|
---|
278 | <tr>
|
---|
279 | <th class="exceptionNameColumn"><include item="exceptionNameHeader" /></th>
|
---|
280 | <th class="exceptionConditionColumn"><include item="exceptionConditionHeader" /></th>
|
---|
281 | </tr>
|
---|
282 | <xsl:for-each select="/document/comments/exception">
|
---|
283 | <tr>
|
---|
284 | <td><referenceLink target="{@cref}" qualified="true" /></td>
|
---|
285 | <td>
|
---|
286 | <xsl:apply-templates select="." />
|
---|
287 | </td>
|
---|
288 | </tr>
|
---|
289 | </xsl:for-each>
|
---|
290 | </table>
|
---|
291 | </div>
|
---|
292 | </xsl:with-param>
|
---|
293 | </xsl:call-template>
|
---|
294 | </xsl:if>
|
---|
295 | </xsl:template>
|
---|
296 |
|
---|
297 | <xsl:template name="permissions">
|
---|
298 | <xsl:if test="count(/document/comments/permission) > 0">
|
---|
299 | <xsl:call-template name="section">
|
---|
300 | <xsl:with-param name="toggleSwitch" select="'permissions'" />
|
---|
301 | <xsl:with-param name="title">
|
---|
302 | <include item="permissionsTitle" />
|
---|
303 | </xsl:with-param>
|
---|
304 | <xsl:with-param name="content">
|
---|
305 | <div class="listSection">
|
---|
306 | <table class="members" width="100%" cellspacing="0" frame="lhs" >
|
---|
307 | <tr>
|
---|
308 | <th class="permissionNameColumn">
|
---|
309 | <include item="permissionNameHeader" />
|
---|
310 | </th>
|
---|
311 | <th class="permissionDescriptionColumn">
|
---|
312 | <include item="permissionDescriptionHeader" />
|
---|
313 | </th>
|
---|
314 | </tr>
|
---|
315 | <xsl:for-each select="/document/comments/permission">
|
---|
316 | <tr>
|
---|
317 | <td>
|
---|
318 | <referenceLink target="{@cref}" qualified="true" />
|
---|
319 | </td>
|
---|
320 | <td>
|
---|
321 | <xsl:apply-templates select="." />
|
---|
322 | </td>
|
---|
323 | </tr>
|
---|
324 | </xsl:for-each>
|
---|
325 | </table>
|
---|
326 | </div>
|
---|
327 | </xsl:with-param>
|
---|
328 | </xsl:call-template>
|
---|
329 | </xsl:if>
|
---|
330 | </xsl:template>
|
---|
331 |
|
---|
332 | <xsl:template name="seealso">
|
---|
333 | <xsl:if test="$hasSeeAlsoSection">
|
---|
334 | <xsl:call-template name="section">
|
---|
335 | <xsl:with-param name="toggleSwitch" select="'seeAlso'" />
|
---|
336 | <xsl:with-param name="title">
|
---|
337 | <include item="relatedTitle" />
|
---|
338 | </xsl:with-param>
|
---|
339 | <xsl:with-param name="content">
|
---|
340 | <xsl:call-template name="autogenSeeAlsoLinks"/>
|
---|
341 | <xsl:for-each select="/document/comments//seealso | /document/reference/elements/element/overloads//seealso">
|
---|
342 | <div class="seeAlsoStyle">
|
---|
343 | <xsl:apply-templates select=".">
|
---|
344 | <xsl:with-param name="displaySeeAlso" select="true()" />
|
---|
345 | </xsl:apply-templates>
|
---|
346 | </div>
|
---|
347 | </xsl:for-each>
|
---|
348 | </xsl:with-param>
|
---|
349 | </xsl:call-template>
|
---|
350 | </xsl:if>
|
---|
351 | </xsl:template>
|
---|
352 |
|
---|
353 | <xsl:template match="list[@type='bullet']">
|
---|
354 | <ul>
|
---|
355 | <xsl:for-each select="item">
|
---|
356 | <li><xsl:apply-templates /></li>
|
---|
357 | </xsl:for-each>
|
---|
358 | </ul>
|
---|
359 | </xsl:template>
|
---|
360 |
|
---|
361 | <xsl:template match="list[@type='number']">
|
---|
362 | <ol>
|
---|
363 | <xsl:for-each select="item">
|
---|
364 | <li><xsl:apply-templates /></li>
|
---|
365 | </xsl:for-each>
|
---|
366 | </ol>
|
---|
367 | </xsl:template>
|
---|
368 |
|
---|
369 | <xsl:template match="list[@type='table']">
|
---|
370 | <div class="listSection">
|
---|
371 | <table class="members" width="100%" cellspacing="0" frame="lhs" >
|
---|
372 | <xsl:for-each select="listheader">
|
---|
373 | <tr>
|
---|
374 | <xsl:for-each select="*">
|
---|
375 | <th><xsl:apply-templates /></th>
|
---|
376 | </xsl:for-each>
|
---|
377 | </tr>
|
---|
378 | </xsl:for-each>
|
---|
379 | <xsl:for-each select="item">
|
---|
380 | <tr>
|
---|
381 | <xsl:for-each select="*">
|
---|
382 | <td>
|
---|
383 | <xsl:apply-templates />
|
---|
384 | </td>
|
---|
385 | </xsl:for-each>
|
---|
386 | </tr>
|
---|
387 | </xsl:for-each>
|
---|
388 | </table>
|
---|
389 | </div>
|
---|
390 | </xsl:template>
|
---|
391 |
|
---|
392 | <!-- inline tags -->
|
---|
393 |
|
---|
394 | <xsl:template match="see[@cref]">
|
---|
395 | <xsl:choose>
|
---|
396 | <xsl:when test="normalize-space(.)">
|
---|
397 | <referenceLink target="{@cref}">
|
---|
398 | <xsl:value-of select="." />
|
---|
399 | </referenceLink>
|
---|
400 | </xsl:when>
|
---|
401 | <xsl:otherwise>
|
---|
402 | <referenceLink target="{@cref}"/>
|
---|
403 | </xsl:otherwise>
|
---|
404 | </xsl:choose>
|
---|
405 | </xsl:template>
|
---|
406 |
|
---|
407 | <xsl:template match="see[@href]">
|
---|
408 | <xsl:choose>
|
---|
409 | <xsl:when test="normalize-space(.)">
|
---|
410 | <a>
|
---|
411 | <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
|
---|
412 | <xsl:value-of select="." />
|
---|
413 | </a>
|
---|
414 | </xsl:when>
|
---|
415 | <xsl:otherwise>
|
---|
416 | <a>
|
---|
417 | <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
|
---|
418 | <xsl:value-of select="@href" />
|
---|
419 | </a>
|
---|
420 | </xsl:otherwise>
|
---|
421 | </xsl:choose>
|
---|
422 | </xsl:template>
|
---|
423 |
|
---|
424 | <xsl:template match="seealso[@href]">
|
---|
425 | <xsl:param name="displaySeeAlso" select="false()" />
|
---|
426 | <xsl:if test="$displaySeeAlso">
|
---|
427 | <xsl:choose>
|
---|
428 | <xsl:when test="normalize-space(.)">
|
---|
429 | <a>
|
---|
430 | <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
|
---|
431 | <xsl:value-of select="." />
|
---|
432 | </a>
|
---|
433 | </xsl:when>
|
---|
434 | <xsl:otherwise>
|
---|
435 | <a>
|
---|
436 | <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
|
---|
437 | <xsl:value-of select="@href" />
|
---|
438 | </a>
|
---|
439 | </xsl:otherwise>
|
---|
440 | </xsl:choose>
|
---|
441 | </xsl:if>
|
---|
442 | </xsl:template>
|
---|
443 |
|
---|
444 | <xsl:template match="see[@langword]">
|
---|
445 | <span class="keyword">
|
---|
446 | <xsl:choose>
|
---|
447 | <xsl:when test="@langword='null' or @langword='Nothing' or @langword='nullptr'">
|
---|
448 | <span class="cs">null</span>
|
---|
449 | <span class="vb">Nothing</span>
|
---|
450 | <span class="cpp">nullptr</span>
|
---|
451 | </xsl:when>
|
---|
452 | <xsl:when test="@langword='static' or @langword='Shared'">
|
---|
453 | <span class="cs">static</span>
|
---|
454 | <span class="vb">Shared</span>
|
---|
455 | <span class="cpp">static</span>
|
---|
456 | </xsl:when>
|
---|
457 | <xsl:when test="@langword='virtual' or @langword='Overridable'">
|
---|
458 | <span class="cs">virtual</span>
|
---|
459 | <span class="vb">Overridable</span>
|
---|
460 | <span class="cpp">virtual</span>
|
---|
461 | </xsl:when>
|
---|
462 | <xsl:when test="@langword='true' or @langword='True'">
|
---|
463 | <span class="cs">true</span>
|
---|
464 | <span class="vb">True</span>
|
---|
465 | <span class="cpp">true</span>
|
---|
466 | </xsl:when>
|
---|
467 | <xsl:when test="@langword='false' or @langword='False'">
|
---|
468 | <span class="cs">false</span>
|
---|
469 | <span class="vb">False</span>
|
---|
470 | <span class="cpp">false</span>
|
---|
471 | </xsl:when>
|
---|
472 | <xsl:when test="@langword='abstract'">
|
---|
473 | <span class="cs">abstract</span>
|
---|
474 | <span class="vb">MustInherit</span>
|
---|
475 | <span class="cpp">abstract</span>
|
---|
476 | </xsl:when>
|
---|
477 | <xsl:otherwise>
|
---|
478 | <xsl:value-of select="@langword" />
|
---|
479 | </xsl:otherwise>
|
---|
480 | </xsl:choose>
|
---|
481 | </span>
|
---|
482 | </xsl:template>
|
---|
483 |
|
---|
484 |
|
---|
485 | <xsl:template match="seealso">
|
---|
486 | <xsl:param name="displaySeeAlso" select="false()" />
|
---|
487 | <xsl:if test="$displaySeeAlso">
|
---|
488 | <xsl:choose>
|
---|
489 | <xsl:when test="normalize-space(.)">
|
---|
490 | <referenceLink target="{@cref}" qualified="true">
|
---|
491 | <xsl:value-of select="." />
|
---|
492 | </referenceLink>
|
---|
493 | </xsl:when>
|
---|
494 | <xsl:otherwise>
|
---|
495 | <referenceLink target="{@cref}" qualified="true" />
|
---|
496 | </xsl:otherwise>
|
---|
497 | </xsl:choose>
|
---|
498 | </xsl:if>
|
---|
499 | </xsl:template>
|
---|
500 |
|
---|
501 | <xsl:template match="c">
|
---|
502 | <span class="code"><xsl:apply-templates /></span>
|
---|
503 | </xsl:template>
|
---|
504 |
|
---|
505 | <xsl:template match="paramref">
|
---|
506 | <span class="parameter">
|
---|
507 | <xsl:value-of select="@name" />
|
---|
508 | </span>
|
---|
509 | </xsl:template>
|
---|
510 |
|
---|
511 | <xsl:template match="typeparamref">
|
---|
512 | <span class="typeparameter">
|
---|
513 | <xsl:value-of select="@name" />
|
---|
514 | </span>
|
---|
515 | </xsl:template>
|
---|
516 |
|
---|
517 | <xsl:template match="syntax">
|
---|
518 | <xsl:if test="count(*) > 0">
|
---|
519 | <xsl:call-template name="section">
|
---|
520 | <xsl:with-param name="toggleSwitch" select="'syntax'" />
|
---|
521 | <xsl:with-param name="title">
|
---|
522 | <include item="syntaxTitle"/>
|
---|
523 | </xsl:with-param>
|
---|
524 | <xsl:with-param name="content">
|
---|
525 | <div id="syntaxCodeBlocks">
|
---|
526 | <xsl:call-template name="syntaxBlocks" />
|
---|
527 | </div>
|
---|
528 | <!-- parameters & return value -->
|
---|
529 | <xsl:apply-templates select="/document/reference/parameters" />
|
---|
530 | <xsl:apply-templates select="/document/reference/templates" />
|
---|
531 | <xsl:apply-templates select="/document/comments/value" />
|
---|
532 | <xsl:apply-templates select="/document/comments/returns" />
|
---|
533 | <xsl:apply-templates select="/document/reference/implements" />
|
---|
534 | </xsl:with-param>
|
---|
535 | </xsl:call-template>
|
---|
536 | </xsl:if>
|
---|
537 | </xsl:template>
|
---|
538 |
|
---|
539 | <xsl:template name="runningHeader">
|
---|
540 | <include item="runningHeaderText" />
|
---|
541 | </xsl:template>
|
---|
542 |
|
---|
543 | <!-- pass through html tags -->
|
---|
544 |
|
---|
545 | <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|a|img|b|i|strong|em|del|sub|sup|br|hr|h1|h2|h3|h4|h5|h6|pre|div|span|blockquote|abbr|acronym|u|font|map|area">
|
---|
546 | <xsl:copy>
|
---|
547 | <xsl:copy-of select="@*" />
|
---|
548 | <xsl:apply-templates />
|
---|
549 | </xsl:copy>
|
---|
550 | </xsl:template>
|
---|
551 |
|
---|
552 | <!-- extra tag support -->
|
---|
553 |
|
---|
554 | <xsl:template match="threadsafety">
|
---|
555 | <xsl:call-template name="section">
|
---|
556 | <xsl:with-param name="toggleSwitch" select="'threadSafety'" />
|
---|
557 | <xsl:with-param name="title">
|
---|
558 | <include item="threadSafetyTitle" />
|
---|
559 | </xsl:with-param>
|
---|
560 | <xsl:with-param name="content">
|
---|
561 | <xsl:choose>
|
---|
562 | <xsl:when test="normalize-space(.)">
|
---|
563 | <xsl:apply-templates />
|
---|
564 | </xsl:when>
|
---|
565 | <xsl:otherwise>
|
---|
566 | <xsl:if test="@static='true'">
|
---|
567 | <include item="staticThreadSafe" />
|
---|
568 | </xsl:if>
|
---|
569 | <xsl:if test="@static='false'">
|
---|
570 | <include item="staticNotThreadSafe" />
|
---|
571 | </xsl:if>
|
---|
572 | <xsl:if test="@instance='true'">
|
---|
573 | <include item="instanceThreadSafe" />
|
---|
574 | </xsl:if>
|
---|
575 | <xsl:if test="@instance='false'">
|
---|
576 | <include item="instanceNotThreadSafe" />
|
---|
577 | </xsl:if>
|
---|
578 | </xsl:otherwise>
|
---|
579 | </xsl:choose>
|
---|
580 | </xsl:with-param>
|
---|
581 | </xsl:call-template>
|
---|
582 | </xsl:template>
|
---|
583 |
|
---|
584 | <xsl:template match="note">
|
---|
585 | <div class="alert">
|
---|
586 | <img>
|
---|
587 | <includeAttribute item="iconPath" name="src">
|
---|
588 | <parameter>alert_note.gif</parameter>
|
---|
589 | </includeAttribute>
|
---|
590 | <includeAttribute name="title" item="noteAltText"/>
|
---|
591 | </img>
|
---|
592 | <xsl:text> </xsl:text>
|
---|
593 | <include item="noteTitle" />
|
---|
594 | <xsl:apply-templates />
|
---|
595 | </div>
|
---|
596 | </xsl:template>
|
---|
597 |
|
---|
598 | <xsl:template match="preliminary">
|
---|
599 | <div class="preliminary">
|
---|
600 | <include item="preliminaryText" />
|
---|
601 | </div>
|
---|
602 | </xsl:template>
|
---|
603 |
|
---|
604 | <!-- move these off into a shared file -->
|
---|
605 |
|
---|
606 | <xsl:template name="createReferenceLink">
|
---|
607 | <xsl:param name="id" />
|
---|
608 | <xsl:param name="qualified" select="false()" />
|
---|
609 |
|
---|
610 | <referenceLink target="{$id}" qualified="{$qualified}" />
|
---|
611 |
|
---|
612 | </xsl:template>
|
---|
613 |
|
---|
614 | <xsl:template name="section">
|
---|
615 | <xsl:param name="toggleSwitch" />
|
---|
616 | <xsl:param name="title" />
|
---|
617 | <xsl:param name="content" />
|
---|
618 |
|
---|
619 | <xsl:variable name="toggleTitle" select="concat($toggleSwitch,'Toggle')" />
|
---|
620 | <xsl:variable name="toggleSection" select="concat($toggleSwitch,'Section')" />
|
---|
621 |
|
---|
622 | <h1 class="heading">
|
---|
623 | <span onclick="ExpandCollapse({$toggleTitle})" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey({$toggleTitle}, event)" tabindex="0">
|
---|
624 | <img id="{$toggleTitle}" class="toggle" name="toggleSwitch">
|
---|
625 | <includeAttribute name="src" item="iconPath">
|
---|
626 | <parameter>collapse_all.gif</parameter>
|
---|
627 | </includeAttribute>
|
---|
628 | </img>
|
---|
629 | <xsl:copy-of select="$title" />
|
---|
630 | </span>
|
---|
631 | </h1>
|
---|
632 |
|
---|
633 | <div id="{$toggleSection}" class="section" name="collapseableSection" style="">
|
---|
634 | <xsl:copy-of select="$content" />
|
---|
635 | </div>
|
---|
636 |
|
---|
637 | </xsl:template>
|
---|
638 |
|
---|
639 | <xsl:template name="subSection">
|
---|
640 | <xsl:param name="title" />
|
---|
641 | <xsl:param name="content" />
|
---|
642 |
|
---|
643 | <h4 class="subHeading">
|
---|
644 | <xsl:copy-of select="$title" />
|
---|
645 | </h4>
|
---|
646 | <xsl:copy-of select="$content" />
|
---|
647 |
|
---|
648 | </xsl:template>
|
---|
649 |
|
---|
650 | <xsl:template name="memberIntro">
|
---|
651 | <xsl:if test="$subgroup='members'">
|
---|
652 | <p>
|
---|
653 | <xsl:apply-templates select="/document/reference/containers/summary"/>
|
---|
654 | </p>
|
---|
655 | </xsl:if>
|
---|
656 | <xsl:if test="/document/reference/elements/element/memberdata[@visibility='public' or @visibility='family' or @visibility='family or assembly' or @visibility='assembly']">
|
---|
657 | <!-- if there are exposed members, show a boilerplate intro p -->
|
---|
658 | <xsl:variable name="introTextItemId">
|
---|
659 | <xsl:choose>
|
---|
660 | <xsl:when test="/document/reference/containers/type/templates">genericExposedMembersTableText</xsl:when>
|
---|
661 | <xsl:otherwise>exposedMembersTableText</xsl:otherwise>
|
---|
662 | </xsl:choose>
|
---|
663 | </xsl:variable>
|
---|
664 | <p>
|
---|
665 | <include item="{$introTextItemId}">
|
---|
666 | <parameter>
|
---|
667 | <referenceLink target="{$typeId}" />
|
---|
668 | </parameter>
|
---|
669 | <parameter>
|
---|
670 | <xsl:value-of select="$subgroup"/><xsl:text>Subgroup</xsl:text>
|
---|
671 | </parameter>
|
---|
672 | </include>
|
---|
673 | </p>
|
---|
674 | </xsl:if>
|
---|
675 | </xsl:template>
|
---|
676 |
|
---|
677 | <xsl:template name="mshelpCodelangAttributes">
|
---|
678 | <xsl:for-each select="/document/comments/example/code">
|
---|
679 |
|
---|
680 | <xsl:if test="not(@language=preceding::*/@language)">
|
---|
681 | <xsl:variable name="codeLang">
|
---|
682 | <xsl:choose>
|
---|
683 | <xsl:when test="@language = 'VBScript' or @language = 'vbs'">
|
---|
684 | <xsl:text>VBScript</xsl:text>
|
---|
685 | </xsl:when>
|
---|
686 | <xsl:when test="@language = 'VisualBasic' or @language = 'vb' or @language = 'vb#' or @language = 'VB' or @language = 'kbLangVB'" >
|
---|
687 | <xsl:text>kbLangVB</xsl:text>
|
---|
688 | </xsl:when>
|
---|
689 | <xsl:when test="@language = 'CSharp' or @language = 'c#' or @language = 'cs' or @language = 'C#'" >
|
---|
690 | <xsl:text>CSharp</xsl:text>
|
---|
691 | </xsl:when>
|
---|
692 | <xsl:when test="@language = 'ManagedCPlusPlus' or @language = 'cpp' or @language = 'cpp#' or @language = 'c' or @language = 'c++' or @language = 'C++' or @language = 'kbLangCPP'" >
|
---|
693 | <xsl:text>kbLangCPP</xsl:text>
|
---|
694 | </xsl:when>
|
---|
695 | <xsl:when test="@language = 'JSharp' or @language = 'j#' or @language = 'jsharp' or @language = 'VJ#'">
|
---|
696 | <xsl:text>VJ#</xsl:text>
|
---|
697 | </xsl:when>
|
---|
698 | <xsl:when test="@language = 'JScript' or @language = 'js' or @language = 'jscript#' or @language = 'jscript' or @language = 'JScript' or @language = 'kbJScript'">
|
---|
699 | <xsl:text>kbJScript</xsl:text>
|
---|
700 | </xsl:when>
|
---|
701 | <xsl:when test="@language = 'xml'">
|
---|
702 | <xsl:text>xml</xsl:text>
|
---|
703 | </xsl:when>
|
---|
704 | <xsl:when test="@language = 'html'">
|
---|
705 | <xsl:text>html</xsl:text>
|
---|
706 | </xsl:when>
|
---|
707 | <xsl:when test="@language = 'vb-c#'">
|
---|
708 | <xsl:text>visualbasicANDcsharp</xsl:text>
|
---|
709 | </xsl:when>
|
---|
710 | <xsl:otherwise>
|
---|
711 | <xsl:text>other</xsl:text>
|
---|
712 | </xsl:otherwise>
|
---|
713 | </xsl:choose>
|
---|
714 | </xsl:variable>
|
---|
715 | <xsl:choose>
|
---|
716 | <xsl:when test="$codeLang='other'" />
|
---|
717 | <xsl:otherwise>
|
---|
718 | <xsl:call-template name="codeLang">
|
---|
719 | <xsl:with-param name="codeLang" select="$codeLang" />
|
---|
720 | </xsl:call-template>
|
---|
721 | </xsl:otherwise>
|
---|
722 | </xsl:choose>
|
---|
723 | </xsl:if>
|
---|
724 |
|
---|
725 | </xsl:for-each>
|
---|
726 | </xsl:template>
|
---|
727 | </xsl:stylesheet>
|
---|