5 Copyright 2008 Tungsten Graphics, Inc.
7 This program is free software: you can redistribute it and/or modify it
8 under the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
24 <xsl:output method="html" />
26 <xsl:strip-space elements="*" />
28 <xsl:template match="/trace">
31 <title>Gallium Trace</title>
35 font-family: verdana, sans-serif;
63 <xsl:apply-templates/>
69 <xsl:template match="call">
72 <xsl:value-of select="@class"/>
73 <xsl:text>::</xsl:text>
74 <xsl:value-of select="@method"/>
76 <xsl:text>(</xsl:text>
77 <xsl:apply-templates select="arg"/>
78 <xsl:text>)</xsl:text>
79 <xsl:apply-templates select="ret"/>
83 <xsl:template match="arg|member">
84 <xsl:apply-templates select="@name"/>
85 <xsl:text> = </xsl:text>
86 <xsl:apply-templates />
87 <xsl:if test="position() != last()">
88 <xsl:text>, </xsl:text>
92 <xsl:template match="ret">
93 <xsl:text> = </xsl:text>
94 <xsl:apply-templates />
97 <xsl:template match="bool|int|uint|float|enum">
99 <xsl:value-of select="text()"/>
103 <xsl:template match="bytes">
105 <xsl:text>...</xsl:text>
109 <xsl:template match="string">
111 <xsl:text>"</xsl:text>
112 <xsl:call-template name="break">
113 <xsl:with-param name="text" select="text()"/>
115 <xsl:text>"</xsl:text>
119 <xsl:template match="array|struct">
120 <xsl:text>{</xsl:text>
121 <xsl:apply-templates />
122 <xsl:text>}</xsl:text>
125 <xsl:template match="elem">
126 <xsl:apply-templates />
127 <xsl:if test="position() != last()">
128 <xsl:text>, </xsl:text>
132 <xsl:template match="null">
134 <xsl:text>NULL</xsl:text>
138 <xsl:template match="ptr">
140 <xsl:value-of select="text()"/>
144 <xsl:template match="@name">
146 <xsl:value-of select="."/>
150 <xsl:template name="break">
151 <xsl:param name="text" select="."/>
153 <xsl:when test="contains($text, '
')">
154 <xsl:value-of select="substring-before($text, '
')"/>
156 <xsl:call-template name="break">
157 <xsl:with-param name="text" select="substring-after($text, '
')"/>
161 <xsl:value-of select="$text"/>
166 <xsl:template name="replace">
167 <xsl:param name="text"/>
168 <xsl:param name="from"/>
169 <xsl:param name="to"/>
171 <xsl:when test="contains($text,$from)">
172 <xsl:value-of select="concat(substring-before($text,$from),$to)"/>
173 <xsl:call-template name="replace">
174 <xsl:with-param name="text" select="substring-after($text,$from)"/>
175 <xsl:with-param name="from" select="$from"/>
176 <xsl:with-param name="to" select="$to"/>
180 <xsl:value-of select="$text"/>