summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@lshift.net>2010-02-26 12:52:44 +0000
committerSimon MacMullen <simon@lshift.net>2010-02-26 12:52:44 +0000
commitb26a09c9f791ac03b4288f14c42d896d6b193784 (patch)
treed2334df5565746843b13f4c3cc63484e5ca2b78f
parentff72085ee9d28dede9d4b38e1d5a8dc4ec81f2c5 (diff)
downloadrabbitmq-server-b26a09c9f791ac03b4288f14c42d896d6b193784.tar.gz
Fix internal links in the generated page.
-rw-r--r--Makefile8
-rw-r--r--docs/html-to-website-xml.xsl6
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5fbeefd3..a9c568c1 100644
--- a/Makefile
+++ b/Makefile
@@ -210,10 +210,12 @@ distclean: clean
# This evil with grep and sed is due to the remarkable ugliness otherwise
# experienced trying to get XSLT to work with an input doc where all nodes are
# in a namespace.
+# Also we rename the file before xmlto sees it since xmlto will use the name of
+# the file to make internal links.
rabbitmqctl.xml: docs/rabbitmqctl.1.xml
- xmlto xhtml docs/rabbitmqctl.1.xml
- cat index.html | grep -v DOCTYPE | sed -e s,xmlns=\"http://www.w3.org/1999/xhtml\",, | xsltproc docs/html-to-website-xml.xsl - | xmllint --format - > rabbitmqctl.xml
- rm index.html
+ cp docs/rabbitmqctl.1.xml rabbitmqctl.xml && xmlto xhtml-nochunks rabbitmqctl.xml ; rm rabbitmqctl.xml
+ cat rabbitmqctl.html | grep -v DOCTYPE | sed -e s,xmlns=\"http://www.w3.org/1999/xhtml\",, | xsltproc docs/html-to-website-xml.xsl - | xmllint --format - > rabbitmqctl.xml
+ rm rabbitmqctl.html
# TODO how should this really be deployed?
cp rabbitmqctl.xml ../rabbitmq-website/site/
diff --git a/docs/html-to-website-xml.xsl b/docs/html-to-website-xml.xsl
index 3aaf3bf2..b6117bc7 100644
--- a/docs/html-to-website-xml.xsl
+++ b/docs/html-to-website-xml.xsl
@@ -7,9 +7,9 @@
<xsl:template match="*"/>
-<!-- Copy every element through, deliberately losing all attributes -->
-<xsl:template match="node()">
- <xsl:copy><xsl:apply-templates select="node()"/></xsl:copy>
+<!-- Copy every element through -->
+<xsl:template match="@*|node()">
+ <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
</xsl:template>
<!-- Copy the root node, and munge the outer part of the page -->