List:Commits« Previous MessageNext Message »
From:paul Date:August 22 2007 4:17pm
Subject:svn commit - mysqldoc@docsrva: r7508 - in trunk: . administrator gui-common make.d query-browser userguide xsl.d
View as plain text  
Author: paul
Date: 2007-08-22 18:17:52 +0200 (Wed, 22 Aug 2007)
New Revision: 7508

Log:
 r29192@polar:  paul | 2007-08-22 11:17:06 -0500
 Some improvements for DocBook -> Texinfo transform.
  Detect <link> elements with no content.
  Handle cross references to tables.
 Add section IDs to some .xml files so they can generate Texinfo.


Modified:
   trunk/administrator/Makefile
   trunk/gui-common/chapter-uninstall-all.xml
   trunk/gui-common/installation-all.xml
   trunk/gui-common/starting-all.xml
   trunk/make.d/xml-help
   trunk/make.d/xml-info
   trunk/query-browser/Makefile
   trunk/userguide/excel-mysql.xml
   trunk/xsl.d/dbk-texi.xsl

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


Modified: trunk/administrator/Makefile
===================================================================
--- trunk/administrator/Makefile	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/administrator/Makefile	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 471 bytes

@@ -52,7 +52,7 @@
 include $(MAKE_DIR)/xml-pdf
 include $(MAKE_DIR)/xml-toc
 #include $(MAKE_DIR)/xml-txt
-#include $(MAKE_DIR)/xml-info
+include $(MAKE_DIR)/xml-info
 include $(MAKE_DIR)/xml-depend
 
 # Import directory specific extensions


Modified: trunk/gui-common/chapter-uninstall-all.xml
===================================================================
--- trunk/gui-common/chapter-uninstall-all.xml	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/gui-common/chapter-uninstall-all.xml	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 3, Lines Added: 3, Lines Deleted: 3; 731 bytes

@@ -17,7 +17,7 @@
 
 <!-- Windows -->
 
-  <section>
+  <section id="guitools-uninstalling-windows">
 
     <title>Uninstall &ndash; Windows</title>
 

@@ -66,7 +66,7 @@
 
 <!-- END WINDOWS UnINSTALL -->
 
-  <section>
+  <section id="guitools-uninstalling-linux">
 
     <title>Uninstall &ndash; Linux</title>
 

@@ -123,7 +123,7 @@
 
 <!-- END LINUX UnINSTALL -->
 
-  <section>
+  <section id="guitools-uninstalling-macosx">
 
     <title>Uninstall &ndash; Mac OS X</title>
 


Modified: trunk/gui-common/installation-all.xml
===================================================================
--- trunk/gui-common/installation-all.xml	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/gui-common/installation-all.xml	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 414 bytes

@@ -134,7 +134,7 @@
 
     </section>
 
-    <section>
+    <section id="gui-tools-installation-zip">
 
       <title>Installing From the ZIP File</title>
 


Modified: trunk/gui-common/starting-all.xml
===================================================================
--- trunk/gui-common/starting-all.xml	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/gui-common/starting-all.xml	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 3, Lines Added: 3, Lines Deleted: 3; 686 bytes

@@ -16,7 +16,7 @@
     system you are using.
   </para>
 
-  <section id="starting-guitools">
+  <section id="starting-guitools-windows">
 
     <title>Running Under Windows</title>
 

@@ -77,7 +77,7 @@
 
 <!-- linux -->
 
-  <section>
+  <section id="starting-guitools-linux">
 
     <title>Running Under Linux</title>
 

@@ -156,7 +156,7 @@
 
   </section>
 
-  <section>
+  <section id="starting-guitools-macosx">
 
     <title>Running On Mac OS X</title>
 


Modified: trunk/make.d/xml-help
===================================================================
--- trunk/make.d/xml-help	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/make.d/xml-help	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 525 bytes

@@ -15,14 +15,14 @@
 		--output $@-tmp \
 		$(MYSQL_HELP_PREP1_XSL) \
 		$<
