[c873d807] | 1 | <?xml version="1.0" encoding="ASCII"?>
|
---|
| 2 | <!--This file was created automatically by html2xhtml-->
|
---|
| 3 | <!--from the HTML stylesheets.-->
|
---|
[15c7d39] | 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="exsl cf">
|
---|
[c873d807] | 5 |
|
---|
| 6 | <!-- ********************************************************************
|
---|
[15c7d39] | 7 | $Id: chunk-changebars.xsl 8399 2009-04-08 07:37:42Z bobstayton $
|
---|
[c873d807] | 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 |
|
---|
[15c7d39] | 18 | <!-- This file is a variant of chunk.xsl, to be used for generating chunked
|
---|
| 19 | output with highlighting based on change markup. -->
|
---|
[c873d807] | 20 |
|
---|
[15c7d39] | 21 | <xsl:import href="changebars.xsl"/>
|
---|
| 22 | <xsl:import href="chunk-common.xsl"/>
|
---|
[c873d807] | 23 |
|
---|
[15c7d39] | 24 | <!-- This customization of "process-chunk-element" is needed in order to make change
|
---|
| 25 | highlighting be inherited by chunked children of an element with change markup. -->
|
---|
[c873d807] | 26 | <xsl:template name="process-chunk-element">
|
---|
[15c7d39] | 27 | <xsl:param name="content">
|
---|
| 28 | <xsl:choose>
|
---|
| 29 |
|
---|
| 30 | <xsl:when test="ancestor-or-self::*[@revisionflag] and $show.revisionflag != 0">
|
---|
| 31 | <xsl:variable name="revisionflag" select="ancestor-or-self::*[@revisionflag][1]/@revisionflag"/>
|
---|
| 32 | <xsl:call-template name="block.or.inline.revision">
|
---|
| 33 | <xsl:with-param name="revisionflag" select="$revisionflag"/>
|
---|
| 34 | </xsl:call-template>
|
---|
| 35 | </xsl:when>
|
---|
| 36 |
|
---|
| 37 | <xsl:otherwise>
|
---|
| 38 | <xsl:apply-imports/>
|
---|
| 39 | </xsl:otherwise>
|
---|
| 40 | </xsl:choose>
|
---|
| 41 | </xsl:param>
|
---|
| 42 |
|
---|
[c873d807] | 43 | <xsl:choose>
|
---|
[15c7d39] | 44 | <xsl:when test="$chunk.fast != 0 and $exsl.node.set.available != 0">
|
---|
| 45 | <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/>
|
---|
[c873d807] | 46 | <xsl:variable name="genid" select="generate-id()"/>
|
---|
| 47 |
|
---|
| 48 | <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/>
|
---|
| 49 |
|
---|
| 50 | <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/>
|
---|
| 51 | <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/>
|
---|
| 52 |
|
---|
| 53 | <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/>
|
---|
| 54 | <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/>
|
---|
| 55 |
|
---|
| 56 | <xsl:choose>
|
---|
| 57 | <xsl:when test="$onechunk != 0 and parent::*">
|
---|
[15c7d39] | 58 | <xsl:copy-of select="$content"/>
|
---|
[c873d807] | 59 | </xsl:when>
|
---|
| 60 | <xsl:otherwise>
|
---|
| 61 | <xsl:call-template name="process-chunk">
|
---|
| 62 | <xsl:with-param name="prev" select="$prev"/>
|
---|
| 63 | <xsl:with-param name="next" select="$next"/>
|
---|
[15c7d39] | 64 | <xsl:with-param name="content" select="$content"/>
|
---|
[c873d807] | 65 | </xsl:call-template>
|
---|
| 66 | </xsl:otherwise>
|
---|
| 67 | </xsl:choose>
|
---|
| 68 | </xsl:when>
|
---|
| 69 | <xsl:otherwise>
|
---|
| 70 | <xsl:choose>
|
---|
| 71 | <xsl:when test="$onechunk != 0 and not(parent::*)">
|
---|
[15c7d39] | 72 | <xsl:call-template name="chunk-all-sections">
|
---|
| 73 | <xsl:with-param name="content" select="$content"/>
|
---|
| 74 | </xsl:call-template>
|
---|
[c873d807] | 75 | </xsl:when>
|
---|
| 76 | <xsl:when test="$onechunk != 0">
|
---|
[15c7d39] | 77 | <xsl:copy-of select="$content"/>
|
---|
[c873d807] | 78 | </xsl:when>
|
---|
| 79 | <xsl:when test="$chunk.first.sections = 0">
|
---|
[15c7d39] | 80 | <xsl:call-template name="chunk-first-section-with-parent">
|
---|
| 81 | <xsl:with-param name="content" select="$content"/>
|
---|
| 82 | </xsl:call-template>
|
---|
[c873d807] | 83 | </xsl:when>
|
---|
| 84 | <xsl:otherwise>
|
---|
[15c7d39] | 85 | <xsl:call-template name="chunk-all-sections">
|
---|
| 86 | <xsl:with-param name="content" select="$content"/>
|
---|
| 87 | </xsl:call-template>
|
---|
[c873d807] | 88 | </xsl:otherwise>
|
---|
| 89 | </xsl:choose>
|
---|
| 90 | </xsl:otherwise>
|
---|
| 91 | </xsl:choose>
|
---|
| 92 | </xsl:template>
|
---|
| 93 |
|
---|
[15c7d39] | 94 | <xsl:include href="chunk-code.xsl"/>
|
---|
| 95 |
|
---|
[c873d807] | 96 | </xsl:stylesheet>
|
---|