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">
71 <xsl:attribute name="value">
72 <xsl:apply-templates select="@no"/>
75 <xsl:value-of select="@class"/>
76 <xsl:text>::</xsl:text>
77 <xsl:value-of select="@method"/>
79 <xsl:text>(</xsl:text>
80 <xsl:apply-templates select="arg"/>
81 <xsl:text>)</xsl:text>
82 <xsl:apply-templates select="ret"/>
86 <xsl:template match="arg|member">
87 <xsl:apply-templates select="@name"/>
88 <xsl:text> = </xsl:text>
89 <xsl:apply-templates />
90 <xsl:if test="position() != last()">
91 <xsl:text>, </xsl:text>
95 <xsl:template match="ret">
96 <xsl:text> = </xsl:text>
97 <xsl:apply-templates />
100 <xsl:template match="bool|int|uint|float|enum">
102 <xsl:value-of select="text()"/>
106 <xsl:template match="bytes">
108 <xsl:text>...</xsl:text>
112 <xsl:template match="string">
114 <xsl:text>"</xsl:text>
115 <xsl:call-template name="break">
116 <xsl:with-param name="text" select="text()"/>
118 <xsl:text>"</xsl:text>
122 <xsl:template match="array|struct">
123 <xsl:text>{</xsl:text>
124 <xsl:apply-templates />
125 <xsl:text>}</xsl:text>
128 <xsl:template match="elem">
129 <xsl:apply-templates />
130 <xsl:if test="position() != last()">
131 <xsl:text>, </xsl:text>
135 <xsl:template match="null">
137 <xsl:text>NULL</xsl:text>
141 <xsl:template match="ptr">
143 <xsl:value-of select="text()"/>
147 <xsl:template match="@name">
149 <xsl:value-of select="."/>
153 <xsl:template name="break">
154 <xsl:param name="text" select="."/>
156 <xsl:when test="contains($text, '
')">
157 <xsl:value-of select="substring-before($text, '
')"/>
159 <xsl:call-template name="break">
160 <xsl:with-param name="text" select="substring-after($text, '
')"/>
164 <xsl:value-of select="$text"/>
169 <xsl:template name="replace">
170 <xsl:param name="text"/>
171 <xsl:param name="from"/>
172 <xsl:param name="to"/>
174 <xsl:when test="contains($text,$from)">
175 <xsl:value-of select="concat(substring-before($text,$from),$to)"/>
176 <xsl:call-template name="replace">
177 <xsl:with-param name="text" select="substring-after($text,$from)"/>
178 <xsl:with-param name="from" select="$from"/>
179 <xsl:with-param name="to" select="$to"/>
183 <xsl:value-of select="$text"/>