List:Commits« Previous MessageNext Message »
From:paul Date:February 13 2007 9:27pm
Subject:svn commit - mysqldoc@docsrva: r4927 - in trunk: . make.d tools xsl.d
View as plain text  
Author: paul
Date: 2007-02-13 22:27:40 +0100 (Tue, 13 Feb 2007)
New Revision: 4927

Log:
 r19804@polar:  paul | 2007-02-13 15:26:00 -0600
 Drop help-url-id in favor of help-url because the latter is more
 informative.


Modified:
   trunk/make.d/xml-help
   trunk/tools/fill_help_tables2.pl
   trunk/xsl.d/help-prep1.xsl
   trunk/xsl.d/help-prep2.xsl
   trunk/xsl.d/mysqlweb-chunk.xsl

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


Modified: trunk/make.d/xml-help
===================================================================
--- trunk/make.d/xml-help	2007-02-13 21:27:15 UTC (rev 4926)
+++ trunk/make.d/xml-help	2007-02-13 21:27:40 UTC (rev 4927)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 638 bytes

@@ -1,7 +1,7 @@
 # Extract help-table information from DocBook
 
-# The doc.url.base parameter MUST be set because
-# mysql-help-prep1.xsl uses it to compute page URLs.
+# The doc.url.base parameter MUST be set because help-prep1.xsl uses
+# it to compute page URLs. Its value MUST end with a slash.
 
 # Do not delete these files when they are generated as intermediates
 # for a final target.  They are deleted by "make clean".


Modified: trunk/tools/fill_help_tables2.pl
===================================================================
--- trunk/tools/fill_help_tables2.pl	2007-02-13 21:27:15 UTC (rev 4926)
+++ trunk/tools/fill_help_tables2.pl	2007-02-13 21:27:40 UTC (rev 4927)
Changed blocks: 9, Lines Added: 8, Lines Deleted: 22; 3343 bytes

@@ -1,11 +1,7 @@
 #!/usr/bin/perl
 # vim:set ts=2 sw=2 expandtab:
 
-# To do:
-# - Still need a version number for the manual, so that the proper
-#   version-specific URL can be constructed.
-
-# Copyright (C) 2003 MySQL AB
+# Copyright (C) 2003-2007 MySQL AB
 # For a more info consult the file COPYRIGHT distributed with this file.
 #
 # This script generates the SQL statements required by mysql_install_db to

@@ -51,10 +47,8 @@
 # Each topic block contains section-id, URL, keyword, syntax, description,
 #  and example blocks.  They look like this:
 #
-# @HELP-URL-ID id-value
+# @HELP-URL url-to-section-containing-topic
 #
-# @HELP-URL-ID url-value
-#
 # @HELP-KEYWORDS-BEGIN
 # ... keywords (plain text) ...
 # @HELP-KEYWORDS-END

@@ -84,7 +78,7 @@
 #
 # @HELP-CATEGORY Comparison operators@Functions
 # @HELP-TOPIC =
-# @HELP-URL-ID comparison-operators
+# @HELP-URL http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html
 # @HELP-SYNTAX-BEGIN
 # @HELP-TEXT-BEGIN WRAP
 # =

@@ -151,7 +145,8 @@
 # 2007-02-12
 # - Handle @HELP-URL directive, which contains full URL to the section
 #   that contains the help topic.  The value is put out at the end of
-#   the Description text.
+#   the Description text.  Also use full URL for the help_topic.url column
+#   rather than just the node name.
 
 use strict;
 

@@ -235,7 +230,6 @@
 my $pc_cat;         # current parent category (default: Contents)
 my $c_cat;          # current category
 my $c_topic;        # current topic within category
-my $c_url_id;       # current URL id within topic
 my $c_url;          # current URL within topic
 my $c_keywords;     # current keywords within topic
 my $c_syntax;       # current syntax within topic

@@ -290,13 +284,6 @@
   # All other tags occur within topic and REQUIRE the topic to be known
   die "$.:\@HELP-$tag found but topic unknown\n" unless defined $c_topic;
 
