You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by kho braun <kh...@pobox.com> on 2003/03/08 07:58:18 UTC

[PATCH] docbook2document.xsl v1.4 support for docbook article type

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">


Re: [PATCH] docbook2document.xsl v1.4 support for docbook article type

Posted by Jeff Turner <je...@apache.org>.
On Fri, Mar 07, 2003 at 10:58:18PM -0800, kho braun wrote:
> 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.

Patch applied, thanks

--Jeff
> 
> cheers,
> kho