source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/html/chunkfast.xsl@ 15c7d39

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 15c7d39 was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.7 KB
Line 
1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2 xmlns:exsl="http://exslt.org/common"
3 xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
4 version="1.0"
5 exclude-result-prefixes="cf exsl">
6
7<!-- ********************************************************************
8 $Id: chunkfast.xsl 8345 2009-03-16 06:44:07Z bobstayton $
9 ********************************************************************
10
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://docbook.sf.net/release/xsl/current/ for
13 copyright and other information.
14
15 ******************************************************************** -->
16
17<!-- ==================================================================== -->
18
19<xsl:import href="chunk.xsl"/>
20<xsl:param name="chunk.fast" select="1"/>
21
22<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
23
24<!-- ==================================================================== -->
25
26<xsl:template name="process-chunk-element">
27 <xsl:choose>
28 <xsl:when test="$chunk.fast != 0 and $exsl.node.set.available != 0">
29 <xsl:variable name="genid" select="generate-id()"/>
30
31 <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
32
33 <xsl:variable name="prevdiv"
34 select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
35 <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
36
37 <xsl:variable name="nextdiv"
38 select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
39 <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
40
41 <xsl:choose>
42 <xsl:when test="$onechunk != 0 and parent::*">
43 <xsl:apply-imports/>
44 </xsl:when>
45 <xsl:otherwise>
46 <xsl:call-template name="process-chunk">
47 <xsl:with-param name="prev" select="$prev"/>
48 <xsl:with-param name="next" select="$next"/>
49 </xsl:call-template>
50 </xsl:otherwise>
51 </xsl:choose>
52 </xsl:when>
53 <xsl:otherwise>
54 <xsl:choose>
55 <xsl:when test="$onechunk != 0 and not(parent::*)">
56 <xsl:call-template name="chunk-all-sections"/>
57 </xsl:when>
58 <xsl:when test="$onechunk != 0">
59 <xsl:apply-imports/>
60 </xsl:when>
61 <xsl:when test="$chunk.first.sections = 0">
62 <xsl:call-template name="chunk-first-section-with-parent"/>
63 </xsl:when>
64 <xsl:otherwise>
65 <xsl:call-template name="chunk-all-sections"/>
66 </xsl:otherwise>
67 </xsl:choose>
68 </xsl:otherwise>
69 </xsl:choose>
70</xsl:template>
71
72</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.