VirtualBox

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

Last change on this file since 1158 was 1142, checked in by vboxsync, 18 years ago

First step towards a webservices API.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 22.1 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 <xsl:text>_CONTRACTID "@xpcom/</xsl:text><xsl:value-of select="@name"/>
294 <xsl:text>;1"&#x0A;</xsl:text>
295 <!-- CLSID_xxx declarations for XPCOM, for compatibility with Win32 -->
296 <xsl:text>// for compatibility with Win32&#x0A;</xsl:text>
297 <xsl:text>#define CLSID_</xsl:text>
298 <xsl:value-of select="@name"/>
299 <xsl:text> (nsCID) NS_</xsl:text>
300 <xsl:call-template name="uppercase">
301 <xsl:with-param name="str" select="@name"/>
302 </xsl:call-template>
303 <xsl:text>_CID&#x0A;</xsl:text>
304 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
305</xsl:template>
306
307
308<!--
309 * enumerators
310-->
311<xsl:template match="enumerator">[
312 uuid(<xsl:value-of select="@uuid"/>),
313 scriptable
314]
315<xsl:text>interface </xsl:text>
316 <xsl:value-of select="@name"/>
317 <xsl:text> : nsISupports&#x0A;{&#x0A;</xsl:text>
318 <!-- HasMore -->
319 <xsl:text> void hasMore ([retval] out boolean more);&#x0A;&#x0A;</xsl:text>
320 <!-- GetNext -->
321 <xsl:text> void getNext ([retval] out </xsl:text>
322 <xsl:apply-templates select="@type"/>
323 <xsl:text> next);&#x0A;&#x0A;</xsl:text>
324 <!-- -->
325 <xsl:text>}; /* interface </xsl:text>
326 <xsl:value-of select="@name"/>
327 <xsl:text> */&#x0A;&#x0A;</xsl:text>
328</xsl:template>
329
330
331<!--
332 * collections
333-->
334<xsl:template match="collection">
335 <xsl:if test="not(@readonly='yes')">
336 <xsl:message terminate="yes">
337 <xsl:value-of select="concat(@name,': ')"/>
338 <xsl:text>non-readonly collections are not currently supported</xsl:text>
339 </xsl:message>
340 </xsl:if>[
341 uuid(<xsl:value-of select="@uuid"/>),
342 scriptable
343]
344<xsl:text>interface </xsl:text>
345 <xsl:value-of select="@name"/>
346 <xsl:text> : nsISupports&#x0A;{&#x0A;</xsl:text>
347 <!-- Count -->
348 <xsl:text> readonly attribute unsigned long count;&#x0A;&#x0A;</xsl:text>
349 <!-- GetItemAt -->
350 <xsl:text> void getItemAt (in unsigned long index, [retval] out </xsl:text>
351 <xsl:apply-templates select="@type"/>
352 <xsl:text> item);&#x0A;&#x0A;</xsl:text>
353 <!-- Enumerate -->
354 <xsl:text> void enumerate ([retval] out </xsl:text>
355 <xsl:apply-templates select="@enumerator"/>
356 <xsl:text> enumerator);&#x0A;&#x0A;</xsl:text>
357 <!-- other extra attributes (properties) -->
358 <xsl:apply-templates select="attribute"/>
359 <!-- other extra methods -->
360 <xsl:apply-templates select="method"/>
361 <!-- 'if' enclosed elements, unsorted -->
362 <xsl:apply-templates select="if"/>
363 <!-- -->
364 <xsl:text>}; /* interface </xsl:text>
365 <xsl:value-of select="@name"/>
366 <xsl:text> */&#x0A;&#x0A;</xsl:text>
367</xsl:template>
368
369
370<!--
371 * enums
372-->
373<xsl:template match="enum">[
374 uuid(<xsl:value-of select="@uuid"/>),
375 scriptable
376]
377<xsl:text>interface </xsl:text>
378 <xsl:value-of select="@name"/>
379 <xsl:text>&#x0A;{&#x0A;</xsl:text>
380 <xsl:for-each select="const">
381 <xsl:text> const PRUint32 </xsl:text>
382 <xsl:value-of select="@name"/> = <xsl:value-of select="@value"/>
383 <xsl:text>;&#x0A;</xsl:text>
384 </xsl:for-each>
385 <xsl:text>};&#x0A;&#x0A;</xsl:text>
386 <!-- -->
387 <xsl:value-of select="concat('/* cross-platform type name for ', @name, ' */&#x0A;')"/>
388 <xsl:text>%{C++&#x0A;</xsl:text>
389 <xsl:value-of select="concat('#define ', @name, '_T', ' ',
390 'PRUint32&#x0A;')"/>
391 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
392 <!-- -->
393 <xsl:value-of select="concat('/* cross-platform constants for ', @name, ' */&#x0A;')"/>
394 <xsl:text>%{C++&#x0A;</xsl:text>
395 <xsl:for-each select="const">
396 <xsl:value-of select="concat('#define ', ../@name, '_', @name, ' ',
397 ../@name, '::', @name, '&#x0A;')"/>
398 </xsl:for-each>
399 <xsl:text>%}&#x0A;&#x0A;</xsl:text>
400</xsl:template>
401
402
403<!--
404 * method parameters
405-->
406<xsl:template match="method/param">
407 <xsl:if test="@array">
408 <xsl:if test="@dir='return'">
409 <xsl:message terminate="yes">
410 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>
411 <xsl:text>return array parameters are not currently supported</xsl:text>
412 </xsl:message>
413 </xsl:if>
414 <xsl:text>[array, </xsl:text>
415 <xsl:choose>
416 <xsl:when test="../param[@name=current()/@array]">
417 <xsl:if test="../param[@name=current()/@array]/@dir != @dir">
418 <xsl:message terminate="yes">
419 <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>
420 <xsl:value-of select="concat(@name,' and ',../param[@name=current()/@array]/@name)"/>
421 <xsl:text> must have the same direction</xsl:text>
422 </xsl:message>
423 </xsl:if>
424 <xsl:text>size_is(</xsl:text>
425 <xsl:if test="@dir='out'">
426 <xsl:text>, </xsl:text>
427 </xsl:if>
428 <xsl:if test="../param[@name=current()/@array]/@dir='out'">
429 <xsl:text>*</xsl:text>
430 </xsl:if>
431 <xsl:value-of select="@array"/>
432 <xsl:text>)</xsl:text>
433 </xsl:when>
434 <xsl:otherwise>
435 <xsl:message terminate="yes">
436 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>
437 <xsl:text>array attribute refers to non-existent param: </xsl:text>
438 <xsl:value-of select="@array"/>
439 </xsl:message>
440 </xsl:otherwise>
441 </xsl:choose>
442 <xsl:text>] </xsl:text>
443 </xsl:if>
444 <xsl:choose>
445 <xsl:when test="@dir='in'">in </xsl:when>
446 <xsl:when test="@dir='out'">out </xsl:when>
447 <xsl:when test="@dir='return'">[retval] out </xsl:when>
448 <xsl:otherwise>in</xsl:otherwise>
449 </xsl:choose>
450 <xsl:apply-templates select="@type"/>
451 <xsl:text> </xsl:text>
452 <xsl:value-of select="@name"/>
453</xsl:template>
454
455
456<!--
457 * attribute/parameter type conversion
458-->
459<xsl:template match="
460 attribute/@type | param/@type |
461 enumerator/@type | collection/@type | collection/@enumerator
462">
463 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/>
464
465 <xsl:choose>
466 <!-- modifiers (ignored for 'enumeration' attributes)-->
467 <xsl:when test="name(current())='type' and ../@mod">
468 <xsl:if test="../@array">
469 <xsl:message terminate="yes">
470 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
471 <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text>
472 </xsl:message>
473 </xsl:if>
474 <xsl:choose>
475 <xsl:when test="../@mod='ptr'">
476 <xsl:choose>
477 <!-- standard types -->
478 <!--xsl:when test=".='result'">??</xsl:when-->
479 <xsl:when test=".='boolean'">booeanPtr</xsl:when>
480 <xsl:when test=".='octet'">octetPtr</xsl:when>
481 <xsl:when test=".='short'">shortPtr</xsl:when>
482 <xsl:when test=".='unsigned short'">ushortPtr</xsl:when>
483 <xsl:when test=".='long'">longPtr</xsl:when>
484 <xsl:when test=".='long long'">llongPtr</xsl:when>
485 <xsl:when test=".='unsigned long'">ulongPtr</xsl:when>
486 <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when>
487 <xsl:when test=".='char'">charPtr</xsl:when>
488 <!--xsl:when test=".='string'">??</xsl:when-->
489 <xsl:when test=".='wchar'">wcharPtr</xsl:when>
490 <!--xsl:when test=".='wstring'">??</xsl:when-->
491 <xsl:otherwise>
492 <xsl:message terminate="yes">
493 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
494 <xsl:text>attribute 'mod=</xsl:text>
495 <xsl:value-of select="concat('&quot;',../@mod,'&quot;')"/>
496 <xsl:text>' cannot be used with type </xsl:text>
497 <xsl:value-of select="concat('&quot;',current(),'&quot;!')"/>
498 </xsl:message>
499 </xsl:otherwise>
500 </xsl:choose>
501 </xsl:when>
502 <xsl:otherwise>
503 <xsl:message terminate="yes">
504 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>
505 <xsl:value-of select="concat('value &quot;',../@mod,'&quot; ')"/>
506 <xsl:text>of attibute 'mod' is invalid!</xsl:text>
507 </xsl:message>
508 </xsl:otherwise>
509 </xsl:choose>
510 </xsl:when>
511 <!-- no modifiers -->
512 <xsl:otherwise>
513 <xsl:choose>
514 <!-- standard types -->
515 <xsl:when test=".='result'">nsresult</xsl:when>
516 <xsl:when test=".='boolean'">boolean</xsl:when>
517 <xsl:when test=".='octet'">octet</xsl:when>
518 <xsl:when test=".='short'">short</xsl:when>
519 <xsl:when test=".='unsigned short'">unsigned short</xsl:when>
520 <xsl:when test=".='long'">long</xsl:when>
521 <xsl:when test=".='long long'">long long</xsl:when>
522 <xsl:when test=".='unsigned long'">unsigned long</xsl:when>
523 <xsl:when test=".='unsigned long long'">unsigned long long</xsl:when>
524 <xsl:when test=".='char'">char</xsl:when>
525 <xsl:when test=".='wchar'">wchar</xsl:when>
526 <xsl:when test=".='string'">string</xsl:when>
527 <xsl:when test=".='wstring'">wstring</xsl:when>
528 <!-- UUID type -->
529 <xsl:when test=".='uuid'">
530 <xsl:choose>
531 <xsl:when test="name(..)='attribute'">
532 <xsl:choose>
533 <xsl:when test="../@readonly='yes'">
534 <xsl:text>nsIDPtr</xsl:text>
535 </xsl:when>
536 <xsl:otherwise>
537 <xsl:message terminate="yes">
538 <xsl:value-of select="../@name"/>
539 <xsl:text>: Non-readonly uuid attributes are not supported!</xsl:text>
540 </xsl:message>
541 </xsl:otherwise>
542 </xsl:choose>
543 </xsl:when>
544 <xsl:when test="name(..)='param'">
545 <xsl:choose>
546 <xsl:when test="../@dir='in'">
547 <xsl:text>nsIDRef</xsl:text>
548 </xsl:when>
549 <xsl:otherwise>
550 <xsl:text>nsIDPtr</xsl:text>
551 </xsl:otherwise>
552 </xsl:choose>
553 </xsl:when>
554 </xsl:choose>
555 </xsl:when>
556 <!-- system interface types -->
557 <xsl:when test=".='$unknown'">nsISupports</xsl:when>
558 <xsl:otherwise>
559 <xsl:choose>
560 <!-- enum types -->
561 <xsl:when test="
562 (ancestor::module/enum[@name=current()]) or
563 (ancestor::module/if[@target=$self_target]/enum[@name=current()])
564 ">
565 <xsl:text>PRUint32</xsl:text>
566 </xsl:when>
567 <!-- custom interface types -->
568 <xsl:when test="
569 (name(current())='enumerator' and
570 ((ancestor::module/enumerator[@name=current()]) or
571 (ancestor::module/if[@target=$self_target]/enumerator[@name=current()]))
572 ) or
573 ((ancestor::module/interface[@name=current()]) or
574 (ancestor::module/if[@target=$self_target]/interface[@name=current()])
575 ) or
576 ((ancestor::module/collection[@name=current()]) or
577 (ancestor::module/if[@target=$self_target]/collection[@name=current()])
578 )
579 ">
580 <xsl:value-of select="."/>
581 </xsl:when>
582 <!-- other types -->
583 <xsl:otherwise>
584 <xsl:message terminate="yes">
585 <xsl:text>Unknown parameter type: </xsl:text>
586 <xsl:value-of select="."/>
587 </xsl:message>
588 </xsl:otherwise>
589 </xsl:choose>
590 </xsl:otherwise>
591 </xsl:choose>
592 </xsl:otherwise>
593 </xsl:choose>
594</xsl:template>
595
596</xsl:stylesheet>
597
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