diff options
| author | Simon MacMullen <simon@lshift.net> | 2010-03-02 11:26:01 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@lshift.net> | 2010-03-02 11:26:01 +0000 |
| commit | 3a7576d1d7e74504ef297bc9e308e7e3752f8b94 (patch) | |
| tree | c1b96c57f4d74ba7bafb2aadf6a9f03ca8763c63 | |
| parent | 7842adbb41ebc687a61cf9f0eaa42c1dfce893e2 (diff) | |
| download | rabbitmq-server-git-3a7576d1d7e74504ef297bc9e308e7e3752f8b94.tar.gz | |
Work around what appears to be a bug in DocBook.
| -rw-r--r-- | docs/examples-to-end.xsl | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/examples-to-end.xsl b/docs/examples-to-end.xsl index adcab2539d..b63ffcb3c9 100644 --- a/docs/examples-to-end.xsl +++ b/docs/examples-to-end.xsl @@ -39,5 +39,45 @@ </refentry> </xsl:template> +<!-- + We show all the subcommands using XML that looks like this: + + <term> + <cmdsynopsis> + <command>list_connections</command> + <arg choice="opt"> + <replaceable>connectioninfoitem</replaceable> + ... + </arg> + </cmdsynopsis> + </term> + + However, while DocBook renders this sensibly for HTML, for some reason it + doen't show anything inside <cmdsynopsis> at all for man pages. I think what + we're doing is semantically correct so this is a bug in DocBook. The following + rules essentially do what DocBook does when <cmdsynopsis> is not inside a + <term>. +--> + +<xsl:template match="term/cmdsynopsis"> + <xsl:apply-templates mode="docbook-bug"/> +</xsl:template> + +<xsl:template match="command" mode="docbook-bug"> + <emphasis role="bold"><xsl:apply-templates mode="docbook-bug"/></emphasis> +</xsl:template> + +<xsl:template match="arg[@choice='opt']" mode="docbook-bug"> + [<xsl:apply-templates mode="docbook-bug"/>] +</xsl:template> + +<xsl:template match="arg[@choice='req']" mode="docbook-bug"> + {<xsl:apply-templates mode="docbook-bug"/>} +</xsl:template> + +<xsl:template match="replaceable" mode="docbook-bug"> + <emphasis><xsl:apply-templates mode="docbook-bug"/></emphasis> +</xsl:template> + </xsl:stylesheet> |
