Author: paul
Date: 2006-11-08 00:01:04 +0100 (Wed, 08 Nov 2006)
New Revision: 3877
Log:
r11737@frost: paul | 2006-11-07 16:58:06 -0600
Harmonize TOC-entry generation with with certification repository.
Modified:
trunk/administrator/Makefile
trunk/gui-common/Makefile
trunk/internals/Makefile
trunk/make.d/default-target
trunk/make.d/vars-docbook
trunk/make.d/xml-toc
trunk/make.d/xml-valid
trunk/migration-toolkit/Makefile
trunk/mysqltest/Makefile
trunk/ndbapi/Makefile
trunk/proto-doc/Makefile
trunk/query-browser/Makefile
trunk/refman-4.1/Makefile
trunk/refman-5.0/Makefile
trunk/refman-5.1/Makefile
trunk/refman-common/Makefile
trunk/sample-data/sakila/Makefile
trunk/sample-data/world/Makefile
trunk/userguide/Makefile
trunk/workbench/Makefile
trunk/xsl.d/make-toc-entries.xsl
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15387
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:11736
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11301
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15387
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:11737
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11301
Modified: trunk/administrator/Makefile
===================================================================
--- trunk/administrator/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/administrator/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 411 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = administrator
# Set IDMAP and remap variables
Modified: trunk/gui-common/Makefile
===================================================================
--- trunk/gui-common/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/gui-common/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 396 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = guibook
# Set IDMAP and remap variables
Modified: trunk/internals/Makefile
===================================================================
--- trunk/internals/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/internals/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 395 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = internals
# Set IDMAP and remap variables
Modified: trunk/make.d/default-target
===================================================================
--- trunk/make.d/default-target 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/make.d/default-target 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 4, Lines Deleted: 1; 372 bytes
@@ -15,7 +15,10 @@
help::
@true
-# Ditto for clean targt
+# Ditto for clean, realclean targets
clean::
@true
+
+realclean:: clean
+ @true
Modified: trunk/make.d/vars-docbook
===================================================================
--- trunk/make.d/vars-docbook 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/make.d/vars-docbook 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 2, Lines Added: 11, Lines Deleted: 0; 940 bytes
@@ -6,6 +6,12 @@
DOC_LANG ?= en
+# Basename of the main document .xml file. This must be overridden in
+# the Makefile for any document that needs to generate -toc-entries.xml
+# files.
+
+MAIN_DOC_BASENAME ?= YOU_MUST_DEFINE_MAIN_DOC_BASENAME
+
# Set XML_CATLOG_FILES to the pathname of the catalog.xml file and
# set that variable in the environment for xmllint so that it uses
# the file.
@@ -21,6 +27,11 @@
MAP_REMARK_TO_PARA ?= 0
+# Whether to generate <toc-section-type> element in toc-entries files.
+# Normally, this is 1; we set it to 0 in Makefiles for some older documents.
+
+GENERATE_TOC_SECTION_TYPE ?= 1
+
# ----------------------------------------------------------------------
# Stylesheet variables
Modified: trunk/make.d/xml-toc
===================================================================
--- trunk/make.d/xml-toc 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/make.d/xml-toc 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 45, Lines Deleted: 10; 3182 bytes
@@ -1,30 +1,65 @@
# TOC and TOC-related target rules
-# $PWD is used so that XSL transforms that need to find -toc-entries.xml
-# files have an absolute pathname to work with. (Otherwise, they look
-# in the same directory in which they are located, and may not find
-# the file.)
+# Generate table of contents entries (for resolving cross-references)
# Do not delete these files when they are generated as intermediates
# for a final target. They are deleted by "make clean".
+
+.PRECIOUS: toc-entries.tmp %-toc-entries.tmp
+.PRECIOUS: toc-entries.xml %-toc-entries.xml
-.PRECIOUS: %-toc-entries.xml
-# Generate table of contents entries (for resolving cross-references)
+# Generate the result as an intermediate file, and update the real
+# file only if there's a change. This way, changes to chapter files
+# that don't result in TOC changes don't cause the toc-entries.xml
+# file to be updated. (That saves all the rebuilds that otherwise
+# would result from just a last-changed date change even when the
+# content doesn't change.)
-%-toc-entries.xml: %-prepped.xml $(TOC_ENTRIES_XSL_DEPS)
- $(XSLTPROC) --output $@ $(TOC_ENTRIES_XSL) $<
+# Note: MAIN_DOC_BASENAME *must* be set to the basename of the main
+# document file. For example, if the main file is manual.xml or
+# book.xml, set MAIN_DOC_BASENAME to manual or book.
-# Make table of contents output file
+# Note: For rules that use the toc-entries.xml file, refer to it using
+# $PWD so that XSL transforms that need to find toc-entries.xml
+# have an absolute pathname to work with. (Otherwise, they look in the
+# same directory in which they are located, and may not find the file.)
+# Full-document TOC entries file. Use this for operations that need
+# to know about the TOC entries for any part of the the document.
+
+toc-entries.tmp: $(MAIN_DOC_BASENAME)-prepped.xml $(TOC_ENTRIES_XSL_DEPS)
+ $(XSLTPROC) \
+ --param generate.toc.section.type $(GENERATE_TOC_SECTION_TYPE) \
+ --output $@ $(TOC_ENTRIES_XSL) $<
+toc-entries.xml: toc-entries.tmp
+ $(TOOLS_DIR)/copy-if-changed $< $@
+
+# Single-file TOC entries file. Use this for operations that need
+# to know about the TOC entries for only a given file. (Examples:
+# %-toc.txt, %.remarks, %-remark-count)
+
+%-toc-entries.tmp: %-prepped.xml $(TOC_ENTRIES_XSL_DEPS)
+ $(XSLTPROC) \
+ --param generate.toc.section.type $(GENERATE_TOC_SECTION_TYPE) \
+ --output $@ $(TOC_ENTRIES_XSL) $<
+%-toc-entries.xml: %-toc-entries.tmp
+ $(TOOLS_DIR)/copy-if-changed $< $@
+
+# Generate table of contents for a document
+
%-toc.txt: %-prepped.xml %-toc-entries.xml $(TOC_XSL_DEPS)
$(XSLTPROC) \
--stringparam toc.entry.file $$PWD/$*-toc-entries.xml \
--output $@ $(TOC_XSL) $<
clean::
- $(RM) *-toc-entries.xml
+ $(RM) toc-entries.xml *-toc-entries.xml
$(RM) *-toc.txt
+realclean::
+ $(RM) toc-entries.tmp *-toc-entries.tmp
+
help::
+ @echo "make toc-entries.xml - produce table of contents entries"
@echo "make file-toc.txt - produce table of contents from file.xml"
Modified: trunk/make.d/xml-valid
===================================================================
--- trunk/make.d/xml-valid 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/make.d/xml-valid 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 464 bytes
@@ -49,5 +49,5 @@
@echo "make idmap.reconcile.refs - reconcile ID maps for all directories referenced by main document"
@echo "make file.deepcheck - perform deep check of file.xml"
-realclean: clean
+realclean:: clean
$(RM) -r metadata
Modified: trunk/migration-toolkit/Makefile
===================================================================
--- trunk/migration-toolkit/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/migration-toolkit/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 427 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = migration-toolkit
# Set IDMAP and remap variables
Modified: trunk/mysqltest/Makefile
===================================================================
--- trunk/mysqltest/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/mysqltest/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 395 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = mysqltest
# Set IDMAP and remap variables
Modified: trunk/ndbapi/Makefile
===================================================================
--- trunk/ndbapi/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/ndbapi/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 383 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = ndbapi
# Set IDMAP and remap variables
Modified: trunk/proto-doc/Makefile
===================================================================
--- trunk/proto-doc/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/proto-doc/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 395 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = proto-doc
# Set IDMAP and remap variables
Modified: trunk/query-browser/Makefile
===================================================================
--- trunk/query-browser/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/query-browser/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 411 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = query-browser
# Set IDMAP and remap variables
Modified: trunk/refman-4.1/Makefile
===================================================================
--- trunk/refman-4.1/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/refman-4.1/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 427 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = manual
DOC_URL_BASE = http://dev.mysql.com/doc/refman/4.1/$(DOC_LANG)/
Modified: trunk/refman-5.0/Makefile
===================================================================
--- trunk/refman-5.0/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/refman-5.0/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 427 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = manual
DOC_URL_BASE = http://dev.mysql.com/doc/refman/5.0/$(DOC_LANG)/
Modified: trunk/refman-5.1/Makefile
===================================================================
--- trunk/refman-5.1/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/refman-5.1/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 427 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = manual
DOC_URL_BASE = http://dev.mysql.com/doc/refman/5.1/$(DOC_LANG)/
Modified: trunk/refman-common/Makefile
===================================================================
--- trunk/refman-common/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/refman-common/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 404 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = manual
# Set IDMAP and remap variables
Modified: trunk/sample-data/sakila/Makefile
===================================================================
--- trunk/sample-data/sakila/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/sample-data/sakila/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 419 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = sakila
# Set IDMAP and remap variables
Modified: trunk/sample-data/world/Makefile
===================================================================
--- trunk/sample-data/world/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/sample-data/world/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 1; 553 bytes
@@ -9,11 +9,12 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = world-setup
# Set IDMAP and remap variables
IDMAP_LANG = $(DOC_LANG)
-IDMAP_MAIN = world
+IDMAP_MAIN = world-setup
IDMAP_URLBASE = $(IDMAP_MAIN)/$(IDMAP_LANG)
IDMAP_REFS = .
Modified: trunk/userguide/Makefile
===================================================================
--- trunk/userguide/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/userguide/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 395 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = userguide
# Set IDMAP and remap variables
Modified: trunk/workbench/Makefile
===================================================================
--- trunk/workbench/Makefile 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/workbench/Makefile 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 0; 395 bytes
@@ -9,6 +9,7 @@
# Set any variables here that should override imported standard variables
DOC_LANG = en
+MAIN_DOC_BASENAME = workbench
# Set IDMAP and remap variables
Modified: trunk/xsl.d/make-toc-entries.xsl
===================================================================
--- trunk/xsl.d/make-toc-entries.xsl 2006-11-07 23:00:49 UTC (rev 3876)
+++ trunk/xsl.d/make-toc-entries.xsl 2006-11-07 23:01:04 UTC (rev 3877)
Changed blocks: 4, Lines Added: 157, Lines Deleted: 70; 10007 bytes
@@ -1,16 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Generate <toc-entry> elements from title elements of chapter,
- appendix, section, and sect[1-5] elements. Each element is created with
- - a <toc-section-type> element indicating "Chapter", "Appendix", "Section"
+TODO:
+- Handle <example> better
+- Languages other than English?
+-->
+
+<!--
+ make-toc-entries.xsl - generate TOC-entry information
+
+ Root element is <toc-entries>. Within the root, generate <toc-entry>
+ elements from title elements of part, chapter, appendix, section,
+ elements. (Also handles subsection and subsubsection as used in the
+ 4.0 Study Guide, and sect1 through sect5, which may still be present
+ in some older documents.)
+
+ Each <toc-entry> element contains:
+ - a <toc-section-type> element indicating the section type ("Chapter",
+ "Appendix", "Section"). This element is not included if the
+ generate.toc.section.type parameter is 0. (The original TOC mechanism
+ for the 4.0 Study Guide handles xref resolution differently and does
+ not use this element.)
- a <toc-number> element indicating the section number
- a <toc-title> element indicating the section title
- These are used for determining sections numbers for titles in
- output documents, and for generating cross-references.
+ The output resulting from this transform can be used to determine
+ section numbers for titles in output documents, and to resolve
+ cross-references.
- Note: The preface and its sections, subsections, etc. have no numbering.
+ Note: The preface and its subsections have no numbering.
-->
<xsl:stylesheet version="1.0"
@@ -18,12 +36,62 @@
<xsl:output method="xml" omit-xml-declaration="no"/>
+<!-- Whether to generate <toc-section-type> elements. Default true. -->
+<xsl:param name="generate.toc.section.type" select="1"/>
+
+<!-- define explicit newline variable that contains a newline character -->
+<xsl:variable name="newline" select="'
'"/>
+
+
<!--
+ Determine the type of the current element
+-->
+
+<xsl:template name="cur-elt-type">
+ <xsl:choose>
+ <xsl:when test="self::part">
+ <xsl:text>Part</xsl:text>
+ </xsl:when>
+ <!-- preface and subsections are not numbered -->
+ <xsl:when test="ancestor-or-self::preface">
+ <!-- no numbering for preface -->
+ </xsl:when>
+ <xsl:when test="self::chapter">
+ <xsl:text>Chapter</xsl:text>
+ </xsl:when>
+ <xsl:when test="self::appendix">
+ <xsl:text>Appendix</xsl:text>
+ </xsl:when>
+ <xsl:when test="self::section
+ |self::sect1
+ |self::sect2
+ |self::sect3
+ |self::sect4
+ |self::sect5
+ |self::subsection
+ |self::subsubsection">
+ <xsl:text>Section</xsl:text>
+ </xsl:when>
+ <xsl:when test="self::example">
+ <xsl:text>Example</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Section</xsl:text>
+ <xsl:message>*** WARNING *** cur-elt-type template invoked inside unknown element!
+ <xsl:value-of select="name(.)"/>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!--
Determine the section number of the current element
This numbers chapters (with numbers) and appendixes (with letters).
- It also numbers section and sect[1-5] elements within chapters and
- appendixes.
+ Within chapters and appendixes, it also numbers:
+ - section
+ - sect1 through sect5
+ - subsection, subsubsection (used in 4.0 Study Guide)
Chapters are numbered with "any" so that numbering increases across
<part> elements. Section numbering within chapters restarts with
@@ -39,80 +107,99 @@
<!-- preface sections are not numbered -->
<xsl:when test="ancestor-or-self::preface">
<!-- no numbering for preface -->
- </xsl:when>
+ </xsl:when>
<xsl:when test="ancestor-or-self::chapter">
- <xsl:number
- count="chapter|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]"
- level="multiple"
- format="1.1.1.1.1.1"/>
+ <xsl:number count="chapter" level="any" format="1"/>
+ <xsl:if test="ancestor::chapter">
+ <xsl:number count="section
+ |sect1
+ |sect2
+ |sect3
+ |sect4
+ |sect5
+ |subsection
+ |subsubsection"
+ level="multiple"
+ format=".1.1.1.1.1"/>
+ </xsl:if>
</xsl:when>
+ <xsl:when test="ancestor-or-self::appendix">
+ <xsl:number count="appendix" level="any" format="A"/>
+ <xsl:if test="ancestor::appendix">
+ <xsl:number count="section
+ |sect1
+ |sect2
+ |sect3
+ |sect4
+ |sect5
+ |subsection
+ |subsubsection"
+ level="multiple"
+ format=".1.1.1.1.1"/>
+ </xsl:if>
+ </xsl:when>
<xsl:otherwise>
- <xsl:number
- count="appendix|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]"
- level="multiple"
- format="A.1.1.1.1.1"/>
+ <xsl:text>Section</xsl:text>
+ <xsl:message>*** WARNING *** cur-sect-num template invoked inside unknown element!
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/">
- <xsl:element name="toc-entries">
- <xsl:text>
</xsl:text>
- <xsl:for-each
- select="//part|//preface|//chapter|//appendix|//example
- |//section|//sect1[@id]|//sect2[@id]|//sect3[@id]|//sect4[@id]|//sect5[@id]">
- <xsl:element name="toc-entry">
- <xsl:attribute name="id">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
- <xsl:text>
 </xsl:text>
- <xsl:element name="toc-section-type">
- <xsl:choose>
- <xsl:when test="self::part">
- <xsl:text>Part</xsl:text>
- </xsl:when>
- <!-- preface sections are not numbered -->
- <xsl:when test="self::preface">
- <!-- no numbering for preface -->
- </xsl:when>
- <xsl:when test="self::chapter">
- <xsl:text>Chapter</xsl:text>
- </xsl:when>
- <xsl:when test="self::appendix">
- <xsl:text>Appendix</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Section</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- <xsl:text>
 </xsl:text>
- <xsl:element name="toc-number">
+ <toc-entries>
+ <xsl:value-of select="$newline"/>
+ <xsl:for-each select="//part
+ |//preface
+ |//chapter
+ |//appendix
+ |//example
+ |//section
+ |//sect1
+ |//sect2
+ |//sect3
+ |//sect4
+ |//sect5
+ |//subsection
+ |//subsubsection">
+ <toc-entry id="{@id}">
+ <xsl:value-of select="$newline"/>
+ <xsl:text> </xsl:text>
+ <xsl:if test="$generate.toc.section.type">
+ <toc-section-type>
+ <xsl:call-template name="cur-elt-type"/>
+ </toc-section-type>
+ <xsl:value-of select="$newline"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <toc-number>
<xsl:call-template name="cur-sect-num"/>
- </xsl:element>
- <xsl:text>
 </xsl:text>