-		mv $@-tmp $@
+	mv $@-tmp $@
 
 %.help: %-help.xml $(MYSQL_HELP_PREP2_XSL_DEPS)
 	$(XSLTPROC) \
 		--output $@-tmp \
 		$(MYSQL_HELP_PREP2_XSL) \
 		$<
-		mv $@-tmp $@
+	mv $@-tmp $@
 
 clean::
 	$(RM) *-help.xml *-help.xml-tmp *.help *.help-tmp


Modified: trunk/make.d/xml-info
===================================================================
--- trunk/make.d/xml-info	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/make.d/xml-info	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 5, Lines Deleted: 3; 657 bytes

@@ -9,14 +9,16 @@
 %.texi: %-prepped.xml $(DBK_TEXI_XSL_DEPS) $(FIXUP_TEXI)
 	$(XSLTPROC)  \
 		--stringparam l10n.gentext.default.language $(DOC_LANG) \
-		$(DBK_TEXI_XSL) $< | $(FIXUP_TEXI) > $@-tmp
-	mv $@-tmp $@
+		$(DBK_TEXI_XSL) $< > $@.tmp
+	$(FIXUP_TEXI) $@.tmp > $@.tmp2
+	$(RM) $@.tmp
+	mv $@.tmp2 $@
 
 %.info: %.texi
 	makeinfo --no-split -I . $<
 
 clean::
-	$(RM) *.texi *.texi-tmp
+	$(RM) *.texi *.texi.tmp *.texi.tmp2
 	$(RM) *.info
 
 help::


Modified: trunk/query-browser/Makefile
===================================================================
--- trunk/query-browser/Makefile	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/query-browser/Makefile	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 471 bytes

@@ -52,7 +52,7 @@
 include $(MAKE_DIR)/xml-pdf
 include $(MAKE_DIR)/xml-toc
 #include $(MAKE_DIR)/xml-txt
-#include $(MAKE_DIR)/xml-info
+include $(MAKE_DIR)/xml-info
 include $(MAKE_DIR)/xml-depend
 
 # Import directory specific extensions


Modified: trunk/userguide/excel-mysql.xml
===================================================================
--- trunk/userguide/excel-mysql.xml	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/userguide/excel-mysql.xml	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 1, Lines Added: 10, Lines Deleted: 2; 857 bytes

@@ -191,8 +191,16 @@
     <table>
       <title>Spreadsheet format</title>
       <tgroup cols="10">
-        <colspec colwidth=".5in"/>
-        <colspec colwidth=".5in"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
+        <colspec colwidth="*10"/>
         <thead>
           <row>
             <entry><emphasis role="bold">firstname</emphasis></entry>


Modified: trunk/xsl.d/dbk-texi.xsl
===================================================================
--- trunk/xsl.d/dbk-texi.xsl	2007-08-22 15:52:00 UTC (rev 7507)
+++ trunk/xsl.d/dbk-texi.xsl	2007-08-22 16:17:52 UTC (rev 7508)
Changed blocks: 23, Lines Added: 54, Lines Deleted: 43; 8321 bytes

@@ -19,15 +19,13 @@
 resulting output to see if it includes any tags that were not
 handled.  Any such tags indicate that the stylesheet is incomplete.
 
-Note: Having the text directive commented out causes &lt;, &gt;,
-etc. to appear literally in the output.  That's okay; when the
-directive is not commented out, those sequences are converted to
-<, >, etc.
+Note: Commenting out the xsl:output directive causes &lt;, &gt;,
+etc. to appear literally in the output.  That's okay; in normal
+use (when the directive is not commented out), those sequences are
+converted to <, >, etc.
 -->
 
 <!-- We do not want any XML header -->
-<!--
--->
 <xsl:output method="text" omit-xml-declaration="yes"/>
 
 <!-- include special-char mapping templates -->

@@ -41,11 +39,11 @@
   cross-references.  This is used for determining whether a <link>
   points to something for which we can generate a cross reference:
   If we come across a <link linkend="xxx"/> that resolves to some
-  other kind of element, key('parent',@linkend) will be empty.
+  other kind of element, key('toc.ids',@linkend) will be empty.
 -->
 
 <xsl:key
-  name="parent"
+  name="toc.ids"
   match="book|abstract|preface|chapter|appendix|section"
   use="@id"/>
 

