xhtml-chunk.xsl revision cc2ee177dbb3befca43e36cfc56778b006c3d050
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="1.0">
4<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
5<xsl:import href="xhtml-common.xsl"/>
6 
7<xsl:template name="process-chunk">
8  <xsl:param name="prev" select="."/>
9  <xsl:param name="next" select="."/>
10 
11  <xsl:variable name="ischunk">
12    <xsl:call-template name="chunk"/>
13  </xsl:variable>
14 
15  <xsl:variable name="chunkfn">
16    <xsl:if test="$ischunk='1'">
17      <xsl:apply-templates mode="chunk-filename" select="."/>
18    </xsl:if>
19  </xsl:variable>
20 
21  <xsl:if test="$ischunk='0'">
22    <xsl:message>
23      <xsl:text>Error </xsl:text>
24      <xsl:value-of select="name(.)"/>
25      <xsl:text> is not a chunk!</xsl:text>
26    </xsl:message>
27  </xsl:if>
28 
29  <xsl:variable name="filename">
30    <xsl:call-template name="make-relative-filename">
31      <xsl:with-param name="base.dir" select="$base.dir"/>
32      <xsl:with-param name="base.name" select="$chunkfn"/>
33    </xsl:call-template>
34  </xsl:variable>
35 
36<!-- FIXME: use Strict when the problems with width on td/th are
37  sorted out. Not yet. -->
38  <xsl:call-template name="write.chunk.with.doctype">
39    <xsl:with-param name="filename" select="$filename"/>
40    <xsl:with-param name="indent" select="'yes'"/>
41   <xsl:with-param name="doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:with-param>
42   <xsl:with-param name="doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:with-param>
43    <xsl:with-param name="content">
44      <xsl:call-template name="chunk-element-content">
45        <xsl:with-param name="prev" select="$prev"/>
46        <xsl:with-param name="next" select="$next"/>
47      </xsl:call-template>
48    </xsl:with-param>
49  </xsl:call-template>
50</xsl:template>
51 
52</xsl:stylesheet>
53