source: trunk/Distribution/XSL/xhtml/chunkfast.xsl@ 2

Last change on this file since 2 was 2, checked in by jkacer, 18 years ago

Added all DocBook Framework stuff:

  • DocBook DTD
  • Transformation software FOP 0.20.5 and Saxon 6
  • XSL styles
  • Rexx scripts

Also added some WarpIN-related stuff for creation of WarpIN installation packages.
This state corresponds to version 1.0.0 from November 2005, just slightly modified to carry versioning information (Rexx scripts).

File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="US-ASCII"?>
2<!--This file was created automatically by html2xhtml-->
3<!--from the HTML stylesheets. Do not edit this file.-->
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: chunkfast.xsl,v 1.4 2005/08/04 07:03:47 bobstayton Exp $
8 ********************************************************************
9
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12 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]"/>
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)"/>
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)"/>
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.