]> granicus.if.org Git - docbook-dsssl/commitdiff
Added torefsect1.xsl stylesheet for converting refparameter,
authorMichael Smith <xmldoc@users.sourceforge.net>
Fri, 1 Sep 2006 00:03:46 +0000 (00:03 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Fri, 1 Sep 2006 00:03:46 +0000 (00:03 +0000)
refreturn, etc. markup to refsect1, and added a target in
makefiles for generating DocBook-valid versions of doc source that
can be Xincluded into reference doc.

xsl/docsrc/common/Makefile
xsl/docsrc/fo/Makefile
xsl/docsrc/refentry/Makefile
xsl/docsrc/template/Makefile
xsl/docsrc/torefsect1.xsl [new file with mode: 0644]

index 3db2d185fd2dce2535147704ad7a850e34b9d219..8973b18b2f925a5a58ffd274cbe8ef7abdbabdbd 100644 (file)
@@ -2,15 +2,19 @@ XSLT=../../../cvstools/saxon
 XJPARSE=../../../cvstools/xjparse
 
 JSTYLE=../../docsrc/xsl2jref.xsl
+TOREFSECT1=../../docsrc/torefsect1.xsl
 VPATH=../../common
 
-XMLFILES = common.xml
+XMLFILES = common.xml common.refsect1.xml
 
 all: $(XMLFILES)
 
 clean:
        rm -f $(XMLFILES)
 
+%.refsect1.xml: %.xml $(TOREFSECT1)
+       $(XSLT) $< $(TOREFSECT1) $@
+
 %.xml : %.xsl $(JSTYLE) ../../docsrc/legalnotice.xml
        $(XSLT) $< $(JSTYLE) /dev/null output-file=$@
        $(XJPARSE) $@
index 822619e9ec243524b0da5200dcc0f200057f0333..c720aaf6fc6671d6179d5c288b0f4745e030d4ef 100644 (file)
@@ -1,15 +1,19 @@
 include ../../../cvstools/Makefile.incl
 
 JSTYLE=../../docsrc/xsl2jref.xsl
+TOREFSECT1=../../docsrc/torefsect1.xsl
 VPATH=../../fo
 
-XMLFILES = docparam.xml table.xml
+XMLFILES = docparam.xml table.xml table.refsect1.xml
 
 all: $(XMLFILES)
 
 clean:
        $(RM) $(XMLFILES)
 
+%.refsect1.xml: %.xml $(TOREFSECT1)
+       $(XSLT) $< $(TOREFSECT1) $@
+
 %.xml : %.xsl $(JSTYLE)
        $(XSLT) $< $(JSTYLE) /dev/null output-file=$@
        $(XJPARSE) $@
index c2bd9f8dcac3f80a680e1858b8c81938fd8f18de..64397b5083821dd38ca7b64c013baa1158f50f04 100644 (file)
@@ -2,14 +2,18 @@ XSLT=../../../cvstools/saxon
 XJPARSE=../../../cvstools/xjparse
 
 JSTYLE=../../docsrc/xsl2jref.xsl
+TOREFSECT1=../../docsrc/torefsect1.xsl
 VPATH=../../common
 
-XMLFILES = refentry.xml
+XMLFILES = refentry.xml refentry.refsect1.xml
 
 all: $(XMLFILES)
 
 clean:
        rm -f $(XMLFILES)
 
+%.refsect1.xml: %.xml $(TOREFSECT1)
+       $(XSLT) $< $(TOREFSECT1) $@
+
 %.xml : %.xsl $(JSTYLE) ../../docsrc/legalnotice.xml
        $(XSLT) $< $(JSTYLE) /dev/null output-file=$@
index 1c45f23dfb19dcc863579f6f0235db12deb1a122..67c93f9adc93b517dc3c1264b1b683097a92d51c 100644 (file)
@@ -2,15 +2,19 @@ XSLT=../../../cvstools/saxon
 XJPARSE=../../../cvstools/xjparse
 
 JSTYLE=../../docsrc/xsl2jref.xsl
+TOREFSECT1=../../docsrc/torefsect1.xsl
 VPATH=../../template
 
-XMLFILES = titlepage.xml
+XMLFILES = titlepage.xml titlepage.refsect1.xml
 
 all: $(XMLFILES)
 
 clean:
        rm -f $(XMLFILES)
 
+%.refsect1.xml: %.xml $(TOREFSECT1)
+       $(XSLT) $< $(TOREFSECT1) $@
+
 %.xml : %.xsl $(JSTYLE)
        $(XSLT) $< $(JSTYLE) /dev/null output-file=$@
        $(XJPARSE) $@
diff --git a/xsl/docsrc/torefsect1.xsl b/xsl/docsrc/torefsect1.xsl
new file mode 100644 (file)
index 0000000..eeee509
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:xi="http://www.w3.org/2001/XInclude"
+                xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+                exclude-result-prefixes="xsl xi src"
+                version='1.0'>
+
+<xsl:output method="xml" indent="no"/>
+
+
+<!-- ********************************************************************
+     $Id$
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:template match="node() | @*">
+  <xsl:copy>
+    <xsl:apply-templates select="@* | node()"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="refdescription">
+  <refsect1>
+    <title></title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refauthor">
+  <refsect1>
+    <title>Author</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refversion">
+  <refsect1>
+    <title>Version</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refparameter">
+  <refsect1>
+    <title>Parameters</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refreturn">
+  <refsect1>
+    <title>Returns</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refexception|refthrows">
+  <refsect1>
+    <title>Exceptions</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refsee">
+  <refsect1>
+    <title>See</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refsince">
+  <refsect1>
+    <title>Since</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refserial">
+  <refsect1>
+    <title>Serial</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+<xsl:template match="refdeprecated">
+  <refsect1>
+    <title>Deprecated</title>
+    <xsl:apply-templates/>
+  </refsect1>
+</xsl:template>
+
+</xsl:stylesheet>