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>GUARD</th> |
10 |
</tr> |
11 |
<xsl:apply-templates select="node()" mode="mbody"/> |
12 |
</table> |
13 |
</xsl:template> |
14 |
|
15 |
<xsl:template match="macro"> |
16 |
<h4>MACRO <xsl:value-of select="@name"/></h4> |
17 |
<xsl:call-template name="mbody"/> |
18 |
</xsl:template> |
19 |
|
20 |
<xsl:template match="message"> |
21 |
<!-- formatting documentation without tags is just dumb, |
22 |
but my toolset ("vi") is too limited. --> |
23 |
<h4>MESSAGE <xsl:value-of select="@name"/></h4> |
24 |
NUMERIC TYPE (hex): <xsl:value-of select="@type"/> |
25 |
<xsl:if test="@send='yes'"> SEND</xsl:if> |
26 |
<xsl:if test="@recv='yes'"> RECV</xsl:if> |
27 |
<xsl:call-template name="mbody"/> |
28 |
</xsl:template> |
29 |
|
30 |
<xsl:template match="member" mode="mbody"> |
31 |
<tr> |
32 |
<td><xsl:value-of select="@name"/></td> |
33 |
<td><xsl:value-of select="@type"/></td> |
34 |
<td><xsl:value-of select="@default"/></td> |
35 |
<td><xsl:value-of select="@guard"/></td> |
36 |
</tr> |
37 |
</xsl:template> |
38 |
|
39 |
<xsl:template match="text()" mode="mbody"> |
40 |
<!-- hack --> |
41 |
<tr><td colspan="4"> |
42 |
<xsl:copy/> |
43 |
</td></tr> |
44 |
</xsl:template> |
45 |
|
46 |
<xsl:template match="@*|node()"> |
47 |
<xsl:copy> |
48 |
<xsl:apply-templates select="@*|node()"/> |
49 |
</xsl:copy> |
50 |
</xsl:template> |
51 |
|
52 |
</xsl:stylesheet> |
53 |
|