summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <robert.mcqueen@collabora.co.uk>2007-02-09 19:12:35 +0000
committer <robert.mcqueen@collabora.co.uk>2007-02-09 19:12:35 +0000
commitf49068759e274253799a447d3f09102b0fa5c698 (patch)
tree93df79c67a7759c471ad643f0e1c9f20c9409f78
parent1ef0ec5b042c35528e55c875ade5bd18b8b4b30b (diff)
update spec generation XSLT to include the properties
-rw-r--r--test/expected/spec.html.canon5
-rw-r--r--test/input/_Test.xml6
-rw-r--r--tools/doc-generator.xsl26
3 files changed, 35 insertions, 2 deletions
diff --git a/test/expected/spec.html.canon b/test/expected/spec.html.canon
index 9d939808..bc1508c1 100644
--- a/test/expected/spec.html.canon
+++ b/test/expected/spec.html.canon
@@ -128,7 +128,10 @@ Library General Public License for more details.</p><h1><a id="org.freedesktop.T
</dd><dt><code>weasel</code> -
<code>b</code></dt><dd>
<em>Mustela nivalis</em> (or compatible)
- </dd></dl></div></div><h2>Enumerated types:</h2><h3>Adjective</h3>Adjectives which may be applied to a specification<dl><dt><code>Adjective_Leveraging = 0</code></dt><dd>
+ </dd></dl></div></div><h2>Properties:</h2><dl><dt><code>wobbly</code> -
+ <code>b</code></dt><dd>
+ Whether or not this badger is wobbly.
+ </dd></dl><h2>Enumerated types:</h2><h3>Adjective</h3>Adjectives which may be applied to a specification<dl><dt><code>Adjective_Leveraging = 0</code></dt><dd>
Can leverage synergy
</dd><dt><code>Adjective_Synergistic = 1</code></dt><dd>
Can synergize with leverage
diff --git a/test/input/_Test.xml b/test/input/_Test.xml
index f0446305..4dd5a357 100644
--- a/test/input/_Test.xml
+++ b/test/input/_Test.xml
@@ -63,6 +63,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
</tp:docstring>
</signal>
+ <tp:property name="wobbly" type="b">
+ <tp:docstring>
+ Whether or not this badger is wobbly.
+ </tp:docstring>
+ </tp:property>
+
<tp:flags name="Test_Flags" value-prefix="Test">
<tp:docstring>A set of flags</tp:docstring>
<tp:flag suffix="LowBit" value="1">
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
index d86ed2df..99c630bd 100644
--- a/tools/doc-generator.xsl
+++ b/tools/doc-generator.xsl
@@ -69,7 +69,19 @@
<xsl:apply-templates select="signal"/>
</xsl:when>
<xsl:otherwise>
- <p>Interface has no signals.</p>
+ <p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="tp:property">
+ <h2 xmlns="http://www.w3.org/1999/xhtml">Properties:</h2>
+ <dl xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:apply-templates select="tp:property"/>
+ </dl>
+ </xsl:when>
+ <xsl:otherwise>
+ <p xmlns="http://www.w3.org/1999/xhtml">Interface has no properties.</p>
</xsl:otherwise>
</xsl:choose>
@@ -141,6 +153,18 @@
</dl>
</xsl:template>
+ <xsl:template match="tp:property">
+ <dt xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:if test="@name">
+ <code><xsl:value-of select="@name"/></code> -
+ </xsl:if>
+ <code><xsl:value-of select="@type"/></code>
+ </dt>
+ <dd xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:apply-templates select="tp:docstring"/>
+ </dd>
+ </xsl:template>
+
<xsl:template match="method">
<div xmlns="http://www.w3.org/1999/xhtml" class="method">
<h3 xmlns="http://www.w3.org/1999/xhtml"><xsl:value-of select="@name"/> (