@@ -257,17 +255,9 @@
   </xsl:call-template>
 </xsl:template>
 
-<!-- XML comments -> Texinfo comment -->
-<!--
-Actually, we could just delete them...
--->
+<!-- strip XML comments -->
 
-<xsl:template match="comment()">
-  <xsl:value-of select="$newline"/>
-  <xsl:text>@c </xsl:text>
-  <xsl:value-of select="normalize-space(.)"/>
-  <xsl:value-of select="$newline"/>
-</xsl:template>
+<xsl:template match="comment()" />
 
 <!-- strip remark elements -->
 <xsl:template match="remark" />

@@ -323,7 +313,7 @@
   <xsl:apply-templates/>
 </xsl:template>
 
-<!-- <title> -> delete it unless in noignore mode -->
+<!-- <title> => delete it unless in noignore mode -->
 
 <xsl:template match="title"/>
 

@@ -374,10 +364,19 @@
   <informaltable><tgroup><colspec>*(<thead><row>*)<tbody>(<row>*)
 
   Use of fancier syntax will probably kill this transform.
+
+  If the table has an id attribute, generate an @anchor for it
+  in case there is a cross-reference to it.
 -->
 
 <xsl:template match="informaltable|table">
   <xsl:value-of select="$newline"/>
+  <xsl:if test="@id">
+    <xsl:text>@anchor{</xsl:text>
+    <xsl:value-of select="@id"/>
+    <xsl:text>}</xsl:text>
+  </xsl:if>
+  <xsl:value-of select="$newline"/>
   <!-- table has title, so grab it here -->
   <xsl:if test="title">
     <xsl:text>@strong{</xsl:text>

@@ -399,7 +398,7 @@
 </xsl:template>
 
 <!--
-  <tgroup>, <colspec>, <thead> <tbody>, <row> -> nothing
+  <tgroup>, <colspec>, <thead> <tbody>, <row> => nothing
                                                  (just delete the tags)
 
   Information from colspec was already used earlier for @columnfractions

@@ -410,7 +409,7 @@
 </xsl:template>
 
 <!--
-  <entry> -> item in @multitable row
+  <entry> => item in @multitable row
 
   First entry in row is preceded by @item.
   Following entries are preceded by @tab

@@ -429,7 +428,7 @@
 </xsl:template>
 
 <!--
-  <entrytbl> -> nested table item in @multitable row
+  <entrytbl> => nested table item in @multitable row
 
   Handle like <entry>, but emit the text of the entire nested
   table. This is likely to look bad but avoids having makeinfo

@@ -448,7 +447,7 @@
   <xsl:value-of select="normalize-space(.)"/>
 </xsl:template>
 
-<!-- <programlisting> -> @example -->
+<!-- <programlisting> => @example -->
 
 <xsl:template match="programlisting">
   <xsl:value-of select="$newline"/>

@@ -459,7 +458,7 @@
   <xsl:value-of select="$newline"/>
 </xsl:template>
 
-<!-- <literallayout> -> @display -->
+<!-- <literallayout> => @display -->
 
 <xsl:template match="literallayout">
   <xsl:value-of select="$newline"/>

@@ -469,10 +468,10 @@
   <xsl:value-of select="$newline"/>
 </xsl:template>
 
-<!-- <para> -> newline + paragraph contents -->
+<!-- <para> => newline + paragraph contents -->
 <!--
   If the para has an id attribute, generate an @anchor for it
-  in case there is a cross-reference to the para.
+  in case there is a cross-reference to it.
 -->
 
 <xsl:template match="para">

@@ -567,7 +566,7 @@
 <xsl:template match="tip/title"/>
 
 
-<!-- <indexterm> -> @[cft]index + value of <primary>/<secondary/<tertiary> -->
+<!-- <indexterm> => @[cft]index + value of <primary>/<secondary/<tertiary> -->
 <!--
 Use the type attribute to determine what kind of index tag to use.
 -->

@@ -606,7 +605,7 @@
 
 <!-- Texinfo inline handlers -->
 
-<!-- <emphasis> -> @strong{} or @emph{} -->
+<!-- <emphasis> => @strong{} or @emph{} -->
 
 <xsl:template match="emphasis[@role='bold']">
   <xsl:text>@strong{</xsl:text>

@@ -614,7 +613,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <emphasis>, <firstterm>, <foreignphrase> -> @emph{} -->
+<!-- <emphasis>, <firstterm>, <foreignphrase> => @emph{} -->
 
 <xsl:template match="emphasis
                     |firstterm

@@ -625,7 +624,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <filename> -> @file{} -->
+<!-- <filename> => @file{} -->
 
 <xsl:template match="filename">
   <xsl:text>@file{</xsl:text>

@@ -633,7 +632,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <command>, <literal>, <option>, etc -> @code{} -->
+<!-- <command>, <literal>, <option>, etc => @code{} -->
 
 <xsl:template match="command
                     |envar

@@ -654,7 +653,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <replaceable> -> @var{} -->
+<!-- <replaceable> => @var{} -->
 
 <xsl:template match="replaceable">
   <xsl:text>@var{</xsl:text>

@@ -662,7 +661,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <quote> -> @samp{} -->
+<!-- <quote> => @samp{} -->
 
 <xsl:template match="quote">
   <xsl:text>@samp{</xsl:text>

@@ -670,13 +669,13 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <userinput> -> nothing (just delete the tags) -->
+<!-- <userinput> => nothing (just delete the tags) -->
 
 <xsl:template match="userinput">
   <xsl:apply-templates/>
 </xsl:template>
 
-<!-- <email> -> @email{} -->
+<!-- <email> => @email{} -->
 
 <xsl:template match="email">
   <xsl:text>@email{</xsl:text>

@@ -684,14 +683,14 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <superscript> -> ^ -->
+<!-- <superscript> => ^ -->
 
 <xsl:template match="superscript">
   <xsl:text>^</xsl:text>
   <xsl:apply-templates/>
 </xsl:template>
 
-<!-- <xref> -> @ref{} (ignore content) -->
+<!-- <xref> => @ref{} (ignore content) -->
 <!-- map linkend="preface" to "Top" (there is no preface) -->
 
 <xsl:template match="xref">

@@ -704,18 +703,19 @@
   <xsl:text>@ref{Top}</xsl:text>
 </xsl:template>
 
-<!-- <link> -> @ref{} (use content as label) -->
+<!-- <link> => @ref{} (use content as label) -->
 
 <!--
   For an item where the linkend attribute points to an element that
   is a TOC element, we generate a cross reference.  For an item that
   points to a non-TOC element, Texinfo provide no means of generating
-  a cross reference. In such cases, we simply emit the text of the link.
+  a cross reference. In such cases, we simply emit the text of the link
+  (and it is an error if there is no text).
 -->
 
 <xsl:template match="link">
   <xsl:choose>
-    <xsl:when test="key('parent',@linkend)">
+    <xsl:when test="key('toc.ids',@linkend)">
       <xsl:text>@ref{</xsl:text>
       <xsl:value-of select="@linkend"/>
       <xsl:text>,,</xsl:text>

@@ -723,12 +723,23 @@
       <xsl:text>}</xsl:text>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates/>
+      <xsl:choose>
+        <xsl:when test="normalize-space(.) != ''">
+          <xsl:apply-templates/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>link found with no text (linkend=</xsl:text>
+            <xsl:value-of select="@linkend"/>
+            <xsl:text>); cannot generate cross reference</xsl:text>
+        </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<!-- <ulink> -> @uref{} -->
+<!-- <ulink> => @uref{} -->
 
 <xsl:template match="ulink">
   <xsl:text>@uref{</xsl:text>

@@ -740,7 +751,7 @@
   <xsl:text>}</xsl:text>
 </xsl:template>
 
-<!-- <citetitle> -> @cite{} -->
+<!-- <citetitle> => @cite{} -->
 
 <xsl:template match="citetitle">
   <xsl:text>@cite{</xsl:text>


Thread
svn commit - mysqldoc@docsrva: r7508 - in trunk: . administrator gui-common make.d query-browser userguide xsl.dpaul22 Aug