summaryrefslogtreecommitdiff
path: root/docs/newapi.xsl
diff options
context:
space:
mode:
authorClaudio Bley <cbley@av-test.de>2013-01-22 11:11:11 +0100
committerClaudio Bley <cbley@av-test.de>2013-02-01 08:47:38 +0100
commit52b1fd2582aaf579cbd2c880ac61ed93823a5c2c (patch)
tree426603ea6d8d005e155b25283f06a6cbb8c61741 /docs/newapi.xsl
parent7d3cef8a5c55a2b2e965874412de86e859eda0f6 (diff)
downloadlibvirt-52b1fd2582aaf579cbd2c880ac61ed93823a5c2c.tar.gz
docs: use div, not table, for notices on opaque types
It's simpler to render and it prevents wrapping the line too early because of the table spacing, border et cetera.
Diffstat (limited to 'docs/newapi.xsl')
-rw-r--r--docs/newapi.xsl110
1 files changed, 54 insertions, 56 deletions
diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index 0d32e55c95..af1dbc8fa7 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -213,14 +213,51 @@
<xsl:text> {
</xsl:text>
</pre>
- <table>
- <xsl:for-each select="field">
- <xsl:choose>
- <xsl:when test='@type = "union"'>
- <tr><td><span class="keyword">union</span> {</td></tr>
- <tr>
- <td><table>
- <xsl:for-each select="union/field">
+ <xsl:if test="field">
+ <table>
+ <xsl:for-each select="field">
+ <xsl:choose>
+ <xsl:when test='@type = "union"'>
+ <tr><td><span class="keyword">union</span> {</td></tr>
+ <tr>
+ <td><table>
+ <xsl:for-each select="union/field">
+ <tr>
+ <td>
+ <span class="type">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ </span>
+ </td>
+ <td><xsl:value-of select="@name"/></td>
+ <xsl:if test="@info != ''">
+ <td>
+ <div class="comment">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </div>
+ </td>
+ </xsl:if>
+ </tr>
+ </xsl:for-each>
+ </table></td>
+ <td></td></tr>
+ <tr><td>}</td>
+ <td><xsl:value-of select="@name"/></td>
+ <xsl:if test="@info != ''">
+ <td>
+ <div class="comment">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </div>
+ </td>
+ </xsl:if>
+ <td></td></tr>
+ </xsl:when>
+ <xsl:otherwise>
<tr>
<td>
<span class="type">
@@ -234,59 +271,20 @@
<td>
<div class="comment">
<xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
+ <xsl:with-param name="text" select="@info"/>
</xsl:call-template>
</div>
</td>
</xsl:if>
</tr>
- </xsl:for-each>
- </table></td>
- <td></td></tr>
- <tr><td>}</td>
- <td><xsl:value-of select="@name"/></td>
- <xsl:if test="@info != ''">
- <td>
- <div class="comment">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
- </xsl:call-template>
- </div>
- </td>
- </xsl:if>
- <td></td></tr>
- </xsl:when>
- <xsl:otherwise>
- <tr>
- <td>
- <span class="type">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@type"/>
- </xsl:call-template>
- </span>
- </td>
- <td><xsl:value-of select="@name"/></td>
- <xsl:if test="@info != ''">
- <td>
- <div class="comment">
- <xsl:call-template name="dumptext">
- <xsl:with-param name="text" select="@info"/>
- </xsl:call-template>
- </div>
- </td>
- </xsl:if>
- </tr>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:if test="not(field)">
- <tr>
- <td colspan="3">
- <span class="undisclosed">The content of this structure is not made public by the API</span>
- </td>
- </tr>
- </xsl:if>
- </table>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </table>
+ </xsl:if>
+ <xsl:if test="not(field)">
+ <div class="undisclosed">The content of this structure is not made public by the API</div>
+ </xsl:if>
<pre>
<xsl:text>
}