<?xml version="1.0"?>
-<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbk="http://docbook.org/ns/docbook" xmlns:rnd="http://docbook.org/ns/docbook/roundtrip" version="1.0">
+<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:dbk="http://docbook.org/ns/docbook"
+ xmlns:rnd="http://docbook.org/ns/docbook/roundtrip"
+ version="1.0">
<!--====================================-->
<!--= =-->
<!--= DO NOT EDIT THIS STYLESHEET =-->
<!--= by makeSections.xsl and a =-->
<!--= mapping specification. =-->
<!--= =-->
-<!--= Revision history: =-->
-<!--= =-->
-<!--= $Id: normalise2sections.xsl 8107 2008-08-17 22:39:58Z balls $ =-->
-<!--= =-->
<!--====================================-->
<axsl:output indent="yes"/>
<axsl:strip-space elements="*"/>
<axsl:for-each select="@*">
<axsl:copy/>
</axsl:for-each>
- <axsl:variable name="books" select="dbk:para[@rnd:style = "book" or @rnd:style = "book-title"]"/>
- <axsl:variable name="toplevel-components" select="dbk:para[@rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title"]"/>
+ <axsl:variable name="books" select="dbk:para[@rnd:style = "d:book" or @rnd:style = "book-title"]"/>
+ <axsl:variable name="toplevel-components" select="dbk:para[@rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title"]"/>
<axsl:choose>
<axsl:when test="$books">
<axsl:apply-templates select="$books[1]/preceding-sibling::*"/>
<axsl:template match="dbk:para" mode="book">
<axsl:param name="books" select="/.."/>
<axsl:choose>
- <axsl:when test="$books and (@rnd:style = "book" or @rnd:style = "book-title")">
+ <axsl:when test="$books and (@rnd:style = "d:book" or @rnd:style = "book-title")">
<axsl:call-template name="make-book">
<axsl:with-param name="books" select="$books"/>
- <axsl:with-param name="book-components" select="$books[1]/preceding-sibling::dbk:para[@rnd:style = "part" or @rnd:style = "part-title" or @rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title"]"/>
+ <axsl:with-param name="book-components" select="$books[1]/preceding-sibling::dbk:para[@rnd:style = "d:part" or @rnd:style = "part-title" or @rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title"]"/>
</axsl:call-template>
</axsl:when>
<axsl:otherwise>
<axsl:call-template name="make-book">
<axsl:with-param name="books" select="$books"/>
- <axsl:with-param name="book-components" select="following-sibling::dbk:para[@rnd:style = "part" or @rnd:style = "part-title" or @rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title"]"/>
+ <axsl:with-param name="book-components" select="following-sibling::dbk:para[@rnd:style = "d:part" or @rnd:style = "part-title" or @rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title"]"/>
</axsl:call-template>
</axsl:otherwise>
</axsl:choose>
<axsl:template match="dbk:para" mode="toplevel-component">
<axsl:param name="toplevel-components" select="/.."/>
<axsl:choose>
- <axsl:when test="$toplevel-components and (@rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title")">
+ <axsl:when test="$toplevel-components and (@rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title")">
<axsl:call-template name="make-toplevel-component">
<axsl:with-param name="toplevel-components" select="$toplevel-components"/>
- <axsl:with-param name="sect1s" select="$toplevel-components[1]/preceding-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"]"/>
+ <axsl:with-param name="sect1s" select="$toplevel-components[1]/preceding-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"]"/>
</axsl:call-template>
</axsl:when>
<axsl:otherwise>
<axsl:call-template name="make-toplevel-component">
<axsl:with-param name="toplevel-components" select="$toplevel-components"/>
- <axsl:with-param name="sect1s" select="following-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"]"/>
+ <axsl:with-param name="sect1s" select="following-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"]"/>
</axsl:call-template>
</axsl:otherwise>
</axsl:choose>
<axsl:param select="/.." name="book-components"/>
<axsl:choose>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "part" or @rnd:style = "part-title" or @rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title"">
- <axsl:variable name="nextbook-component" select="following-sibling::dbk:para[@rnd:style = "part" or @rnd:style = "part-title" or @rnd:style = "article" or @rnd:style = "article-title" or @rnd:style = "appendix" or @rnd:style = "appendix-title" or @rnd:style = "chapter" or @rnd:style = "chapter-title" or @rnd:style = "preface" or @rnd:style = "preface-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:part" or @rnd:style = "part-title" or @rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title"">
+ <axsl:variable name="nextbook-component" select="following-sibling::dbk:para[@rnd:style = "d:part" or @rnd:style = "part-title" or @rnd:style = "d:article" or @rnd:style = "article-title" or @rnd:style = "d:appendix" or @rnd:style = "appendix-title" or @rnd:style = "d:chapter" or @rnd:style = "chapter-title" or @rnd:style = "d:preface" or @rnd:style = "preface-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextbook-component">
- <axsl:variable name="sect1s" select="$nextbook-component/preceding-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"]"/>
+ <axsl:variable name="sect1s" select="$nextbook-component/preceding-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"]"/>
<!-- mode sections 1 -->
<book-component xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect1s" select="following-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"]"/>
+ <axsl:variable name="sect1s" select="following-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"]"/>
<!-- mode sections 2 -->
<book-component xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:choose>
<axsl:when test="generate-id() = generate-id($nextbook-component)"/>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "sect1" or @rnd:style = "sect1-title"">
- <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect1" or @rnd:style = "sect1-title"">
+ <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect1">
- <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"]"/>
+ <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"]"/>
<!-- mode sections 1 -->
<sect1 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"]"/>
+ <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"]"/>
<!-- mode sections 2 -->
<sect1 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nextbook-component)"/>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "sect2" or @rnd:style = "sect2-title"">
- <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect2" or @rnd:style = "sect2-title"">
+ <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect2">
- <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"]"/>
+ <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"]"/>
<!-- mode sections 1 -->
<sect2 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"]"/>
+ <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"]"/>
<!-- mode sections 2 -->
<sect2 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nextbook-component)"/>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "sect3" or @rnd:style = "sect3-title"">
- <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect3" or @rnd:style = "sect3-title"">
+ <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect3">
- <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"]"/>
+ <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"]"/>
<!-- mode sections 1 -->
<sect3 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"]"/>
+ <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"]"/>
<!-- mode sections 2 -->
<sect3 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nextbook-component)"/>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "sect4" or @rnd:style = "sect4-title"">
- <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect4" or @rnd:style = "sect4-title"">
+ <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect4">
- <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"]"/>
+ <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"]"/>
<!-- mode sections 1 -->
<sect4 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"]"/>
+ <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"]"/>
<!-- mode sections 2 -->
<sect4 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nextbook-component)"/>
<axsl:when test="generate-id() = generate-id($nextbook)"/>
- <axsl:when test="@rnd:style = "sect5" or @rnd:style = "sect5-title"">
- <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect5" or @rnd:style = "sect5-title"">
+ <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"][1]"/>
<!-- mode sections 3 -->
<sect5 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:param select="/.." name="sect1s"/>
<axsl:choose>
<axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
- <axsl:when test="@rnd:style = "sect1" or @rnd:style = "sect1-title"">
- <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = "sect1" or @rnd:style = "sect1-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect1" or @rnd:style = "sect1-title"">
+ <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = "d:sect1" or @rnd:style = "sect1-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect1">
- <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"]"/>
+ <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"]"/>
<!-- mode sections 1 -->
<sect1 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"]"/>
+ <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"]"/>
<!-- mode sections 2 -->
<sect1 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:choose>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
- <axsl:when test="@rnd:style = "sect2" or @rnd:style = "sect2-title"">
- <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = "sect2" or @rnd:style = "sect2-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect2" or @rnd:style = "sect2-title"">
+ <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = "d:sect2" or @rnd:style = "sect2-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect2">
- <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"]"/>
+ <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"]"/>
<!-- mode sections 1 -->
<sect2 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"]"/>
+ <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"]"/>
<!-- mode sections 2 -->
<sect2 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect2)"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
- <axsl:when test="@rnd:style = "sect3" or @rnd:style = "sect3-title"">
- <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = "sect3" or @rnd:style = "sect3-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect3" or @rnd:style = "sect3-title"">
+ <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = "d:sect3" or @rnd:style = "sect3-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect3">
- <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"]"/>
+ <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"]"/>
<!-- mode sections 1 -->
<sect3 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"]"/>
+ <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"]"/>
<!-- mode sections 2 -->
<sect3 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect2)"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
- <axsl:when test="@rnd:style = "sect4" or @rnd:style = "sect4-title"">
- <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = "sect4" or @rnd:style = "sect4-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect4" or @rnd:style = "sect4-title"">
+ <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = "d:sect4" or @rnd:style = "sect4-title"][1]"/>
<axsl:choose>
<axsl:when test="$nextsect4">
- <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"]"/>
+ <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"]"/>
<!-- mode sections 1 -->
<sect4 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
</axsl:if>
</axsl:when>
<axsl:otherwise>
- <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"]"/>
+ <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"]"/>
<!-- mode sections 2 -->
<sect4 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>
<axsl:when test="generate-id() = generate-id($nextsect2)"/>
<axsl:when test="generate-id() = generate-id($nextsect1)"/>
<axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
- <axsl:when test="@rnd:style = "sect5" or @rnd:style = "sect5-title"">
- <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = "sect5" or @rnd:style = "sect5-title"][1]"/>
+ <axsl:when test="@rnd:style = "d:sect5" or @rnd:style = "sect5-title"">
+ <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = "d:sect5" or @rnd:style = "sect5-title"][1]"/>
<!-- mode sections 3 -->
<sect5 xmlns="http://docbook.org/ns/docbook">
<axsl:call-template name="copy"/>