Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2016-06-24 23:50:15 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2016-06-25 19:04:15 +0300
commit041ea4106881a3434e63ca95a38c911515793f09 (patch)
treedd5ee281fad7be281b680f86e8730983e137eb3b /newlib/refcontainers.xslt
parentfdc45c4bfbf382cac03e0b8267771fd7c5f678e6 (diff)
Make newlib manpages via DocBook XML (v3)
Add makedocbook, a tool to process makedoc markup and output DocBook XML refentries. Process all the source files which are processed with makedoc with makedocbook as well Add chapter-texi2docbook, a tool to automatically generate DocBook XML chapter files from the chapter .texi files. For generating man pages all we care about is the content of the refentries, so all this needs to do is convert the @include of the makedoc generated .def files to xi:include of the makedocbook generated .xml files. Add skeleton Docbook XML book files, lib[cm].in.xml which include these generated chapters, which in turn include the generated files containing refentries, which is processed with xsltproc to generate the lib[cm].xml Add new make targets to generate and install man pages from lib[cm].xml
Diffstat (limited to 'newlib/refcontainers.xslt')
-rw-r--r--newlib/refcontainers.xslt14
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/refcontainers.xslt b/newlib/refcontainers.xslt
new file mode 100644
index 000000000..85396f6a8
--- /dev/null
+++ b/newlib/refcontainers.xslt
@@ -0,0 +1,14 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!-- trivial XSLT which removes the refentrycontainer layer -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" doctype-public="-//OASIS//DTD DocBook V4.5//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" />
+ <xsl:strip-space elements="*"/>
+
+ <!-- Whenever you match any node but refentrycontainer or any attribute -->
+ <xsl:template match="node()[not(self::refentrycontainer)]|@*">
+ <!-- Copy the current node -->
+ <xsl:copy>
+ <!-- Including any attributes it has and any child nodes -->
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>