ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/doc/doc2messages.xsl
Revision: 1.1
Committed: Wed Jun 4 19:12:51 2003 UTC (20 years, 11 months ago) by pcg
Content type: application/xml
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.1 <!DOCTYPE xsl:stylesheet>
2     <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3    
4     <xsl:output method="text" media-type="text/plain" encoding="utf-8"/>
5    
6     <xsl:template match="/">
7     package KGS::Messages;
8    
9     {
10     <xsl:apply-templates/>
11     }
12    
13     1;
14     </xsl:template>
15    
16     <xsl:template match="macro">
17     $macro{<xsl:value-of select="@name"/>} = [<xsl:apply-templates/>
18     ];
19     </xsl:template>
20    
21     <xsl:template match="message">
22     # <xsl:value-of select="@name"/>
23     my $msg = [<xsl:apply-templates/>
24     ];<xsl:if test="@send='yes'">
25     $send{<xsl:value-of select="@name"/>} = [ 0x<xsl:value-of select="@type"/>, $msg ];
26     </xsl:if>
27     <xsl:if test="@recv='yes'">
28     $recv{0x<xsl:value-of select="@type"/>} = [ <xsl:value-of select="@name"/> => $msg ];
29     </xsl:if>
30     </xsl:template>
31    
32     <xsl:template match="member">
33     [<xsl:value-of select="@name"/> => "<xsl:value-of select="@type"/>", "<xsl:value-of select="@default"/>", "<xsl:value-of select="@guard"/>"],<!--
34     --></xsl:template>
35    
36     <xsl:template match="text()">
37     </xsl:template>
38    
39     </xsl:stylesheet>
40