VirtualBox

source: vbox/trunk/src/VBox/Main/idl/xpidl.xsl@ 5626

Last change on this file since 5626 was 4097, checked in by vboxsync, 17 years ago

Main, Installer:

  • XIDL Schema: Renamed module/ => library, class => module/class.
  • WiX: Created XSLT to generate the TypeLib block from XIDL to avoid usage of tallow.exe.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 22.2 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 * A template to generate a XPCOM IDL compatible interface definition file
5 * from the generic interface definition expressed in XML.
6
7 Copyright (C) 2006-2007 innotek GmbH
8
9 This file is part of VirtualBox Open Source Edition (OSE), as
10 available from http://www.virtualbox.org. This file is free software;
11 you can redistribute it and/or modify it under the terms of the GNU
12 General Public License as published by the Free Software Foundation,
13 in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 distribution. VirtualBox OSE is distributed in the hope that it will
15 be useful, but WITHOUT ANY WARRANTY of any kind.
16-->
17
18<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
19<xsl:output method="text"/>
20
21<xsl:strip-space elements="*"/>
22
23
24<!--
25// helper definitions
26/////////////////////////////////////////////////////////////////////////////
27-->
28
29<!--
30 * uncapitalizes the first letter only if the second one is not capital
31 * otherwise leaves the string unchanged
32-->
33<xsl:template name="uncapitalize">
34 <xsl:param name="str" select="."/>
35 <xsl:choose>
36 <xsl:when test="not(contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', substring($str,2,1)))">
37 <xsl:value-of select="
38 concat(
39 translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
40 substring($str,2)
41 )
42 "/>
43 </xsl:when>
44 <xsl:otherwise>
45 <xsl:value-of select="string($str)"/>
46 </xsl:otherwise>
47 </xsl:choose>
48</xsl:template>
49
50<!--
51 * translates the string to uppercase
52-->
53<xsl:template name="uppercase">
54 <xsl:param name="str" select="."/>
55 <xsl:value-of select="
56 translate($str,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')
57 "/>
58</xsl:template>
59
60
61<!--
62// templates
63/////////////////////////////////////////////////////////////////////////////
64-->
65
66
67<!--
68 * header
69-->
70<xsl:template match="/idl">
71 <xsl:text>
72/*
73 * DO NOT EDIT! This is a generated file.
74 *
75 * XPCOM IDL (XPIDL) definition for VirualBox Main API (COM interfaces)
76 * generated from XIDL (XML interface definition).
77 *
78 * Source : src/VBox/Main/idl/VirtualBox.xidl
79 * Generator : src/VBox/Main/idl/xpidl.xsl
80 */
81
82#include "nsISupports.idl"
83#include "nsIException.idl"
84</xsl:text>
85 <!-- native typedefs for the 'mod="ptr"' attribute -->
86 <xsl:text>
87[ptr] native booeanPtr (PRBool);
88[ptr] native octetPtr (PRUint8);
89[ptr] native shortPtr (PRInt16);
90[ptr] native ushortPtr (PRUint16);
91[ptr] native longPtr (PRInt32);
92[ptr] native llongPtr (PRInt64);
93[ptr] native ulongPtr (PRUint32);
94[ptr] native ullongPtr (PRUint64);
95<!-- charPtr is already defined in nsrootidl.idl -->
96<!-- [ptr] native charPtr (char) -->
97[ptr] native stringPtr (string);
98[ptr] native wcharPtr (wchar);
99[ptr] native wstringPtr (wstring);
100
101</xsl:text>
102 <xsl:apply-templates/>
103</xsl:template>
104
105
106<!--
107 * ignore all |if|s except those for XPIDL target
108-->
109<xsl:template match="if">
110 <xsl:if test="@target='xpidl'">
111 <xsl:apply-templates/>
112 </xsl:if>
113</xsl:template>
114<xsl:template match="if" mode="forward">
115 <xsl:if test="@target='xpidl'">
116 <xsl:apply-templates mode="forward"/>
117 </xsl:if>
118</xsl:template>
119
120
121<!--
122 * cpp_quote
123-->
124<xsl:template match="cpp">
125 <xsl:if test="text()">
126 <xsl:text>%{C++</xsl:text>
127 <xsl:value-of select="text()"/>
128 <xsl:text>&#x0A;%}&#x0A;&#x0A;</xsl:text>
129 </xsl:if>
130 <xsl:if test="not(text()) and @line">
131 <xsl:text>%{C++&#x0A;</xsl:text>
132 <xsl:value-of select="@line"/>
133 <xsl:text>&#x0A;%}&#x0A;&#x0A;</xsl:text>
134 </xsl:if>
135</xsl:template>
136
137
138<!--
139 * #if statement (@if attribute)
140 * @note
141 * xpidl doesn't support any preprocessor defines other than #include
142 * (it just ignores them), so the generated IDL will most likely be
143 * invalid. So for now we forbid using @if attributes
144-->
145<xsl:template match="@if" mode="begin">
146 <xsl:message terminate="yes">
147 @if attributes are not currently allowed because xpidl lacks
148 support of #ifdef and stuff.
149 </xsl:message>
150 <xsl:text>#if </xsl:text>
151 <xsl:value-of select="."/>
152 <xsl:text>&#x0A;</xsl:text>
153</xsl:template>
154<xsl:template match="@if" mode="end">
155 <xsl:text>#endif&#x0A;</xsl:text>
156</xsl:template>
157
158
159<!--
160 * libraries
161-->
162<xsl:template match="library">
163 <!-- forward declarations -->
164 <xsl:apply-templates select="if | interface | collection | enumerator" mode="forward"/>
165 <xsl:text>&#x0A;</xsl:text>
166 <!-- all enums go first -->
167 <xsl:apply-templates select="enum | if/enum"/>
168 <!-- everything else but enums -->
169 <xsl:apply-templates select="*[not(self::enum) and not(self::if[enum])]"/>
170</xsl:template>
171
172
173<!--
174 * forward declarations
175-->
176<xsl:template match="interface | collection | enumerator" mode="forward">
177 <xsl:text>interface </xsl:text>
178 <xsl:value-of select="@name"/>
179 <xsl:text>;&#x0A;</xsl:text>
180</xsl:template>
181
182
183<!--
184 * interfaces
185-->
186<xsl:template match="interface">[
187 uuid(<xsl:value-of select="@uuid"/>),
188 scriptable
189]
190<xsl:text>interface </xsl:text>
191 <xsl:value-of select="@name"/>
192 <xsl:text> : </xsl:text>
193 <xsl:choose>
194 <xsl:when test="@extends='$unknown'">nsISupports</xsl:when>
195 <xsl:when test="@extends='$dispatched'">nsISupports</xsl:when>
196 <xsl:when test="@extends='$errorinfo'">nsIException</xsl:when>
197 <xsl:otherwise><xsl:value-of select="@extends"/></xsl:otherwise>
198 </xsl:choose>
199 <xsl:text>&#x0A;{&#x0A;</xsl:text>
200 <!-- attributes (properties) -->
201 <xsl:apply-templates select="attribute"/>
202 <!-- methods -->
203 <xsl:apply-templates select="method"/>
204 <!-- 'if' enclosed elements, unsorted -->
205 <xsl:apply-templates select="if"/>
206 <!-- -->
207 <xsl:text>}; /* interface </xsl:text>
208 <xsl:value-of select="@name"/>
209 <xsl:text> */&#x0A;&#x0A;</xsl:text>
210</xsl:template>
211
212<!--
213 * attributes
214-->
215<xsl:template match="interface//attribute | collection//attribute">
216 <xsl:apply-templates select="@if" mode="begin"/>
217 <xsl:if test="@mod='ptr'">
218 <!-- attributes using native types must be non-scriptable -->
219 <xsl:text> [noscript]&#x0A;</xsl:text>
220 </xsl:if>
221 <xsl:text> </xsl:text>
222 <xsl:if test="@readonly='yes'">
223 <xsl:text>readonly </xsl:text>
224 </xsl:if>
225 <xsl:text>attribute </xsl:text>
226 <xsl:apply-templates select="@type"/>
227 <xsl:text> </xsl:text>
228 <xsl:value-of select="@name"/>
229 <xsl:text>;&#x0A;</xsl:text>
230 <xsl:apply-templates select="@if" mode="end"/>
231 <xsl:text>&#x0A;</xsl:text>
232</xsl:template>
233
234<!--
235 * methods
236-->
237<xsl:template match="interface//method | collection//method">
238 <xsl:apply-templates select="@if" mode="begin"/>
239 <xsl:if test="param/@mod='ptr'">
240 <!-- methods using native types must be non-scriptable -->
241 <xsl:text> [noscript]&#x0A;</xsl:text>
242 </xsl:if>
243 <xsl:text> void </xsl:text>
244 <xsl:value-of select="@name"/>
245 <xsl:if test="param">
246 <xsl:text> (&#x0A;</xsl:text>
247 <xsl:for-each select="param [position() != last()]">
248 <xsl:text> </xsl:text>
249 <xsl:apply-templates select="."/>
250 <xsl:text>,&#x0A;</xsl:text>
251 </xsl:for-each>
252 <xsl:text> </xsl:text>
253 <xsl:apply-templates select="param [last()]"/>
254 <xsl:text>&#x0A; );&#x0A;</xsl:text>
255 </xsl:if>
256 <xsl:if test="not(param)">
257 <xsl:text>();&#x0A;</xsl:text>
258 </xsl:if>
259 <xsl:apply-templates select="@if" mode="end"/>
260 <xsl:text>&#x0A;</xsl:text>
261</xsl:template>
262
263
264<!--
265 * co-classes
266-->
267<xsl:template match="module/class">
268 <!-- class and contract id -->
269 <xsl:text>%{C++&#x0A;</xsl:text>
270 <xsl:text>#define NS_</xsl:text>
271 <xsl:call-template name="uppercase">
272 <xsl:with-param name="str" select="@name"/>
273 </xsl:call-template>
274 <xsl:text>_CID { \&#x0A;</xsl:text>
275 <xsl:text> 0x</xsl:text><xsl:value-of select="substring(@uuid,1,8)"/>
276 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,10,4)"/>
277 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,15,4)"/>
278 <xsl:text>, \&#x0A; </xsl:text>
279 <xsl:text>{ 0x</xsl:text><xsl:value-of select="substring(@uuid,20,2)"/>
280 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,22,2)"/>
281 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,25,2)"/>
282 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,27,2)"/>
283 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,29,2)"/>
284 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,31,2)"/>
285 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,33,2)"/>
286 <xsl:text>, 0x</xsl:text><xsl:value-of select="substring(@uuid,35,2)"/>
287 <xsl:text> } \&#x0A;}&#x0A;</xsl:text>
288 <xsl:text>#define NS_</xsl:text>
289 <xsl:call-template name="uppercase">
290 <xsl:with-param name="str" select="@name"/>
291 </xsl:call-template>
292 <!-- Contract ID -->
293 <xsl:text>_CONTRACTID &quot;@</xsl:text>
294 <xsl:value-of select="@namespace"/>
295 <xsl:text>/</xsl:text>
296 <xsl:value-of select="@name"/>
297 <xsl:text>;1&quot;&#x0A;</xsl:text>
298 <!-- CLSID_xxx declarations for XPCOM, for compatibility with Win32 -->
299 <xsl:text>// for compatibility with Win32&#x0A;</xsl:text>
300 <xsl:text>#define CLSID_</xsl:text>
301 <xsl:value-of select="@name"/>
302 <xsl:text> (nsCID) NS_</xsl:text>
303 <xsl:call-template name="uppercase">
304 <xsl:with-param name="str" select="@name"/>
305 </xsl:call-template>
306 <xsl:text>_CID&#x0A;</xsl:text>
307 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
308</xsl:template>
309
310
311<!--
312 * enumerators
313-->
314<xsl:template match="enumerator">[
315 uuid(<xsl:value-of select="@uuid"/>),
316 scriptable
317]
318<xsl:text>interface </xsl:text>
319 <xsl:value-of select="@name"/>
320 <xsl:text> : nsISupports&#x0A;{&#x0A;</xsl:text>
321 <!-- HasMore -->
322 <xsl:text> void hasMore ([retval] out boolean more);&#x0A;&#x0A;</xsl:text>
323 <!-- GetNext -->
324 <xsl:text> void getNext ([retval] out </xsl:text>
325 <xsl:apply-templates select="@type"/>
326 <xsl:text> next);&#x0A;&#x0A;</xsl:text>
327 <!-- -->
328 <xsl:text>}; /* interface </xsl:text>
329 <xsl:value-of select="@name"/>
330 <xsl:text> */&#x0A;&#x0A;</xsl:text>
331</xsl:template>
332
333
334<!--
335 * collections
336-->
337<xsl:template match="collection">
338 <xsl:if test="not(@readonly='yes')">
339 <xsl:message terminate="yes">
340 <xsl:value-of select="concat(@name,': ')"/>
341 <xsl:text>non-readonly collections are not currently supported</xsl:text>
342 </xsl:message>
343 </xsl:if>[
344 uuid(<xsl:value-of select="@uuid"/>),
345 scriptable
346]
347<xsl:text>interface </xsl:text>
348 <xsl:value-of select="@name"/>
349 <xsl:text> : nsISupports&#x0A;{&#x0A;</xsl:text>
350 <!-- Count -->
351 <xsl:text> readonly attribute unsigned long count;&#x0A;&#x0A;</xsl:text>
352 <!-- GetItemAt -->
353 <xsl:text> void getItemAt (in unsigned long index, [retval] out </xsl:text>
354 <xsl:apply-templates select="@type"/>
355 <xsl:text> item);&#x0A;&#x0A;</xsl:text>
356 <!-- Enumerate -->
357 <xsl:text> void enumerate ([retval] out </xsl:text>
358 <xsl:apply-templates select="@enumerator"/>
359 <xsl:text> enumerator);&#x0A;&#x0A;</xsl:text>
360 <!-- other extra attributes (properties) -->
361 <xsl:apply-templates select="attribute"/>
362 <!-- other extra methods -->
363 <xsl:apply-templates select="method"/>
364 <!-- 'if' enclosed elements, unsorted -->
365 <xsl:apply-templates select="if"/>
366 <!-- -->
367 <xsl:text>}; /* interface </xsl:text>
368 <xsl:value-of select="@name"/>
369 <xsl:text> */&#x0A;&#x0A;</xsl:text>
370</xsl:template>
371
372
373<!--
374 * enums
375-->
376<xsl:template match="enum">[
377 uuid(<xsl:value-of select="@uuid"/>),
378 scriptable
379]
380<xsl:text>interface </xsl:text>
381 <xsl:value-of select="@name"/>
382 <xsl:text>&#x0A;{&#x0A;</xsl:text>
383 <xsl:for-each select="const">
384 <xsl:text> const PRUint32 </xsl:text>
385 <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>
386 <xsl:text>;&#x0A;</xsl:text>
387 </xsl:for-each>
388 <xsl:text>};&#x0A;&#x0A;</xsl:text>
389 <!-- -->
390 <xsl:value-of select="concat('/* cross-platform type name for ', @name, ' */&#x0A;')"/>
391 <xsl:text>%{C++&#x0A;</xsl:text>
392 <xsl:value-of select="concat('#define ', @name, '_T', ' ',
393 'PRUint32&#x0A;')"/>
394 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
395 <!-- -->
396 <xsl:value-of select="concat('/* cross-platform constants for ', @name, ' */&#x0A;')"/>
397 <xsl:text>%{C++&#x0A;</xsl:text>
398 <xsl:for-each select="const">
399 <xsl:value-of select="concat('#define ', ../@name, '_', @name, ' ',
400 ../@name, '::', @name, '&#x0A;')"/>
401 </xsl:for-each>
402 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
403</xsl:template>
404
405
406<!--
407 * method parameters
408-->
409<xsl:template match="method/param">
410 <xsl:if test="@array">
411 <xsl:if test="@dir='return'">
412 <xsl:message terminate="yes">
413 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>
414 <xsl:text>return array parameters are not currently supported</xsl:text>
415 </xsl:message>
416 </xsl:if>
417 <xsl:text>[array, </xsl:text>
418 <xsl:choose>
419 <xsl:when test="../param[@name=current()/@array]">
420 <xsl:if test="../param[@name=current()/@array]/@dir != @dir">
421 <xsl:message terminate="yes">
422 <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>
423 <xsl:value-of select="concat(@name,' and ',../param[@name=current()/@array]/@name)"/>
424 <xsl:text> must have the same direction</xsl:text>
425 </xsl:message>
426 </xsl:if>
427 <xsl:text>size_is(</xsl:text>
428 <xsl:if test="@dir='out'">
429 <xsl:text>, </xsl:text>
430 </xsl:if>
431 <xsl:if test="../param[@name=current()/@array]/@dir='out'">
432 <xsl:text>*</xsl:text>
433 </xsl:if>
434 <xsl:value-of select="@array"/>
435 <xsl:text>)</xsl:text>
436 </xsl:when>
437 <xsl:otherwise>
438 <xsl:message terminate="yes">
439 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>
440 <xsl:text>array attribute refers to non-existent param: </xsl:text>
441 <xsl:value-of select="@array"/>
442 </xsl:message>
443 </xsl:otherwise>
444 </xsl:choose>
445 <xsl:text>] </xsl:text>
446 </xsl:if>
447 <xsl:choose>
448 <xsl:when test="@dir='in'">in </xsl:when>
449 <xsl:when test="@dir='out'">out </xsl:when>
450 <xsl:when test="@dir='return'">[retval] out </xsl:when>
451 <xsl:otherwise>in</xsl:otherwise>
452 </xsl:choose>
453 <xsl:apply-templates select="@type"/>
454 <xsl:text> </xsl:text>
455 <xsl:value-of select="@name"/>
456</xsl:template>
457
458
459<!--
460 * attribute/parameter type conversion
461-->
462<xsl:template match="
463 attribute/@type | param/@type |
464 enumerator/@type | collection/@type | collection/@enumerator
465">
466 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/>
467
468 <xsl:choose>
469 <!-- modifiers (ignored for 'enumeration' attributes)-->
470 <xsl:when test="name(current())='type' and ../@mod">
471 <xsl:if test="../@array">
472 <xsl:message terminate="yes">
473 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
474 <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
475 </xsl:message>
476 </xsl:if>
477 <xsl:choose>
478 <xsl:when test="../@mod='ptr'">
479 <xsl:choose>
480 <!-- standard types -->
481 <!--xsl:when test=".='result'">??</xsl:when-->
482 <xsl:when test=".='boolean'">booeanPtr</xsl:when>
483 <xsl:when test=".='octet'">octetPtr</xsl:when>
484 <xsl:when test=".='short'">shortPtr</xsl:when>
485 <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
486 <xsl:when test=".='long'">longPtr</xsl:when>
487 <xsl:when test=".='long long'">llongPtr</xsl:when>
488 <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
489 <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
490 <xsl:when test=".='char'">charPtr</xsl:when>
491 <!--xsl:when test=".='string'">??</xsl:when-->
492 <xsl:when test=".='wchar'">wcharPtr</xsl:when>
493 <!--xsl:when test=".='wstring'">??</xsl:when-->
494 <xsl:otherwise>
495 <xsl:message terminate="yes">
496 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
497 <xsl:text>attribute 'mod=</xsl:text>
498 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
499 <xsl:text>' cannot be used with type </xsl:text>
500 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
501 </xsl:message>
502 </xsl:otherwise>
503 </xsl:choose>
504 </xsl:when>
505 <xsl:otherwise>
506 <xsl:message terminate="yes">
507 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
508 <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
509 <xsl:text>of attibute 'mod' is invalid!</xsl:text>
510 </xsl:message>
511 </xsl:otherwise>
512 </xsl:choose>
513 </xsl:when>
514 <!-- no modifiers -->
515 <xsl:otherwise>
516 <xsl:choose>
517 <!-- standard types -->
518 <xsl:when test=".='result'">nsresult</xsl:when>
519 <xsl:when test=".='boolean'">boolean</xsl:when>
520 <xsl:when test=".='octet'">octet</xsl:when>
521 <xsl:when test=".='short'">short</xsl:when>
522 <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
523 <xsl:when test=".='long'">long</xsl:when>
524 <xsl:when test=".='long long'">long long</xsl:when>
525 <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
526 <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
527 <xsl:when test=".='char'">char</xsl:when>
528 <xsl:when test=".='wchar'">wchar</xsl:when>
529 <xsl:when test=".='string'">string</xsl:when>
530 <xsl:when test=".='wstring'">wstring</xsl:when>
531 <!-- UUID type -->
532 <xsl:when test=".='uuid'">
533 <xsl:choose>
534 <xsl:when test="name(..)='attribute'">
535 <xsl:choose>
536 <xsl:when test="../@readonly='yes'">
537 <xsl:text>nsIDPtr</xsl:text>
538 </xsl:when>
539 <xsl:otherwise>
540 <xsl:message terminate="yes">
541 <xsl:value-of select="../@name"/>
542 <xsl:text>: Non-readonly uuid attributes are not supported!</xsl:text>
543 </xsl:message>
544 </xsl:otherwise>
545 </xsl:choose>
546 </xsl:when>
547 <xsl:when test="name(..)='param'">
548 <xsl:choose>
549 <xsl:when test="../@dir='in'">
550 <xsl:text>nsIDRef</xsl:text>
551 </xsl:when>
552 <xsl:otherwise>
553 <xsl:text>nsIDPtr</xsl:text>
554 </xsl:otherwise>
555 </xsl:choose>
556 </xsl:when>
557 </xsl:choose>
558 </xsl:when>
559 <!-- system interface types -->
560 <xsl:when test=".='$unknown'">nsISupports</xsl:when>
561 <xsl:otherwise>
562 <xsl:choose>
563 <!-- enum types -->
564 <xsl:when test="
565 (ancestor::library/enum[@name=current()]) or
566 (ancestor::library/if[@target=$self_target]/enum[@name=current()])
567 ">
568 <xsl:text>PRUint32</xsl:text>
569 </xsl:when>
570 <!-- custom interface types -->
571 <xsl:when test="
572 (name(current())='enumerator' and
573 ((ancestor::library/enumerator[@name=current()]) or
574 (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))
575 ) or
576 ((ancestor::library/interface[@name=current()]) or
577 (ancestor::library/if[@target=$self_target]/interface[@name=current()])
578 ) or
579 ((ancestor::library/collection[@name=current()]) or
580 (ancestor::library/if[@target=$self_target]/collection[@name=current()])
581 )
582 ">
583 <xsl:value-of select="."/>
584 </xsl:when>
585 <!-- other types -->
586 <xsl:otherwise>
587 <xsl:message terminate="yes">
588 <xsl:text>Unknown parameter type: </xsl:text>
589 <xsl:value-of select="."/>
590 </xsl:message>
591 </xsl:otherwise>
592 </xsl:choose>
593 </xsl:otherwise>
594 </xsl:choose>
595 </xsl:otherwise>
596 </xsl:choose>
597</xsl:template>
598
599</xsl:stylesheet>
600
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette