summaryrefslogtreecommitdiff
path: root/xhtml/chunktoc.xsl
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 06:55:11 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-15 06:55:11 +0900
commitd2cfd1f36d94c2377115f9ac79213eae31f83464 (patch)
treed33d3aadc7edbb0b5dd84194e053e16fc4410c06 /xhtml/chunktoc.xsl
parent4c7d5230da2c9c32ccfd18cf1f46b8c50d32db7a (diff)
downloaddocbook-xsl-stylesheets-d2cfd1f36d94c2377115f9ac79213eae31f83464.tar.gz
docbook-xsl-stylesheets-d2cfd1f36d94c2377115f9ac79213eae31f83464.tar.bz2
docbook-xsl-stylesheets-d2cfd1f36d94c2377115f9ac79213eae31f83464.zip
Imported Upstream version 1.79.2upstream/1.79.2
Diffstat (limited to 'xhtml/chunktoc.xsl')
-rw-r--r--xhtml/chunktoc.xsl95
1 files changed, 45 insertions, 50 deletions
diff --git a/xhtml/chunktoc.xsl b/xhtml/chunktoc.xsl
index 659e44f..82f1236 100644
--- a/xhtml/chunktoc.xsl
+++ b/xhtml/chunktoc.xsl
@@ -1,14 +1,9 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--This file was created automatically by html2xhtml-->
-<!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
+<?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc d">
<!-- ********************************************************************
- $Id: chunktoc.xsl 9866 2014-01-29 02:55:52Z bobstayton $
- ********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
- See ../README or http://docbook.sf.net/release/xsl/current/ for
+ See ../README or http://cdn.docbook.org/release/xsl/current/ for
copyright and other information.
******************************************************************** -->
@@ -31,7 +26,7 @@
<xsl:variable name="chunks" select="document($chunk.toc,/)"/>
<xsl:choose>
- <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when>
+ <xsl:when test="$chunks//d:tocentry[@linkend=$id]">1</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -47,7 +42,7 @@
<xsl:variable name="chunks" select="document($chunk.toc,/)"/>
- <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+ <xsl:variable name="chunk" select="$chunks//d:tocentry[@linkend=$id]"/>
<xsl:variable name="filename">
<xsl:call-template name="pi.dbhtml_filename">
<xsl:with-param name="node" select="$chunk"/>
@@ -73,9 +68,9 @@
<xsl:variable name="chunks" select="document($chunk.toc,/)"/>
- <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
- <xsl:variable name="prev-id" select="($chunk/preceding::tocentry |$chunk/ancestor::tocentry)[last()]/@linkend"/>
- <xsl:variable name="next-id" select="($chunk/following::tocentry |$chunk/child::tocentry)[1]/@linkend"/>
+ <xsl:variable name="chunk" select="$chunks//d:tocentry[@linkend=$id]"/>
+ <xsl:variable name="prev-id" select="($chunk/preceding::d:tocentry |$chunk/ancestor::d:tocentry)[last()]/@linkend"/>
+ <xsl:variable name="next-id" select="($chunk/following::d:tocentry |$chunk/child::d:tocentry)[1]/@linkend"/>
<xsl:variable name="prev" select="key('id',$prev-id)"/>
<xsl:variable name="next" select="key('id',$next-id)"/>
@@ -119,67 +114,67 @@
<!-- ==================================================================== -->
-<xsl:template match="set">
+<xsl:template match="d:set">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="book">
+<xsl:template match="d:book">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="book/appendix">
+<xsl:template match="d:book/d:appendix">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="book/glossary">
+<xsl:template match="d:book/d:glossary">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="book/bibliography">
+<xsl:template match="d:book/d:bibliography">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="dedication" mode="dedication">
+<xsl:template match="d:dedication" mode="dedication">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="preface|chapter">
+<xsl:template match="d:preface|d:chapter">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="part|reference">
+<xsl:template match="d:part|d:reference">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="refentry">
+<xsl:template match="d:refentry">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="colophon">
+<xsl:template match="d:colophon">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="article">
+<xsl:template match="d:article">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="topic">
+<xsl:template match="d:topic">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="article/appendix">
+<xsl:template match="d:article/d:appendix">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="article/glossary">
+<xsl:template match="d:article/d:glossary">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="article/bibliography">
+<xsl:template match="d:article/d:bibliography">
<xsl:call-template name="process-chunk"/>
</xsl:template>
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+<xsl:template match="d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section">
<xsl:variable name="ischunk">
<xsl:call-template name="chunk"/>
</xsl:variable>
@@ -194,7 +189,7 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="setindex |book/index |article/index">
+<xsl:template match="d:setindex |d:book/d:index |d:article/d:index">
<!-- some implementations use completely empty index tags to indicate -->
<!-- where an automatically generated index should be inserted. so -->
<!-- if the index is completely empty, skip it. -->
@@ -217,23 +212,23 @@
<xsl:text>The chunk.toc file is not set.</xsl:text>
</xsl:message>
</xsl:when>
- <xsl:when test="$exsl.node.set.available != 0 and namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+ <xsl:when test="$exsl.node.set.available != 0 and namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
<xsl:call-template name="log.message">
<xsl:with-param name="level">Note</xsl:with-param>
<xsl:with-param name="source" select="$doc.title"/>
<xsl:with-param name="context-desc">
- <xsl:text>namesp. cut</xsl:text>
+ <xsl:text>namesp. add</xsl:text>
</xsl:with-param>
<xsl:with-param name="message">
- <xsl:text>stripped namespace before processing</xsl:text>
+ <xsl:text>added namespace before processing</xsl:text>
</xsl:with-param>
</xsl:call-template>
- <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+ <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
</xsl:when>
<!-- Can't process unless namespace is correct -->
- <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+ <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
<xsl:message terminate="yes">
- <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+ <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
<xsl:text> cannot proceed.</xsl:text>
</xsl:message>
</xsl:when>
@@ -309,7 +304,7 @@
<xsl:with-param name="lot">
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'figure'"/>
- <xsl:with-param name="nodes" select=".//figure"/>
+ <xsl:with-param name="nodes" select=".//d:figure"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
@@ -317,7 +312,7 @@
<xsl:otherwise>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'figure'"/>
- <xsl:with-param name="nodes" select=".//figure"/>
+ <xsl:with-param name="nodes" select=".//d:figure"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -331,7 +326,7 @@
<xsl:with-param name="lot">
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'table'"/>
- <xsl:with-param name="nodes" select=".//table"/>
+ <xsl:with-param name="nodes" select=".//d:table"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
@@ -339,7 +334,7 @@
<xsl:otherwise>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'table'"/>
- <xsl:with-param name="nodes" select=".//table"/>
+ <xsl:with-param name="nodes" select=".//d:table"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -353,7 +348,7 @@
<xsl:with-param name="lot">
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'example'"/>
- <xsl:with-param name="nodes" select=".//example"/>
+ <xsl:with-param name="nodes" select=".//d:example"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
@@ -361,7 +356,7 @@
<xsl:otherwise>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'example'"/>
- <xsl:with-param name="nodes" select=".//example"/>
+ <xsl:with-param name="nodes" select=".//d:example"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -375,7 +370,7 @@
<xsl:with-param name="lot">
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'equation'"/>
- <xsl:with-param name="nodes" select=".//equation"/>
+ <xsl:with-param name="nodes" select=".//d:equation"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
@@ -383,7 +378,7 @@
<xsl:otherwise>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'equation'"/>
- <xsl:with-param name="nodes" select=".//equation"/>
+ <xsl:with-param name="nodes" select=".//d:equation"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -397,7 +392,7 @@
<xsl:with-param name="lot">
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'procedure'"/>
- <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
@@ -405,7 +400,7 @@
<xsl:otherwise>
<xsl:call-template name="list.of.titles">
<xsl:with-param name="titles" select="'procedure'"/>
- <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
@@ -431,8 +426,8 @@
</xsl:with-param>
<xsl:with-param name="content">
<xsl:call-template name="chunk-element-content">
- <xsl:with-param name="prev" select="/foo"/>
- <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="prev" select="/d:foo"/>
+ <xsl:with-param name="next" select="/d:foo"/>
<xsl:with-param name="nav.context" select="'toc'"/>
<xsl:with-param name="content">
<h1>
@@ -485,8 +480,8 @@
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="content">
<xsl:call-template name="chunk-element-content">
- <xsl:with-param name="prev" select="/foo"/>
- <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="prev" select="/d:foo"/>
+ <xsl:with-param name="next" select="/d:foo"/>
<xsl:with-param name="nav.context" select="'toc'"/>
<xsl:with-param name="content">
<xsl:copy-of select="$lot"/>
@@ -518,4 +513,4 @@
</xsl:if>
</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet> \ No newline at end of file