Changeset 53920 in vbox for trunk/src/VBox
- Timestamp:
- Jan 22, 2015 3:21:55 PM (10 years ago)
- Location:
- trunk/src/VBox/Main/idl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/midl.xsl
r50855 r53920 25 25 <xsl:param name="g_fGenProxy" select="'no'"/> 26 26 27 28 <!-- 29 // helper definitions 30 ///////////////////////////////////////////////////////////////////////////// 31 --> 32 33 <!-- 34 * capitalizes the first letter 35 --> 36 <xsl:template name="capitalize"> 37 <xsl:param name="str" select="."/> 38 <xsl:value-of select=" 39 concat( 40 translate(substring($str,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 41 substring($str,2) 42 ) 43 "/> 44 </xsl:template> 45 46 <!-- 47 * uncapitalizes the first letter only if the second one is not capital 48 * otherwise leaves the string unchanged 49 --> 50 <xsl:template name="uncapitalize"> 51 <xsl:param name="str" select="."/> 52 <xsl:choose> 53 <xsl:when test="not(contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', substring($str,2,1)))"> 54 <xsl:value-of select=" 55 concat( 56 translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'), 57 substring($str,2) 58 ) 59 "/> 60 </xsl:when> 61 <xsl:otherwise> 62 <xsl:value-of select="string($str)"/> 63 </xsl:otherwise> 64 </xsl:choose> 65 </xsl:template> 27 <xsl:include href="typemap-shared.inc.xsl"/> 66 28 67 29 … … 249 211 <xsl:otherwise><xsl:value-of select="@extends"/></xsl:otherwise> 250 212 </xsl:choose> 251 <xsl:text>
{
</xsl:text> 213 <xsl:call-template name="xsltprocNewlineOutputHack"/> 214 <xsl:text>{
</xsl:text> 252 215 <!-- attributes (properties) --> 253 216 <xsl:apply-templates select="attribute"/> -
trunk/src/VBox/Main/idl/xpidl.xsl
r50183 r53920 22 22 <xsl:strip-space elements="*"/> 23 23 24 <xsl:include href="typemap-shared.inc.xsl"/> 24 25 25 26 <!-- … … 29 30 30 31 <!-- 31 * capitalizes the first letter32 -->33 <xsl:template name="capitalize">34 <xsl:param name="str" select="."/>35 <xsl:value-of select="36 concat(37 translate(substring($str,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),38 substring($str,2)39 )40 "/>41 </xsl:template>42 43 <!--44 * uncapitalizes the first letter only if the second one is not capital45 * otherwise leaves the string unchanged46 -->47 <xsl:template name="uncapitalize">48 <xsl:param name="str" select="."/>49 <xsl:choose>50 <xsl:when test="not(contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', substring($str,2,1)))">51 <xsl:value-of select="52 concat(53 translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),54 substring($str,2)55 )56 "/>57 </xsl:when>58 <xsl:otherwise>59 <xsl:value-of select="string($str)"/>60 </xsl:otherwise>61 </xsl:choose>62 </xsl:template>63 64 <!--65 32 * translates the string to uppercase 66 33 --> 67 34 <xsl:template name="uppercase"> 68 35 <xsl:param name="str" select="."/> 69 <xsl:value-of select=" 70 translate($str,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ') 71 "/> 36 <xsl:value-of select="translate($str, $G_lowerCase, $G_upperCase)"/> 72 37 </xsl:template> 73 38 … … 247 212 <xsl:otherwise><xsl:value-of select="@extends"/></xsl:otherwise> 248 213 </xsl:choose> 249 <xsl:text>
{
</xsl:text> 214 <xsl:call-template name="xsltprocNewlineOutputHack"/> 215 <xsl:text>{
</xsl:text> 250 216 <!-- attributes (properties) --> 251 217 <xsl:apply-templates select="attribute"/>
Note:
See TracChangeset
for help on using the changeset viewer.