VirtualBox

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

Last change on this file since 2333 was 1471, checked in by vboxsync, 18 years ago

Main: XPCOM: Initial implementation of auto-startable "out-of-proc" VirtualBox component (VBoxSVC).

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