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 | Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
---|
10 |
|
---|
11 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | available from http://www.virtualbox.org. This file is free software;
|
---|
13 | you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | General Public License (GPL) as published by the Free Software
|
---|
15 | Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 |
|
---|
19 | The contents of this file may alternatively be used under the terms
|
---|
20 | of the Common Development and Distribution License Version 1.0
|
---|
21 | (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
22 | VirtualBox OSE distribution, in which case the provisions of the
|
---|
23 | CDDL are applicable instead of those of the GPL.
|
---|
24 |
|
---|
25 | You may elect to license modified versions of this file under the
|
---|
26 | terms and conditions of either the GPL or the CDDL or both.
|
---|
27 |
|
---|
28 | Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
29 | Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
30 | additional information or have any questions.
|
---|
31 | -->
|
---|
32 |
|
---|
33 | <xsl:stylesheet version="1.0"
|
---|
34 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
35 | xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
---|
36 | >
|
---|
37 | <xsl:output method="text"/>
|
---|
38 |
|
---|
39 | <xsl:strip-space elements="*"/>
|
---|
40 |
|
---|
41 | <!--
|
---|
42 | // helpers
|
---|
43 | ////////////////////////////////////////////////////////////////////////////////
|
---|
44 | -->
|
---|
45 |
|
---|
46 | <!--
|
---|
47 | // templates
|
---|
48 | ////////////////////////////////////////////////////////////////////////////////
|
---|
49 | -->
|
---|
50 |
|
---|
51 | <!--
|
---|
52 | * shut down all implicit templates
|
---|
53 | -->
|
---|
54 | <xsl:template match="*"/>
|
---|
55 |
|
---|
56 | <xsl:template match="idl">
|
---|
57 | <xsl:for-each select="library/result">
|
---|
58 | <xsl:text>{ "</xsl:text>
|
---|
59 | <xsl:choose>
|
---|
60 | <xsl:when test="contains(normalize-space(desc/text()), '. ')">
|
---|
61 | <xsl:value-of select="normalize-space(substring-before(desc/text(), '. '))"/>
|
---|
62 | </xsl:when>
|
---|
63 | <xsl:when test="contains(normalize-space(desc/text()), '.')">
|
---|
64 | <xsl:value-of select="normalize-space(substring-before(desc/text(), '.'))"/>
|
---|
65 | </xsl:when>
|
---|
66 | <xsl:otherwise>
|
---|
67 | <xsl:value-of select="normalize-space(desc/text())"/>
|
---|
68 | </xsl:otherwise>
|
---|
69 | </xsl:choose>
|
---|
70 | <xsl:text>", "</xsl:text>
|
---|
71 | <xsl:value-of select="@name"/>
|
---|
72 | <xsl:text>", </xsl:text>
|
---|
73 | <xsl:value-of select="@value"/>
|
---|
74 | <xsl:text> },
</xsl:text>
|
---|
75 | </xsl:for-each>
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 | <!--
|
---|
79 | * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
80 | * END
|
---|
81 | * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
82 | -->
|
---|
83 |
|
---|
84 | </xsl:stylesheet>
|
---|
85 |
|
---|