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