2010-02-26 20:25:34 +08:00
|
|
|
<?xml version='1.0'?>
|
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
|
xmlns:doc="http://www.rabbitmq.com/namespaces/ad-hoc/doc"
|
|
|
|
|
version='1.0'>
|
|
|
|
|
|
2010-03-05 00:18:28 +08:00
|
|
|
<xsl:param name="original"/>
|
|
|
|
|
|
2010-02-26 20:25:34 +08:00
|
|
|
<xsl:output method="xml" doctype-public="bug in xslt processor requires fake doctype" doctype-system="otherwise css isn't included" />
|
|
|
|
|
|
|
|
|
|
<xsl:template match="*"/>
|
|
|
|
|
|
2010-02-26 20:52:44 +08:00
|
|
|
<!-- Copy every element through -->
|
|
|
|
|
<xsl:template match="@*|node()">
|
|
|
|
|
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
|
2010-02-26 20:25:34 +08:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
<!-- Copy the root node, and munge the outer part of the page -->
|
|
|
|
|
<xsl:template match="/html">
|
|
|
|
|
<xsl:processing-instruction name="xml-stylesheet">type="text/xml" href="page.xsl"</xsl:processing-instruction>
|
|
|
|
|
<html xmlns:doc="http://www.rabbitmq.com/namespaces/ad-hoc/doc">
|
|
|
|
|
<head>
|
2010-03-05 00:18:28 +08:00
|
|
|
<title><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>) manual page</title>
|
2010-02-26 20:25:34 +08:00
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<doc:div>
|
|
|
|
|
<p>
|
2010-03-05 00:18:28 +08:00
|
|
|
This is the manual page for
|
|
|
|
|
<code><xsl:value-of select="document($original)/refentry/refnamediv/refname"/>(<xsl:value-of select="document($original)/refentry/refmeta/manvolnum"/>)</code>.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<a href="manpages.html">See a list of all manual pages</a>.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
For more general documentation, please see the
|
2010-02-26 20:25:34 +08:00
|
|
|
<a href="admin-guide.html">administrator's guide</a>.
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<doc:toc class="compact">
|
|
|
|
|
<doc:heading>Table of Contents</doc:heading>
|
|
|
|
|
</doc:toc>
|
|
|
|
|
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:apply-templates select="body/div[@class='refentry']"/>
|
2010-02-26 20:25:34 +08:00
|
|
|
</doc:div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
<!-- Specific instructions to revert the DocBook HTML to be more like our ad-hoc XML schema -->
|
|
|
|
|
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:template match="div[@class='refsect1'] | div[@class='refnamediv'] | div[@class='refsynopsisdiv']">
|
2010-02-26 20:25:34 +08:00
|
|
|
<doc:section name="{@title}">
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2010-02-26 20:25:34 +08:00
|
|
|
</doc:section>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:template match="div[@class='refsect2']">
|
2010-02-26 20:25:34 +08:00
|
|
|
<doc:subsection name="{@title}">
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2010-02-26 20:25:34 +08:00
|
|
|
</doc:subsection>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:template match="h2 | h3">
|
2010-02-26 20:25:34 +08:00
|
|
|
<doc:heading>
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2010-02-26 20:25:34 +08:00
|
|
|
</doc:heading>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:template match="pre[@class='screen']">
|
2010-02-26 20:25:34 +08:00
|
|
|
<pre class="sourcecode">
|
2010-02-26 20:29:10 +08:00
|
|
|
<xsl:apply-templates select="node()"/>
|
2010-02-26 20:25:34 +08:00
|
|
|
</pre>
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|
|
|
|
|
|