-  if ($tag eq "URL-ID")
-  {
-    die "$.:\@HELP-$tag found with no id value\n" unless $rest ne "";
-    $c_url_id = $rest;
-    next;
-  }
-
   if ($tag eq "URL")
   {
     die "$.:\@HELP-$tag found with no id value\n" unless $rest ne "";

@@ -484,7 +471,7 @@
   warn "$.:No description for topic ", uc($c_topic), "\n"
     unless defined $c_description;
 
-  add_url ($c_topic, $c_url_id) if defined $c_url_id;
+  add_url ($c_topic, $c_url) if defined $c_url;
 
   foreach my $keyword (split (/\s+/, $c_keywords))
   {

@@ -495,13 +482,12 @@
   $c_description = "" unless defined $c_description;
   $c_description = "Syntax:\n$c_syntax\n$c_description" if defined $c_syntax;
   # if URL was given, make it last part of description
-  $c_description .= "\nURL: $c_url\n" if defined $c_url;
+  $c_description .= "\nURL: $c_url\n\n" if defined $c_url;
   add_description ($c_topic, $c_description) if $c_description;
 
   add_example ($c_topic, $c_example) if defined $c_example;
 
   $c_topic = undef;
-  $c_url_id = undef;
   $c_url = undef;
   $c_keywords = undef;
   $c_syntax = undef;

@@ -897,7 +883,7 @@
     
   if (exists($topics{$topic_name}->{url}))
   {
-    print_error "double URL id for $topic_name\n";
+    print_error "double URL for $topic_name\n";
   }
   $topics{$topic_name}->{url}= $url;
 }


Modified: trunk/xsl.d/help-prep1.xsl
===================================================================
--- trunk/xsl.d/help-prep1.xsl	2007-02-13 21:27:15 UTC (rev 4926)
+++ trunk/xsl.d/help-prep1.xsl	2007-02-13 21:27:40 UTC (rev 4927)
Changed blocks: 2, Lines Added: 2, Lines Deleted: 10; 1162 bytes

@@ -70,9 +70,8 @@
   extract their contents in the next processing stage.
 
   Other actions:
-  - For each topic, add a <help-url-id name="XXX"/> element containing the
-    @id attribute of the containing section.  This is used for generating
-    the URL of the corresponding page in the online manual.
+  - For each topic, add a <help-url/> element containing the URL into the
+    online manual for the containing section.
   - Process some elements to convert them to plainer format:
   - "Resolve" cross-references by converting <xref linkend="target-id"/>
     into [target-id].

@@ -302,13 +301,6 @@
     </xsl:choose>
   </xsl:variable>
 
-  <help-url-id>
-    <xsl:attribute name="name">
-      <xsl:value-of select="$container.id"/>
-    </xsl:attribute>
-  </help-url-id>
-  <xsl:value-of select="$newline"/>
-
   <help-url>
     <xsl:call-template name="map.id.to.online.manual.url">
       <xsl:with-param name="id" select="$container.id"/>


Modified: trunk/xsl.d/help-prep2.xsl
===================================================================
--- trunk/xsl.d/help-prep2.xsl	2007-02-13 21:27:15 UTC (rev 4926)
+++ trunk/xsl.d/help-prep2.xsl	2007-02-13 21:27:40 UTC (rev 4927)
Changed blocks: 4, Lines Added: 6, Lines Deleted: 25; 2049 bytes

@@ -18,10 +18,9 @@
   The input looks like this:
 
   <help-information>
-    <help-category>
-      <help-topic>
-        <help-url-id/>
-        <help-url/>
+    <help-category name="category-name">
+      <help-topic name="topic-name">
+        <help-url> ... </help-url>
         <help-keywords> ... </help-keywords>
         <help-syntax> ... </help-syntax>
         <help-description> ... </help-description>

@@ -113,8 +112,7 @@
   <xsl:text>@HELP-TOPIC </xsl:text>
   <xsl:value-of select="@name"/>
   <xsl:value-of select="$newline"/>
-  <xsl:apply-templates match="help-url-id
-                             |help-url
+  <xsl:apply-templates match="help-url
                              |help-keywords
                              |help-syntax
                              |help-description

@@ -122,25 +120,8 @@
                              "/>
 </xsl:template>
 
+<!-- For URL, copy content (always a single line) -->
 
-<!-- For URL ID, copy @name attribute -->
-
-<xsl:template match="help-url-id">
-  <!-- require @name attribute -->
-  <xsl:if test="not(@name)">
-    <xsl:message terminate="yes">
-      <xsl:text>ERROR: Found </xsl:text>
-      <xsl:value-of select="local-name(.)"/>
-      <xsl:text> tag without required value attribute</xsl:text>
-    </xsl:message>
-  </xsl:if>
-  <xsl:text>@HELP-URL-ID </xsl:text>
-  <xsl:value-of select="@name"/>
-  <xsl:value-of select="$newline"/>
-</xsl:template>
-
-<!-- For URL, copy content -->
-
 <xsl:template match="help-url">
   <xsl:text>@HELP-URL </xsl:text>
   <xsl:copy-of select="normalize-space(.)"/>

@@ -295,7 +276,7 @@
 <!--
   Discard text and elements not otherwise explicitly matched:
   - Match elements and text
-  - Recursively apply templates only to subelements (which has the
+  - Recursively apply templates only to elements (which has the
     effect of discarding matched text)
 -->
 


Modified: trunk/xsl.d/mysqlweb-chunk.xsl
===================================================================
--- trunk/xsl.d/mysqlweb-chunk.xsl	2007-02-13 21:27:15 UTC (rev 4926)
+++ trunk/xsl.d/mysqlweb-chunk.xsl	2007-02-13 21:27:40 UTC (rev 4927)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 656 bytes

@@ -23,8 +23,8 @@
 
 <!--
   How deep to chunk sections. Deeper sections are included inline
-  in the parent section page.  If this value changes, you MUST
-  also change the depth used for the toc-elt key of help-prep1.xsl.
+  in the parent section page.  If you change this value, you MUST
+  also change the depth used for the page-elt key of help-prep1.xsl.
 -->
 <xsl:param name="chunk.section.depth" select="3"/>
 


Thread
svn commit - mysqldoc@docsrva: r4927 - in trunk: . make.d tools xsl.dpaul13 Feb