VirtualBox

source: vbox/trunk/src/VBox/Main/win/VirtualBox_rgs.xsl@ 8765

Last change on this file since 8765 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 4.3 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 * A template to generate a RGS resource script that contains
5 * registry definitions necessary to properly register
6 * VirtualBox Main API COM components.
7
8 Copyright (C) 2007 Sun Microsystems, Inc.
9
10 This file is part of VirtualBox Open Source Edition (OSE), as
11 available from http://www.virtualbox.org. This file is free software;
12 you can redistribute it and/or modify it under the terms of the GNU
13 General Public License (GPL) as published by the Free Software
14 Foundation, in version 2 as it comes in the "COPYING" file of the
15 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17
18 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 Clara, CA 95054 USA or visit http://www.sun.com if you need
20 additional information or have any questions.
21-->
22
23<xsl:stylesheet version="1.0"
24 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
25
26<xsl:output method="text"/>
27
28<xsl:strip-space elements="*"/>
29
30<!--
31// parameters
32/////////////////////////////////////////////////////////////////////////////
33-->
34
35<!-- Name of the module to generate the RGS script for -->
36<xsl:param name="Module"/>
37
38
39<!--
40// templates
41/////////////////////////////////////////////////////////////////////////////
42-->
43
44<!--
45 * header
46-->
47<xsl:template match="/idl">
48HKCR
49{
50<xsl:apply-templates/>
51}
52</xsl:template>
53
54
55<!--
56 * libraries
57-->
58<xsl:template match="idl/library">
59 NoRemove AppID
60 {
61 {<xsl:value-of select="@appUuid"/>} = s '<xsl:value-of select="@name"/> Application'
62 }
63
64<xsl:apply-templates select="module[@name=$Module]/class"/>
65</xsl:template>
66
67
68<!--
69 * classes
70-->
71<xsl:template match="library//module/class">
72 <xsl:variable name="cname" select="concat(//library/@name,'.',@name)"/>
73 <xsl:variable name="desc" select="concat(@name,' Class')"/>
74 <xsl:text> </xsl:text>
75 <xsl:value-of select="concat($cname,'.1')"/> = s '<xsl:value-of select="$desc"/>'
76 {
77 CLSID = s '{<xsl:value-of select="@uuid"/>}'
78 }
79 <xsl:value-of select="$cname"/> = s '<xsl:value-of select="$desc"/>'
80 {
81 CLSID = s '{<xsl:value-of select="@uuid"/>}'
82 CurVer = s '<xsl:value-of select="concat($cname,'.1')"/>'
83 }
84 NoRemove CLSID
85 {
86 ForceRemove {<xsl:value-of select="@uuid"/>} = s '<xsl:value-of select="$desc"/>'
87 {
88 ProgId = s '<xsl:value-of select="concat($cname,'.1')"/>'
89 VersionIndependentProgID = s '<xsl:value-of select="$cname"/>'
90 <xsl:choose>
91 <xsl:when test="../@context='InprocServer'">InprocServer32</xsl:when>
92 <xsl:when test="../@context='LocalServer'">LocalServer32</xsl:when>
93 <xsl:otherwise>
94 <xsl:message terminate="yes">
95 <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>
96 <xsl:text>module context </xsl:text>
97 <xsl:value-of select="concat('&quot;',../@context,'&quot;')"/>
98 <xsl:text> is invalid!</xsl:text>
99 </xsl:message>
100 </xsl:otherwise>
101 </xsl:choose> = s '%MODULE%'
102 <xsl:if test="../@context='InprocServer'">
103 <xsl:variable name="tmodel" select="(./@threadingModel | ../@threadingModel)[last()]"/>{
104 val ThreadingModel = s '<xsl:choose>
105 <xsl:when test="$tmodel='Apartment'">Apartment</xsl:when>
106 <xsl:when test="$tmodel='Free'">Free</xsl:when>
107 <xsl:when test="$tmodel='Both'">Both</xsl:when>
108 <xsl:when test="$tmodel='Neutral'">Neutral</xsl:when>
109 <xsl:when test="$tmodel='Single'">Single</xsl:when>
110 <xsl:when test="$tmodel='Rental'">Rental</xsl:when>
111 <xsl:otherwise>
112 <xsl:message terminate="yes">
113 <xsl:value-of select="concat(../../@name,'::',@name,': ')"/>
114 <xsl:text>class (or module) threading model </xsl:text>
115 <xsl:value-of select="concat('&quot;',$tmodel,'&quot;')"/>
116 <xsl:text> is invalid!</xsl:text>
117 </xsl:message>
118 </xsl:otherwise>
119 </xsl:choose>'
120 }
121 </xsl:if>
122 val AppId = s '{<xsl:value-of select="//library/@appUuid"/>}'
123 'TypeLib' = s '{<xsl:value-of select="//library/@uuid"/>}'
124 }
125 }
126
127</xsl:template>
128
129
130<!--
131 * eat everything else not explicitly matched
132-->
133<xsl:template match="*">
134</xsl:template>
135
136
137</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette