List:Commits« Previous MessageNext Message »
From:paul Date:January 11 2007 1:49pm
Subject:svn commit - mysqldoc@docsrva: r4446 - in trunk: . guihelp make.d xsl.d
View as plain text  
Author: paul
Date: 2007-01-11 14:49:33 +0100 (Thu, 11 Jan 2007)
New Revision: 4446

Log:
 r14392@frost:  paul | 2007-01-10 22:18:33 -0600
 Set up XSL transform and make target specific to the GUI tools help
 files. (We were using the standard XHTML transform. The new one suppresses
 section numbering in titles and xrefs.)


Added:
   trunk/make.d/xml-guihelp-xhtml-chapter
   trunk/xsl.d/mysql-guihelp-xhtml-section.xsl
Modified:
   trunk/guihelp/Makefile
   trunk/make.d/vars-docbook
   trunk/make.d/xml-chm
   trunk/make.d/xml-html-chapter
   trunk/make.d/xml-xhtml-chapter

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:17918
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:14375
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:13015
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:17918
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:14392
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:13015


Modified: trunk/guihelp/Makefile
===================================================================
--- trunk/guihelp/Makefile	2007-01-11 13:48:33 UTC (rev 4445)
+++ trunk/guihelp/Makefile	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 2, Lines Added: 8, Lines Deleted: 21; 2235 bytes

@@ -4,9 +4,14 @@
 # chapter files.  We construct it by copying the files from that directory
 # into this directory (under the different names used by the GUI team)
 # and construct a mysqlqb.xml file that Xincludes the chapter files.
-# Then we format it using the %.xhtml-chapter rule to create individual
-# output files per chapter.
+# Then we format it using the %.guihelp-xhtml-chapter rule to create
+# individual output files per chapter.
 
+# *** IMPORTANT ***
+# If you add files to the set of files processed here, you'll
+# also need to change the %.guihelp-xhtml-section target rule in
+# $(MAKE_DIR)/xml-guihelp-xhtml-section.
+
 # References from an included file to another resolve as expected.
 # References to non-included files resolve to links to the online
 # manual (via the ID-mapping machinery).

@@ -68,35 +73,17 @@
 mysqlqb_statements.xml: ../refman-5.0/sql-syntax.xml
 	cp $^ $@
 
-# "Fixup" target to rename output files and fix inter-file hyperlinks
-# per the GUI teams file-naming conventions.  Use like this:
-#   make mysqlqb.xhtml-chapter-fixup
-# The .PRECIOUS line is needed to keep the output directory from being
-# clobbered.
-
-.PRECIOUS: %.xhtml-chapter
-
-mysqlqb.xhtml-chapter-fixup: mysqlqb.xhtml-chapter
-	cd $^; \
-	mv -f functions.html mysqlqb_functions.html; \
-	mv -f sql-syntax.html mysqlqb_statements.html; \
-	replace 'href="functions.html' 'href="mysqlqb_functions.html' -- *.html; \
-	replace 'href="sql-syntax.html' 'href="mysqlqb_statements.html' -- *.html;
-
 clean::
 	$(RM) versions.ent mysqlqb_functions.xml mysqlqb_statements.xml
 
 # Import standard target rules
 
-# Need xml-html-dir for formatting the manual itself into a subdir,
-# but also need xml-html for formatting ReadMe.html
-
 include $(MAKE_DIR)/xml-dynxml
 include $(MAKE_DIR)/xml-valid
 include $(MAKE_DIR)/xml-format
 include $(MAKE_DIR)/xml-useless
 include $(MAKE_DIR)/xml-prep
-include $(MAKE_DIR)/xml-xhtml-chapter
+include $(MAKE_DIR)/xml-guihelp-xhtml-chapter
 include $(MAKE_DIR)/xml-depend
 
 # Import directory specific extensions


Modified: trunk/make.d/vars-docbook
===================================================================
--- trunk/make.d/vars-docbook	2007-01-11 13:48:33 UTC (rev 4445)
+++ trunk/make.d/vars-docbook	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 9, Lines Deleted: 1; 899 bytes

