1 | <?xml version="1.0"?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | A template to generate a C header that will contain all result code
|
---|
5 | definitions as entires of the const RTCOMERRMSG array (for use in the
|
---|
6 | %Rhrc format specifier) as they are defined in the VirtualBox interface
|
---|
7 | definition file (src/VBox/Main/idl/VirtualBox.xidl).
|
---|
8 | -->
|
---|
9 | <!--
|
---|
10 | Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
11 |
|
---|
12 | This file is part of VirtualBox base platform packages, as
|
---|
13 | available from https://www.virtualbox.org.
|
---|
14 |
|
---|
15 | This program is free software; you can redistribute it and/or
|
---|
16 | modify it under the terms of the GNU General Public License
|
---|
17 | as published by the Free Software Foundation, in version 3 of the
|
---|
18 | License.
|
---|
19 |
|
---|
20 | This program is distributed in the hope that it will be useful, but
|
---|
21 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
23 | General Public License for more details.
|
---|
24 |
|
---|
25 | You should have received a copy of the GNU General Public License
|
---|
26 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
27 |
|
---|
28 | The contents of this file may alternatively be used under the terms
|
---|
29 | of the Common Development and Distribution License Version 1.0
|
---|
30 | (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
31 | in the VirtualBox distribution, in which case the provisions of the
|
---|
32 | CDDL are applicable instead of those of the GPL.
|
---|
33 |
|
---|
34 | You may elect to license modified versions of this file under the
|
---|
35 | terms and conditions of either the GPL or the CDDL or both.
|
---|
36 |
|
---|
37 | SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
38 | -->
|
---|
39 |
|
---|
40 | <xsl:stylesheet version="1.0"
|
---|
41 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
42 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
---|
43 | >
|
---|
44 | <xsl:output method="text"/>
|
---|
45 |
|
---|
46 | <xsl:strip-space elements="*"/>
|
---|
47 |
|
---|
48 | <!--
|
---|
49 | // helpers
|
---|
50 | ////////////////////////////////////////////////////////////////////////////////
|
---|
51 | -->
|
---|
52 |
|
---|
53 | <!--
|
---|
54 | // templates
|
---|
55 | ////////////////////////////////////////////////////////////////////////////////
|
---|
56 | -->
|
---|
57 |
|
---|
58 | <!--
|
---|
59 | * shut down all implicit templates
|
---|
60 | -->
|
---|
61 | <xsl:template match="*"/>
|
---|
62 |
|
---|
63 | <xsl:template match="idl">
|
---|
64 | <xsl:for-each select="library/application/result">
|
---|
65 | <xsl:text>{ "</xsl:text>
|
---|
66 | <xsl:choose>
|
---|
67 | <xsl:when test="contains(normalize-space(desc/text()), '. ')">
|
---|
68 | <xsl:value-of select="normalize-space(substring-before(desc/text(), '. '))"/>
|
---|
69 | </xsl:when>
|
---|
70 | <xsl:when test="contains(normalize-space(desc/text()), '.')">
|
---|
71 | <xsl:value-of select="normalize-space(substring-before(desc/text(), '.'))"/>
|
---|
72 | </xsl:when>
|
---|
73 | <xsl:otherwise>
|
---|
74 | <xsl:value-of select="normalize-space(desc/text())"/>
|
---|
75 | </xsl:otherwise>
|
---|
76 | </xsl:choose>
|
---|
77 | <xsl:text>", "</xsl:text>
|
---|
78 | <xsl:value-of select="@name"/>
|
---|
79 | <xsl:text>", (VBOXSTATUSTYPE)</xsl:text>
|
---|
80 | <xsl:value-of select="@value"/>
|
---|
81 | <xsl:text>L },
</xsl:text>
|
---|
82 | </xsl:for-each>
|
---|
83 | </xsl:template>
|
---|
84 |
|
---|
85 | <!--
|
---|
86 | * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
87 | * END
|
---|
88 | * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
89 | -->
|
---|
90 |
|
---|
91 | </xsl:stylesheet>
|
---|
92 |
|
---|