VirtualBox

source: vbox/trunk/src/VBox/Main/webservice/websrv-cpp.xsl@ 25414

Last change on this file since 25414 was 24679, checked in by vboxsync, 15 years ago

websrv-cpp.xsl: generate default case to shut up gcc's presumably correct bitching about using uninitialized variables e and v. The default case will return some value that is likely to be invalid. In debug builds it will assert.

  • Property svn:eol-style set to native
File size: 64.6 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 websrv-cpp.xsl:
5 XSLT stylesheet that generates methodmaps.cpp from
6 VirtualBox.xidl. This generated C++ code contains
7 all the service implementations that one would
8 normally have to implement manually to create a
9 web service; our generated code automatically maps
10 all SOAP calls into COM/XPCOM method calls.
11
12 Copyright (C) 2006-2009 Sun Microsystems, Inc.
13
14 This file is part of VirtualBox Open Source Edition (OSE), as
15 available from http://www.virtualbox.org. This file is free software;
16 you can redistribute it and/or modify it under the terms of the GNU
17 General Public License (GPL) as published by the Free Software
18 Foundation, in version 2 as it comes in the "COPYING" file of the
19 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
20 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
21
22 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23 Clara, CA 95054 USA or visit http://www.sun.com if you need
24 additional information or have any questions.
25-->
26
27<xsl:stylesheet
28 version="1.0"
29 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
30 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
31 xmlns:exsl="http://exslt.org/common"
32 extension-element-prefixes="exsl">
33
34 <xsl:output method="text"/>
35
36 <xsl:strip-space elements="*"/>
37
38<!-- - - - - - - - - - - - - - - - - - - - - - -
39 global XSLT variables
40 - - - - - - - - - - - - - - - - - - - - - - -->
41
42<xsl:variable name="G_xsltFilename" select="'websrv-cpp.xsl'" />
43
44<xsl:include href="websrv-shared.inc.xsl" />
45
46<!-- collect all interfaces with "wsmap='suppress'" in a global variable for
47 quick lookup -->
48<xsl:variable name="G_setSuppressedInterfaces"
49 select="//interface[@wsmap='suppress']" />
50
51<!-- - - - - - - - - - - - - - - - - - - - - - -
52 root match
53 - - - - - - - - - - - - - - - - - - - - - - -->
54
55<xsl:template match="/idl">
56 <xsl:text><![CDATA[
57/* DO NOT EDIT! This is a generated file.
58 * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
59 * Generator: src/VBox/Main/webservice/websrv-cpp.xsl
60 */
61
62// shared webservice header
63#include "vboxweb.h"
64
65// vbox headers
66#include <VBox/com/com.h>
67#include <VBox/com/array.h>
68#include <VBox/com/ErrorInfo.h>
69#include <VBox/com/errorprint.h>
70#include <VBox/com/EventQueue.h>
71#include <VBox/VRDPAuth.h>
72#include <VBox/version.h>
73
74#include <iprt/assert.h>
75#include <iprt/initterm.h>
76#include <iprt/stream.h>
77#include <iprt/string.h>
78
79// gSOAP headers (must come after vbox includes because it checks for conflicting defs)
80#include "soapH.h"
81
82// standard headers
83#include <map>
84#include <sstream>
85
86// shared strings for debug output
87const char *g_pcszCallingComMethod = " calling COM method %s\n";
88const char *g_pcszDoneCallingComMethod = " done calling COM method\n";
89const char *g_pcszConvertComOutputBack = " convert COM output \"%s\" back to caller format\n";
90const char *g_pcszDoneConvertingComOutputBack = " done converting COM output \"%s\" back to caller format\n";
91const char *g_pcszEntering = "\n-- entering %s\n";
92const char *g_pcszLeaving = "-- leaving %s, rc: 0x%lX (%d)\n";
93
94// generated string constants for all interface names
95const char *g_pcszIUnknown = "IUnknown";
96]]></xsl:text>
97
98 <xsl:for-each select="//interface">
99 <xsl:variable name="ifname" select="@name" />
100 <xsl:value-of select="concat('const char *g_pcsz', $ifname, ' = &quot;', $ifname, '&quot;;')" />
101 <xsl:call-template name="emitNewline" />
102 </xsl:for-each>
103 <xsl:apply-templates />
104</xsl:template>
105
106<!-- - - - - - - - - - - - - - - - - - - - - - -
107 if
108 - - - - - - - - - - - - - - - - - - - - - - -->
109
110<!--
111 * ignore all |if|s except those for WSDL target
112-->
113<xsl:template match="if">
114 <xsl:if test="@target='wsdl'">
115 <xsl:apply-templates/>
116 </xsl:if>
117</xsl:template>
118
119<!-- - - - - - - - - - - - - - - - - - - - - - -
120 cpp
121 - - - - - - - - - - - - - - - - - - - - - - -->
122
123<xsl:template match="cpp">
124<!-- ignore this -->
125</xsl:template>
126
127<!-- - - - - - - - - - - - - - - - - - - - - - -
128 library
129 - - - - - - - - - - - - - - - - - - - - - - -->
130
131<xsl:template match="library">
132 <xsl:text>
133/****************************************************************************
134 *
135 * types: enum converter helper functions
136 *
137 ****************************************************************************/
138 </xsl:text>
139 <!--
140 enum converter functions at top of file
141 -->
142 <xsl:for-each select="//enum">
143 <xsl:variable name="enumname" select="@name" />
144 <!-- generate enum converter for COM-to-SOAP -->
145 <xsl:call-template name="emitNewline" />
146 <xsl:value-of select="concat('vbox__', $enumname, ' ', $G_funcPrefixOutputEnumConverter, $enumname, '(', $enumname, '_T e)')" />
147 <xsl:call-template name="emitNewline" />
148 <xsl:text>{</xsl:text>
149 <xsl:call-template name="emitNewline" />
150 <xsl:value-of select="concat(' vbox__', $enumname, ' v;')" />
151 <xsl:call-template name="emitNewline" />
152 <xsl:call-template name="emitNewline" />
153 <xsl:text> switch(e)</xsl:text>
154 <xsl:call-template name="emitNewline" />
155 <xsl:text> {</xsl:text>
156 <xsl:call-template name="emitNewline" />
157 <xsl:for-each select="const[not(@wsmap='suppress')]">
158 <xsl:variable name="enumconst" select="@name" />
159 <xsl:value-of select="concat(' case ', $enumname, '_', $enumconst, ':')" />
160 <xsl:call-template name="emitNewlineIndent8" />
161 <xsl:value-of select="concat(' v = vbox__', $enumname, '__')" />
162 <!-- escape all "_" in $enumconst -->
163 <xsl:call-template name="escapeUnderscores">
164 <xsl:with-param name="string" select="$enumconst" />
165 </xsl:call-template>
166 <xsl:value-of select="';'" />
167 <xsl:call-template name="emitNewlineIndent8" />
168 <xsl:text>break;</xsl:text>
169 <xsl:call-template name="emitNewline" />
170 </xsl:for-each>
171 <!-- Add a default case so gcc gives us a rest, esp. on darwin. -->
172 <xsl:call-template name="emitNewlineIndent8" />
173 <xsl:text>default:</xsl:text>
174 <xsl:call-template name="emitNewlineIndent8" />
175 <xsl:text> AssertMsgFailed(("e=%d\n", (int)e));</xsl:text>
176 <xsl:call-template name="emitNewlineIndent8" />
177 <xsl:value-of select="concat(' v = (vbox__', $enumname, ')0x7fffdead;')" />
178 <xsl:call-template name="emitNewlineIndent8" />
179 <xsl:text>break; </xsl:text>
180 <xsl:call-template name="emitNewline" />
181 <xsl:text> }</xsl:text>
182 <xsl:call-template name="emitNewline" />
183 <xsl:call-template name="emitNewline" />
184 <xsl:text> return v;</xsl:text>
185 <xsl:call-template name="emitNewline" />
186 <xsl:text>}</xsl:text>
187 <xsl:call-template name="emitNewline" />
188 <!-- generate enum converter for SOAP-to-COM -->
189 <xsl:call-template name="emitNewline" />
190 <xsl:value-of select="concat($enumname, '_T ', $G_funcPrefixInputEnumConverter, $enumname, '(vbox__', $enumname, ' v)')" />
191 <xsl:call-template name="emitNewline" />
192 <xsl:text>{</xsl:text>
193 <xsl:call-template name="emitNewline" />
194 <xsl:value-of select="concat(' ', $enumname, '_T e;')" />
195 <xsl:call-template name="emitNewline" />
196 <xsl:call-template name="emitNewline" />
197 <xsl:text> switch(v)</xsl:text>
198 <xsl:call-template name="emitNewline" />
199 <xsl:text> {</xsl:text>
200 <xsl:call-template name="emitNewline" />
201 <xsl:for-each select="const[not(@wsmap='suppress')]">
202 <xsl:variable name="enumconst" select="@name" />
203 <xsl:value-of select="concat(' case vbox__', $enumname, '__')" />
204 <!-- escape all "_" in $enumconst -->
205 <xsl:call-template name="escapeUnderscores">
206 <xsl:with-param name="string" select="$enumconst" />
207 </xsl:call-template>
208 <xsl:value-of select="':'" />
209 <xsl:call-template name="emitNewlineIndent8" />
210 <xsl:value-of select="concat(' e = ', $enumname, '_', $enumconst, ';')" />
211 <xsl:call-template name="emitNewlineIndent8" />
212 <xsl:text>break;</xsl:text>
213 <xsl:call-template name="emitNewline" />
214 </xsl:for-each>
215 <!-- Insert a default case so gcc gives us a rest, esp. on darwin. -->
216 <xsl:call-template name="emitNewlineIndent8" />
217 <xsl:text>default:</xsl:text>
218 <xsl:call-template name="emitNewlineIndent8" />
219 <xsl:text> AssertMsgFailed(("v=%d\n", (int)v));</xsl:text>
220 <xsl:call-template name="emitNewlineIndent8" />
221 <xsl:value-of select="concat(' e = (', $enumname, '_T)0x7fffbeef;')" />
222 <xsl:call-template name="emitNewlineIndent8" />
223 <xsl:text>break; </xsl:text>
224 <xsl:call-template name="emitNewline" />
225 <xsl:text> }</xsl:text>
226 <xsl:call-template name="emitNewline" />
227 <xsl:call-template name="emitNewline" />
228 <xsl:text> return e;</xsl:text>
229 <xsl:call-template name="emitNewline" />
230 <xsl:text>}</xsl:text>
231 <xsl:call-template name="emitNewline" />
232 </xsl:for-each>
233
234 <xsl:text>
235/****************************************************************************
236 *
237 * types: struct converter helper functions
238 *
239 ****************************************************************************/
240 </xsl:text>
241
242 <xsl:for-each select="//interface[@wsmap='struct']">
243 <xsl:variable name="structname" select="@name" />
244
245 <xsl:call-template name="emitNewline" />
246 <xsl:value-of select="concat('// ', $structname, ' converter: called from method mappers to convert data from')" />
247 <xsl:call-template name="emitNewline" />
248 <xsl:value-of select="concat('// COM interface ', $structname, ', which has wsmap=&quot;struct&quot;, to SOAP structures')" />
249 <xsl:call-template name="emitNewline" />
250 <xsl:value-of select="concat('vbox__', $structname, '* ', $G_funcPrefixOutputEnumConverter, $structname, '(')" />
251 <xsl:call-template name="emitNewline" />
252 <xsl:value-of select="' struct soap *soap,'" />
253 <xsl:call-template name="emitNewline" />
254 <xsl:value-of select="' const WSDLT_ID &amp;idThis,'" />
255 <xsl:call-template name="emitNewline" />
256 <xsl:value-of select="' HRESULT &amp;rc,'" />
257 <xsl:call-template name="emitNewline" />
258 <xsl:value-of select="concat(' ComPtr&lt;', $structname, '&gt; &amp;in)')" />
259 <xsl:call-template name="emitNewline" />
260 <xsl:text>{</xsl:text>
261 <xsl:call-template name="emitNewline" />
262
263 <xsl:value-of select="concat(' vbox__', $structname, ' *resp = NULL;')" />
264 <xsl:call-template name="emitNewline" />
265
266 <xsl:call-template name="emitPrologue"><xsl:with-param name="fSkipHRESULT" select="'1'"/></xsl:call-template>
267
268 <xsl:value-of select="concat(' resp = soap_new_vbox__', $structname, '(soap, -1);')" />
269 <xsl:call-template name="emitNewline" />
270 <xsl:call-template name="emitNewline" />
271
272 <xsl:for-each select="//interface[@name=$structname]/attribute">
273 <xsl:value-of select="concat(' // -- ', $structname, '.', @name)" />
274 <xsl:call-template name="emitNewline" />
275 <!-- recurse! -->
276 <xsl:call-template name="emitGetAttributeComCall">
277 <xsl:with-param name="ifname" select="$structname" />
278 <xsl:with-param name="object" select="'in'" />
279 <xsl:with-param name="attrname" select="@name" />
280 <xsl:with-param name="attrtype" select="@type" />
281 <xsl:with-param name="callerprefix" select="concat('out', '.')" />
282 </xsl:call-template>
283 <xsl:call-template name="emitNewline" />
284 </xsl:for-each>
285
286 <xsl:call-template name="emitEpilogue"><xsl:with-param name="fSkipHRESULT" select="'1'"/></xsl:call-template>
287
288 </xsl:for-each>
289
290 <xsl:apply-templates />
291</xsl:template>
292
293<!-- - - - - - - - - - - - - - - - - - - - - - -
294 class
295 - - - - - - - - - - - - - - - - - - - - - - -->
296
297<xsl:template match="module/class">
298<!-- TODO swallow for now -->
299</xsl:template>
300
301<!-- - - - - - - - - - - - - - - - - - - - - - -
302 enum
303 - - - - - - - - - - - - - - - - - - - - - - -->
304
305<xsl:template match="enum">
306</xsl:template>
307
308<!-- - - - - - - - - - - - - - - - - - - - - - -
309 const
310 - - - - - - - - - - - - - - - - - - - - - - -->
311
312<!--
313<xsl:template match="const">
314 <xsl:apply-templates />
315</xsl:template>
316-->
317
318<!-- - - - - - - - - - - - - - - - - - - - - - -
319 desc
320 - - - - - - - - - - - - - - - - - - - - - - -->
321
322<xsl:template match="desc">
323<!-- TODO swallow for now -->
324</xsl:template>
325
326<!-- - - - - - - - - - - - - - - - - - - - - - -
327 note
328 - - - - - - - - - - - - - - - - - - - - - - -->
329
330<xsl:template match="note">
331<!-- TODO -->
332 <xsl:apply-templates />
333</xsl:template>
334
335<!--
336 emitBeginOfFunctionHeader:
337-->
338
339<xsl:template name="emitBeginOfFunctionHeader">
340 <xsl:param name="ifname" />
341 <xsl:param name="method" />
342
343 <xsl:call-template name="emitNewline" />
344 <xsl:value-of select="concat('int __vbox__', $ifname, '_USCORE', $method, '(')" />
345 <xsl:call-template name="emitNewline" />
346 <xsl:text> struct soap *soap</xsl:text>
347</xsl:template>
348
349<!--
350 emitCppTypeForIDLType:
351 emits the C++ type that corresponds to the given WSDL type in $type.
352 -->
353<xsl:template name="emitCppTypeForIDLType">
354 <xsl:param name="method" />
355 <xsl:param name="type" />
356 <xsl:param name="safearray" />
357 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
358 <xsl:param name="inptr" /> <!-- whether to add INPTR to BSTR (Dmitry template magic) -->
359
360 <!-- look up C++ glue type from IDL type from table array in websrv-shared.inc.xsl -->
361 <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
362
363 <xsl:choose>
364 <xsl:when test="$type='wstring' or $type='uuid'">
365 <xsl:choose>
366 <xsl:when test="$safearray='yes'">
367 <xsl:choose>
368 <xsl:when test="$inptr='yes'">
369 <xsl:value-of select="'com::SafeArray&lt;IN_BSTR&gt;'" /> <!-- input string arrays must use IN_BSTR (see com/array.h) -->
370 </xsl:when>
371 <xsl:otherwise>
372 <xsl:value-of select="'com::SafeArray&lt;BSTR&gt;'" /> <!-- output string arrays use raw BSTR -->
373 </xsl:otherwise>
374 </xsl:choose>
375 </xsl:when>
376 <xsl:otherwise>
377 <xsl:value-of select="'com::Bstr'" />
378 </xsl:otherwise>
379 </xsl:choose>
380 </xsl:when>
381 <!-- if above lookup in table succeeded, use that type -->
382 <xsl:when test="string-length($gluetypefield)">
383 <xsl:call-template name="emitTypeOrArray">
384 <xsl:with-param name="type" select="$gluetypefield"/>
385 <xsl:with-param name="safearray" select="$safearray"/>
386 </xsl:call-template>
387 </xsl:when>
388 <xsl:when test="//enum[@name=$type]">
389 <xsl:call-template name="emitTypeOrArray">
390 <xsl:with-param name="type" select="concat($type, '_T ')"/>
391 <xsl:with-param name="safearray" select="$safearray"/>
392 </xsl:call-template>
393 </xsl:when>
394 <xsl:when test="$type='$unknown'">
395 <xsl:choose>
396 <xsl:when test="$safearray='yes'">
397 <xsl:value-of select="'com::SafeIfaceArray&lt;IUnknown&gt;'" />
398 </xsl:when>
399 <xsl:otherwise>
400 <xsl:value-of select="'ComPtr&lt;IUnknown&gt;'" />
401 </xsl:otherwise>
402 </xsl:choose>
403 </xsl:when>
404 <xsl:when test="//interface[@name=$type]">
405 <xsl:variable name="thatif" select="//interface[@name=$type]" />
406 <xsl:variable name="thatifname" select="$thatif/@name" />
407 <xsl:choose>
408 <xsl:when test="$safearray='yes'">
409 <xsl:value-of select="concat('com::SafeIfaceArray&lt;', $thatifname, '&gt;')" />
410 </xsl:when>
411 <xsl:otherwise>
412 <xsl:value-of select="concat('ComPtr&lt;', $thatifname, '&gt;')" />
413 </xsl:otherwise>
414 </xsl:choose>
415 </xsl:when>
416 <xsl:when test="//collection[@name=$type]">
417 <xsl:variable name="thatif" select="//collection[@name=$type]" />
418 <xsl:variable name="thatifname" select="$thatif/@name" />
419 <xsl:value-of select="concat('ComPtr&lt;', $thatifname, '&gt;')" />
420 </xsl:when>
421 <xsl:otherwise>
422 <xsl:call-template name="fatalError">
423 <xsl:with-param name="msg" select="concat('emitCppTypeForIDLType: Type &quot;', $type, '&quot; in method &quot;', $method, '&quot; is not supported.')" />
424 </xsl:call-template>
425 </xsl:otherwise>
426 </xsl:choose>
427</xsl:template>
428
429
430<!--
431 emitDocumentStyleArgStructs:
432 with WSDL "document" style only, emits those lengthy structs for
433 the input and output argument in the function header.
434-->
435<xsl:template name="emitDocumentStyleArgStructs">
436 <xsl:param name="ifname" />
437 <xsl:param name="methodname" />
438 <xsl:param name="fOutputs" /> <!-- if 1, emit output struct as well -->
439
440 <xsl:text>,</xsl:text>
441 <xsl:call-template name="emitNewline" />
442 <xsl:value-of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_requestMessageElementSuffix, ' *', $G_requestElementVarName)" />
443 <xsl:if test="$fOutputs">
444 <xsl:text>,</xsl:text>
445 <xsl:call-template name="emitNewline" />
446 <xsl:value-of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_responseMessageElementSuffix, ' *', $G_responseElementVarName)" />
447 <!-- <xsl:value-of select="concat(' struct ', $ifname, '__', $methodname, 'Response &amp;', $G_result)" /> -->
448 </xsl:if>
449
450</xsl:template>
451
452<!--
453 emitPrologue:
454 emits the closing ")" for the parameter list and the beginning
455 of the function body.
456 -->
457<xsl:template name="emitPrologue">
458 <xsl:text> WEBDEBUG((g_pcszEntering, __FUNCTION__));
459
460 do {</xsl:text>
461 <xsl:call-template name="emitNewline" />
462</xsl:template>
463
464<!--
465 emitEpilogue
466 -->
467<xsl:template name="emitEpilogue">
468 <xsl:param name="fSkipHRESULT" />
469
470 <xsl:text> } while (0);</xsl:text>
471 <xsl:call-template name="emitNewline" />
472 <xsl:call-template name="emitNewline" />
473 <xsl:text> WEBDEBUG((g_pcszLeaving, __FUNCTION__, rc, rc));</xsl:text>
474 <xsl:call-template name="emitNewline" />
475 <xsl:if test="not($fSkipHRESULT)">
476 <xsl:text>
477 if (FAILED(rc))
478 return SOAP_FAULT;
479 return SOAP_OK;</xsl:text>
480 </xsl:if>
481 <xsl:if test="$fSkipHRESULT">
482 <xsl:text> return resp;</xsl:text>
483 </xsl:if>
484 <xsl:call-template name="emitNewline" />
485 <xsl:text>}</xsl:text>
486 <xsl:call-template name="emitNewline" />
487</xsl:template>
488
489<!--
490 emitObjForMethod:
491 after the function prologue, emit a "pObj" object that
492 specifies the object upon which the method should be invoked.
493-->
494<xsl:template name="emitObjForMethod">
495 <xsl:param name="ifname" />
496 <xsl:param name="wsmap" />
497 <xsl:param name="structprefix" /> <!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" -->
498
499 <xsl:choose>
500 <xsl:when test="$wsmap='global'">
501 <xsl:choose>
502 <xsl:when test="$ifname='IVirtualBox'">
503 <xsl:text> // invoke method on global IVirtualBox instance</xsl:text>
504 <xsl:call-template name="emitNewlineIndent8" />
505 <xsl:text>ComPtr&lt;IVirtualBox&gt; pObj = G_pVirtualBox;</xsl:text>
506 <xsl:call-template name="emitNewline" />
507 </xsl:when>
508 <xsl:otherwise>
509 <xsl:call-template name="fatalError">
510 <xsl:with-param name="msg" select="concat('emitObjForMethod: Unknown interface &quot;', $ifname, '&quot; with wsmap=global in XIDL.')" />
511 </xsl:call-template>
512 </xsl:otherwise>
513 </xsl:choose>
514 </xsl:when>
515 <xsl:when test="($wsmap='managed')">
516 <xsl:text> // look up managed object reference for method call&#10;</xsl:text>
517 <xsl:value-of select="concat(' ComPtr&lt;', $ifname, '&gt; pObj;&#10;')" />
518 <xsl:value-of select="concat(' if (!', $G_requestElementVarName, ')&#10;')" />
519 <xsl:text> {&#10;</xsl:text>
520 <xsl:text> RaiseSoapInvalidObjectFault(soap, "");&#10;</xsl:text>
521 <xsl:text> break;&#10;</xsl:text>
522 <xsl:text> }&#10;</xsl:text>
523 <xsl:value-of select="concat(' const WSDLT_ID &amp;idThis = ', $structprefix, $G_nameObjectRefEncoded, ';&#10;')" />
524 <xsl:value-of select="' if ((rc = findComPtrFromId(soap, idThis, pObj, false)))&#10;'" />
525 <xsl:text> break;&#10;</xsl:text>
526 </xsl:when>
527 </xsl:choose>
528</xsl:template>
529
530<!--
531 emitInputArgConverter:
532 another type converter (from wsdl type to COM types),
533 that generates temporary variables on the stack with
534 the WSDL input parameters converted to the COM types,
535 so we can then pass them to the actual COM method call.
536-->
537<xsl:template name="emitInputArgConverter">
538 <xsl:param name="method" />
539 <xsl:param name="structprefix" /> <!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" -->
540 <xsl:param name="name" />
541 <xsl:param name="type" />
542 <xsl:param name="safearray" />
543
544 <xsl:value-of select="concat(' // convert input arg ', $name)" />
545 <xsl:call-template name="emitNewlineIndent8" />
546
547 <xsl:choose>
548 <xsl:when test="$safearray='yes'">
549 <xsl:value-of select="concat('size_t c', $name, ' = ', $structprefix, $name, '.size();')" />
550 <xsl:call-template name="emitNewlineIndent8" />
551 <xsl:call-template name="emitCppTypeForIDLType">
552 <xsl:with-param name="method" select="$method"/>
553 <xsl:with-param name="type" select="$type"/>
554 <xsl:with-param name="safearray" select="$safearray"/>
555 <xsl:with-param name="inptr" select="'yes'"/>
556 </xsl:call-template>
557 <xsl:value-of select="concat(' comcall_', $name, '(c', $name, ');')" />
558 <xsl:call-template name="emitNewlineIndent8" />
559 <xsl:value-of select="concat('for (size_t i = 0; i &lt; c', $name, '; ++i)')" />
560 <xsl:call-template name="emitNewlineIndent8" />
561 <xsl:value-of select="'{'" />
562 <xsl:call-template name="emitNewlineIndent8" />
563 <xsl:choose>
564 <xsl:when test="$type='$unknown'">
565 <xsl:value-of select="' ComPtr&lt;IUnknown&gt; tmpObject;'" />
566 <xsl:call-template name="emitNewlineIndent8" />
567 <xsl:value-of select="concat(' if ((rc = findComPtrFromId(soap, ', $structprefix, $name, '[i], tmpObject, true)))')" />
568 <xsl:call-template name="emitNewlineIndent8" />
569 <xsl:text> break;</xsl:text>
570 <xsl:call-template name="emitNewlineIndent8" />
571 <xsl:value-of select="concat(' IUnknown *tmpObject2(tmpObject); tmpObject2->AddRef(); comcall_', $name, '[i] = tmpObject;')" />
572 </xsl:when>
573 <xsl:when test="$type='wstring'">
574 <xsl:value-of select="concat(' com::Bstr tmpObject(', $structprefix, $name, '[i].c_str());')" />
575 <xsl:call-template name="emitNewlineIndent8" />
576 <xsl:value-of select="' BSTR tmpObjectB;'" />
577 <xsl:call-template name="emitNewlineIndent8" />
578 <xsl:value-of select="' tmpObject.detachTo(&amp;tmpObjectB);'" />
579 <xsl:call-template name="emitNewlineIndent8" />
580 <xsl:value-of select="concat(' comcall_', $name, '[i] = tmpObjectB;')" />
581 </xsl:when>
582 <xsl:when test="$type='long'">
583 <xsl:call-template name="emitNewlineIndent8" />
584 <xsl:value-of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
585 </xsl:when>
586 <xsl:when test="$type='boolean'">
587 <xsl:call-template name="emitNewlineIndent8" />
588 <xsl:value-of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
589 </xsl:when>
590 <xsl:otherwise>
591 <xsl:call-template name="fatalError">
592 <xsl:with-param name="msg" select="concat('emitInputArgConverter Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not yet supported in safearrays.')" />
593 </xsl:call-template>
594 </xsl:otherwise>
595 </xsl:choose>
596 <xsl:call-template name="emitNewlineIndent8" />
597 <xsl:value-of select="'}'" />
598 <xsl:call-template name="emitNewline" />
599 </xsl:when>
600 <xsl:otherwise>
601 <xsl:call-template name="emitCppTypeForIDLType">
602 <xsl:with-param name="method" select="$method"/>
603 <xsl:with-param name="type" select="$type"/>
604 <xsl:with-param name="safearray" select="$safearray"/>
605 <xsl:with-param name="inptr" select="'yes'"/>
606 </xsl:call-template>
607 <xsl:choose>
608 <xsl:when test="$type='wstring' or $type='uuid'">
609 <xsl:value-of select="concat(' comcall_', $name, '(', $structprefix, $name, '.c_str())')" />
610 </xsl:when>
611 <xsl:when test="//enum[@name=$type]">
612 <xsl:value-of select="concat(' comcall_', $name, ' = ', $G_funcPrefixInputEnumConverter, $type, '(', $structprefix, $name, ')')" />
613 </xsl:when>
614 <xsl:when test="$type='$unknown'">
615 <xsl:value-of select="concat(' comcall_', $name, ';')" />
616 <xsl:call-template name="emitNewlineIndent8" />
617 <xsl:value-of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
618 <xsl:call-template name="emitNewlineIndent8" />
619 <xsl:text> break</xsl:text>
620 </xsl:when>
621 <xsl:when test="(//interface[@name=$type]) or (//collection[@name=$type])">
622 <!-- the type is one of our own interfaces: then it must have a wsmap attr -->
623 <xsl:variable name="thatif" select="(//interface[@name=$type]) | (//collection[@name=$type])" />
624 <xsl:variable name="wsmap" select="$thatif/@wsmap" />
625 <xsl:variable name="thatifname" select="$thatif/@name" />
626 <xsl:choose>
627 <xsl:when test="not($wsmap)">
628 <xsl:call-template name="fatalError">
629 <xsl:with-param name="msg" select="concat('emitInputArgConverter: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; lacks wsmap attribute in XIDL.')" />
630 </xsl:call-template>
631 </xsl:when>
632 <xsl:when test="($wsmap='managed')">
633 <xsl:value-of select="concat(' comcall_', $name, ';')" />
634 <xsl:call-template name="emitNewlineIndent8" />
635 <xsl:value-of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
636 <xsl:call-template name="emitNewlineIndent8" />
637 <xsl:text> break</xsl:text>
638 </xsl:when>
639 <xsl:otherwise>
640 <xsl:call-template name="fatalError">
641 <xsl:with-param name="msg" select="concat('emitInputArgConverter: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; has unsupported wsmap attribute value &quot;', $wsmap, '&quot; in XIDL.')" />
642 </xsl:call-template>
643 </xsl:otherwise>
644 </xsl:choose>
645 </xsl:when>
646 <xsl:otherwise>
647 <xsl:value-of select="concat(' comcall_', $name, ' = ', $structprefix, $name)" />
648 </xsl:otherwise>
649 </xsl:choose>
650 <xsl:text>;
651</xsl:text>
652 </xsl:otherwise>
653 </xsl:choose>
654
655</xsl:template>
656
657<!--
658 emitTypeOrArray
659-->
660
661<xsl:template name="emitTypeOrArray">
662 <xsl:param name="type" />
663 <xsl:param name="safearray" />
664
665 <xsl:choose>
666 <xsl:when test="$safearray='yes'">
667 <xsl:value-of select="concat('com::SafeArray&lt;', $type, '&gt;')" />
668 </xsl:when>
669 <xsl:otherwise>
670 <xsl:value-of select="$type" />
671 </xsl:otherwise>
672 </xsl:choose>
673</xsl:template>
674
675<!--
676 emitOutputArgBuffer:
677 another type converter (from wsdl type to COM types)
678 that generates a buffer variable which receives the
679 data from 'out' and 'return' parameters of the COM method call.
680-->
681<xsl:template name="emitOutputArgBuffer">
682 <xsl:param name="method" />
683 <xsl:param name="name" />
684 <xsl:param name="type" />
685 <xsl:param name="safearray" />
686 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
687
688 <xsl:text> // com output arg for </xsl:text><xsl:value-of select="concat($name, ' (safearray: ', $safearray, ')')" /><xsl:text>
689 </xsl:text>
690 <xsl:call-template name="emitCppTypeForIDLType">
691 <xsl:with-param name="method" select="$method" />
692 <xsl:with-param name="type" select="$type" />
693 <xsl:with-param name="safearray" select="$safearray" />
694 </xsl:call-template>
695 <xsl:value-of select="concat(' comcall_', $varprefix, $name, ';')" />
696 <xsl:call-template name="emitNewline" />
697</xsl:template>
698
699<!--
700 emitOutParam:
701-->
702<xsl:template name="emitOutParam">
703 <xsl:param name="name" />
704 <xsl:param name="type" />
705 <xsl:param name="safearray" />
706 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
707
708 <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
709
710 <xsl:choose>
711 <xsl:when test="$safearray='yes'">
712 <xsl:value-of select="concat('ComSafeArrayAsOutParam(', $varname, ')')" />
713 </xsl:when>
714 <xsl:otherwise>
715 <xsl:choose>
716 <xsl:when test=" ($type='boolean')
717 or ($type='short')
718 or ($type='unsigned short')
719 or ($type='long')
720 or ($type='unsigned long')
721 or ($type='long long')
722 or ($type='unsigned long long')
723 or ($type='result')
724 or (//enum[@name=$type])">
725 <xsl:text>&amp;</xsl:text><xsl:value-of select="$varname" />
726 </xsl:when>
727 <xsl:otherwise>
728 <xsl:value-of select="$varname" /><xsl:text>.asOutParam()</xsl:text>
729 </xsl:otherwise>
730 </xsl:choose>
731 </xsl:otherwise>
732 </xsl:choose>
733</xsl:template>
734
735<!--
736 emitComCall:
737 emits the actual method call with the arguments.
738-->
739<xsl:template name="emitComCall">
740 <xsl:param name="object" /> <!-- normally "pObj->" -->
741 <xsl:param name="methodname" />
742 <xsl:param name="attrname" /> <!-- with attributes only -->
743 <xsl:param name="attrtype" /> <!-- with attributes only -->
744 <xsl:param name="attrsafearray" /> <!-- with attributes only -->
745 <xsl:param name="attrdir" /> <!-- with attributes only: "in" or "return" -->
746 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
747
748 <xsl:variable name="comMethodName">
749 <xsl:call-template name="capitalize"><xsl:with-param name="str" select="$methodname" /></xsl:call-template>
750 </xsl:variable>
751
752 <xsl:call-template name="emitNewlineIndent8" />
753 <xsl:value-of select="concat('WEBDEBUG((g_pcszCallingComMethod, &quot;', $comMethodName, '&quot;));')" />
754 <xsl:call-template name="emitNewlineIndent8" />
755 <xsl:value-of select="concat('rc = ', $object, '-&gt;', $comMethodName, '(')" />
756 <xsl:if test="$attrtype">
757 <xsl:choose>
758 <xsl:when test="$attrdir='in'">
759 <xsl:value-of select="concat('comcall_', $varprefix, @name)" />
760 </xsl:when>
761 <xsl:when test="$attrdir='return'">
762 <xsl:call-template name="emitOutParam">
763 <xsl:with-param name="name" select="$attrname" />
764 <xsl:with-param name="type" select="$attrtype" />
765 <xsl:with-param name="safearray" select="$attrsafearray" />
766 <xsl:with-param name="varprefix" select="$varprefix" />
767 </xsl:call-template>
768 </xsl:when>
769 </xsl:choose>
770 </xsl:if>
771 <xsl:for-each select="param">
772 <xsl:if test="position()=1">
773 <xsl:call-template name="emitNewline" />
774 </xsl:if>
775 <xsl:if test="position() > 1">
776 <xsl:text>,</xsl:text>
777 <xsl:call-template name="emitNewline" />
778 </xsl:if>
779 <xsl:text> </xsl:text>
780 <xsl:choose>
781 <xsl:when test="@dir='in'">
782 <xsl:choose>
783 <xsl:when test="@safearray='yes'">
784 <xsl:value-of select="concat('ComSafeArrayAsInParam(comcall_', $varprefix, @name, ')')" />
785 </xsl:when>
786 <xsl:otherwise>
787 <xsl:value-of select="concat('comcall_', $varprefix, @name)" />
788 </xsl:otherwise>
789 </xsl:choose>
790 </xsl:when>
791 <xsl:when test="@dir='out'">
792 <xsl:call-template name="emitOutParam">
793 <xsl:with-param name="name" select="@name" />
794 <xsl:with-param name="type" select="@type" />
795 <xsl:with-param name="safearray" select="@safearray" />
796 <xsl:with-param name="varprefix" select="$varprefix" />
797 </xsl:call-template>
798 </xsl:when>
799 <xsl:when test="@dir='return'">
800 <xsl:call-template name="emitOutParam">
801 <xsl:with-param name="name" select="$G_result" />
802 <xsl:with-param name="type" select="@type" />
803 <xsl:with-param name="safearray" select="@safearray" />
804 <xsl:with-param name="varprefix" select="$varprefix" />
805 </xsl:call-template>
806 </xsl:when>
807 </xsl:choose>
808 </xsl:for-each>
809 <xsl:text>);</xsl:text>
810 <xsl:call-template name="emitNewlineIndent8" />
811 <xsl:text>if (FAILED(rc))</xsl:text>
812 <xsl:call-template name="emitNewlineIndent8" />
813 <xsl:text>{</xsl:text>
814 <xsl:call-template name="emitNewlineIndent8" />
815 <xsl:value-of select="concat(' RaiseSoapRuntimeFault(soap, rc, ', $object, ');')" />
816 <xsl:call-template name="emitNewlineIndent8" />
817 <xsl:text> break;</xsl:text>
818 <xsl:call-template name="emitNewlineIndent8" />
819 <xsl:text>}</xsl:text>
820 <xsl:call-template name="emitNewlineIndent8" />
821 <xsl:text>WEBDEBUG((g_pcszDoneCallingComMethod));</xsl:text>
822 <xsl:call-template name="emitNewline" />
823</xsl:template>
824
825<!--
826 emitOutputArgBackConverter2: implementation details of emitOutputArgBackConverter.
827 -->
828
829<xsl:template name="emitOutputArgBackConverter2">
830 <xsl:param name="name" />
831 <xsl:param name="varname" />
832 <xsl:param name="type" />
833 <xsl:param name="callerprefix" />
834
835 <xsl:choose>
836 <xsl:when test="$type='wstring' or $type='uuid'">
837 <xsl:value-of select="concat('ConvertComString(', $varname, ')')" />
838 </xsl:when>
839 <xsl:when test="$type='boolean'">
840 <!-- the "!!" avoids a microsoft compiler warning -->
841 <xsl:value-of select="concat('!!', $varname)" />
842 </xsl:when>
843 <xsl:when test=" ($type='octet')
844 or ($type='short')
845 or ($type='unsigned short')
846 or ($type='long')
847 or ($type='unsigned long')
848 or ($type='long long')
849 or ($type='unsigned long long')
850 or ($type='result')">
851 <xsl:value-of select="$varname" />
852 </xsl:when>
853 <xsl:when test="//enum[@name=$type]">
854 <xsl:value-of select="concat($G_funcPrefixOutputEnumConverter, $type, '(', $varname, ')')" />
855 </xsl:when>
856 <xsl:when test="$type='$unknown'">
857 <xsl:value-of select="concat('createOrFindRefFromComPtr(idThis, g_pcszIUnknown, ', $varname, ')')" />
858 </xsl:when>
859 <xsl:when test="//interface[@name=$type]">
860 <!-- the type is one of our own interfaces: then it must have a wsmap attr -->
861 <xsl:variable name="thatif" select="//interface[@name=$type]" />
862 <xsl:variable name="wsmap" select="$thatif/@wsmap" />
863 <xsl:variable name="thatifname" select="$thatif/@name" />
864 <xsl:choose>
865 <xsl:when test=" ($wsmap='managed') or ($wsmap='global')">
866 <xsl:value-of select="concat('createOrFindRefFromComPtr(idThis, g_pcsz', $thatifname, ', ', $varname, ')')" />
867 </xsl:when>
868 <xsl:when test="$wsmap='struct'">
869 <!-- prevent infinite recursion -->
870 <!-- <xsl:call-template name="fatalError"><xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: attempted infinite recursion for type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $ifname, '::', $method)" /></xsl:call-template> -->
871 <xsl:if test="not($callerprefix)">
872 <xsl:value-of select="concat('/* convert COM interface to struct */ ', $G_funcPrefixOutputEnumConverter, $type, '(soap, idThis, rc, ', $varname, ')')" />
873 </xsl:if>
874 </xsl:when>
875 <xsl:otherwise>
876 <xsl:call-template name="fatalError">
877 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $ifname, '::', $method, '&quot; has invalid wsmap attribute value &quot;', $wsmap, '&quot; in XIDL.')" />
878 </xsl:call-template>
879 </xsl:otherwise>
880 </xsl:choose>
881 </xsl:when>
882 <xsl:when test="//collection[@name=$type]">
883 <!-- the type is a collection of our own types: then build an array from it -->
884 <xsl:variable name="collectiontype" select="//collection[@name=$type]/@type" />
885 <xsl:variable name="targetwsmap" select="//interface[@name=$collectiontype]/@wsmap" />
886 <xsl:value-of select="concat('soap_new_vbox__ArrayOf', $collectiontype, '(soap, -1);')" />
887 <xsl:call-template name="emitNewlineIndent8" />
888 <xsl:variable name="enumerator" select="concat('comcall_', $callerprefix, $name, '_enum')" />
889 <xsl:value-of select="concat('ComPtr&lt;', $collectiontype, 'Enumerator&gt; ', $enumerator, ';')" />
890 <xsl:call-template name="emitNewlineIndent8" />
891 <xsl:value-of select="concat('CHECK_ERROR_BREAK( comcall_', $callerprefix, $name, ', Enumerate(', $enumerator, '.asOutParam()) );')" />
892 <xsl:call-template name="emitNewlineIndent8" />
893 <xsl:value-of select="concat('BOOL comcall_', $callerprefix, $name, '_hasmore = FALSE;')" />
894 <xsl:call-template name="emitNewlineIndent8" />
895 <xsl:value-of select="'do {'" />
896 <xsl:call-template name="emitNewlineIndent8" />
897 <xsl:value-of select="concat(' CHECK_ERROR_BREAK( ', $enumerator, ', HasMore(&amp;comcall_', $callerprefix, $name, '_hasmore) );')" />
898 <xsl:call-template name="emitNewlineIndent8" />
899 <xsl:value-of select="concat(' if (!comcall_', $callerprefix, $name, '_hasmore) break;')" />
900 <xsl:call-template name="emitNewlineIndent8" />
901 <xsl:value-of select="concat(' ComPtr&lt;', $collectiontype, '&gt; arrayitem;')" />
902 <xsl:call-template name="emitNewlineIndent8" />
903 <xsl:value-of select="concat(' CHECK_ERROR_BREAK( ', $enumerator, ', GetNext(arrayitem.asOutParam()) );')" />
904 <xsl:call-template name="emitNewlineIndent8" />
905 <xsl:value-of select="concat(' // collection of &quot;', $collectiontype, '&quot;, target interface wsmap: &quot;', $targetwsmap, '&quot;')" />
906 <xsl:call-template name="emitNewlineIndent8" />
907 <xsl:value-of select="concat(' ', $G_responseElementVarName, '-&gt;', $G_result)" />
908 <xsl:value-of select="'->array.push_back('" />
909 <xsl:choose>
910 <xsl:when test="($targetwsmap='managed')">
911 <xsl:value-of select="concat('createOrFindRefFromComPtr(idThis, g_pcsz', $collectiontype, ', arrayitem));')" />
912 </xsl:when>
913 <xsl:when test="$targetwsmap='struct'">
914 <xsl:value-of select="concat($G_funcPrefixOutputEnumConverter, $collectiontype, '(soap, idThis, rc, arrayitem));')" />
915 </xsl:when>
916 <xsl:otherwise>
917 <xsl:call-template name="fatalError">
918 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: Type &quot;', $collectiontype, '&quot; of collection &quot;', $type, '&quot;, used in method &quot;', $method, '&quot;, has unsupported wsmap &quot;', $targetwsmap, '&quot;.')" />
919 </xsl:call-template>
920 </xsl:otherwise>
921 </xsl:choose>
922 <xsl:call-template name="emitNewlineIndent8" />
923 <xsl:value-of select="'} while (1)'" />
924 </xsl:when>
925 <xsl:otherwise>
926 <xsl:call-template name="fatalError">
927 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not supported.')" />
928 </xsl:call-template>
929 </xsl:otherwise>
930 </xsl:choose>
931
932</xsl:template>
933
934<!--
935 emitOutputArgBackConverter:
936 another type converter (from COM type back to WSDL)
937 which converts the output argument from the COM
938 method call back to the WSDL type passed in by the
939 caller.
940-->
941<xsl:template name="emitOutputArgBackConverter">
942 <xsl:param name="ifname" />
943 <xsl:param name="method" />
944 <xsl:param name="name" />
945 <xsl:param name="type" />
946 <xsl:param name="safearray" />
947 <xsl:param name="varprefix" /> <!-- only when called recursively from emitGetAttributeComCall -->
948 <xsl:param name="callerprefix" /> <!-- only for out params or when called recursively from emitGetAttributeComCall -->
949
950 <xsl:variable name="topname" select="$name" />
951 <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
952
953 <xsl:call-template name="emitNewlineIndent8" />
954 <xsl:value-of select="concat('WEBDEBUG((g_pcszConvertComOutputBack, &quot;', $name, '&quot;));')" />
955 <xsl:call-template name="emitNewlineIndent8" />
956
957 <xsl:variable name="receiverVariable">
958 <xsl:choose>
959 <xsl:when test="(not($varprefix))">
960 <xsl:choose>
961 <xsl:when test="$callerprefix"> <!-- callerprefix set but varprefix not: then this is an out parameter :-) -->
962 <xsl:value-of select="concat($G_responseElementVarName, '-&gt;', $name)" />
963 </xsl:when>
964 <xsl:otherwise>
965 <xsl:value-of select="concat($G_responseElementVarName, '-&gt;', $G_result)" />
966 </xsl:otherwise>
967 </xsl:choose>
968 </xsl:when>
969 <xsl:otherwise>
970 <xsl:value-of select="concat($callerprefix, $G_result, '-&gt;', $name)" />
971 </xsl:otherwise>
972 </xsl:choose>
973 </xsl:variable>
974
975 <xsl:choose>
976 <xsl:when test="$safearray='yes'">
977 <xsl:value-of select="concat('for (size_t i = 0; i &lt; ', $varname, '.size(); ++i)')" />
978 <xsl:call-template name="emitNewlineIndent8" />
979 <xsl:value-of select="'{'" />
980 <xsl:call-template name="emitNewlineIndent8" />
981 <!-- look up C++ glue type from IDL type from table array in websrv-shared.inc.xsl -->
982 <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
983 <xsl:choose>
984 <xsl:when test="//interface[@name=$type]">
985 <xsl:value-of select="concat(' ComPtr&lt;', $type, '&gt; tmpObject(', $varname, '[i]);')" />
986 </xsl:when>
987 <xsl:when test="//enum[@name=$type]">
988 <xsl:value-of select="concat(' ', $type, '_T tmpObject(', $varname, '[i]);')" />
989 </xsl:when>
990 <xsl:when test="$type='$unknown'">
991 <xsl:value-of select="concat(' ComPtr&lt;IUnknown&gt; tmpObject(', $varname, '[i]);')" />
992 </xsl:when>
993 <xsl:when test="$type='wstring' or $type='uuid'">
994 <xsl:value-of select="concat(' com::Bstr tmpObject(', $varname, '[i]);')" />
995 </xsl:when>
996 <xsl:when test="$gluetypefield">
997 <xsl:value-of select="concat(' ', $gluetypefield, ' tmpObject(', $varname, '[i]);')" />
998 </xsl:when>
999 <xsl:otherwise>
1000 <xsl:call-template name="fatalError">
1001 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter (1): Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not yet supported in safearrays.')" />
1002 </xsl:call-template>
1003
1004 </xsl:otherwise>
1005 </xsl:choose>
1006 <xsl:call-template name="emitNewlineIndent8" />
1007 <xsl:value-of select="concat(' ', $receiverVariable, '.push_back(')" />
1008 <xsl:call-template name="emitOutputArgBackConverter2">
1009 <xsl:with-param name="name" select="$name"/>
1010 <xsl:with-param name="varname" select="'tmpObject'"/>
1011 <xsl:with-param name="type" select="$type"/>
1012 <xsl:with-param name="callerprefix" select="$callerprefix"/>
1013 </xsl:call-template>
1014 <xsl:value-of select="');'" />
1015 <xsl:call-template name="emitNewlineIndent8" />
1016 <xsl:value-of select="'}'" />
1017 <xsl:call-template name="emitNewline" />
1018 </xsl:when>
1019 <xsl:otherwise>
1020 <!-- emit variable name: "resp->retval = " -->
1021 <xsl:value-of select="$receiverVariable" />
1022
1023 <xsl:value-of select="' = '" />
1024 <xsl:call-template name="emitOutputArgBackConverter2">
1025 <xsl:with-param name="name" select="$name"/>
1026 <xsl:with-param name="varname" select="$varname"/>
1027 <xsl:with-param name="type" select="$type"/>
1028 <xsl:with-param name="callerprefix" select="$callerprefix"/>
1029 </xsl:call-template>
1030 <xsl:value-of select="';'" />
1031 <xsl:call-template name="emitNewline" />
1032
1033 </xsl:otherwise>
1034 </xsl:choose>
1035
1036 <xsl:value-of select="concat(' WEBDEBUG((g_pcszDoneConvertingComOutputBack, &quot;', $name, '&quot;));')" />
1037 <xsl:call-template name="emitNewline" />
1038</xsl:template>
1039
1040<!--
1041 emitGetAttributeComCall
1042 -->
1043<xsl:template name="emitGetAttributeComCall">
1044 <xsl:param name="ifname" />
1045 <xsl:param name="object" /> <!-- normally "pObj->" -->
1046 <xsl:param name="attrname" />
1047 <xsl:param name="attrtype" />
1048 <xsl:param name="attrsafearray" />
1049 <xsl:param name="varprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1050 <xsl:param name="callerprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1051
1052 <xsl:variable name="gettername"><xsl:call-template name="makeGetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1053 <xsl:call-template name="emitOutputArgBuffer">
1054 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1055 <xsl:with-param name="method"><xsl:value-of select="$gettername" /></xsl:with-param>
1056 <xsl:with-param name="name" select="$attrname" />
1057 <xsl:with-param name="type" select="$attrtype" />
1058 <xsl:with-param name="safearray" select="$attrsafearray" />
1059 <xsl:with-param name="varprefix" select="$varprefix" />
1060 </xsl:call-template>
1061 <xsl:variable name="upperattrname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
1062 <!-- actual COM method call -->
1063 <xsl:call-template name="emitComCall">
1064 <xsl:with-param name="methodname" select="concat('COMGETTER(', $upperattrname, ')')" />
1065 <xsl:with-param name="object" select="$object" />
1066 <xsl:with-param name="attrname" select="$attrname" />
1067 <xsl:with-param name="attrtype" select="$attrtype" />
1068 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1069 <xsl:with-param name="attrdir" select="'return'" />
1070 <xsl:with-param name="varprefix" select="$varprefix" />
1071 </xsl:call-template>
1072 <!-- convert back the output data -->
1073 <xsl:call-template name="emitOutputArgBackConverter">
1074 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1075 <xsl:with-param name="method"><xsl:value-of select="$gettername" /></xsl:with-param>
1076 <xsl:with-param name="name" select="$attrname" />
1077 <xsl:with-param name="type" select="$attrtype" />
1078 <xsl:with-param name="safearray" select="$attrsafearray" />
1079 <xsl:with-param name="varprefix" select="$varprefix" />
1080 <xsl:with-param name="callerprefix" select="$callerprefix" />
1081 </xsl:call-template>
1082</xsl:template>
1083
1084<!--
1085 emitSetAttributeComCall
1086 -->
1087<xsl:template name="emitSetAttributeComCall">
1088 <xsl:param name="ifname" />
1089 <xsl:param name="object" /> <!-- normally "pObj->" -->
1090 <xsl:param name="attrname" />
1091 <xsl:param name="attrtype" />
1092 <xsl:param name="attrsafearray" />
1093 <xsl:param name="callerprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1094
1095 <xsl:variable name="settername"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1096 <xsl:variable name="upperattrname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
1097
1098 <xsl:call-template name="emitInputArgConverter">
1099 <xsl:with-param name="method" select="concat($ifname, '::', $settername)" />
1100 <xsl:with-param name="name" select="$attrname" />
1101 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1102 <xsl:with-param name="type" select="$attrtype" />
1103 <xsl:with-param name="safearray" select="$attrsafearray" />
1104 </xsl:call-template>
1105 <xsl:call-template name="emitComCall">
1106 <xsl:with-param name="methodname" select="concat('COMSETTER(', $upperattrname, ')')" />
1107 <xsl:with-param name="object" select="$object" />
1108 <xsl:with-param name="attrname" select="$attrname" />
1109 <xsl:with-param name="attrtype" select="$attrtype" />
1110 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1111 <xsl:with-param name="attrdir" select="'in'" />
1112 </xsl:call-template>
1113</xsl:template>
1114
1115<!--
1116 emitGetAttributeMapper
1117 -->
1118<xsl:template name="emitGetAttributeMapper">
1119 <xsl:param name="ifname" />
1120 <xsl:param name="wsmap" />
1121 <xsl:param name="attrname" />
1122 <xsl:param name="attrtype" />
1123 <xsl:param name="attrreadonly" />
1124 <xsl:param name="attrsafearray" />
1125
1126 <xsl:variable name="gettername"><xsl:call-template name="makeGetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1127
1128 <xsl:call-template name="emitBeginOfFunctionHeader">
1129 <xsl:with-param name="ifname" select="$ifname" />
1130 <xsl:with-param name="method" select="$gettername" />
1131 </xsl:call-template>
1132
1133 <xsl:call-template name="emitDocumentStyleArgStructs">
1134 <xsl:with-param name="ifname" select="$ifname" />
1135 <xsl:with-param name="methodname" select="$gettername" />
1136 <xsl:with-param name="fOutputs" select="$attrtype" />
1137 </xsl:call-template>
1138
1139 <xsl:text>)</xsl:text>
1140 <xsl:call-template name="emitNewline" />
1141 <xsl:text>{</xsl:text>
1142 <xsl:call-template name="emitNewline" />
1143
1144 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1145 <xsl:call-template name="emitNewline" />
1146
1147 <xsl:call-template name="emitPrologue" />
1148
1149 <!-- actual COM method call -->
1150 <!-- <xsl:choose>
1151 array attributes/parameters are not supported yet...
1152 <xsl:when test="@array or @safearray='yes'">
1153 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for &quot;', $attrname, '&quot; because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1154 </xsl:when>
1155 <xsl:otherwise> -->
1156 <xsl:call-template name="emitObjForMethod">
1157 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1158 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1159 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1160 </xsl:call-template>
1161
1162 <xsl:call-template name="emitGetAttributeComCall">
1163 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1164 <xsl:with-param name="object" select='"pObj"' />
1165 <xsl:with-param name="attrname"><xsl:value-of select="$attrname" /></xsl:with-param>
1166 <xsl:with-param name="attrtype"><xsl:value-of select="$attrtype" /></xsl:with-param>
1167 <xsl:with-param name="attrsafearray"><xsl:value-of select="$attrsafearray" /></xsl:with-param>
1168 </xsl:call-template>
1169 <!-- </xsl:otherwise>
1170 </xsl:choose> -->
1171
1172 <xsl:call-template name="emitEpilogue" />
1173</xsl:template>
1174
1175<!--
1176 emitSetAttributeMapper:
1177 -->
1178<xsl:template name="emitSetAttributeMapper">
1179 <xsl:param name="ifname" select="$ifname" />
1180 <xsl:param name="wsmap" select="$wsmap" />
1181 <xsl:param name="attrname" select="$attrname" />
1182 <xsl:param name="attrtype" select="$attrtype" />
1183 <xsl:param name="attrreadonly" select="$attrreadonly" />
1184
1185 <xsl:variable name="settername"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1186
1187 <xsl:call-template name="emitBeginOfFunctionHeader">
1188 <xsl:with-param name="ifname" select="$ifname" />
1189 <xsl:with-param name="method" select="$settername" />
1190 </xsl:call-template>
1191
1192 <xsl:call-template name="emitDocumentStyleArgStructs">
1193 <xsl:with-param name="ifname" select="$ifname" />
1194 <xsl:with-param name="methodname" select="$settername" />
1195 <xsl:with-param name="fOutputs" select="1" />
1196 </xsl:call-template>
1197
1198 <xsl:text>)</xsl:text>
1199 <xsl:call-template name="emitNewline" />
1200 <xsl:text>{</xsl:text>
1201 <xsl:call-template name="emitNewline" />
1202 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1203 <xsl:call-template name="emitNewline" />
1204 <xsl:call-template name="emitPrologue" />
1205
1206 <!-- actual COM method call -->
1207 <!-- <xsl:choose>
1208 array attributes/parameters are not supported yet...
1209 <xsl:when test="@array or @safearray='yes'">
1210 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for &quot;', $attrname, '&quot; because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1211 </xsl:when>
1212 <xsl:otherwise> -->
1213 <xsl:call-template name="emitObjForMethod">
1214 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1215 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1216 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1217 </xsl:call-template>
1218 <xsl:call-template name="emitSetAttributeComCall">
1219 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1220 <xsl:with-param name="object" select='"pObj"' />
1221 <xsl:with-param name="attrname"><xsl:value-of select="$attrname" /></xsl:with-param>
1222 <xsl:with-param name="attrtype"><xsl:value-of select="$attrtype" /></xsl:with-param>
1223 </xsl:call-template>
1224 <!-- </xsl:otherwise>
1225 </xsl:choose> -->
1226
1227 <xsl:call-template name="emitEpilogue" />
1228</xsl:template>
1229
1230<!-- - - - - - - - - - - - - - - - - - - - - - -
1231 interface
1232 - - - - - - - - - - - - - - - - - - - - - - -->
1233
1234<xsl:template match="interface">
1235 <!-- remember the interface name in local variables -->
1236 <xsl:variable name="ifname"><xsl:value-of select="@name" /></xsl:variable>
1237 <xsl:variable name="wsmap"><xsl:value-of select="@wsmap" /></xsl:variable>
1238 <xsl:variable name="wscpp"><xsl:value-of select="@wscpp" /></xsl:variable>
1239
1240 <!-- we can save ourselves verifying the interface here as it's already
1241 done in the WSDL converter -->
1242
1243 <xsl:if test='not( ($wsmap="suppress") or ($wsmap="struct") or ($wscpp="hardcoded") )'>
1244 <xsl:text>
1245/****************************************************************************
1246 *
1247 * interface </xsl:text>
1248<xsl:copy-of select="$ifname" />
1249<xsl:text>
1250 *
1251 ****************************************************************************/
1252</xsl:text>
1253
1254 <!--
1255 here come the attributes
1256 -->
1257 <xsl:for-each select="attribute">
1258 <xsl:variable name="attrname"><xsl:value-of select="@name" /></xsl:variable>
1259 <xsl:variable name="attrtype"><xsl:value-of select="@type" /></xsl:variable>
1260 <xsl:variable name="attrreadonly"><xsl:value-of select="@readonly" /></xsl:variable>
1261 <xsl:variable name="attrsafearray"><xsl:value-of select="@safearray" /></xsl:variable>
1262 <xsl:call-template name="emitNewline" />
1263 <!-- skip this attribute if it has parameters of a type that has wsmap="suppress" -->
1264 <xsl:choose>
1265 <xsl:when test="( $attrtype=($G_setSuppressedInterfaces/@name) )">
1266 <xsl:value-of select="concat('// Skipping attribute ', $attrtype, ' for it is of suppressed type ', $attrtype)" />
1267 </xsl:when>
1268 <xsl:otherwise>
1269 <xsl:choose>
1270 <xsl:when test="@readonly='yes'">
1271 <xsl:value-of select="concat('// read-only attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
1272 </xsl:when>
1273 <xsl:otherwise>
1274 <xsl:value-of select="concat('// read/write attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
1275 </xsl:otherwise>
1276 </xsl:choose>
1277 <xsl:value-of select="concat(' (safearray: ', $attrsafearray, ')')" />
1278 <!-- emit getter method -->
1279 <xsl:call-template name="emitGetAttributeMapper">
1280 <xsl:with-param name="ifname" select="$ifname" />
1281 <xsl:with-param name="wsmap" select="$wsmap" />
1282 <xsl:with-param name="attrname" select="$attrname" />
1283 <xsl:with-param name="attrtype" select="$attrtype" />
1284 <xsl:with-param name="attrreadonly" select="$attrreadonly" />
1285 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1286 </xsl:call-template>
1287 <!-- for read-write attributes, emit setter method -->
1288 <xsl:if test="not(@readonly='yes')">
1289 <xsl:call-template name="emitSetAttributeMapper">
1290 <xsl:with-param name="ifname" select="$ifname" />
1291 <xsl:with-param name="wsmap" select="$wsmap" />
1292 <xsl:with-param name="attrname" select="$attrname" />
1293 <xsl:with-param name="attrtype" select="$attrtype" />
1294 <xsl:with-param name="attrreadonly" select="$attrreadonly" />
1295 </xsl:call-template>
1296 </xsl:if>
1297 </xsl:otherwise> <!-- not wsmap=suppress -->
1298 </xsl:choose>
1299 </xsl:for-each>
1300
1301 <!--
1302 here come the real methods
1303 -->
1304
1305 <xsl:for-each select="method">
1306 <xsl:variable name="methodname"><xsl:value-of select="@name" /></xsl:variable>
1307 <!-- method header: return value "int", method name, soap arguments -->
1308 <!-- skip this method if it has parameters of a type that has wsmap="suppress" -->
1309 <xsl:choose>
1310 <xsl:when test=" (param[@type=($G_setSuppressedInterfaces/@name)])
1311 or (param[@mod='ptr'])" >
1312 <xsl:comment><xsl:value-of select="concat('Skipping method ', $methodname, ' for it has parameters with suppressed types')" /></xsl:comment>
1313 </xsl:when>
1314 <xsl:otherwise>
1315 <xsl:variable name="fHasReturnParms" select="param[@dir='return']" />
1316 <xsl:variable name="fHasOutParms" select="param[@dir='out']" />
1317
1318 <xsl:call-template name="emitNewline" />
1319 <xsl:value-of select="concat('/* method ', $ifname, '::', $methodname, '(')" />
1320 <xsl:for-each select="param">
1321 <xsl:call-template name="emitNewline" />
1322 <xsl:value-of select="concat(' [', @dir, '] ', @type, ' ', @name)" />
1323 <xsl:if test="@safearray='yes'">
1324 <xsl:text>[]</xsl:text>
1325 </xsl:if>
1326 <xsl:if test="not(position()=last())">
1327 <xsl:text>,</xsl:text>
1328 </xsl:if>
1329 </xsl:for-each>
1330 <xsl:text>)</xsl:text>
1331 <xsl:call-template name="emitNewline" />
1332 <xsl:text> */</xsl:text>
1333
1334 <xsl:call-template name="emitBeginOfFunctionHeader">
1335 <xsl:with-param name="ifname" select="$ifname" />
1336 <xsl:with-param name="method" select="$methodname" />
1337 </xsl:call-template>
1338
1339 <xsl:call-template name="emitDocumentStyleArgStructs">
1340 <xsl:with-param name="ifname" select="$ifname" />
1341 <xsl:with-param name="methodname" select="$methodname" />
1342 <xsl:with-param name="fOutputs" select="1" />
1343 </xsl:call-template>
1344 <xsl:text>)</xsl:text>
1345 <xsl:call-template name="emitNewline" />
1346 <xsl:text>{</xsl:text>
1347 <xsl:call-template name="emitNewline" />
1348 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1349 <xsl:call-template name="emitNewline" />
1350 <xsl:call-template name="emitPrologue" />
1351
1352 <xsl:choose>
1353 <xsl:when test="param[@array]">
1354 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING METHOD IMPLEMENTATION for &quot;', $methodname, '&quot; because it has arguments with &quot;array&quot; types. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1355 </xsl:when>
1356 <xsl:otherwise>
1357 <!-- emit the object upon which to invoke the method -->
1358 <xsl:call-template name="emitObjForMethod">
1359 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1360 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1361 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1362 </xsl:call-template>
1363 <!-- next, emit storage variables to convert the SOAP/C++ arguments to COM types -->
1364 <xsl:for-each select="param">
1365 <xsl:variable name="dir" select="@dir" />
1366 <xsl:choose>
1367 <xsl:when test="$dir='in'">
1368 <xsl:call-template name="emitInputArgConverter">
1369 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1370 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1371 <xsl:with-param name="name" select="@name" />
1372 <xsl:with-param name="type" select="@type" />
1373 <xsl:with-param name="safearray" select="@safearray" />
1374 </xsl:call-template>
1375 </xsl:when>
1376 <xsl:when test="$dir='out'">
1377 <xsl:call-template name="emitOutputArgBuffer">
1378 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1379 <xsl:with-param name="name" select="@name" />
1380 <xsl:with-param name="type" select="@type" />
1381 <xsl:with-param name="safearray" select="@safearray" />
1382 </xsl:call-template>
1383 </xsl:when>
1384 <xsl:when test="$dir='return'">
1385 <xsl:call-template name="emitOutputArgBuffer">
1386 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1387 <xsl:with-param name="name" select="$G_result" />
1388 <xsl:with-param name="type" select="@type" />
1389 <xsl:with-param name="safearray" select="@safearray" />
1390 </xsl:call-template>
1391 </xsl:when>
1392 </xsl:choose>
1393 </xsl:for-each>
1394 <!-- actual COM method call -->
1395 <xsl:call-template name="emitComCall">
1396 <xsl:with-param name="object" select='"pObj"' />
1397 <xsl:with-param name="methodname">
1398 <xsl:call-template name="capitalize">
1399 <xsl:with-param name="str" select="$methodname" />
1400 </xsl:call-template>
1401 </xsl:with-param>
1402 </xsl:call-template>
1403 <!-- convert back the output data -->
1404 <xsl:for-each select="param">
1405 <xsl:variable name="dir" select="@dir" />
1406 <xsl:if test="$dir='out'">
1407 <xsl:call-template name="emitOutputArgBackConverter">
1408 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1409 <xsl:with-param name="method" select="$methodname" />
1410 <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
1411 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1412 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1413 <xsl:with-param name="callerprefix" select="'outparms.'"/>
1414 </xsl:call-template>
1415 </xsl:if>
1416 <xsl:if test="$dir='return'">
1417 <!-- return values _normally_ should convert to the input arg from the function prototype,
1418 except when there are both return and out params; in that case gsoap squeezes them all
1419 into the output args structure and the return thing is called "retval" -->
1420 <xsl:choose>
1421 <xsl:when test="$fHasOutParms">
1422 <xsl:call-template name="emitOutputArgBackConverter">
1423 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1424 <xsl:with-param name="method" select="$methodname" />
1425 <xsl:with-param name="name"><xsl:value-of select="$G_result" /></xsl:with-param>
1426 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1427 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1428 <xsl:with-param name="callerprefix" select="'outparms.'"/>
1429 </xsl:call-template>
1430 </xsl:when>
1431 <xsl:otherwise>
1432 <xsl:call-template name="emitOutputArgBackConverter">
1433 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1434 <xsl:with-param name="method" select="$methodname" />
1435 <xsl:with-param name="name"><xsl:value-of select="$G_result" /></xsl:with-param>
1436 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1437 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1438 </xsl:call-template>
1439 </xsl:otherwise>
1440 </xsl:choose>
1441 </xsl:if>
1442 </xsl:for-each>
1443 </xsl:otherwise>
1444 </xsl:choose>
1445 <xsl:call-template name="emitEpilogue" />
1446 </xsl:otherwise>
1447 </xsl:choose>
1448 </xsl:for-each>
1449 </xsl:if>
1450
1451</xsl:template>
1452
1453
1454</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use