1<?xml version='1.0'?>
2<!-- vim: sw=2 sta et
3-->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
7                xmlns="http://docbook2x.sourceforge.net/xmlns/Texi-XML"
8                exclude-result-prefixes="doc"
9                version='1.0'
10                xml:lang="en">
11
12<!-- ********************************************************************
13     $Id: chunk.xsl,v 1.5 2004/08/22 22:46:06 stevecheng Exp $
14     ********************************************************************
15
16     (C) 2000-2004 Steve Cheng <stevecheng@users.sourceforge.net>
17
18     This file is part of the docbook2X XSLT stylesheets for
19     converting DocBook to Texinfo.
20
21     See ../../COPYING for the copyright status of this software.
22
23     ******************************************************************** -->
24
25<doc:reference xmlns="">
26<title>Output the preamble</title>
27</doc:reference>
28
29<!-- ==================================================================== -->
30
31<!-- This is where all processing starts. -->
32<xsl:template match="/">
33  <texinfoset>
34    <xsl:call-template name="make-nodenamemap" />
35    <xsl:apply-templates mode="top-chunk" />
36  </texinfoset>
37</xsl:template>
38
39<!-- ==================================================================== -->
40
41<doc:mode mode="top-chunk" xmlns="">
42<refpurpose>Process a top-level chunk</refpurpose>
43<refdescription>
44<para>
45This mode is supposed to output all the Texi-XML markup
46required for the beginning of the Texinfo file,
47e.g. <sgmltag class="element">settitle</sgmltag>,
48Texinfo directories, etc.   After that, it goes onto
49normal processing.
50</para>
51</refdescription>
52</doc:mode>
53
54<!-- ==================================================================== -->
55
56<xsl:template match="*" mode="top-chunk">
57  <xsl:variable name="is-node">
58    <xsl:apply-templates select="." mode="is-texinfo-node" />
59  </xsl:variable>
60
61  <texinfo>
62    <xsl:attribute name="file">
63      <xsl:call-template name="get-texinfo-file-name" />
64    </xsl:attribute>
65
66    <settitle>
67      <xsl:apply-templates select="." mode="for-title" />
68    </settitle>
69
70    <xsl:call-template name="make-texinfo-directory" />
71
72    <xsl:if test="$is-node = ''">
73      <xsl:call-template name="make-texinfo-node" />
74      <xsl:call-template name="make-texinfo-section" />
75    </xsl:if>
76
77    <xsl:apply-templates select="." />
78  </texinfo>
79</xsl:template>
80
81</xsl:stylesheet>
82