Author: paul
Date: 2007-01-11 14:49:54 +0100 (Thu, 11 Jan 2007)
New Revision: 4447
Log:
r14393@frost: paul | 2007-01-11 07:46:57 -0600
Use a shorter externsion.
Added:
trunk/make.d/xml-guihelp
trunk/xsl.d/mysql-guihelp.xsl
Removed:
trunk/make.d/xml-guihelp-xhtml-chapter
trunk/xsl.d/mysql-guihelp-xhtml-section.xsl
Modified:
trunk/guihelp/Makefile
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:14392
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:14393
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:49:33 UTC (rev 4446)
+++ trunk/guihelp/Makefile 2007-01-11 13:49:54 UTC (rev 4447)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 6; 1374 bytes
@@ -4,13 +4,12 @@
# 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 %.guihelp-xhtml-chapter rule to create
-# individual output files per chapter.
+# Then we format it using the %.guihelp 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.
+# If you add files to the set of files processed here, you'll also
+# need to change the %.guihelp target rule in $(MAKE_DIR)/xml-guihelp.
# References from an included file to another resolve as expected.
# References to non-included files resolve to links to the online
@@ -83,7 +82,7 @@
include $(MAKE_DIR)/xml-format
include $(MAKE_DIR)/xml-useless
include $(MAKE_DIR)/xml-prep
-include $(MAKE_DIR)/xml-guihelp-xhtml-chapter
+include $(MAKE_DIR)/xml-guihelp
include $(MAKE_DIR)/xml-depend
# Import directory specific extensions
Added: trunk/make.d/xml-guihelp
===================================================================
--- trunk/make.d/xml-guihelp (rev 0)
+++ trunk/make.d/xml-guihelp 2007-01-11 13:49:54 UTC (rev 4447)
Changed blocks: 1, Lines Added: 42, Lines Deleted: 0; 1740 bytes
@@ -0,0 +1,42 @@
+# 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: %-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 *.guihelp
+
+help::
+ @echo "make file.guihelp - convert file.xml to XHTML GUI help, 1 file/chapter"
+ @echo " (putting output in subdirectory)"
Added: trunk/xsl.d/mysql-guihelp.xsl
===================================================================
--- trunk/xsl.d/mysql-guihelp.xsl (rev 0)
+++ trunk/xsl.d/mysql-guihelp.xsl 2007-01-11 13:49:54 UTC (rev 4447)
Changed blocks: 1, Lines Added: 56, Lines Deleted: 0; 2192 bytes
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ mysql-guihelp.xsl - Driver stylesheet for generating XHTML
+ per-section output, but with <remark> elements stripped and several
+ parameters preset.
+
+ Based on mysql-xhtml-section.xsl, but includes these
+ 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.
+
+ Include the xhtml namespace declaration so that it becomes
+ the default namespace for literal output elements.
+-->
+
+<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: r4447 - in trunk: . guihelp make.d xsl.d | paul | 11 Jan |