Documentation Source Text

Check-in [22726478ad]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Provide for alternative document titles using <alt-title>...</alt-title>. Have the document page come up with the first sublist (containing lists of other documents) open automatically.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 22726478ade668aedf9fbc4e6690d9142726131e
User & Date: drh 2016-09-22 18:03:29
Context
2016-09-23
11:32
Fix a LHS/RHS mixup in the rowvalue documentation. check-in: db4e5cec36 user: drh tags: trunk
2016-09-22
18:03
Provide for alternative document titles using <alt-title>...</alt-title>. Have the document page come up with the first sublist (containing lists of other documents) open automatically. check-in: 22726478ad user: drh tags: trunk
17:19
Fix typos in the opcode.html page. check-in: bfe3dc203f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/capi3ref.in.

     1      1   <title>C/C++ Interface For SQLite Version 3</title>
            2  +<alt-title>C/C++ API Reference</alt-title>
     2      3   <tcl>
     3      4   set in [open sqlite3.h] 
     4      5   set title {}       ;# title of a section of interface definition
     5      6   set type {}        ;# one of: constant datatype function
     6      7   set body {}        ;# human-readable description
     7      8   set code {}        ;# C code of the definition
     8      9   set phase 0        ;# Phase used by the parser 

Changes to pages/compile.in.

     1         -<title>Compilation Options For SQLite</title>
            1  +<title>Compile-time Options</title>
     2      2   <tcl>hd_keywords {compile-time options}</tcl>
     3      3   
     4      4   <table_of_contents>
     5      5   
     6      6   <h1>Overview</h1>
     7      7   
     8      8   <p>

Changes to pages/docs.in.

    64     64   }
    65     65   proc end_heading {} {
    66     66     global lDoc cnt prevHead
    67     67     if {$prevHead==""} return
    68     68     incr cnt
    69     69     hd_puts "<li><a onclick='showhide($cnt)'>"
    70     70     hd_puts "<span class='sh_mark' id='sh_mark_$cnt'>"
    71         -  hd_puts "&#x25ba;</span> $prevHead</a>\n"
    72         -  hd_putsnl "<ul id='sh_sub_$cnt'>"
           71  +  if {$cnt==1} {
           72  +    hd_puts "&#x25bc;</span> $prevHead</a>\n"
           73  +    hd_putsnl "<ul id='sh_sub_$cnt' style='display:block;'>"
           74  +  } else {
           75  +    hd_puts "&#x25ba;</span> $prevHead</a>\n"
           76  +    hd_putsnl "<ul id='sh_sub_$cnt'>"
           77  +  }
    73     78     foreach {name url desc} $lDoc {
    74     79       hd_putsnl "<li><a class='sh_link' href='$url'>$name</a>"
    75         -    hd_putsnl "<span class='desktoponly'>&rarr; $desc</span>"
           80  +    if {$desc!=""} {
           81  +      hd_putsnl "<span class='desktoponly'>&rarr; $desc</span>"
           82  +    }
    76     83     }
    77     84     hd_putsnl </ul>
    78     85     set lDoc {}
    79     86   }
    80     87   source [file join $::DOC pages docsdata.tcl]
    81     88   end_heading
    82     89   </tcl>
    83     90   </ul>

