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