Author: paul
Date: 2005-10-23 02:01:08 +0200 (Sun, 23 Oct 2005)
New Revision: 145
Log:
r3005@frost: paul | 2005-10-22 19:00:56 -0500
New stylesheet.
Added:
trunk/xsl.d/extract-toc-ids.xsl
Modified:
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:2998
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:145
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:3005
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:145
Added: trunk/xsl.d/extract-toc-ids.xsl
===================================================================
--- trunk/xsl.d/extract-toc-ids.xsl 2005-10-22 16:17:08 UTC (rev 144)
+++ trunk/xsl.d/extract-toc-ids.xsl 2005-10-23 00:01:08 UTC (rev 145)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
+
+<!--
+ extract-toc-ids.xsl - extract @id attribute values for TOC elements
+
+ Use before and after making @id changes. Diffing the two results
+ shows which @id attributes were changed, so that we know which URLs
+ will need mapping for the online manual.
+
+ The input should have had any Xincludes already processed.
+ (For example, use the -xinclude option for xsltproc.)
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- We do not want any XML header -->
+<xsl:output method="text" omit-xml-declaration="yes"/>
+
+<!-- define explicit newline variable that contains a newline character -->
+<xsl:variable name="newline" select="'
'"/>
+
+<!-- match TOC elements, print @id attribute, process contents -->
+
+<xsl:template match="book|part|preface|chapter|appendix|section">
+ <xsl:if test="@id != ''">
+ <xsl:value-of select="@id"/>
+ <xsl:value-of select="$newline"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- match everything else and pass through without producing output -->
+
+<xsl:template match="node()">
+ <xsl:apply-templates/>
+</xsl:template>
+
+</xsl:stylesheet>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r145 - in trunk: . xsl.d | paul | 23 Oct |