ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/doc/doc2html.xsl
Revision: 1.3
Committed: Thu Jun 5 10:09:10 2003 UTC (20 years, 11 months ago) by pcg
Content type: application/xml
Branch: MAIN
Changes since 1.2: +7 -4 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 <!DOCTYPE xsl:stylesheet>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:output method="xhtml" omit-xml-declaration='yes' media-type="text/html" encoding="utf-8"/>
5
6 <xsl:template name="mbody">
7 <table border="1">
8 <tr>
9 <th>NAME</th><th>TYPE</th><th>DEFAULT</th><th>DEC-GUARD</th>
10 </tr>
11 <xsl:apply-templates select="node()" mode="mbody"/>
12 </table>
13 </xsl:template>
14
15 <xsl:template match="struct">
16 <h4>STRUCTURE <xsl:value-of select="@name"/></h4>
17 <xsl:if test="@class">
18 CLASS: <xsl:value-of select="@class"/><br/>
19 </xsl:if>
20 <xsl:call-template name="mbody"/>
21 </xsl:template>
22
23 <xsl:template match="message">
24 <!-- formatting documentation without tags is just dumb,
25 but my toolset ("vi") is too limited. -->
26 <h4>MESSAGE <xsl:value-of select="@name"/></h4>
27 NUMERIC TYPE (hex): <xsl:value-of select="@type"/>
28 <xsl:if test="@send='yes'"> SEND</xsl:if>
29 <xsl:if test="@recv='yes'"> RECV</xsl:if>
30 <xsl:call-template name="mbody"/>
31 </xsl:template>
32
33 <xsl:template match="member" mode="mbody">
34 <tr>
35 <td><xsl:value-of select="@name"/></td>
36 <td><xsl:value-of select="@type"/></td>
37 <td><xsl:value-of select="@default"/></td>
38 <td><b><xsl:value-of select="@guard-member"/></b>&#32;<xsl:value-of select="@guard-cond"/></td>
39 </tr>
40 </xsl:template>
41
42 <xsl:template match="text()" mode="mbody">
43 <!-- hack -->
44 <tr><td colspan="4">
45 <xsl:copy/>
46 </td></tr>
47 </xsl:template>
48
49 <xsl:template match="@*|node()">
50 <xsl:copy>
51 <xsl:apply-templates select="@*|node()"/>
52 </xsl:copy>
53 </xsl:template>
54
55 </xsl:stylesheet>
56