forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kho braun <...@pobox.com>
Subject [PATCH] docbook2document.xsl v1.4 support for docbook article type
Date Sat, 08 Mar 2003 06:58:18 GMT
I'm trying out forrest with some sources that conform to the docbook DTD, using the docbook2document
stylesheet.
I noticed that this stylesheet does support the docbook chapter and book but not the docbook
article.

Below a context diff that when applied provides at least some rudimentary support for a docbook
article type.
If the omission is on purpose obviously this patch is irrelevant.

cheers,
kho

----
kho braun.


Patch for docbook2document.xsl  cvs version 1.4


***************
*** 14,20 ****
        <xsl:output method="xml" indent="yes" doctype-system="http://localhost/forrest/dtd/document-v11.dtd"
doctype-public="-//APACHE//DTD Documentation V1.1//EN" encoding="UTF-8"/>

        <xsl:template match="/">
!             <xsl:apply-templates select="book|chapter|revhistory"/>
        </xsl:template>

        <xsl:template match="/book">
--- 14,20 ----
        <xsl:output method="xml" indent="yes" doctype-system="http://localhost/forrest/dtd/document-v11.dtd"
doctype-public="-//APACHE//DTD Documentation V1.1//EN" encoding="UTF-8"/>

        <xsl:template match="/">
!             <xsl:apply-templates select="book|chapter|revhistory|article"/>
        </xsl:template>

        <xsl:template match="/book">
***************
*** 56,61 ****
--- 56,83 ----
                    </body>
              </document>
        </xsl:template>
+
+       <xsl:template match="/article">
+             <document>
+                   <header>
+                         <xsl:apply-templates select="articleinfo/title"/>
+                         <xsl:apply-templates select="articleinfo/subtitle"/>
+                         <authors>
+                               <xsl:apply-templates select="articleinfo/author"/>
+                               <xsl:apply-templates select="articleinfo/corpauthor"/>
+                         </authors>
+                   </header>
+                   <body>
+                         <xsl:apply-templates select="node()[
+                               local-name() != 'title' and
+                               local-name() != 'subtitle' and
+                               local-name() != 'articleinfo'
+                               ]"/>
+                         <xsl:call-template name="apply-footnotes"/>
+                   </body>
+             </document>
+       </xsl:template>
+

        <xsl:template name="apply-footnotes">
              <xsl:if test="//footnote">


Mime
View raw message