Added stylesheet which converts manrefs to docbook book content.
[id-docbook-common-moved-to-github.git] / ref2dbinc.xsl
diff --git a/ref2dbinc.xsl b/ref2dbinc.xsl
new file mode 100644 (file)
index 0000000..764899c
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- $Id: ref2dbinc.xsl,v 1.1 2006-04-20 12:10:50 adam Exp $ -->
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+    <xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/refentry">
+  <section>
+    <title>
+      <xsl:value-of select="refmeta/refentrytitle"/>
+    </title>
+    <xsl:apply-templates/>
+  </section>
+</xsl:template>
+
+<xsl:template match="refnamediv">
+  <para>
+     <xsl:value-of select="refpurpose"/> 
+  </para>
+</xsl:template>
+
+<xsl:template match="refmeta">
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv">
+  <xsl:copy-of select="cmdsynopsis"/>
+</xsl:template>
+
+<xsl:template match="refsect1">
+ <section>
+  <xsl:copy-of select="*"/>
+ </section>
+</xsl:template>
+
+</xsl:stylesheet>
+