source: BOOK/stylesheets/lfs-xsl/docbook-xsl-snapshot/xhtml/chunkfast.xsl@ 8150908

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8150908 was f8c4e94, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS XSL Stylesheets.

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