1 | <?xml version="1.0"?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | platform-xidl.xsl:
|
---|
5 | XSLT stylesheet that generates a platform-specific
|
---|
6 | VirtualBox.xidl from ../idl/VirtualBox.xidl, which
|
---|
7 | is identical to the original except that all <if...>
|
---|
8 | sections are resolved (for easier processing).
|
---|
9 | -->
|
---|
10 | <!--
|
---|
11 | Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
12 |
|
---|
13 | This file is part of VirtualBox base platform packages, as
|
---|
14 | available from https://www.virtualbox.org.
|
---|
15 |
|
---|
16 | This program is free software; you can redistribute it and/or
|
---|
17 | modify it under the terms of the GNU General Public License
|
---|
18 | as published by the Free Software Foundation, in version 3 of the
|
---|
19 | License.
|
---|
20 |
|
---|
21 | This program is distributed in the hope that it will be useful, but
|
---|
22 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
24 | General Public License for more details.
|
---|
25 |
|
---|
26 | You should have received a copy of the GNU General Public License
|
---|
27 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
28 |
|
---|
29 | SPDX-License-Identifier: GPL-3.0-only
|
---|
30 | -->
|
---|
31 |
|
---|
32 | <xsl:stylesheet
|
---|
33 | version="1.0"
|
---|
34 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
35 |
|
---|
36 | <xsl:output
|
---|
37 | method="xml"
|
---|
38 | version="1.0"
|
---|
39 | encoding="utf-8"
|
---|
40 | indent="yes"/>
|
---|
41 |
|
---|
42 | <xsl:strip-space
|
---|
43 | elements="*" />
|
---|
44 |
|
---|
45 | <!--
|
---|
46 | template for "idl" match; this emits the header of the target file
|
---|
47 | and recurses into the libraries with interfaces (which are matched below)
|
---|
48 | -->
|
---|
49 | <xsl:template match="/idl">
|
---|
50 | <xsl:comment>
|
---|
51 | DO NOT EDIT! This is a generated file.
|
---|
52 | Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
|
---|
53 | Generator: src/VBox/Main/webservice/platform-xidl.xsl
|
---|
54 | </xsl:comment>
|
---|
55 |
|
---|
56 | <idl>
|
---|
57 | <xsl:apply-templates />
|
---|
58 | </idl>
|
---|
59 |
|
---|
60 | </xsl:template>
|
---|
61 |
|
---|
62 | <!--
|
---|
63 | template for "if" match: ignore all ifs except those for wsdl
|
---|
64 | -->
|
---|
65 | <xsl:template match="if">
|
---|
66 | <xsl:if test="@target='wsdl'">
|
---|
67 | <xsl:apply-templates/>
|
---|
68 | </xsl:if>
|
---|
69 | </xsl:template>
|
---|
70 |
|
---|
71 | <!--
|
---|
72 | ignore everything we don't need
|
---|
73 | -->
|
---|
74 | <xsl:template match="cpp|class|enumerator">
|
---|
75 | </xsl:template>
|
---|
76 |
|
---|
77 | <!--
|
---|
78 | and keep the rest intact (including all attributes)
|
---|
79 |
|
---|
80 | NOTE: this drops class and everything in it, which I left unchanged
|
---|
81 | since the other xslt scripts blow up badly.
|
---|
82 | -->
|
---|
83 | <xsl:template match="library|module|enum|const|interface|attribute|collection|method|param|result">
|
---|
84 | <xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
|
---|
85 | </xsl:template>
|
---|
86 |
|
---|
87 | <!--
|
---|
88 | keep those completely unchanged, including child nodes (including all
|
---|
89 | attributes)
|
---|
90 | -->
|
---|
91 | <xsl:template match="descGroup|desc|note">
|
---|
92 | <xsl:copy-of select="."/>
|
---|
93 | </xsl:template>
|
---|
94 |
|
---|
95 |
|
---|
96 | </xsl:stylesheet>
|
---|