Changes to pages/docsdata.tcl.

     1      1   heading {Document Lists And Indexes} lists
     2      2   
     3         -doc {Alphabetical Listing Of Documents} {doclist.html} {
     4         -  A list of all titled pages on this website, sorted by title.
     5         -}
     6         -doc {Website Keyword Index} {keyword_index.html} {
     7         -  A cross-reference from keywords to various pages within this website.
     8         -}
     9         -doc {Permuted Title Index} {sitemap.html#pindex} {
    10         -  Also known as a "keyword in context" or "KWIC" index or as a concordance,
    11         -  this document is a listing of all other documents sorted by keyword.
    12         -}
            3  +doc {Alphabetical Listing Of All Documents} {doclist.html} {}
            4  +doc {Website Keyword Index} {keyword_index.html} {}
            5  +doc {Permuted Title Index} {sitemap.html#pindex} {}
    13      6   
    14      7   ###############################################################################
    15      8   heading {Overview Documents} overview
    16      9   
    17     10   doc {About SQLite} {about.html} {
    18     11     A high-level overview of what SQLite is and why you might be
    19     12     interested in using it.

Changes to pages/sitemap.in.

    18     18   <tcl>
    19     19   db eval {
    20     20     DROP TABLE IF EXISTS px;
    21     21     CREATE TEMP TABLE px(title COLLATE nocase,link);
    22     22   }
    23     23   db eval {
    24     24     SELECT pagetitle, filename FROM page WHERE pagetitle!='No Title'
           25  +  UNION ALL
           26  +  SELECT alttitle, filename FROM alttitle, page
           27  +   WHERE alttitle.pageid=page.pageid
    25     28     UNION ALL
    26     29     SELECT pagetitle, url FROM expage
    27     30   } {
    28     31     set nword [llength $pagetitle]
    29     32     db eval {INSERT INTO px VALUES($pagetitle, $filename)}
    30     33     for {set i 1} {$i<$nword} {incr i} {
    31     34       set firstpart [lrange $pagetitle 0 [expr {$i-1}]]

Changes to pages/versionnumbers.in.

     1      1   <tcl>hd_keywords {version numbering conventions}</tcl>
     2      2   <title>Version Numbers in SQLite</title>
            3  +
            4  +<fancy_format>
     3      5   
     4      6   <h1>SQLite Version Numbers</h1>
     5      7   
     6      8   <p>
     7         -Beginning with [version 3.9.0] SQLite uses 
            9  +Beginning with [version 3.9.0] ([dateof:3.9.0]) SQLite uses 
     8     10   [http://semver.org|semantic versioning].
     9     11   Prior to that time, SQLite employed a version identifier that
    10     12   contained between two and four numbers.
    11     13   
    12         -<h2>The New Version Numbering System (After 2015-10-01)</h2>
           14  +<h2>The New Version Numbering System (After [dateof:3.9.0])</h2>
    13     15   
    14     16   <p>
    15     17   All SQLite releases starting with 3.9.0 use a three-number
    16     18   "[http://semver.org|semantic version]" of the form X.Y.Z.
    17     19   The first number X is only increased when there is a change that
    18     20   breaks backward compatibility.  The
    19     21   current value for X is 3, and the SQLite developers plan to support
................................................................................
    39     41   numbering format used by for [SQLITE_VERSION_NUMBER] and
    40     42   [sqlite3_libversion_number()] allows versions up to 3.999.999, which is
    41     43   more than enough for the planned end-of-support date for SQLite
    42     44   in 2050.  However, the current tarball naming conventions only
    43     45   reserve two digits for the Y and so the naming format for downloads
    44     46   will need to be revised in about 2030.
    45     47   
    46         -<h2>The Historical Numbering System (Before 2015-10-01)</h2>
           48  +<h2>The Historical Numbering System (Before [dateof:3.9.0])</h2>
    47     49   
    48     50   <p>This historical version numbering system used a two-, three-,
    49     51   or four-number version:  W.X, W.X.Y, or W.X.Y.Z.
    50     52   W was the file format: 1 or 2 or 3.
    51     53   X was the major version.
    52     54   Y was the minor version.
    53     55   Z was used only for patch releases to fix bugs.
................................................................................
    77     79   [partial indexes], and [indexes on expressions] are all examples of
    78     80   "minor" changes.  Again, the distinction between "major" and "minor"
    79     81   is subjective.
    80     82   
    81     83   <p>
    82     84   The patch level Z was historically only used for bug-fix releases
    83     85   that changed only a small number of code lines.
           86  +
           87  +<h2>Version History</h2>
           88  +
           89  +<ul>
           90  +<li>[chronology|Chronology]
           91  +<li>[release history|Change log]
           92  +</ul>

Changes to schema.tcl.

    14     14       pageid INTEGER PRIMARY KEY,           -- ID for internal use only
    15     15       pagetitle TEXT,                       -- Brief title of the page
    16     16       pageabstract TEXT,                    -- Verbose title of the page
    17     17       filename TEXT UNIQUE NOT NULL,        -- Name of the HTML file
    18     18       parent INTEGER REFERENCES page        -- Aggregate page.  Usually NULL
    19     19     );
    20     20     CREATE INDEX IF NOT EXISTS page_parent ON page(parent);
    21         -  
           21  +
           22  +  /*
           23  +  ** Alternative titles for pages
           24  +  */
           25  +  CREATE TABLE IF NOT EXISTS alttitle(
           26  +    alttitle TEXT,                      -- Alternative title
           27  +    pageid INTEGER REFERENCES page      -- The page with the alternative title
           28  +  );
    22     29     
    23     30     /*
    24     31     ** Each page has one or more fragments.  The first fragment has
    25     32     ** a NULL name.  All other fragments are named.
    26     33     */
    27     34     CREATE TABLE IF NOT EXISTS fragment(
    28     35       fragid INTEGER PRIMARY KEY,               -- ID for internal use only
................................................................................
    91     98       srcclass TEXT,           -- source class:  tcl, th3, src
    92     99       srccat TEXT,             -- source category.  Ex: tcl, th3/cov1
    93    100       srcfile TEXT,            -- document from which evidence extracted
    94    101       srcline INTEGER,         -- line number in source document
    95    102       url TEXT,                -- URL & fragment of htmlized evidence
    96    103       UNIQUE(srcfile, srcline, srccat)
    97    104     );
    98         -  CREATE INDEX ev_reqno ON evidence(reqno);
          105  +  CREATE INDEX IF NOT EXISTS ev_reqno ON evidence(reqno);
    99    106     COMMIT;
   100    107   }
   101    108   db eval {
   102    109     ATTACH 'history.db' AS history;
   103    110     BEGIN;
   104    111     CREATE TABLE IF NOT EXISTS history.allreq(
   105    112       reqno TEXT PRIMARY KEY,  -- Ex: R-12345-67890-...

Changes to wrap.tcl.

    49     49   db eval {
    50     50     ATTACH 'history.db' AS history;
    51     51     BEGIN;
    52     52     DELETE FROM link;
    53     53     DELETE FROM keyword;
    54     54     DELETE FROM fragment;
    55     55     DELETE FROM page;
           56  +  DELETE FROM alttitle;
    56     57     DROP TABLE IF EXISTS expage;
    57     58   }
    58     59   
    59     60   # Load the syntax diagram linkage data
    60     61   #
    61     62   source $DOC/art/syntax/syntax_linkage.tcl
    62     63   
................................................................................
   769    770     set outfile [file root [file tail $infile]].html
   770    771     hd_open_main $outfile
   771    772     db eval {
   772    773       INSERT INTO page(filename,pagetitle)
   773    774       VALUES($outfile,$title);
   774    775     }
   775    776     set h(pageid) [db last_insert_rowid]
          777  +  while {[regexp {<alt-title>([^\n]*)</alt-title>} $in all alttitle]} {
          778  +    regsub {<alt-title>[^\n]*</alt-title>} $in {} in
          779  +    db eval {
          780  +      INSERT INTO alttitle(alttitle,pageid) VALUES($alttitle,$h(pageid));
          781  +    }
          782  +  }
   776    783     hd_header $title $infile
   777    784     regsub -all {<tcl>} $in "\175; eval \173" in
   778    785     regsub -all {</tcl>} $in "\175; hd_puts \173" in
   779    786     eval "hd_puts \173$in\175"
   780    787     cd $::HOMEDIR
   781    788     hd_close_main
   782    789   }