1 |
pcg |
1.2 |
<!DOCTYPE xsl:stylesheet> |
2 |
pcg |
1.1 |
<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 |
pcg |
1.3 |
<th>NAME</th><th>TYPE</th><th>DEFAULT</th><th>DEC-GUARD</th> |
10 |
pcg |
1.1 |
</tr> |
11 |
|
|
<xsl:apply-templates select="node()" mode="mbody"/> |
12 |
|
|
</table> |
13 |
|
|
</xsl:template> |
14 |
|
|
|
15 |
pcg |
1.4 |
<xsl:template match="type"> |
16 |
|
|
<h4>TYPE <xsl:value-of select="@name"/></h4> |
17 |
|
|
BASE TYPE: <xsl:value-of select="@type"/><br/> |
18 |
|
|
LENGTH: <xsl:value-of select="@length"/><br/> |
19 |
|
|
MULTIPLIER: <xsl:value-of select="@multiplier"/><br/> |
20 |
|
|
</xsl:template> |
21 |
|
|
|
22 |
pcg |
1.3 |
<xsl:template match="struct"> |
23 |
|
|
<h4>STRUCTURE <xsl:value-of select="@name"/></h4> |
24 |
|
|
<xsl:if test="@class"> |
25 |
|
|
CLASS: <xsl:value-of select="@class"/><br/> |
26 |
|
|
</xsl:if> |
27 |
pcg |
1.1 |
<xsl:call-template name="mbody"/> |
28 |
|
|
</xsl:template> |
29 |
|
|
|
30 |
|
|
<xsl:template match="message"> |
31 |
|
|
<!-- formatting documentation without tags is just dumb, |
32 |
|
|
but my toolset ("vi") is too limited. --> |
33 |
|
|
<h4>MESSAGE <xsl:value-of select="@name"/></h4> |
34 |
|
|
NUMERIC TYPE (hex): <xsl:value-of select="@type"/> |
35 |
|
|
<xsl:if test="@send='yes'"> SEND</xsl:if> |
36 |
|
|
<xsl:if test="@recv='yes'"> RECV</xsl:if> |
37 |
|
|
<xsl:call-template name="mbody"/> |
38 |
|
|
</xsl:template> |
39 |
|
|
|
40 |
|
|
<xsl:template match="member" mode="mbody"> |
41 |
|
|
<tr> |
42 |
|
|
<td><xsl:value-of select="@name"/></td> |
43 |
|
|
<td><xsl:value-of select="@type"/></td> |
44 |
|
|
<td><xsl:value-of select="@default"/></td> |
45 |
pcg |
1.4 |
<td><b><xsl:value-of select="@guard-member"/></b> |
46 |
|
|
<xsl:text> </xsl:text><xsl:value-of select="@guard-cond"/> |
47 |
|
|
</td> |
48 |
pcg |
1.1 |
</tr> |
49 |
|
|
</xsl:template> |
50 |
|
|
|
51 |
|
|
<xsl:template match="text()" mode="mbody"> |
52 |
|
|
<!-- hack --> |
53 |
|
|
<tr><td colspan="4"> |
54 |
|
|
<xsl:copy/> |
55 |
|
|
</td></tr> |
56 |
|
|
</xsl:template> |
57 |
|
|
|
58 |
|
|
<xsl:template match="@*|node()"> |
59 |
|
|
<xsl:copy> |
60 |
|
|
<xsl:apply-templates select="@*|node()"/> |
61 |
|
|
</xsl:copy> |
62 |
|
|
</xsl:template> |
63 |
|
|
|
64 |
|
|
</xsl:stylesheet> |
65 |
|
|
|