Index: Doc/buildChm.tcl
==================================================================
--- Doc/buildChm.tcl
+++ Doc/buildChm.tcl
@@ -43,10 +43,75 @@
return [string trim [lindex [split $result " "] 0]]
}
return ""
}
+#
+# NOTE: This procedure unescapes certain HTML tags that are used within the
+# documentation for the virtual table methods.
+#
+proc unescapeHtmlTags { fileName cdata } {
+ #
+ # NOTE: Read all the textual data from the file.
+ #
+ set data [readFile $fileName]
+
+ #
+ # NOTE: No replacements made yet.
+ #
+ set count 0
+
+ #
+ # NOTE: If requested by the caller, unwrap all content contained with XML
+ # CDATA sections as well.
+ #
+ if {$cdata} then {
+ #
+ # NOTE: Grab everything within the CDATA tags and use verbatim.
+ #
+ set cdataCount [regsub -all -- {} $data {\1} data]
+
+ if {$cdataCount > 0} then {
+ incr count $cdataCount
+ } else {
+ # puts stdout "*WARNING* File \"$fileName\" has no CDATA"
+ }
+ }
+
+ #
+ # TODO: Handle all the HTML tags we know may be present in the virtual
+ # table method documentation. This may need adjustments in the
+ # future.
+ #
+ foreach to [list \
+ {} {} {
} {
} {} {} {
} {} \
+ {} {} {} {} {
} {} {} \
+ {}] {
+ #
+ # NOTE: Figure out the escaped form of this tag and then replace it
+ # with the unescaped form.
+ #
+ set from [string map [list < <\; > >\;] $to]
+ incr count [regsub -all -- $from $data $to data]
+ }
+
+ #
+ # NOTE: Issue a warning if the "href" pattern was not matched.
+ #
+ if {$count == 0} then {
+ puts stdout "*WARNING* File \"$fileName\" has no supported HTML tags"
+ }
+
+ #
+ # NOTE: If some replacements were performed on the data from the file,
+ # then overwrite it with the new data.
+ #
+ if {$count > 0} then {
+ writeFile $fileName $data
+ }
+}
+
#
# HACK: This procedure checks all the "href" attribute values in the specified
# core documentation file. For each value, this procedure checks if the
# reference conforms to one of the following general categories:
#
@@ -137,17 +202,22 @@
#
incr count [regsub -all -- $pattern $data $subSpec data]
}
#
- # NOTE: If some replacements were performed on the data from the file, then
- # overwrite it with the new data; otherwise, issue a warning.
+ # NOTE: Issue a warning if the "href" pattern was not matched.
+ #
+ if {$count == 0} then {
+ puts stdout "*WARNING* File \"$fileName\" does not match: href=\"(.*?)\""
+ }
+
+ #
+ # NOTE: If some replacements were performed on the data from the file,
+ # then overwrite it with the new data.
#
if {$count > 0} then {
writeFile $fileName $data
- } else {
- puts stdout "*WARNING* File \"$fileName\" does not match: href=\"(.*?)\""
}
}
#
# HACK: Copy our local [fixed] copy of the MSDN documenter assembly into the
@@ -294,10 +364,24 @@
exit 1
}
transformCoreDocumentationFile $fileName https://www.sqlite.org/
}
+
+###############################################################################
+
+foreach fileName [glob -nocomplain [file join $temporaryPath \
+ System.Data.SQLite~System.Data.SQLite.ISQLiteNativeModule*.html]] {
+ set fileName [file join $path $fileName]
+
+ if {![file isfile $fileName]} then {
+ puts stdout "Cannot find temporary provider file: $fileName"
+ exit 1
+ }
+
+ unescapeHtmlTags $fileName false
+}
###############################################################################
set patterns(.hhc,1) {}
Index: Doc/vtab.tcl
==================================================================
--- Doc/vtab.tcl
+++ Doc/vtab.tcl
@@ -48,21 +48,25 @@
}
set result $line
foreach remove [list \
- {} {} {} {} {} \
- {- } {
} {} {
} {- } {
} {- } \
- {
} {} {
} {} {
} {}] {
+ {} {} {} {} {
}] {
regsub -all -- $remove $result "" result
if {[string length [string trim $result]] == 0} then {
return ""
}
}
- regsub -all -- {
} $result \n[escapeSubSpec $prefix] result
+ foreach escape [list \
+ {} {} {
} {- } {
} {} {
} {- } \
+ {
} {- } {
} {} {
} {} {} \
+ {}] {
+ regsub -all -- ($escape) $result {} result
+ }
+
regsub -all -- {≠} $result {\≠} result
regsub -all -- {[(?:;)?} $result {[} result
regsub -all -- {](?:;)?} $result {]} result
regsub -all -- {<( |\"|\d|=)} $result {\<\1} result
regsub -all -- {( |\"|\d|=)>} $result {\1\>} result
@@ -76,11 +80,11 @@
proc extractMethod { name lines pattern prefix indexVarName methodsVarName } {
upvar 1 $indexVarName index
upvar 1 $methodsVarName methods
- set paragraph 0
+ array set levels {p 0}
set length [llength $lines]
while {$index < $length} {
set line [lindex $lines $index]
@@ -87,28 +91,28 @@
if {[regexp -- $pattern $line]} then {
break; # stop on this line for outer loop.
} else {
set trimLine [string trim $line]; set data ""
- if {$paragraph > 0 && [string length $trimLine] == 0} then {
+ if {$levels(p) > 0 && [string length $trimLine] == 0} then {
# blank line, close paragraph.
if {[info exists methods($name)]} then {
# non-first line, leading line separator.
append data \n $prefix
} else {
# first line, no leading line separator.
append data $prefix
}
- incr paragraph -1
+ incr levels(p) -1
} elseif {[string range $trimLine 0 2] eq ""} then {
- # open paragraph ... maybe one line?
+ # open tag ... maybe one line?
if {[string range $trimLine end-3 end] eq "
"} then {
set newLine [processLine $line $prefix]
if {[string length $newLine] > 0} then {
- # one line paragraph, wrap.
+ # one line tag, wrap.
if {[info exists methods($name)]} then {
# non-first line, leading line separator.
append data \n $prefix
} else {
# first line, no leading line separator.
@@ -131,11 +135,11 @@
if {[string length $newLine] > 0} then {
append data \n $prefix $newLine
}
- incr paragraph
+ incr levels(p)
}
} else {
set newLine [processLine $line $prefix]
if {[string length $newLine] > 0} then {
Index: System.Data.SQLite/ISQLiteNativeModule.cs
==================================================================
--- System.Data.SQLite/ISQLiteNativeModule.cs
+++ System.Data.SQLite/ISQLiteNativeModule.cs
@@ -107,16 +107,18 @@
/// it is omitted from the column datatype name and the column is marked
/// as a hidden column internally.
/// A hidden column differs from a normal column in three respects:
///
///
- /// Hidden columns are not listed in the dataset returned by
+ /// ]]>
+ /// ]]> Hidden columns are not listed in the dataset returned by
/// "PRAGMA table_info",
- /// Hidden columns are not included in the expansion of a "*"
+ /// ]]> Hidden columns are not included in the expansion of a "*"
/// expression in the result set of a SELECT, and
- /// Hidden columns are not included in the implicit column-list
+ /// ]]> Hidden columns are not included in the implicit column-list
/// used by an INSERT statement that lacks an explicit column-list.
+ /// ]]>
///
///
/// For example, if the following SQL is passed to sqlite3_declare_vtab():
///
///
@@ -351,13 +353,13 @@
/// int idxNum; /* Number used to identify the index */
/// char *idxStr; /* String, possibly obtained from sqlite3_malloc */
/// int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */
/// int orderByConsumed; /* True if output is already ordered */
/// double estimatedCost; /* Estimated cost of using this index */
- /// /* Fields below are only available in SQLite 3.8.2 and later */
+ /// ]]>/* Fields below are only available in SQLite 3.8.2 and later */]]>
/// sqlite3_int64 estimatedRows; /* Estimated number of rows returned */
- /// /* Fields below are only available in SQLite 3.9.0 and later */
+ /// ]]>/* Fields below are only available in SQLite 3.9.0 and later */]]>
/// int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */
/// };
///
///
/// Please note the warnings on the "estimatedRows" and "idxFlags" field.
@@ -872,20 +874,22 @@
/// is numbered 0.
/// The xColumn method may return its result back to SQLite using one of the
/// following interface:
///
///
- /// sqlite3_result_blob()
- /// sqlite3_result_double()
- /// sqlite3_result_int()
- /// sqlite3_result_int64()
- /// sqlite3_result_null()
- /// sqlite3_result_text()
- /// sqlite3_result_text16()
- /// sqlite3_result_text16le()
- /// sqlite3_result_text16be()
- /// sqlite3_result_zeroblob()
+ /// ]]>
+ /// ]]> sqlite3_result_blob()
+ /// ]]> sqlite3_result_double()
+ /// ]]> sqlite3_result_int()
+ /// ]]> sqlite3_result_int64()
+ /// ]]> sqlite3_result_null()
+ /// ]]> sqlite3_result_text()
+ /// ]]> sqlite3_result_text16()
+ /// ]]> sqlite3_result_text16le()
+ /// ]]> sqlite3_result_text16be()
+ /// ]]> sqlite3_result_zeroblob()
+ /// ]]>
///
///
/// If the xColumn method implementation calls none of the functions above,
/// then the value of the column defaults to an SQL NULL.
///
@@ -973,13 +977,13 @@
/// In the previous sentence, N includes any hidden columns.
///
///
/// Every argv entry will have a non-NULL value in C but may contain the
/// SQL value NULL. In other words, it is always true that
- /// argv[i]!=0 for i between 0 and argc-1.
+ /// ]]>argv[i]!=0]]> for ]]>i]]> between 0 and ]]>argc-1]]>.
/// However, it might be the case that
- /// sqlite3_value_type(argv[i])==SQLITE_NULL.
+ /// ]]>sqlite3_value_type(argv[i])==SQLITE_NULL]]>.
///
///
/// The argv[0] parameter is the rowid of a row in the virtual table
/// to be deleted. If argv[0] is an SQL NULL, then no deletion occurs.
///
@@ -1000,36 +1004,33 @@
/// the SQLite engine ignores the *pRowid return value if argc==1 or
/// argv[1] is not an SQL NULL.
///
///
/// Each call to xUpdate will fall into one of cases shown below.
- /// Not that references to argv[i] mean the SQL value
+ /// Not that references to ]]>argv[i]]]> mean the SQL value
/// held within the argv[i] object, not the argv[i]
/// object itself.
///
///
- /// argc = 1
- /// The single row with rowid equal to argv[0] is deleted. No insert occurs.
- /// argc > 1
- /// argv[0] = NULL
- /// A new row is inserted with a rowid argv[1] and column values in
+ /// ]]>
+ /// ]]>]]>argc = 1]]>
+ /// ]]>The single row with rowid equal to argv[0] is deleted. No insert occurs.
+ /// ]]>]]>argc > 1 ]]> argv[0] = NULL]]>
+ /// ]]>A new row is inserted with a rowid argv[1] and column values in
/// argv[2] and following. If argv[1] is an SQL NULL,
/// the a new unique rowid is generated automatically.
- /// argc > 1
- /// argv[0] ≠ NULL
- /// argv[0] = argv[1]
- /// The row with rowid argv[0] is updated with new values
+ /// ]]>]]>argc > 1 ]]> argv[0] ≠ NULL ]]> argv[0] = argv[1]]]>
+ /// ]]>The row with rowid argv[0] is updated with new values
/// in argv[2] and following parameters.
- /// argc > 1
- /// argv[0] ≠ NULL
- /// argv[0] ≠ argv[1]
- /// The row with rowid argv[0] is updated with rowid argv[1]
+ /// ]]>]]>argc > 1 ]]> argv[0] ≠ NULL ]]> argv[0] ≠ argv[1]]]>
+ /// ]]> The row with rowid argv[0] is updated with rowid argv[1]
/// and new values in argv[2] and following parameters. This will occur
/// when an SQL statement updates a rowid, as in the statement:
///
/// UPDATE table SET rowid=rowid+1 WHERE ...;
///
+ /// ]]>
///
///
/// The xUpdate method must return SQLITE_OK if and only if it is
/// successful. If a failure occurs, the xUpdate must return an appropriate
/// error code. On a failure, the pVTab->zErrMsg element may optionally