… | |
… | |
53 | </xsl:if> |
53 | </xsl:if> |
54 | <xsl:call-template name="mbody"/> |
54 | <xsl:call-template name="mbody"/> |
55 | </xsl:template> |
55 | </xsl:template> |
56 | |
56 | |
57 | <xsl:template match="message"> |
57 | <xsl:template match="message"> |
58 | <!-- formatting documentation without tags is just dumb, |
|
|
59 | but my toolset ("vi") is too limited ;) --> |
|
|
60 | <h4> |
58 | <h4> |
61 | <xsl:if test="@src='server'"><a name="{concat('R', @type)}"/>ORIGIN: SERVER</xsl:if> |
59 | <xsl:if test="@src='server'"><a name="{concat('S', @type)}"/>ORIGIN: SERVER;</xsl:if> |
62 | <xsl:if test="@src='client'"><a name="{concat('S', @type)}"/>ORIGIN: CLIENT</xsl:if> |
60 | <xsl:if test="@src='client'"><a name="{concat('C', @type)}"/>ORIGIN: CLIENT;</xsl:if> |
63 | MESSAGE <xsl:value-of select="@name"/> |
61 | MESSAGE: <xsl:value-of select="@name"/> |
64 | </h4> |
62 | </h4> |
65 | NUMERIC TYPE (hex): <xsl:value-of select="@type"/> |
63 | NUMERIC TYPE (hex): <xsl:value-of select="@type"/> |
66 | <xsl:if test="@src='server'"> |
64 | <xsl:if test="@src='server'"> |
67 | <xsl:variable name="ref" select="@name"/> |
65 | <xsl:variable name="ref" select="@name"/> |
68 | <xsl:for-each select="//message[@src='client' and descendant::ref[@reply=$ref]]"> |
66 | <xsl:for-each select="//message[@src='client' and descendant::ref[@reply=$ref]]"> |
69 | (possibly in response to |
67 | (possibly in response to |
70 | <a href="{concat('#S', @type)}"><xsl:value-of select="concat(@name, '(', @type, ')')"/></a> |
68 | <a href="{concat('#C', @type)}"><xsl:value-of select="concat(@name, '(', @type, ')')"/></a> |
71 | ) |
69 | ) |
72 | </xsl:for-each> |
70 | </xsl:for-each> |
73 | </xsl:if> |
71 | </xsl:if> |
74 | <xsl:call-template name="mbody"/> |
72 | <xsl:call-template name="mbody"/> |
75 | </xsl:template> |
73 | </xsl:template> |
76 | |
74 | |
77 | <xsl:template match="ref"> |
75 | <xsl:template match="ref"> |
78 | <xsl:variable name="ref" select="concat(@ref, @reply)"/> |
76 | <xsl:variable name="ref" select="concat(@ref, @reply)"/> |
79 | <xsl:for-each select="//message[@src='server' and @name=$ref]"> |
77 | <xsl:for-each select="//message[@src='server' and @name=$ref]"> |
80 | <a href="{concat('#R', @type)}"><xsl:value-of select="concat(@name, '(', @type, ')')"/></a> |
78 | <a href="{concat('#S', @type)}"><xsl:value-of select="concat(@name, '(', @type, ')')"/></a> |
81 | </xsl:for-each> |
79 | </xsl:for-each> |
82 | </xsl:template> |
80 | </xsl:template> |
83 | |
81 | |
84 | <xsl:template match="@*|node()"> |
82 | <xsl:template match="@*|node()"> |
85 | <xsl:copy> |
83 | <xsl:copy> |