1 | <?xml version="1.0"?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
|
---|
3 | xmlns:MSHelp="http://msdn.microsoft.com/mshelp"
|
---|
4 | xmlns:mshelp="http://msdn.microsoft.com/mshelp"
|
---|
5 | xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5"
|
---|
6 | xmlns:xlink="http://www.w3.org/1999/xlink"
|
---|
7 | xmlns:msxsl="urn:schemas-microsoft-com:xslt"
|
---|
8 | >
|
---|
9 |
|
---|
10 | <xsl:import href="../../shared/transforms/utilities_metadata.xsl" />
|
---|
11 |
|
---|
12 | <xsl:template name="insertMetadata">
|
---|
13 | <xsl:if test="$metadata='true'">
|
---|
14 | <xml>
|
---|
15 | <MSHelp:Attr Name="AssetID" Value="{$key}" />
|
---|
16 | <!-- toc title, rl title, etc. -->
|
---|
17 | <xsl:call-template name="mshelpTitles" />
|
---|
18 | <!-- keywords for the A (link target) index -->
|
---|
19 | <xsl:call-template name="linkMetadata" />
|
---|
20 | <!-- keywords for the K (index) index -->
|
---|
21 | <xsl:call-template name="indexMetadata" />
|
---|
22 | <!-- keywords for the F (F1 help) index -->
|
---|
23 | <xsl:call-template name="helpMetadata" />
|
---|
24 | <!-- help priority settings -->
|
---|
25 | <xsl:call-template name="helpPriorityMetadata" />
|
---|
26 | <!-- attributes for api identification -->
|
---|
27 | <xsl:call-template name="apiTaggingMetadata" />
|
---|
28 | <!-- atributes for filtering -->
|
---|
29 | <xsl:call-template name="mshelpDevlangAttributes" />
|
---|
30 | <MSHelp:Attr Name="Locale">
|
---|
31 | <includeAttribute name="Value" item="locale" />
|
---|
32 | </MSHelp:Attr>
|
---|
33 | <!-- attribute to allow F1 help integration -->
|
---|
34 | <MSHelp:Attr Name="TopicType" Value="kbSyntax" />
|
---|
35 | <MSHelp:Attr Name="TopicType" Value="apiref" />
|
---|
36 |
|
---|
37 | <!-- Abstract -->
|
---|
38 | <xsl:choose>
|
---|
39 | <xsl:when test="string-length($abstractSummary) > 254">
|
---|
40 | <MSHelp:Attr Name="Abstract" Value="{normalize-space(concat(substring($abstractSummary,1,250), ' ...'))}" />
|
---|
41 | </xsl:when>
|
---|
42 | <xsl:when test="string-length($abstractSummary) > 0">
|
---|
43 | <MSHelp:Attr Name="Abstract" Value="{normalize-space($abstractSummary)}" />
|
---|
44 | </xsl:when>
|
---|
45 | </xsl:choose>
|
---|
46 |
|
---|
47 | <!-- Assembly Version-->
|
---|
48 | <xsl:if test="$api-group != 'namespace'">
|
---|
49 | <MSHelp:Attr Name="AssemblyVersion" Value="{/document/reference/containers/library/assemblydata/@version}" />
|
---|
50 | </xsl:if>
|
---|
51 |
|
---|
52 | <xsl:call-template name="codelangAttributes" />
|
---|
53 | <xsl:call-template name="versionMetadata" />
|
---|
54 | <xsl:call-template name="authoredMetadata" />
|
---|
55 | </xml>
|
---|
56 | </xsl:if>
|
---|
57 | </xsl:template>
|
---|
58 |
|
---|
59 | <!-- add DocSet and Technology attributes depending on the versions that support this api -->
|
---|
60 | <xsl:template name="versionMetadata">
|
---|
61 | <xsl:variable name="supportedOnCf">
|
---|
62 | <xsl:call-template name="IsMemberSupportedOnCf"/>
|
---|
63 | </xsl:variable>
|
---|
64 | <xsl:variable name="supportedOnXNA">
|
---|
65 | <xsl:call-template name="IsMemberSupportedOnXna" />
|
---|
66 | </xsl:variable>
|
---|
67 | <xsl:if test="count(/document/reference/versions/versions[@name='netfw']//version) > 0 or count(/document/reference/topicdata/versions/versions[@name='netfw']//version) > 0 ">
|
---|
68 | <MSHelp:Attr Name="Technology">
|
---|
69 | <includeAttribute name="Value" item="desktopTechnologyAttribute" />
|
---|
70 | </MSHelp:Attr>
|
---|
71 | </xsl:if>
|
---|
72 | <!-- insert CF values for Technology and DocSet attributes for:
|
---|
73 | api topics that have netcfw version nodes
|
---|
74 | memberlist topics where topicdata/versions has netcfw version nodes
|
---|
75 | overload list topics where any of the elements has netcfw version nodes
|
---|
76 | -->
|
---|
77 | <xsl:if test="count(/document/reference/versions/versions[@name='netcfw']//version) > 0 or count(/document/reference/topicdata/versions/versions[@name='netcfw']//version) > 0 or count(/document/reference[topicdata[@subgroup='overload']]/elements//element/versions/versions[@name='netcfw']//version) > 0 or normalize-space($supportedOnCf)!=''">
|
---|
78 | <MSHelp:Attr Name="Technology">
|
---|
79 | <includeAttribute name="Value" item="netcfTechnologyAttribute" />
|
---|
80 | </MSHelp:Attr>
|
---|
81 | <MSHelp:Attr Name="DocSet">
|
---|
82 | <includeAttribute name="Value" item="netcfDocSetAttribute" />
|
---|
83 | </MSHelp:Attr>
|
---|
84 | </xsl:if>
|
---|
85 | <!-- insert XNA values for Technology and DocSet attributes for:
|
---|
86 | api topics that have xnafw version nodes
|
---|
87 | memberlist topics where topicdata/versions has xnafw version nodes
|
---|
88 | overload list topics where any of the elements has xnafw version nodes
|
---|
89 | -->
|
---|
90 | <xsl:if test="count(/document/reference/versions/versions[@name='xnafw']//version) > 0 or count(/document/reference/topicdata/versions/versions[@name='xnafw']//version) > 0 or count(/document/reference[topicdata[@subgroup='overload']]/elements//element/versions/versions[@name='xnafw']//version) > 0 or normalize-space($supportedOnXNA)!=''">
|
---|
91 | <MSHelp:Attr Name="Technology">
|
---|
92 | <includeAttribute name="Value" item="xnaTechnologyAttribute" />
|
---|
93 | </MSHelp:Attr>
|
---|
94 | <MSHelp:Attr Name="DocSet">
|
---|
95 | <includeAttribute name="Value" item="xnaDocSetAttribute" />
|
---|
96 | </MSHelp:Attr>
|
---|
97 | </xsl:if>
|
---|
98 | </xsl:template>
|
---|
99 |
|
---|
100 | <!-- attributes and keywords added to topics by authors -->
|
---|
101 |
|
---|
102 | <xsl:template name="authoredMetadata">
|
---|
103 |
|
---|
104 | <!-- authored attributes -->
|
---|
105 | <xsl:for-each select="/document/metadata/attribute">
|
---|
106 | <MSHelp:Attr Name="{@name}" Value="{text()}" />
|
---|
107 | </xsl:for-each>
|
---|
108 |
|
---|
109 | <!-- authored K -->
|
---|
110 | <xsl:for-each select="/document/metadata/keyword[@index='K']">
|
---|
111 | <MSHelp:Keyword Index="K">
|
---|
112 | <xsl:attribute name="Term">
|
---|
113 | <xsl:value-of select="text()" />
|
---|
114 | <xsl:for-each select="keyword[@index='K']">
|
---|
115 | <xsl:text>, </xsl:text>
|
---|
116 | <xsl:value-of select="text()"/>
|
---|
117 | </xsl:for-each>
|
---|
118 | </xsl:attribute>
|
---|
119 | </MSHelp:Keyword>
|
---|
120 | </xsl:for-each>
|
---|
121 |
|
---|
122 | <!-- authored S -->
|
---|
123 | <xsl:for-each select="/document/metadata/keyword[@index='S']">
|
---|
124 | <MSHelp:Keyword Index="S">
|
---|
125 | <xsl:attribute name="Term">
|
---|
126 | <xsl:value-of select="text()" />
|
---|
127 | <xsl:for-each select="keyword[@index='S']">
|
---|
128 | <xsl:text>, </xsl:text>
|
---|
129 | <xsl:value-of select="text()"/>
|
---|
130 | </xsl:for-each>
|
---|
131 | </xsl:attribute>
|
---|
132 | </MSHelp:Keyword>
|
---|
133 | <!-- S index keywords need to be converted to F index keywords -->
|
---|
134 | <MSHelp:Keyword Index="F">
|
---|
135 | <xsl:attribute name="Term">
|
---|
136 | <xsl:value-of select="text()" />
|
---|
137 | <xsl:for-each select="keyword[@index='S']">
|
---|
138 | <xsl:text>, </xsl:text>
|
---|
139 | <xsl:value-of select="text()"/>
|
---|
140 | </xsl:for-each>
|
---|
141 | </xsl:attribute>
|
---|
142 | </MSHelp:Keyword>
|
---|
143 | </xsl:for-each>
|
---|
144 |
|
---|
145 | <!-- authored F -->
|
---|
146 | <xsl:for-each select="/document/metadata/keyword[@index='F']">
|
---|
147 | <MSHelp:Keyword Index="F">
|
---|
148 | <xsl:attribute name="Term">
|
---|
149 | <xsl:value-of select="text()" />
|
---|
150 | <xsl:for-each select="keyword[@index='F']">
|
---|
151 | <xsl:text>, </xsl:text>
|
---|
152 | <xsl:value-of select="text()"/>
|
---|
153 | </xsl:for-each>
|
---|
154 | </xsl:attribute>
|
---|
155 | </MSHelp:Keyword>
|
---|
156 | </xsl:for-each>
|
---|
157 |
|
---|
158 | <!-- authored B -->
|
---|
159 | <xsl:for-each select="/document/metadata/keyword[@index='B']">
|
---|
160 | <MSHelp:Keyword Index="B">
|
---|
161 | <xsl:attribute name="Term">
|
---|
162 | <xsl:value-of select="text()" />
|
---|
163 | <xsl:for-each select="keyword[@index='B']">
|
---|
164 | <xsl:text>, </xsl:text>
|
---|
165 | <xsl:value-of select="text()"/>
|
---|
166 | </xsl:for-each>
|
---|
167 | </xsl:attribute>
|
---|
168 | </MSHelp:Keyword>
|
---|
169 | </xsl:for-each>
|
---|
170 |
|
---|
171 | </xsl:template>
|
---|
172 |
|
---|
173 | <!-- toc title and rl title -->
|
---|
174 |
|
---|
175 | <xsl:template name="mshelpTitles">
|
---|
176 |
|
---|
177 | <!-- Toc List title-->
|
---|
178 | <MSHelp:TOCTitle>
|
---|
179 | <includeAttribute name="Title" item="tocTitle">
|
---|
180 | <parameter>
|
---|
181 | <xsl:call-template name="topicTitlePlain" />
|
---|
182 | </parameter>
|
---|
183 | </includeAttribute>
|
---|
184 | </MSHelp:TOCTitle>
|
---|
185 |
|
---|
186 | <!-- The Results List title -->
|
---|
187 | <MSHelp:RLTitle>
|
---|
188 | <includeAttribute name="Title" item="rlTitle">
|
---|
189 | <parameter>
|
---|
190 | <xsl:call-template name="topicTitlePlain">
|
---|
191 | <xsl:with-param name="qualifyMembers" select="true()" />
|
---|
192 | </xsl:call-template>
|
---|
193 | </parameter>
|
---|
194 | <parameter>
|
---|
195 | <xsl:value-of select="$namespaceName"/>
|
---|
196 | </parameter>
|
---|
197 | </includeAttribute>
|
---|
198 | </MSHelp:RLTitle>
|
---|
199 |
|
---|
200 | </xsl:template>
|
---|
201 |
|
---|
202 | <xsl:template name="apiTaggingMetadata">
|
---|
203 | <xsl:if test="$topic-group='api' and ($api-group='type' or $api-group='member')">
|
---|
204 | <MSHelp:Attr Name="APIType" Value="Managed" />
|
---|
205 | <MSHelp:Attr Name="APILocation" Value="{/document/reference/containers/library/@assembly}.dll" />
|
---|
206 | <xsl:choose>
|
---|
207 | <xsl:when test="$api-group='type'">
|
---|
208 | <xsl:variable name="apiTypeName">
|
---|
209 | <xsl:choose>
|
---|
210 | <xsl:when test="/document/reference/containers/namespace/apidata/@name != ''">
|
---|
211 | <xsl:value-of select="concat(/document/reference/containers/namespace/apidata/@name,'.',/document/reference/apidata/@name)" />
|
---|
212 | </xsl:when>
|
---|
213 | <xsl:otherwise>
|
---|
214 | <xsl:value-of select="/document/reference/apidata/@name" />
|
---|
215 | </xsl:otherwise>
|
---|
216 | </xsl:choose>
|
---|
217 | <xsl:if test="count(/document/reference/templates/template) > 0">
|
---|
218 | <xsl:value-of select="concat('`',count(/document/reference/templates/template))" />
|
---|
219 | </xsl:if>
|
---|
220 | </xsl:variable>
|
---|
221 | <!-- Namespace + Type -->
|
---|
222 | <MSHelp:Attr Name="APIName" Value="{$apiTypeName}" />
|
---|
223 | <xsl:choose>
|
---|
224 | <xsl:when test="boolean($api-subgroup='delegate')">
|
---|
225 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.ctor')}" />
|
---|
226 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.','Invoke')}" />
|
---|
227 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.','BeginInvoke')}" />
|
---|
228 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.','EndInvoke')}" />
|
---|
229 | </xsl:when>
|
---|
230 | <xsl:when test="$api-subgroup='enumeration'">
|
---|
231 | <xsl:for-each select="/document/reference/elements/element">
|
---|
232 | <MSHelp:Attr Name="APIName" Value="{substring(@api,3)}" />
|
---|
233 | </xsl:for-each>
|
---|
234 | <!-- Namespace + Type + Member for each member -->
|
---|
235 | </xsl:when>
|
---|
236 | </xsl:choose>
|
---|
237 | </xsl:when>
|
---|
238 | <xsl:when test="$api-group='member'">
|
---|
239 | <xsl:variable name="apiTypeName">
|
---|
240 | <xsl:value-of select="concat(/document/reference/containers/namespace/apidata/@name,'.',/document/reference/containers/type/apidata/@name)" />
|
---|
241 | <xsl:if test="count(/document/reference/templates/template) > 0">
|
---|
242 | <xsl:value-of select="concat('`',count(/document/reference/templates/template))" />
|
---|
243 | </xsl:if>
|
---|
244 | </xsl:variable>
|
---|
245 | <!-- Namespace + Type + Member -->
|
---|
246 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.',/document/reference/apidata/@name)}" />
|
---|
247 | <xsl:choose>
|
---|
248 | <!-- for properties, add APIName attribute get/set accessor methods -->
|
---|
249 | <xsl:when test="boolean($api-subgroup='property')">
|
---|
250 | <xsl:if test="/document/reference/propertydata[@get='true']">
|
---|
251 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.get_',/document/reference/apidata/@name)}" />
|
---|
252 | </xsl:if>
|
---|
253 | <xsl:if test="/document/reference/propertydata[@set='true']">
|
---|
254 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.set_',/document/reference/apidata/@name)}" />
|
---|
255 | </xsl:if>
|
---|
256 | </xsl:when>
|
---|
257 | <!-- for events, add APIName attribute add/remove accessor methods -->
|
---|
258 | <xsl:when test="boolean($api-subgroup='event')">
|
---|
259 | <xsl:if test="/document/reference/eventdata[@add='true']">
|
---|
260 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.add_',/document/reference/apidata/@name)}" />
|
---|
261 | </xsl:if>
|
---|
262 | <xsl:if test="/document/reference/eventdata[@remove='true']">
|
---|
263 | <MSHelp:Attr Name="APIName" Value="{concat($apiTypeName,'.remove_',/document/reference/apidata/@name)}" />
|
---|
264 | </xsl:if>
|
---|
265 | </xsl:when>
|
---|
266 | </xsl:choose>
|
---|
267 | </xsl:when>
|
---|
268 | </xsl:choose>
|
---|
269 | </xsl:if>
|
---|
270 | </xsl:template>
|
---|
271 |
|
---|
272 | <!-- link target (A index) keywords -->
|
---|
273 |
|
---|
274 | <xsl:template name="linkMetadata">
|
---|
275 |
|
---|
276 | <!-- code entity reference keyword -->
|
---|
277 | <MSHelp:Keyword Index="A" Term="{$key}" />
|
---|
278 |
|
---|
279 | <xsl:if test="$topic-group='api' and $api-subgroup='enumeration'">
|
---|
280 | <xsl:for-each select="/document/reference/elements/element">
|
---|
281 | <MSHelp:Keyword Index="A" Term="{@api}" />
|
---|
282 | </xsl:for-each>
|
---|
283 | </xsl:if>
|
---|
284 |
|
---|
285 | <!-- frlrf keywords -->
|
---|
286 | <xsl:call-template name="FrlrfKeywords"/>
|
---|
287 |
|
---|
288 | </xsl:template>
|
---|
289 |
|
---|
290 | <xsl:template name="FrlrfKeywords">
|
---|
291 | <xsl:variable name="frlrfTypeName">
|
---|
292 | <!-- for members and nested types, start with the containing type name -->
|
---|
293 | <xsl:for-each select="/document/reference/containers/type">
|
---|
294 | <xsl:call-template name="FrlrfTypeName"/>
|
---|
295 | </xsl:for-each>
|
---|
296 | <!-- for types and member list topics, append the type name -->
|
---|
297 | <xsl:if test="/document/reference/apidata[@group='type']">
|
---|
298 | <xsl:for-each select="/document/reference">
|
---|
299 | <xsl:call-template name="FrlrfTypeName"/>
|
---|
300 | </xsl:for-each>
|
---|
301 | </xsl:if>
|
---|
302 | </xsl:variable>
|
---|
303 | <xsl:variable name="memberName">
|
---|
304 | <xsl:choose>
|
---|
305 | <xsl:when test="/document/reference/apidata[@subgroup='constructor']">
|
---|
306 | <xsl:value-of select="'ctor'"/>
|
---|
307 | </xsl:when>
|
---|
308 | <xsl:when test="/document/reference/apidata[@subsubgroup='operator']">
|
---|
309 | <xsl:value-of select="concat('op_', /document/reference/apidata/@name)"/>
|
---|
310 | </xsl:when>
|
---|
311 | <xsl:otherwise>
|
---|
312 | <xsl:value-of select="/document/reference/apidata/@name"/>
|
---|
313 | </xsl:otherwise>
|
---|
314 | </xsl:choose>
|
---|
315 | </xsl:variable>
|
---|
316 | <xsl:choose>
|
---|
317 | <!-- namespace topic -->
|
---|
318 | <xsl:when test="/document/reference/apidata/@group='namespace'">
|
---|
319 | <MSHelp:Keyword Index="A" Term="{translate(concat('frlrf',$memberName),'.','')}"/>
|
---|
320 | </xsl:when>
|
---|
321 | <!-- Overload topic -->
|
---|
322 | <xsl:when test="/document/reference/topicdata[@subgroup='overload']">
|
---|
323 | <xsl:variable name="frlrfBaseId">
|
---|
324 | <xsl:value-of select="translate(concat('frlrf', $namespaceName, $frlrfTypeName, 'Class', $memberName, 'Topic'),'.','')"/>
|
---|
325 | </xsl:variable>
|
---|
326 | <MSHelp:Keyword Index="A" Term="{$frlrfBaseId}"/>
|
---|
327 | <!-- whidbey included frlrf keyword for each overload, but I don't think we need in Manifold, so commenting it out -->
|
---|
328 | <!--
|
---|
329 | <xsl:for-each select="elements/element">
|
---|
330 | <MSHelp:Keyword Index="A" Term="{concat($frlrfBaseId, string(position()))}"/>
|
---|
331 | </xsl:for-each>
|
---|
332 | -->
|
---|
333 | </xsl:when>
|
---|
334 | <!-- Member list topic (other than overload list captured above) -->
|
---|
335 | <xsl:when test="/document/reference/topicdata[@group='list']">
|
---|
336 | <xsl:variable name="memberListSubgroup">
|
---|
337 | <xsl:choose>
|
---|
338 | <xsl:when test="/document/reference/topicdata/@subgroup='members'">Members</xsl:when>
|
---|
339 | <xsl:otherwise>
|
---|
340 | <xsl:value-of select="/document/reference/topicdata/@subgroup"/>
|
---|
341 | </xsl:otherwise>
|
---|
342 | </xsl:choose>
|
---|
343 | </xsl:variable>
|
---|
344 | <MSHelp:Keyword Index="A" Term="{translate(concat('frlrf', $namespaceName, $frlrfTypeName, $memberListSubgroup, 'Topic'),'.','')}"/>
|
---|
345 | </xsl:when>
|
---|
346 | <!-- type topic -->
|
---|
347 | <xsl:when test="/document/reference/apidata[@group='type']">
|
---|
348 | <MSHelp:Keyword Index="A" Term="{translate(concat('frlrf',$namespaceName, $frlrfTypeName, 'ClassTopic'),'.','')}"/>
|
---|
349 | </xsl:when>
|
---|
350 | <!-- no frlrf ID for overload signature topics-->
|
---|
351 | <xsl:when test="/document/reference/apidata[@group='member'] and /document/reference/memberdata/@overload"/>
|
---|
352 | <!-- non-overload member topic -->
|
---|
353 | <xsl:when test="/document/reference/apidata[@group='member']">
|
---|
354 | <MSHelp:Keyword Index="A" Term="{translate(concat('frlrf',$namespaceName, $frlrfTypeName, 'Class', $memberName, 'Topic'),'.','')}"/>
|
---|
355 | </xsl:when>
|
---|
356 | </xsl:choose>
|
---|
357 | </xsl:template>
|
---|
358 |
|
---|
359 | <xsl:template name="FrlrfTypeName">
|
---|
360 | <xsl:for-each select="type">
|
---|
361 | <xsl:call-template name="FrlrfTypeName"/>
|
---|
362 | </xsl:for-each>
|
---|
363 | <xsl:choose>
|
---|
364 | <xsl:when test="templates/template">
|
---|
365 | <xsl:value-of select="concat(apidata/@name, count(templates/template))"/>
|
---|
366 | </xsl:when>
|
---|
367 | <xsl:otherwise>
|
---|
368 | <xsl:value-of select="apidata/@name"/>
|
---|
369 | </xsl:otherwise>
|
---|
370 | </xsl:choose>
|
---|
371 | </xsl:template>
|
---|
372 |
|
---|
373 | <xsl:template name="helpMetadata">
|
---|
374 | <!-- F keywords -->
|
---|
375 | <xsl:choose>
|
---|
376 | <!-- namespace pages get the namespace keyword, if it exists -->
|
---|
377 | <xsl:when test="$group='namespace'">
|
---|
378 | <xsl:variable name="namespace" select="/document/reference/apidata/@name" />
|
---|
379 | <xsl:if test="boolean($namespace != '')">
|
---|
380 | <MSHelp:Keyword Index="F" Term="{$namespace}" />
|
---|
381 | </xsl:if>
|
---|
382 | </xsl:when>
|
---|
383 | <!-- type overview and member list pages get type and namespace.type keywords -->
|
---|
384 | <xsl:when test="$group='type' or ($group='list' and $subgroup='members')">
|
---|
385 | <xsl:variable name="namespace" select="/document/reference/containers/namespace/apidata/@name" />
|
---|
386 | <xsl:variable name="type">
|
---|
387 | <xsl:for-each select="/document/reference[1]">
|
---|
388 | <xsl:call-template name="typeNameWithTicks" />
|
---|
389 | </xsl:for-each>
|
---|
390 | </xsl:variable>
|
---|
391 | <MSHelp:Keyword Index="F" Term="{$type}" />
|
---|
392 | <xsl:if test="boolean($namespace != '')">
|
---|
393 | <MSHelp:Keyword Index="F" Term="{concat($namespace,'.',$type)}" />
|
---|
394 | </xsl:if>
|
---|
395 | <xsl:if test="$subgroup = 'enumeration'">
|
---|
396 | <xsl:for-each select="/document/reference/elements/element">
|
---|
397 | <MSHelp:Keyword Index="F" Term="{concat($type, '.', apidata/@name)}" />
|
---|
398 | <xsl:if test="boolean($namespace)">
|
---|
399 | <MSHelp:Keyword Index="F" Term="{concat($namespace,'.',$type, '.', apidata/@name)}" />
|
---|
400 | </xsl:if>
|
---|
401 | </xsl:for-each>
|
---|
402 | </xsl:if>
|
---|
403 | <xsl:call-template name="xamlMSHelpFKeywords"/>
|
---|
404 | </xsl:when>
|
---|
405 |
|
---|
406 | <!-- overload list pages get member, type.member, and namepsace.type.member keywords -->
|
---|
407 | <xsl:when test="$group='list' and $subgroup='overload'">
|
---|
408 | <xsl:variable name="namespace" select="/document/reference/containers/namespace/apidata/@name" />
|
---|
409 | <xsl:variable name="type">
|
---|
410 | <xsl:for-each select="/document/reference/containers/type[1]">
|
---|
411 | <xsl:call-template name="typeNameWithTicks" />
|
---|
412 | </xsl:for-each>
|
---|
413 | </xsl:variable>
|
---|
414 | <xsl:variable name="member">
|
---|
415 | <xsl:choose>
|
---|
416 | <!-- if the member is a constructor, use the member name for the type name -->
|
---|
417 | <xsl:when test="/document/reference/apidata[@subgroup='constructor']">
|
---|
418 | <xsl:value-of select="$type" />
|
---|
419 | </xsl:when>
|
---|
420 | <xsl:otherwise>
|
---|
421 | <xsl:value-of select="/document/reference/apidata/@name"/>
|
---|
422 | </xsl:otherwise>
|
---|
423 | </xsl:choose>
|
---|
424 | </xsl:variable>
|
---|
425 | <MSHelp:Keyword Index="F" Term="{$member}" />
|
---|
426 | <MSHelp:Keyword Index="F" Term="{concat($type, '.', $member)}" />
|
---|
427 | <xsl:if test="boolean($namespace != '')">
|
---|
428 | <MSHelp:Keyword Index="F" Term="{concat($namespace, '.', $type, '.', $member)}" />
|
---|
429 | </xsl:if>
|
---|
430 | </xsl:when>
|
---|
431 |
|
---|
432 | <!-- no F1 help entries for overload signature topics -->
|
---|
433 | <xsl:when test="$group='member' and /document/reference/memberdata/@overload"/>
|
---|
434 |
|
---|
435 | <!-- member pages get member, type.member, and namepsace.type.member keywords -->
|
---|
436 | <xsl:when test="$group='member'">
|
---|
437 | <xsl:variable name="namespace" select="/document/reference/containers/namespace/apidata/@name" />
|
---|
438 | <xsl:variable name="type">
|
---|
439 | <xsl:for-each select="/document/reference/containers/type[1]">
|
---|
440 | <xsl:call-template name="typeNameWithTicks" />
|
---|
441 | </xsl:for-each>
|
---|
442 | </xsl:variable>
|
---|
443 | <xsl:variable name="member">
|
---|
444 | <xsl:choose>
|
---|
445 | <!-- if the member is a constructor, use the member name for the type name -->
|
---|
446 | <xsl:when test="$subgroup='constructor'">
|
---|
447 | <xsl:value-of select="$type" />
|
---|
448 | </xsl:when>
|
---|
449 | <!-- explicit interface implementation -->
|
---|
450 | <xsl:when test="document/reference[memberdata[@visibility='private'] and proceduredata[@virtual = 'true']]">
|
---|
451 | <xsl:for-each select="/document/reference/implements/member">
|
---|
452 | <xsl:call-template name="typeNameWithTicks" />
|
---|
453 | </xsl:for-each>
|
---|
454 | </xsl:when>
|
---|
455 | <xsl:otherwise>
|
---|
456 | <xsl:value-of select="/document/reference/apidata/@name"/>
|
---|
457 | </xsl:otherwise>
|
---|
458 | </xsl:choose>
|
---|
459 | </xsl:variable>
|
---|
460 | <!--
|
---|
461 | <xsl:choose>
|
---|
462 | -->
|
---|
463 | <!--
|
---|
464 | <xsl:when test="$subgroup='constructor'">
|
---|
465 | <MSHelp:Keyword Index="F" Term="{$type}" />
|
---|
466 | <MSHelp:Keyword Index="F" Term="{concat($type, '.', $type)}" />
|
---|
467 | <xsl:if test="boolean($namespace)">
|
---|
468 | <MSHelp:Keyword Index="F" Term="{concat($namespace, '.', $type, '.', $type)}" />
|
---|
469 | </xsl:if>
|
---|
470 | </xsl:when>
|
---|
471 | <xsl:otherwise>
|
---|
472 | -->
|
---|
473 | <MSHelp:Keyword Index="F" Term="{$member}" />
|
---|
474 | <MSHelp:Keyword Index="F" Term="{concat($type, '.', $member)}" />
|
---|
475 | <xsl:if test="boolean($namespace != '')">
|
---|
476 | <MSHelp:Keyword Index="F" Term="{concat($namespace, '.', $type, '.', $member)}" />
|
---|
477 | </xsl:if>
|
---|
478 | <!--
|
---|
479 | </xsl:otherwise>
|
---|
480 | </xsl:choose>
|
---|
481 | -->
|
---|
482 | </xsl:when>
|
---|
483 | </xsl:choose>
|
---|
484 | </xsl:template>
|
---|
485 |
|
---|
486 | <!-- set high help priority for namespace and member list pages, lower priority for type overview pages -->
|
---|
487 |
|
---|
488 | <xsl:template name="helpPriorityMetadata">
|
---|
489 | <xsl:choose>
|
---|
490 | <xsl:when test="($topic-group='api' and $api-group='namespace') or ($topic-group='list' and $topic-subgroup='members')">
|
---|
491 | <MSHelp:Attr Name="HelpPriority" Value="1"/>
|
---|
492 | </xsl:when>
|
---|
493 | <xsl:when test="$topic-group='api' and $api-group='type'">
|
---|
494 | <MSHelp:Attr Name="HelpPriority" Value="2"/>
|
---|
495 | </xsl:when>
|
---|
496 | </xsl:choose>
|
---|
497 | </xsl:template>
|
---|
498 |
|
---|
499 | <xsl:template name="apiName">
|
---|
500 | <xsl:choose>
|
---|
501 | <xsl:when test="$subgroup='constructor'">
|
---|
502 | <xsl:value-of select="/document/reference/containers/type/apidata/@name" />
|
---|
503 | </xsl:when>
|
---|
504 | <xsl:otherwise>
|
---|
505 | <xsl:value-of select="/document/reference/apidata/@name" />
|
---|
506 | </xsl:otherwise>
|
---|
507 | </xsl:choose>
|
---|
508 | </xsl:template>
|
---|
509 |
|
---|
510 | <!-- make a semicolon-separated list of the $languages-->
|
---|
511 | <xsl:template name="languagesList">
|
---|
512 | <xsl:for-each select="$languages/language">
|
---|
513 | <xsl:variable name="devlang">
|
---|
514 | <xsl:call-template name="GetDevLangAttrValue">
|
---|
515 | <xsl:with-param name="devlang" select="@name"/>
|
---|
516 | </xsl:call-template>
|
---|
517 | </xsl:variable>
|
---|
518 | <xsl:if test="normalize-space($devlang)!=''">
|
---|
519 | <xsl:value-of select="$devlang"/><xsl:text>;</xsl:text>
|
---|
520 | </xsl:if>
|
---|
521 | </xsl:for-each>
|
---|
522 | </xsl:template>
|
---|
523 |
|
---|
524 | <xsl:template name="mshelpDevlangAttributes">
|
---|
525 | <!-- first insert a DevLang attr for each language in the $languages arg passed to the transform -->
|
---|
526 | <xsl:for-each select="$languages/language">
|
---|
527 | <xsl:variable name="devlang">
|
---|
528 | <xsl:call-template name="GetDevLangAttrValue">
|
---|
529 | <xsl:with-param name="devlang" select="@name"/>
|
---|
530 | </xsl:call-template>
|
---|
531 | </xsl:variable>
|
---|
532 | <xsl:choose>
|
---|
533 | <xsl:when test="normalize-space($devlang)=''"/>
|
---|
534 | <xsl:when test="$devlang = 'VJ#'">
|
---|
535 | <xsl:if test="boolean(/document/reference/versions/versions[@name='netfw']//version[not(@name='netfw35')])">
|
---|
536 | <MSHelp:Attr Name="DevLang" Value="{$devlang}" />
|
---|
537 | </xsl:if>
|
---|
538 | </xsl:when>
|
---|
539 | <xsl:otherwise>
|
---|
540 | <MSHelp:Attr Name="DevLang" Value="{$devlang}" />
|
---|
541 | </xsl:otherwise>
|
---|
542 | </xsl:choose>
|
---|
543 | </xsl:for-each>
|
---|
544 |
|
---|
545 | <!-- make a list of the languages that have already been included via $languages -->
|
---|
546 | <xsl:variable name="languagesList">
|
---|
547 | <xsl:call-template name="languagesList"/>
|
---|
548 | </xsl:variable>
|
---|
549 |
|
---|
550 | <!-- add DevLang attr for any additional languages referred to in the topic's snippet and code nodes -->
|
---|
551 | <xsl:for-each select="//*[@language]">
|
---|
552 | <xsl:if test="not(@language=preceding::*/@language)">
|
---|
553 | <xsl:variable name="devlang">
|
---|
554 | <xsl:call-template name="GetDevLangAttrValue">
|
---|
555 | <xsl:with-param name="devlang" select="@language"/>
|
---|
556 | </xsl:call-template>
|
---|
557 | </xsl:variable>
|
---|
558 | <xsl:choose>
|
---|
559 | <xsl:when test="normalize-space($devlang)=''"/>
|
---|
560 | <xsl:when test="contains($languagesList,concat($devlang,';'))"/>
|
---|
561 | <xsl:otherwise>
|
---|
562 | <MSHelp:Attr Name="DevLang" Value="{$devlang}" />
|
---|
563 | </xsl:otherwise>
|
---|
564 | </xsl:choose>
|
---|
565 | </xsl:if>
|
---|
566 | </xsl:for-each>
|
---|
567 |
|
---|
568 | <!-- extend the list of languages that have already been included -->
|
---|
569 | <xsl:variable name="languagesList2">
|
---|
570 | <xsl:value-of select="$languagesList"/>
|
---|
571 | <xsl:for-each select="//*[@language]">
|
---|
572 | <xsl:variable name="devlang">
|
---|
573 | <xsl:call-template name="GetDevLangAttrValue">
|
---|
574 | <xsl:with-param name="devlang" select="@language"/>
|
---|
575 | </xsl:call-template>
|
---|
576 | </xsl:variable>
|
---|
577 | <xsl:if test="normalize-space($devlang)!=''">
|
---|
578 | <xsl:value-of select="$devlang"/><xsl:text>;</xsl:text>
|
---|
579 | </xsl:if>
|
---|
580 | </xsl:for-each>
|
---|
581 | </xsl:variable>
|
---|
582 |
|
---|
583 | <!-- add DevLang attr for any additional languages referred to in the topic's syntax blocks -->
|
---|
584 | <xsl:for-each select="/document/syntax/div[@codeLanguage and not(div[@class='nonXamlAssemblyBoilerplate'])]">
|
---|
585 | <xsl:if test="not(@codeLanguage=preceding::*/@codeLanguage)">
|
---|
586 | <xsl:variable name="devlang">
|
---|
587 | <xsl:call-template name="GetDevLangAttrValue">
|
---|
588 | <xsl:with-param name="devlang" select="@codeLanguage"/>
|
---|
589 | </xsl:call-template>
|
---|
590 | </xsl:variable>
|
---|
591 | <xsl:choose>
|
---|
592 | <xsl:when test="normalize-space($devlang)=''"/>
|
---|
593 | <xsl:when test="contains($languagesList2,concat($devlang,';'))"/>
|
---|
594 | <xsl:otherwise>
|
---|
595 | <MSHelp:Attr Name="DevLang" Value="{$devlang}" />
|
---|
596 | </xsl:otherwise>
|
---|
597 | </xsl:choose>
|
---|
598 | </xsl:if>
|
---|
599 | </xsl:for-each>
|
---|
600 | </xsl:template>
|
---|
601 |
|
---|
602 | <xsl:template name="GetDevLangAttrValue">
|
---|
603 | <xsl:param name="devlang"/>
|
---|
604 | <xsl:choose>
|
---|
605 | <xsl:when test="$devlang = 'CSharp' or $devlang = 'c#' or $devlang = 'cs' or $devlang = 'C#'" >
|
---|
606 | <xsl:text>CSharp</xsl:text>
|
---|
607 | </xsl:when>
|
---|
608 | <xsl:when test="$devlang = 'ManagedCPlusPlus' or $devlang = 'cpp' or $devlang = 'cpp#' or $devlang = 'c' or $devlang = 'c++' or $devlang = 'C++' or $devlang = 'kbLangCPP'" >
|
---|
609 | <xsl:text>C++</xsl:text>
|
---|
610 | </xsl:when>
|
---|
611 | <xsl:when test="$devlang = 'JScript' or $devlang = 'js' or $devlang = 'jscript#' or $devlang = 'jscript' or $devlang = 'JScript' or $devlang = 'kbJScript'">
|
---|
612 | <xsl:text>JScript</xsl:text>
|
---|
613 | </xsl:when>
|
---|
614 | <xsl:when test="$devlang = 'VisualBasic' or $devlang = 'VisualBasicUsage' or $devlang = 'vb' or $devlang = 'vb#' or $devlang = 'VB' or $devlang = 'kbLangVB'" >
|
---|
615 | <xsl:text>VB</xsl:text>
|
---|
616 | </xsl:when>
|
---|
617 | <xsl:when test="$devlang = 'VBScript' or $devlang = 'vbs'">
|
---|
618 | <xsl:text>VBScript</xsl:text>
|
---|
619 | </xsl:when>
|
---|
620 | <xsl:when test="$devlang = 'JSharp' or $devlang = 'j#' or $devlang = 'jsharp' or $devlang = 'VJ#'">
|
---|
621 | <xsl:text>VJ#</xsl:text>
|
---|
622 | </xsl:when>
|
---|
623 | <xsl:when test="$devlang = 'xaml' or $devlang = 'XAML'">
|
---|
624 | <xsl:text>XAML</xsl:text>
|
---|
625 | </xsl:when>
|
---|
626 | <xsl:when test="$devlang = 'xml' or $devlang = 'XML'">
|
---|
627 | <xsl:text>XML</xsl:text>
|
---|
628 | </xsl:when>
|
---|
629 | <xsl:otherwise/>
|
---|
630 | </xsl:choose>
|
---|
631 | </xsl:template>
|
---|
632 |
|
---|
633 | <!--
|
---|
634 | Additional F1 keywords for class, struct, and enum topics in a set of WPF namespaces.
|
---|
635 | This template inserts the MSHelp:Keyword nodes.
|
---|
636 | The keyword prefixes and the WPF namespaces are hard-coded in variables.
|
---|
637 | -->
|
---|
638 | <xsl:variable name="var_wpf_f1index_prefix_1">http://schemas.microsoft.com/winfx/2006/xaml/presentation#</xsl:variable>
|
---|
639 | <xsl:variable name="var_wpf_f1index_prefix_1_namespaces">N:System.Windows.Controls#N:System.Windows.Documents#N:System.Windows.Shapes#N:System.Windows.Navigation#N:System.Windows.Data#N:System.Windows#N:System.Windows.Controls.Primitives#N:System.Windows.Media.Animation#N:System.Windows.Annotations#N:System.Windows.Annotations.Anchoring#N:System.Windows.Annotations.Storage#N:System.Windows.Media#N:System.Windows.Media.Animation#N:System.Windows.Media.Media3D#N:</xsl:variable>
|
---|
640 |
|
---|
641 | <xsl:template name="xamlMSHelpFKeywords">
|
---|
642 | <xsl:if test="$subgroup='class' or $subgroup='enumeration' or $subgroup='structure'">
|
---|
643 | <xsl:if test="boolean(contains($var_wpf_f1index_prefix_1_namespaces, concat('#',/document/reference/containers/namespace/@api,'#'))
|
---|
644 | or starts-with($var_wpf_f1index_prefix_1_namespaces, concat(/document/reference/containers/namespace/@api,'#')))">
|
---|
645 | <MSHelp:Keyword Index="F" Term="{concat($var_wpf_f1index_prefix_1, /document/reference/apidata/@name)}"/>
|
---|
646 | </xsl:if>
|
---|
647 | </xsl:if>
|
---|
648 | </xsl:template>
|
---|
649 |
|
---|
650 | <!-- Index Logic -->
|
---|
651 |
|
---|
652 | <xsl:template name="indexMetadata">
|
---|
653 | <xsl:choose>
|
---|
654 | <!-- namespace topics get one unqualified index entry -->
|
---|
655 | <xsl:when test="$topic-group='api' and $api-group='namespace'">
|
---|
656 | <xsl:variable name="names">
|
---|
657 | <xsl:for-each select="/document/reference">
|
---|
658 | <xsl:call-template name="textNames" />
|
---|
659 | </xsl:for-each>
|
---|
660 | </xsl:variable>
|
---|
661 | <MSHelp:Keyword Index="K">
|
---|
662 | <includeAttribute name="Term" item="namespaceIndexEntry">
|
---|
663 | <parameter>
|
---|
664 | <xsl:value-of select="msxsl:node-set($names)/name" />
|
---|
665 | </parameter>
|
---|
666 | </includeAttribute>
|
---|
667 | </MSHelp:Keyword>
|
---|
668 | </xsl:when>
|
---|
669 | <!-- type overview topics get qualified and unqualified index entries, and an about index entry -->
|
---|
670 | <xsl:when test="$topic-group='api' and $api-group='type'">
|
---|
671 | <xsl:variable name="names">
|
---|
672 | <xsl:for-each select="/document/reference">
|
---|
673 | <xsl:call-template name="textNames" />
|
---|
674 | </xsl:for-each>
|
---|
675 | </xsl:variable>
|
---|
676 | <xsl:variable name="namespace" select="/document/reference/containers/namespace/apidata/@name" />
|
---|
677 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
678 | <MSHelp:Keyword Index="K">
|
---|
679 | <includeAttribute name="Term" item="{$api-subgroup}IndexEntry">
|
---|
680 | <parameter>
|
---|
681 | <xsl:copy-of select="."/>
|
---|
682 | </parameter>
|
---|
683 | </includeAttribute>
|
---|
684 | </MSHelp:Keyword>
|
---|
685 | <xsl:if test="boolean($namespace != '')">
|
---|
686 | <MSHelp:Keyword Index="K">
|
---|
687 | <includeAttribute name="Term" item="{$api-subgroup}IndexEntry">
|
---|
688 | <parameter>
|
---|
689 | <xsl:value-of select="$namespace"/>
|
---|
690 | <xsl:text>.</xsl:text>
|
---|
691 | <xsl:copy-of select="." />
|
---|
692 | </parameter>
|
---|
693 | </includeAttribute>
|
---|
694 | </MSHelp:Keyword>
|
---|
695 | </xsl:if>
|
---|
696 | <!-- multi-topic types (not delegates and enumerations) get about entries, too-->
|
---|
697 | <xsl:if test="$api-subgroup='class' or $api-subgroup='structure' or $api-subgroup='interface'">
|
---|
698 | <MSHelp:Keyword Index="K">
|
---|
699 | <includeAttribute name="Term" item="aboutTypeIndexEntry">
|
---|
700 | <parameter>
|
---|
701 | <include item="{$api-subgroup}IndexEntry">
|
---|
702 | <parameter>
|
---|
703 | <xsl:copy-of select="."/>
|
---|
704 | </parameter>
|
---|
705 | </include>
|
---|
706 | </parameter>
|
---|
707 | </includeAttribute>
|
---|
708 | </MSHelp:Keyword>
|
---|
709 | </xsl:if>
|
---|
710 | </xsl:for-each>
|
---|
711 | <!-- enumerations get the index entries for their members -->
|
---|
712 | <xsl:if test="$api-subgroup='enumeration'">
|
---|
713 | <xsl:for-each select="/document/reference/elements/element">
|
---|
714 | <MSHelp:Keyword Index="K">
|
---|
715 | <includeAttribute name="Term" item="{$api-subgroup}MemberIndexEntry">
|
---|
716 | <parameter>
|
---|
717 | <xsl:value-of select="apidata/@name" />
|
---|
718 | </parameter>
|
---|
719 | </includeAttribute>
|
---|
720 | </MSHelp:Keyword>
|
---|
721 | </xsl:for-each>
|
---|
722 | </xsl:if>
|
---|
723 | </xsl:when>
|
---|
724 | <!-- all member lists get unqualified entries, qualified entries, and unqualified sub-entries -->
|
---|
725 | <xsl:when test="$topic-group='list' and $topic-subgroup='members'">
|
---|
726 | <xsl:variable name="namespace" select="/document/reference/containers/namespace/apidata/@name" />
|
---|
727 | <xsl:variable name="names">
|
---|
728 | <xsl:for-each select="/document/reference">
|
---|
729 | <xsl:call-template name="textNames" />
|
---|
730 | </xsl:for-each>
|
---|
731 | </xsl:variable>
|
---|
732 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
733 | <MSHelp:Keyword Index="K">
|
---|
734 | <includeAttribute name="Term" item="{$api-subgroup}IndexEntry">
|
---|
735 | <parameter>
|
---|
736 | <xsl:value-of select="." />
|
---|
737 | </parameter>
|
---|
738 | </includeAttribute>
|
---|
739 | </MSHelp:Keyword>
|
---|
740 | <MSHelp:Keyword Index="K">
|
---|
741 | <includeAttribute name="Term" item="membersIndexEntry">
|
---|
742 | <parameter>
|
---|
743 | <include item="{$api-subgroup}IndexEntry">
|
---|
744 | <parameter>
|
---|
745 | <xsl:value-of select="." />
|
---|
746 | </parameter>
|
---|
747 | </include>
|
---|
748 | </parameter>
|
---|
749 | </includeAttribute>
|
---|
750 | </MSHelp:Keyword>
|
---|
751 | </xsl:for-each>
|
---|
752 | <xsl:variable name="qnames">
|
---|
753 | <xsl:for-each select="/document/reference">
|
---|
754 | <xsl:call-template name="qualifiedTextNames" />
|
---|
755 | </xsl:for-each>
|
---|
756 | </xsl:variable>
|
---|
757 | <xsl:if test="boolean($namespace != '')">
|
---|
758 | <xsl:for-each select="msxsl:node-set($qnames)/name">
|
---|
759 | <MSHelp:Keyword Index="K">
|
---|
760 | <includeAttribute name="Term" item="{$api-subgroup}IndexEntry">
|
---|
761 | <parameter>
|
---|
762 | <xsl:value-of select="." />
|
---|
763 | </parameter>
|
---|
764 | </includeAttribute>
|
---|
765 | </MSHelp:Keyword>
|
---|
766 | </xsl:for-each>
|
---|
767 | </xsl:if>
|
---|
768 | </xsl:when>
|
---|
769 | <!-- other member list pages get unqualified sub-entries -->
|
---|
770 | <xsl:when test="$topic-group='list' and not($topic-subgroup = 'overload')">
|
---|
771 | <xsl:variable name="names">
|
---|
772 | <xsl:for-each select="/document/reference">
|
---|
773 | <xsl:call-template name="textNames" />
|
---|
774 | </xsl:for-each>
|
---|
775 | </xsl:variable>
|
---|
776 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
777 | <MSHelp:Keyword Index="K">
|
---|
778 | <includeAttribute name="Term" item="{$subgroup}IndexEntry">
|
---|
779 | <parameter>
|
---|
780 | <include item="{$api-subgroup}IndexEntry">
|
---|
781 | <parameter>
|
---|
782 | <xsl:value-of select="." />
|
---|
783 | </parameter>
|
---|
784 | </include>
|
---|
785 | </parameter>
|
---|
786 | </includeAttribute>
|
---|
787 | </MSHelp:Keyword>
|
---|
788 | </xsl:for-each>
|
---|
789 | </xsl:when>
|
---|
790 | <!-- constructor (or constructor overload) topics get unqualified sub-entries using the type names -->
|
---|
791 | <xsl:when test="($topic-group='api' and $api-subgroup='constructor' and not(/document/reference/memberdata/@overload)) or ($topic-subgroup='overload' and $api-subgroup = 'constructor')">
|
---|
792 | <xsl:variable name="typeSubgroup" select="/document/reference/containers/type/apidata/@subgroup" />
|
---|
793 | <xsl:variable name="names">
|
---|
794 | <xsl:for-each select="/document/reference/containers/type">
|
---|
795 | <xsl:call-template name="textNames" />
|
---|
796 | </xsl:for-each>
|
---|
797 | </xsl:variable>
|
---|
798 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
799 | <MSHelp:Keyword Index="K">
|
---|
800 | <includeAttribute name="Term" item="constructorIndexEntry">
|
---|
801 | <parameter>
|
---|
802 | <include item="{$typeSubgroup}IndexEntry">
|
---|
803 | <parameter>
|
---|
804 | <xsl:value-of select="." />
|
---|
805 | </parameter>
|
---|
806 | </include>
|
---|
807 | </parameter>
|
---|
808 | </includeAttribute>
|
---|
809 | </MSHelp:Keyword>
|
---|
810 | </xsl:for-each>
|
---|
811 | <xsl:variable name="qnames">
|
---|
812 | <xsl:for-each select="/document/reference">
|
---|
813 | <xsl:call-template name="qualifiedTextNames" />
|
---|
814 | </xsl:for-each>
|
---|
815 | </xsl:variable>
|
---|
816 | <xsl:for-each select="msxsl:node-set($qnames)/name">
|
---|
817 | <MSHelp:Keyword Index="K">
|
---|
818 | <includeAttribute name="Term" item="constructorTypeIndexEntry">
|
---|
819 | <parameter>
|
---|
820 | <xsl:value-of select="." />
|
---|
821 | </parameter>
|
---|
822 | </includeAttribute>
|
---|
823 | </MSHelp:Keyword>
|
---|
824 | </xsl:for-each>
|
---|
825 | </xsl:when>
|
---|
826 | <!-- other member (or overload) topics get qualified and unqualified entries using the member names -->
|
---|
827 | <xsl:when test="($topic-group='api' and $api-group='member' and not(/document/reference/memberdata/@overload)) or $topic-subgroup='overload'">
|
---|
828 |
|
---|
829 | <xsl:choose>
|
---|
830 | <!-- explicit interface implementation -->
|
---|
831 | <xsl:when test="/document/reference/proceduredata/@virtual='true' and /document/reference/memberdata/@visibility='private'">
|
---|
832 | <xsl:variable name="entryType">
|
---|
833 | <xsl:choose>
|
---|
834 | <xsl:when test="string($subsubgroup)">
|
---|
835 | <xsl:value-of select="$subsubgroup" />
|
---|
836 | </xsl:when>
|
---|
837 | <xsl:otherwise>
|
---|
838 | <xsl:choose>
|
---|
839 | <xsl:when test="$subgroup='overload'">
|
---|
840 | <xsl:value-of select="/document/reference/apidata/@subgroup"/>
|
---|
841 | </xsl:when>
|
---|
842 | <xsl:otherwise>
|
---|
843 | <xsl:value-of select="$subgroup" />
|
---|
844 | </xsl:otherwise>
|
---|
845 | </xsl:choose>
|
---|
846 | </xsl:otherwise>
|
---|
847 | </xsl:choose>
|
---|
848 | </xsl:variable>
|
---|
849 | <xsl:variable name="names">
|
---|
850 | <xsl:for-each select="/document/reference/implements/member">
|
---|
851 | <xsl:call-template name="textNames" />
|
---|
852 | </xsl:for-each>
|
---|
853 | </xsl:variable>
|
---|
854 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
855 | <MSHelp:Keyword Index="K">
|
---|
856 | <includeAttribute name="Term" item="{$entryType}ExplicitIndexEntry">
|
---|
857 | <parameter>
|
---|
858 | <xsl:copy-of select="."/>
|
---|
859 | </parameter>
|
---|
860 | </includeAttribute>
|
---|
861 | </MSHelp:Keyword>
|
---|
862 | </xsl:for-each>
|
---|
863 | <xsl:variable name="qnames">
|
---|
864 | <xsl:for-each select="/document/reference">
|
---|
865 | <xsl:call-template name="qualifiedTextNames" />
|
---|
866 | </xsl:for-each>
|
---|
867 | </xsl:variable>
|
---|
868 | <xsl:for-each select="msxsl:node-set($qnames)/name">
|
---|
869 | <MSHelp:Keyword Index="K">
|
---|
870 | <includeAttribute name="Term" item="{$entryType}ExplicitIndexEntry">
|
---|
871 | <parameter>
|
---|
872 | <xsl:copy-of select="."/>
|
---|
873 | </parameter>
|
---|
874 | </includeAttribute>
|
---|
875 | </MSHelp:Keyword>
|
---|
876 | </xsl:for-each>
|
---|
877 | </xsl:when>
|
---|
878 | <xsl:otherwise>
|
---|
879 | <xsl:variable name="entryType">
|
---|
880 | <xsl:choose>
|
---|
881 | <xsl:when test="string($subsubgroup)">
|
---|
882 | <xsl:value-of select="$subsubgroup" />
|
---|
883 | </xsl:when>
|
---|
884 | <xsl:otherwise>
|
---|
885 | <xsl:choose>
|
---|
886 | <xsl:when test="$subgroup='overload'">
|
---|
887 | <xsl:value-of select="/document/reference/apidata/@subgroup"/>
|
---|
888 | </xsl:when>
|
---|
889 | <xsl:otherwise>
|
---|
890 | <xsl:value-of select="$subgroup" />
|
---|
891 | </xsl:otherwise>
|
---|
892 | </xsl:choose>
|
---|
893 | </xsl:otherwise>
|
---|
894 | </xsl:choose>
|
---|
895 | </xsl:variable>
|
---|
896 | <xsl:variable name="names">
|
---|
897 | <xsl:for-each select="/document/reference">
|
---|
898 | <xsl:call-template name="textNames" />
|
---|
899 | </xsl:for-each>
|
---|
900 | </xsl:variable>
|
---|
901 | <xsl:for-each select="msxsl:node-set($names)/name">
|
---|
902 | <MSHelp:Keyword Index="K">
|
---|
903 | <includeAttribute name="Term" item="{$entryType}IndexEntry">
|
---|
904 | <parameter>
|
---|
905 | <xsl:copy-of select="."/>
|
---|
906 | </parameter>
|
---|
907 | </includeAttribute>
|
---|
908 | </MSHelp:Keyword>
|
---|
909 | </xsl:for-each>
|
---|
910 | <xsl:variable name="qnames">
|
---|
911 | <xsl:for-each select="/document/reference">
|
---|
912 | <xsl:call-template name="qualifiedTextNames" />
|
---|
913 | </xsl:for-each>
|
---|
914 | </xsl:variable>
|
---|
915 | <xsl:for-each select="msxsl:node-set($qnames)/name">
|
---|
916 | <MSHelp:Keyword Index="K">
|
---|
917 | <includeAttribute name="Term" item="{$entryType}IndexEntry">
|
---|
918 | <parameter>
|
---|
919 | <xsl:copy-of select="."/>
|
---|
920 | </parameter>
|
---|
921 | </includeAttribute>
|
---|
922 | </MSHelp:Keyword>
|
---|
923 | </xsl:for-each>
|
---|
924 | </xsl:otherwise>
|
---|
925 | </xsl:choose>
|
---|
926 |
|
---|
927 | </xsl:when>
|
---|
928 | <!-- derived type lists get unqualified sub-entries -->
|
---|
929 | </xsl:choose>
|
---|
930 | </xsl:template>
|
---|
931 |
|
---|
932 | </xsl:stylesheet>
|
---|