1 | <?xml version="1.0"?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 |
|
---|
5 | platform-xidl.xsl:
|
---|
6 | XSLT stylesheet that generates a platform-specific
|
---|
7 | VirtualBox.xidl from ../idl/VirtualBox.xidl, which
|
---|
8 | is identical to the original except that all <if...>
|
---|
9 | sections are resolved (for easier processing).
|
---|
10 |
|
---|
11 | Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
---|
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 | Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
22 | Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
23 | additional information or have any questions.
|
---|
24 | -->
|
---|
25 |
|
---|
26 | <xsl:stylesheet
|
---|
27 | version="1.0"
|
---|
28 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
29 |
|
---|
30 | <xsl:output
|
---|
31 | method="xml"
|
---|
32 | version="1.0"
|
---|
33 | encoding="utf-8"
|
---|
34 | indent="yes"/>
|
---|
35 |
|
---|
36 | <xsl:strip-space
|
---|
37 | elements="*" />
|
---|
38 |
|
---|
39 | <!--
|
---|
40 | template for "idl" match; this emits the header of the target file
|
---|
41 | and recurses into the librarys with interfaces (which are matched below)
|
---|
42 | -->
|
---|
43 | <xsl:template match="/idl">
|
---|
44 | <xsl:comment>
|
---|
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/platform-xidl.xsl
|
---|
48 | </xsl:comment>
|
---|
49 |
|
---|
50 | <idl>
|
---|
51 | <xsl:apply-templates />
|
---|
52 | </idl>
|
---|
53 |
|
---|
54 | </xsl:template>
|
---|
55 |
|
---|
56 | <!--
|
---|
57 | template for "if" match: ignore all ifs except those for wsdl
|
---|
58 | -->
|
---|
59 | <xsl:template match="if">
|
---|
60 | <xsl:if test="@target='wsdl'">
|
---|
61 | <xsl:apply-templates/>
|
---|
62 | </xsl:if>
|
---|
63 | </xsl:template>
|
---|
64 |
|
---|
65 | <!--
|
---|
66 | ignore everything we don't need
|
---|
67 | -->
|
---|
68 | <xsl:template match="cpp|class|enumerator|desc|note">
|
---|
69 | </xsl:template>
|
---|
70 |
|
---|
71 | <!--
|
---|
72 | and keep the rest intact (including all attributes)
|
---|
73 | -->
|
---|
74 | <xsl:template match="library|module|enum|const|interface|attribute|collection|method|param">
|
---|
75 | <xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 |
|
---|
79 | </xsl:stylesheet>
|
---|