diff options
| author | Simon MacMullen <simon@lshift.net> | 2010-02-24 14:49:10 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@lshift.net> | 2010-02-24 14:49:10 +0000 |
| commit | 60c14baa96118e587b12716b49f7d66e487a5939 (patch) | |
| tree | cc18d3a2ed0b84a09da6157fc474f75f97fc18b1 /docs/examples-to-end.xsl | |
| parent | 16418a9488e15c4d8ef3bfa9fce69190fb8ec796 (diff) | |
| download | rabbitmq-server-git-60c14baa96118e587b12716b49f7d66e487a5939.tar.gz | |
Rewrite rabbitmqctl man page as DocBook XML taken from the website admin guide. Generate man pages, usage guides and a web page from man pages.
Diffstat (limited to 'docs/examples-to-end.xsl')
| -rw-r--r-- | docs/examples-to-end.xsl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/examples-to-end.xsl b/docs/examples-to-end.xsl new file mode 100644 index 0000000000..adcab2539d --- /dev/null +++ b/docs/examples-to-end.xsl @@ -0,0 +1,43 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" + exclude-result-prefixes="exsl ng db" + version='1.0'> + +<xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.docbook.org/xml/4.5/docbookx.dtd" /> + +<!-- Don't copy exmaples through in place --> +<xsl:template match="*[@role='example-prefix']"/> +<xsl:template match="*[@role='example']"/> + +<!-- Copy everything through (with lower priority) --> +<xsl:template match="@*|node()"> + <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> +</xsl:template> + +<!-- Copy the root node, and add examples at the end--> +<xsl:template match="/refentry"> +<refentry lang="en"> +<xsl:for-each select="*"> + <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> +</xsl:for-each> + <refsect1> + <title>Examples</title> + <variablelist> +<xsl:for-each select="//screen[@role='example']"> + <varlistentry> + <term><command><xsl:copy-of select="text()"/></command></term> + <listitem> + <xsl:copy-of select="following-sibling::para[@role='example']"/> + </listitem> + </varlistentry> +</xsl:for-each> + </variablelist> + </refsect1> +</refentry> +</xsl:template> + +</xsl:stylesheet> + |