@@ -259,8 +259,16 @@
 	$(XSL_DIR)/mysql-disclaimer-xhtml.xsl \
 	$(HTML_CSS_FILE)
 
-# Driver stylesheet for Docbook -> HTML, one file per chapter or section
+# Driver stylesheet for Docbook -> XHTML GUI help,
+# one file per chapter or section
 
+MYSQL_GUIHELP_XHTML_SECTION_XSL = $(XSL_DIR)/mysql-guihelp-xhtml-section.xsl
+MYSQL_GUIHELP_XHTML_SECTION_XSL_DEPS = $(MYSQL_GUIHELP_XHTML_SECTION_XSL) \
+	$(XSL_DIR)/mysql-disclaimer-xhtml.xsl \
+	$(HTML_CSS_FILE)
+
+# Driver stylesheet for Docbook -> Eclipse HTML, one file per chapter or section
+
 MYSQL_ECLIPSE_XSL = $(XSL_DIR)/mysql-eclipse.xsl
 MYSQL_ECLIPSE_XSL_DEPS = $(MYSQL_ECLIPSE_XSL) \
 	$(XSL_DIR)/mysql-disclaimer-html.xsl


Modified: trunk/make.d/xml-chm
===================================================================
--- trunk/make.d/xml-chm	2007-01-11 13:48:33 UTC (rev 4445)
+++ trunk/make.d/xml-chm	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 478 bytes

@@ -4,7 +4,7 @@
 # (Language sensitive)
 
 # Use html-section driver file, but set chunk.section.depth to 0,
-# causes chunking at the chapter level.
+# which causes chunking at the chapter level.
 
 # The %_SRCS variable must be set to the list of target dependencies.
 


Added: trunk/make.d/xml-guihelp-xhtml-chapter
===================================================================
--- trunk/make.d/xml-guihelp-xhtml-chapter	                        (rev 0)
+++ trunk/make.d/xml-guihelp-xhtml-chapter	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 43, Lines Deleted: 0; 1889 bytes