- <xsl:element name="toc-title">
+ </toc-number>
+ <xsl:value-of select="$newline"/>
+ <xsl:text> </xsl:text>
+ <toc-title>
+ <xsl:apply-templates select="title"/>
<!--
- <xsl:apply-templates select="title"/>
+ <xsl:copy-of select="title/node()"/>
-->
- <xsl:copy-of select="title/node()"/>
- </xsl:element>
- <xsl:text>
</xsl:text>
- </xsl:element>
- <xsl:text>
</xsl:text>
+ </toc-title>
+ <xsl:value-of select="$newline"/>
+ </toc-entry>
+ <xsl:value-of select="$newline"/>
</xsl:for-each>
- </xsl:element>
+ </toc-entries>
</xsl:template>
<!--
-For first text element of a title, strip leading whitespace.
-For last text element of a title, strip trailing whitespace.
-(The reason for this is that when output-generating stylesheets
-are run later, they may add quotes around the title. If there
-is whitespace around the title in the toc-title, the quote
-marks will end up separated by whitespace from the title text,
-which is ugly.
+ For first text element of a title, strip leading whitespace.
+ For last text element of a title, strip trailing whitespace.
+ (The reason for this is that when output-generating stylesheets
+ are run later, they may add quotes around the title. If there
+ is whitespace around the title in the toc-title, the quote
+ marks will end up separated by whitespace from the title text,
+ which is ugly.
-->
<xsl:template match="title">
@@ -120,10 +207,10 @@
</xsl:template>
<!--
-Next two templates handle first and last text elements within titles.
-It's necessary for each one to check whether the element is the only
-element, because we don't know which one the XSLT processor will call
-if there is only one element.
+ Next two templates handle first and last text elements within titles.
+ It's necessary for each one to check whether the element is the only
+ element, because we don't know which one the XSLT processor will call
+ if there is only one element.
-->
<xsl:template match="text()[1]">
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r3877 - in trunk: . administrator gui-common internals make.d migration-toolkit mysqltest ndbapi proto-doc query-browse... | paul | 7 Nov |