VirtualBox

source: vbox/trunk/src/VBox/Main/webservice/websrv-typemap.xsl@ 73768

Last change on this file since 73768 was 69381, checked in by vboxsync, 7 years ago

webservices: scm updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 4.2 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4
5 websrv-typemap.xsl:
6 XSLT stylesheet that generates a typemap file from
7 VirtualBox.xidl for use with the gSOAP compilers.
8 See webservice/Makefile.kmk for an overview of all the things
9 generated for the webservice.
10
11 Copyright (C) 2006-2016 Oracle Corporation
12
13 This file is part of VirtualBox Open Source Edition (OSE), as
14 available from http://www.virtualbox.org. This file is free software;
15 you can redistribute it and/or modify it under the terms of the GNU
16 General Public License (GPL) as published by the Free Software
17 Foundation, in version 2 as it comes in the "COPYING" file of the
18 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20-->
21
22<xsl:stylesheet
23 version="1.0"
24 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
26
27 <xsl:output method="text"/>
28
29 <xsl:strip-space elements="*"/>
30
31<!-- - - - - - - - - - - - - - - - - - - - - - -
32 global XSLT variables
33 - - - - - - - - - - - - - - - - - - - - - - -->
34
35<xsl:variable name="G_xsltFilename" select="'websrv-typemap.xsl'" />
36
37<xsl:include href="../idl/typemap-shared.inc.xsl" />
38
39<!-- - - - - - - - - - - - - - - - - - - - - - -
40 root match
41 - - - - - - - - - - - - - - - - - - - - - - -->
42
43<xsl:template match="/idl">
44 <xsl:text><![CDATA[
45# DO NOT EDIT! This is a generated file.
46# Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
47# Generator: src/VBox/Main/webservice/websrv-typemap.xsl
48
49# forces typedefs:
50xsd__int = | long
51xsd__unsignedInt = | unsigned long
52
53# xsd__short =| int16_t
54# xsd__unsignedShort =| uint16_t
55# xsd__int =| int32_t
56# xsd__unsignedInt =| uint32_t
57# xsd__long =| int64_t
58# xsd__unsignedLong =| uint64_t
59
60# Main namespace (which is mapped to vbox__ prefixes):
61]]></xsl:text>
62 <xsl:value-of select="concat('vbox = &quot;', $G_targetNamespace, '&quot;')" />
63 <xsl:text>
64
65# Namespaces for the interfaces in xidl that need to be mapped according to their wsmap attribs:
66</xsl:text>
67 <xsl:apply-templates />
68</xsl:template>
69
70<!-- - - - - - - - - - - - - - - - - - - - - - -
71 if
72 - - - - - - - - - - - - - - - - - - - - - - -->
73
74<!--
75 * ignore all |if|s except those for WSDL target
76-->
77<xsl:template match="if">
78 <xsl:if test="@target='wsdl'">
79 <xsl:apply-templates/>
80 </xsl:if>
81</xsl:template>
82
83<!-- - - - - - - - - - - - - - - - - - - - - - -
84 cpp
85 - - - - - - - - - - - - - - - - - - - - - - -->
86
87<xsl:template match="cpp">
88<!-- ignore this -->
89</xsl:template>
90
91<!-- - - - - - - - - - - - - - - - - - - - - - -
92 library
93 - - - - - - - - - - - - - - - - - - - - - - -->
94
95<xsl:template match="library">
96 <xsl:apply-templates />
97</xsl:template>
98
99<!-- - - - - - - - - - - - - - - - - - - - - - -
100 class
101 - - - - - - - - - - - - - - - - - - - - - - -->
102
103<xsl:template match="module/class">
104<!-- TODO swallow for now -->
105</xsl:template>
106
107<!-- - - - - - - - - - - - - - - - - - - - - - -
108 enum
109 - - - - - - - - - - - - - - - - - - - - - - -->
110
111<xsl:template match="enum">
112</xsl:template>
113
114<!-- - - - - - - - - - - - - - - - - - - - - - -
115 const
116 - - - - - - - - - - - - - - - - - - - - - - -->
117
118<!--
119<xsl:template match="const">
120 <xsl:apply-templates />
121</xsl:template>
122-->
123
124<!-- - - - - - - - - - - - - - - - - - - - - - -
125 desc
126 - - - - - - - - - - - - - - - - - - - - - - -->
127
128<xsl:template match="desc">
129<!-- TODO swallow for now -->
130</xsl:template>
131
132<!-- - - - - - - - - - - - - - - - - - - - - - -
133 note
134 - - - - - - - - - - - - - - - - - - - - - - -->
135
136<xsl:template match="note">
137<!-- TODO -->
138 <xsl:apply-templates />
139</xsl:template>
140
141<xsl:template match="interface | collection">
142 <!-- remember the interface name in local variables -->
143 <xsl:variable name="ifname"><xsl:value-of select="@name" /></xsl:variable>
144 <xsl:variable name="wsmap"><xsl:value-of select="@wsmap" /></xsl:variable>
145 <xsl:choose>
146 <xsl:when test="$wsmap='struct'" />
147 <xsl:when test="$wsmap='suppress'" />
148 <xsl:otherwise>
149 <xsl:value-of select="concat($ifname, ' = ', $G_targetNamespace, $G_targetNamespaceSeparator,
150 $ifname, $G_bindingSuffix, $G_sNewLine)" />
151 </xsl:otherwise>
152 </xsl:choose>
153</xsl:template>
154
155</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use