@@ -0,0 +1,43 @@
+# Convert DocBook -> XHTML GUI help files, with one file per chapter.
+# (Language sensitive)
+
+# Use xhtml-section driver file, but set chunk.section.depth to 0,
+# which causes chunking at the chapter level.
+
+# Compared to the standard xhtml-chapter rule, this has an extra
+# "fixup" step to rename output files and fix inter-file hyperlinks
+# per the GUI team's file-naming conventions.
+
+# The %_SRCS variable must be set to the list of target dependencies.
+
+%.guihelp-xhtml-chapter: %-prepped.xml $(MYSQL_GUIHELP_XHTML_SECTION_XSL_DEPS)
+	-$(RM) -r $@ $@-tmp
+	mkdir $@-tmp
+	$(XSLTPROC) \
+		--stringparam l10n.gentext.default.language $(DOC_LANG) \
+		--stringparam html.stylesheet $(notdir $(HTML_CSS_FILE)) \
+		--param chunk.section.depth 0 \
+		--output $@-tmp/ \
+		$(MYSQL_GUIHELP_XHTML_SECTION_XSL) \
+		$<
+	cd $@-tmp; \
+	mv -f functions.html mysqlqb_functions.html; \
+	mv -f sql-syntax.html mysqlqb_statements.html; \
+	replace 'href="functions.html' 'href="mysqlqb_functions.html' -- *.html; \
+	replace 'href="sql-syntax.html' 'href="mysqlqb_statements.html' -- *.html
+	IMAGE_FILES="$(call target_images,$*)"; \
+	if [ "x$$IMAGE_FILES" != "x" ]; then \
+		mkdir $@-tmp/images; \
+		cp $$IMAGE_FILES $@-tmp/images; \
+		$(TOOLS_DIR)/remap-img-paths.pl $@-tmp/*.html; \
+	fi
+	cp $(HTML_CSS_FILE) $@-tmp
+	mv $@-tmp $@
+
+clean::
+	$(RM) -r *.guihelp-xhtml-chapter *.guihelp-xhtml-chapter-tmp
+
+help::
+	@echo "make file.guihelp-xhtml-chapter   - convert file.xml to XHTML GUI"
+	@echo "                                    help, 1 file/chapter"
+	@echo "                                    (putting output in subdirectory)"


Modified: trunk/make.d/xml-html-chapter
===================================================================
--- trunk/make.d/xml-html-chapter	2007-01-11 13:48:33 UTC (rev 4445)
+++ trunk/make.d/xml-html-chapter	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 505 bytes

@@ -2,7 +2,7 @@
 # (Language sensitive)
 
 # Use html-section driver file, but set chunk.section.depth to 0,
-# causes chunking at the chapter level.
+# which causes chunking at the chapter level.
 
 # The %_SRCS variable must be set to the list of target dependencies.
 


Modified: trunk/make.d/xml-xhtml-chapter
===================================================================
--- trunk/make.d/xml-xhtml-chapter	2007-01-11 13:48:33 UTC (rev 4445)
+++ trunk/make.d/xml-xhtml-chapter	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 509 bytes

@@ -2,7 +2,7 @@
 # (Language sensitive)
 
 # Use xhtml-section driver file, but set chunk.section.depth to 0,
-# causes chunking at the chapter level.
+# which causes chunking at the chapter level.
 
 # The %_SRCS variable must be set to the list of target dependencies.
 


Added: trunk/xsl.d/mysql-guihelp-xhtml-section.xsl
===================================================================
--- trunk/xsl.d/mysql-guihelp-xhtml-section.xsl	                        (rev 0)
+++ trunk/xsl.d/mysql-guihelp-xhtml-section.xsl	2007-01-11 13:49:33 UTC (rev 4446)
Changed blocks: 1, Lines Added: 55, Lines Deleted: 0; 2199 bytes

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  mysql-guihelp-xhtml-section.xsl - Driver stylesheet for generating XHTML
+  per-section output, but with <remark> elements stripped and several
+  parameters preset.
+
+  Include the xhtml namespace declaration so that it becomes
+  the default namespace for literal output elements.
+
+  Other changes specific to generation of GUI help files:
+  - Disable section numbering; we want just section titles
+  - Add customization of xref generation to include *only* the text
+    of the title (necessary to suppress leading "the section called"
+    that otherwise appears when section numbering is disabled.
+-->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="http://www.w3.org/1999/xhtml"
+  version="1.0">
+
+<xsl:import href="docbook-xsl/xhtml/chunkfast.xsl"/>
+<xsl:include href="mysql-disclaimer-xhtml.xsl"/>
+
+<xsl:param name="generate.section.toc.level" select="8"/>
+<xsl:param name="use.id.as.filename" select="1"/>
+
+<xsl:param name="chunk.quietly" select="1"/>
+<xsl:param name="chunk.first.sections" select="1"/>
+<xsl:param name="chunk.fast" select="1"/>
+
+<!-- we always want utf-8 - makes it easier to deal with comments -->
+<xsl:param name="chunker.output.encoding" select="'utf-8'"/>
+
+<!-- strip remark elements -->
+<xsl:template match="remark" />
+
+<!-- disable section numbering -->
+<xsl:param name="chapter.autolabel" select="0"/>
+<xsl:param name="section.autolabel" select="0"/>
+
+<!-- customize xref title generation: include only text of titles -->
+<xsl:param name="local.l10n.xml" select="document('')"/> 
+<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> 
+  <l:l10n language="en"> 
+    <l:context name="xref"> 
+      <l:template name="appendix" text="%t"/> 
+      <l:template name="chapter" text="%t"/> 
+      <l:template name="section" text="%t"/> 
+    </l:context>    
+  </l:l10n>
+</l:i18n>
+
+</xsl:stylesheet>


Thread
svn commit - mysqldoc@docsrva: r4446 - in trunk: . guihelp make.d xsl.dpaul11 Jan