Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

439 lines
47 KiB

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2. <html>
  3. <head>
  4. <title>Microsoft Index Server Guide: HTML Extension Files</title>
  5. <meta name="FORMATTER" content="Microsoft FrontPage 1.1">
  6. <meta name="FORMATTER" content="Microsoft FrontPage 1.1">
  7. <meta name="FORMATTER" content="Microsoft FrontPage 1.1">
  8. <meta name="FORMATTER" content="Microsoft FrontPage 1.1">
  9. <meta name="GENERATOR" content="Microsoft FrontPage 1.1">
  10. </head>
  11. <body bgcolor="#FFFFFF">
  12. <!--Headerbegin--><p align=center><a name="TOP"><img src="onepix.gif" alt="Space" align=middle width=1 height=1></a> <a href="default.htm#Top"><img src="toc.gif" alt=" Contents" align=middle border=0 width=89 height=31></a> <a href="idqhelp.htm"><img src="previous.gif" alt="Previous" align=middle border=0 width=32 height=31></a> <a href="idq-vars.htm"><img src="next.gif" alt="Next" align=middle border=0 width=32 height=31></a> </p>
  13. <hr>
  14. <!--Headerend--><p><a name="HTMLExtensionFiles"><font size=6><strong>HTML Extension Files</strong></font></a></p>
  15. <p align=left><!--Chaptoc--></p>
  16. <blockquote>
  17. <p><a href="htxhelp.htm#exec">Query Execution Parameters </a><br>
  18. <a href="htxhelp.htm#pages">Query Result Pages </a><br>
  19. <a href="htxhelp.htm#Syntax">Syntax</a> <br>
  20. <a href="htxhelp.htm#recordnumbers">Record Numbers and Counts </a><br>
  21. <a href="htxhelp.htm#idqvars">Parameters from Internet Data Query files </a><br>
  22. <a href="htxhelp.htm#pagenav">Navigating Between Pages in Query Results </a><br>
  23. <a href="htxhelp.htm#formatvar">Variables Affecting the Formatting of Results </a><br>
  24. <a href="htxhelp.htm#httpvar">HTTP Variables </a><br>
  25. <a href="htxhelp.htm#errors">Error Pages </a><br>
  26. </p>
  27. </blockquote>
  28. <hr>
  29. <!--ChaptocEnd--><p>HTML extension (.htx) files for Microsoft Index Server are very similar to HTML extension files for the Internet Database
  30. Connector. There are some differences; this page explains the features of Index Server extension files and the keywords
  31. contained in those files..</p>
  32. <p><strong>Note</strong>&#160;&#160;&#160;All path names to .htx files must be either full virtual paths or full physical paths with no &#147;.&#148; or &#147;..&#148; components.This
  33. applies to .htx files referenced in CiTemplate or as include files.</p>
  34. <p>Do not put these files on a virtual root pointing to a remote Uniform Naming Convention (UNC) share.</p>
  35. <hr>
  36. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="exec">Query Execution Parameters </a></h1>
  37. <p>A number of situations leading to unexpected query results are flagged by using built-in variables available in the .htx file. Most
  38. .htx pages should include a <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if...<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> test on these variables.</p>
  39. <p><strong>CiOutOfDate</strong> will be set to the value 1 if the content index has files to filter, or scans to complete. Missing results are
  40. possible, because information about particular documents is either from an old version of the document or missing. When this
  41. variable is set, it is possible to get results including deleted files, and files whose current version does not match the query.</p>
  42. <p><strong>CiQueryTimedOut</strong> will be set to the value 1 when the amount of CPU time spent executing the query exceeds the limit
  43. specified in the <a href="reghelp.htm#MaxQueryTime">registry</a>. The variable will be valid for all pages in the result for <a href="idqhelp.htm">nonsequentially executed queries</a>. For
  44. <a href="idqhelp.htm#SeqQuery">sequentially executed queries</a>, the <b>CiQueryTimedOut</b> variable is valid only after all available results for the query have been
  45. displayed.</p>
  46. <p><strong>CiQueryIncomplete</strong> will be set to the value 1 if some portion of the query restriction was ignored. This can occur when a
  47. query is forced to use the content index.</p>
  48. <hr>
  49. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="pages">Query Result Pages </a></h1>
  50. <p>Query results are split into pages based upon the parameter <b>CiMaxRecordsPerPage</b>. The total number of query result
  51. records is governed by the parameter <b>CiMaxRecordsInResultSet</b>. The current page number in the result set is given in the
  52. variable <b>CiCurrentPageNumber</b>. For a nonsequential query, the <b>CiTotalNumberPages</b> variable gives the total number of
  53. pages in the result and <b>CiRecordsNexPage</b> gives the number of records on the next page. The variables
  54. <b>CiContainsFirstRecord</b> and <b>CiContainsLastRecord</b> indicate whether the current page is the first or last in the result set.
  55. For an example of how to navigate between pages See <a href="#pagenav">Navigating Between Pages in Query Results</a>, later on this page. </p>
  56. <hr>
  57. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="Syntax">Syntax</a></h1>
  58. <p>This section discusses the syntax in .htx files.</p>
  59. <h2><!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan --><a name="detail">begindetai</a>l<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan -->, <!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan -->enddetail<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></h2>
  60. <p>The <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> and <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>enddetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> tags surround a section of the HTML extension file in which the results of
  61. the search will be merged. The section will be interpreted once for each record matching the query on the page. Within the
  62. section, the column names delimited with <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> and <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> are used to mark the position of the returned data from the query.
  63. There can be only one detail section in the HTML extension file. </p>
  64. <p>For example:</p>
  65. <blockquote>
  66. <pre>&lt;dl&gt;
  67. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&lt;p&gt;
  68. &lt;dt&gt;
  69. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiCurrentRecordNumber<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->.
  70. &lt;b&gt;&lt;a href=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeURL <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->path<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot;&gt;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->filename<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&lt;/a&gt;&lt;/b&gt;
  71. &lt;dd&gt;
  72. &lt;b&gt;&lt;i&gt;Abscract: &lt;/i&gt;&lt;/b&gt;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->characterization<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&lt;br&gt;
  73. &lt;font size=-1&gt; - size <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->size<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> bytes - <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->write<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> GMT&lt;/font&gt;
  74. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->enddetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&lt;/dl&gt;</pre>
  75. </blockquote>
  76. <p>This query shows the name of the file where the search stringcomes from, gives a brief absract of the file, shows the size of the
  77. file in bytes, and shows when the file was last modified.</p>
  78. <p><strong>Note</strong>&#160;&#160;&#160;If there are no records returned from the query, the <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> section will be skipped.</p>
  79. <h2><!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan --><a name="ifstatement">if<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></a>..<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan --><a name="else">else<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></a>..<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan --><a name="endif">endif<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></a></h2>
  80. <p>HTML extension files can contain conditional logic with an if-then-else statement to control how the Web page is constructed.
  81. For example, one common usage is to insert a condition to display a header for the query on the first row within a <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  82. <code>begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> section; but if there are no records returned by the query, to display the text &#147;Sorry, no authors had YTD
  83. sales greater than&#148; <tt>%sales%</tt>. By using the <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> statement and a built-in variable called <b>CiLastRecordNumber</b> you can
  84. tailor the output so that the error message is printed when no records are returned. Here is an example showing the use of the
  85. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> statement. </p>
  86. <pre><font size=2><tt> <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></tt></font><tt>begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  87. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if CiCurrentRecordNumber EQ 1<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  88. Query results:
  89. &lt;B&gt;Author YTD Sales&lt;BR&gt;&lt;/B&gt;
  90. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  91. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->au_lname<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->$<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->ytd_sales<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  92. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->enddetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  93. &lt;P&gt;
  94. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if CiLastRecordNumber EQ 0<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  95. &lt;I&gt;&lt;B&gt;Sorry, no authors had YTD sales greater than &lt;/I&gt;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->sales<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->.&lt;/B&gt;
  96. &lt;P&gt;
  97. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->else<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  98. &lt;HR&gt;
  99. &lt;I&gt;
  100. The Web page you see here was created by merging the results
  101. of the Content query with the template file Sample.htx.
  102. &lt;P&gt;
  103. The merge was done by the Microsoft Index Server and
  104. the results were returned to this Web browser by the Microsoft
  105. Internet Information Server.
  106. &lt;/I&gt;
  107. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  108. &lt;/BODY&gt;
  109. &lt;/HTML&gt; </tt></pre>
  110. <p>The general syntax is: </p>
  111. <pre> <font size=2> </font><tt> <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if condition<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  112. HTML text
  113. [ <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->else<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  114. HTML text ]
  115. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> </tt></pre>
  116. <p>where condition is of the form: <i>value1</i> <i>operator</i> <i>value2</i> and <i>operator</i> can be one of the following: </p>
  117. <blockquote>
  118. <dl>
  119. <dt><strong>EQ</strong></dt>
  120. <dd>if <em>value1</em> equals <em>value2</em><br>
  121. </dd>
  122. <dt><strong>NE</strong></dt>
  123. <dd>if <em>value1</em> does not equal <em>value2</em><br>
  124. </dd>
  125. <dt><strong>LT</strong></dt>
  126. <dd>if <em>value1</em> is less than <em>value2</em><br>
  127. </dd>
  128. <dt><strong>LE</strong></dt>
  129. <dd>if <em>value1</em> is less than or equal to <em>value2</em><br>
  130. </dd>
  131. <dt><strong>GT</strong></dt>
  132. <dd>if <em>value1</em> is greater than <em>value2</em><br>
  133. </dd>
  134. <dt><strong>GE</strong> </dt>
  135. <dd>if <em>value1</em> is greater than or equal to <em>value2</em><br>
  136. </dd>
  137. <dt><strong>CONTAINS</strong></dt>
  138. <dd>if any part of <em>value1</em> contains the string <em>value2</em><br>
  139. </dd>
  140. <dt>&#160;<strong>ISTYPEEQ</strong></dt>
  141. <dd>allows the .htx file to determine the VT_TYPE of a particular variable.<br>
  142. <dl>
  143. <dd><pre>value1 IsTypeEq value2
  144. value1 IsTypeEq const1
  145. const1 IsTypeEq value1 </pre>
  146. </dd>
  147. </dl>
  148. <p>For example, if a variable is of type currency (VT_CY) its type is 6. Type numbers are defined in the
  149. OLE specification. A valid .htx comparison would be: </p>
  150. <dl>
  151. <dd><pre><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if propName IsTypeEq 5<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->Variable is of type currency
  152. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->else<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->Variable is NOT type currency
  153. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> </pre>
  154. </dd>
  155. </dl>
  156. </dd>
  157. </dl>
  158. </blockquote>
  159. <p>This operator is especially useful to check for type <strong>VT_EMPTY</strong>, an empty property.</p>
  160. <blockquote>
  161. <dl>
  162. <dt>&#160;<strong>ISEMPTY</strong></dt>
  163. <dd><strong>TRUE</strong> if value1 is of type <strong>VT_EMPTY</strong>, or of type <strong>VT_NULL</strong>, or is of a textual type (<strong>VT_LPSTR</strong>,
  164. <strong>VT_LPWSTR</strong>, <strong>VT_BSTR</strong>, or vectors of the preceding types) and contains only &#147;empty&#148; characters
  165. (space, tab, and so on.)</dd>
  166. </dl>
  167. </blockquote>
  168. <p>The operands <i>value1</i> and <i>value2</i> can be column names, one of the built-in variables, an HTTP variable name (see <a href="#httpvar">HTTP
  169. Variables</a> later on this page), or a constant. When used in an <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> statement, values are not delimited with <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> <code>and</code> <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  170. . For example, to do special processing on author name &#147;Green,&#148; use the condition: </p>
  171. <pre><font size=2><tt> </tt></font><tt>&lt;FORM ACTION=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->HTTP_SCRIPT_NAME<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->?&quot; METHOD=&quot;POST&quot;&gt;
  172. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if au_lname EQ &quot;Green&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  173. this guy is green!
  174. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  175. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->enddetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> </tt></pre>
  176. <p>The <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> statement can also be used to do special processing based on information from HTTP variables. For example,
  177. to format a page differently based on the type of client Web browser you could include the following in the HTML extension
  178. file. </p>
  179. <pre><tt> </tt><font size=2><tt> </tt></font><tt> <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if HTTP_USER_AGENT contains &quot;Mozilla&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  180. client supports advanced HTML features
  181. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->else<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  182. client is <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->HTTP_USER_AGENT<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  183. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> </tt></pre>
  184. <p>Property types <strong>VT_FILETIME</strong> and <strong>VT_DATE</strong> can be compared within <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>if<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> statements. Use the following format: </p>
  185. <blockquote>
  186. <pre><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if fileTime eq &quot;yyyy/mm/dd hh:mm:ss:iii&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->FIle times are identical
  187. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></pre>
  188. </blockquote>
  189. <p>The time must be enclosed in quotes. The year must be a four-digit number (for example, 1996, not 96), and slashes and
  190. colons are required. </p>
  191. <blockquote>
  192. <p>yyyy = year<br>
  193. mm = month ( 1=January, 12=December, and so on)<br>
  194. dd = day of month ( 1 - 31)<br>
  195. hh = hour of the day in 24-hour format (optional)<br>
  196. mm = minutes (optional)<br>
  197. ss = seconds (optional)<br>
  198. iii = milliseconds (optional) </p>
  199. </blockquote>
  200. <p>For example: </p>
  201. <blockquote>
  202. <pre><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->if write eq &quot;1996/07/21 17:22:11:333&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->File times are identical
  203. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></pre>
  204. </blockquote>
  205. <h2><!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan --><a name="escapes">EscapeHTML<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></a>, <!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeURL<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan -->, <!--VERMEER BOT=HTMLMarkup StartSpan --><h2>&lt;%</h2><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeRAW<!--VERMEER BOT=HTMLMarkup StartSpan --><h2>%&gt;</h2><!--VERMEER BOT=HTMLMarkup EndSpan --></h2>
  206. <p>The <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeHTML<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code>, <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeURL<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code><b>,</b> and <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeRAW<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> keywords can be used to affect the formatting of
  207. output strings. These are typically used with variables such as <b>CiRestriction,</b> or <b>CiScope</b> when used in a form or in an
  208. anchor. </p>
  209. <p>The output of variables is normally suitable for HTML format. The preceding keywords affect the output format so that the
  210. variable can be used correctly in different contexts. The form of the construct is: </p>
  211. <blockquote>
  212. <pre><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeHTML <em>variable<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></em> or
  213. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeURL <em>variable<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></em> or
  214. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->EscapeRAW <em>variable<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></em> </pre>
  215. </blockquote>
  216. <p>where <i>variable</i> is any parameter or variable that could be used in the HTTP Extension file. Constant values can also be used,
  217. as in, <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><tt>EscapeURL /scripts/query.idq<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></tt>. </p>
  218. <p><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeHTML<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code><strong> </strong>(the default formatting) is used to escape characters that are meaningful in HTML. For example, the
  219. symbol &gt; will appear as <tt>&amp;gt;</tt>. </p>
  220. <p><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeURL<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code><strong> </strong>is used to do standard escaping for strings that will be URLs (as in the HREF tag of an anchor). For
  221. example, the string <tt>@size &gt; 10000</tt>; will appear as <tt>%40size+%3E+10000</tt>. </p>
  222. <p><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>EscapeRAW<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code><strong> </strong>is used when no escaping should be done. This might be the case for a variable that is being used as the
  223. value of a form variable, or to have the value of a variable that contains HTML code to be interpreted correctly. </p>
  224. <h2><a name="fileinclude">File Inclusion </a></h2>
  225. <p>The <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>include<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code> keyword can be used to interpolate the contents of a file into the HTTP Extension page. The syntax of
  226. the construct is </p>
  227. <blockquote>
  228. <pre><!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><font size=3><code>include </code><code><i>filename<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></i></code></font> </pre>
  229. </blockquote>
  230. <p>where <i>filename</i> is the name of the file to be included. The file is named with a full virtual path name, and HTTP Extension
  231. constructs are interpreted if found in the file. File includes can be nested, cannot exceed 31 include files total.. </p>
  232. <hr>
  233. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="recordnumbers">Record Numbers and Counts </a></h1>
  234. <p>The <b>CiCurrentRecordNumber</b> built-in variable contains the record number of the current record (1-based). The record
  235. number starts at [(<i>page-number</i> - 1) * <i>records-per-page</i>] + 1 for any page. Each time through the <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --><code>begindetail<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code>
  236. section, the value of <b>CiCurrentRecordNumber</b> increases by one. </p>
  237. <p>The <b>CiMatchedRecordCount</b> built-in variable contains the value of the total number of records matched in the query (limited
  238. to <b>CiMaxRecordsInResultSet</b>). The <b>CiRecordsNextPage</b> built-in variable contains the number of records that will appear
  239. on the next page. Referring to either <b>CiMatchedRecordCount</b> or <b>CiRecordsNextPage</b> will cause the query to be
  240. nonsequential. </p>
  241. <hr>
  242. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="idqvars">Parameters from Internet Data Query files </a></h1>
  243. <p>A number of predefined parameters are supplied, which can be set in the Internet Data Query files. See <a href="idq-vars.htm#htxvars">Variables in .htx and
  244. .idq Files</a>.</p>
  245. <p>In addition, any CGI variable, form parameter, or variable defined in the .idq file can be referred to in the HTTP Extension file
  246. by enclosing the variable name in <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> <code>and</code> <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->. If a variable is referred to that has not been assigned a value, it will result in a
  247. null string being sent to the output. </p>
  248. <hr>
  249. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="pagenav">Navigating Between Pages in Query Results </a></h1>
  250. <p>The first record on a page is identified in the variable <b>CiBookmark</b>, which can be used in a form to get to the next page or the
  251. previous page. The form variable <b>CiBookmarkSkipCount</b> should be used with <b>CiBookmark</b> to specify the relative offset
  252. from the current page. <b>CiBookmarkSkipCount</b> is typically set to either <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> or -<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  253. CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->, although it could be set to other multiples of <b>CiMaxRecordsPerPage</b>. </p>
  254. <p>Here is an example of a form that will skip to the next page for a sequential query follows: </p>
  255. <pre><tt> </tt><font size=2><tt> </tt></font><font size=3><code>&lt;FORM ACTION=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code>HTTP_SCRIPT_NAME<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->?&quot; METHOD=&quot;POST&quot;&gt;
  256. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  257. NAME=&quot;CiBookmark&quot;
  258. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiBookmark<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  259. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  260. NAME=&quot;CiBookmarkSkipCount&quot;
  261. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  262. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  263. NAME=&quot;CiMaxRecordsPerPage&quot;
  264. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  265. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  266. NAME=&quot;CiRestriction&quot;
  267. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiRestriction<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  268. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  269. NAME=&quot;CiScope&quot;
  270. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiScope<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  271. &lt;INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;Next page&quot;&gt;
  272. &lt;/FORM&gt;</font></pre>
  273. <p>The following example shows how the buttons for going to adjacent pages can be generated conditionally depending upon the
  274. variables <b>CiContainsFirstPage</b> and <b>CiContainsLastPage</b>. It also shows how the number of hits on the next page can be
  275. displayed for a nonsequential query. </p>
  276. <pre> <font size=2> </font><font size=3><code>&lt;TABLE&gt; &lt;TR&gt;
  277. &lt;TD&gt; <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code>if CiContainsFirstRecord eq 0<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  278. &lt;FORM ACTION=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->HTTP_SCRIPT_NAME<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->?&quot; METHOD=&quot;POST&quot;&gt;
  279. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  280. NAME=&quot;CiBookmark&quot;
  281. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiBookmark<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  282. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  283. NAME=&quot;CiBookmarkSkipCount&quot;
  284. VALUE=&quot;-<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  285. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  286. NAME=&quot;CiMaxRecordsPerPage&quot;
  287. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  288. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  289. NAME=&quot;CiRestriction&quot;
  290. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiRestriction<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  291. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  292. NAME=&quot;CiScope&quot;
  293. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiScope<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  294. &lt;INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;Previous <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> Hits&quot;&gt;
  295. &lt;/FORM&gt;
  296. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> &lt;/TD&gt;</font></pre>
  297. <pre><font size=3><code> &lt;TD&gt; <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --></code>if CiContainsLastRecord eq 0<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->
  298. &lt;FORM ACTION=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->HTTP_SCRIPT_NAME<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->?&quot; METHOD=&quot;POST&quot;&gt;
  299. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  300. NAME=&quot;CiBookmark&quot;
  301. VALUE=&quot;<code>&lt;</code>CiBookmark<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  302. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  303. NAME=&quot;CiBookmarkSkipCount&quot;
  304. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  305. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  306. NAME=&quot;CiMaxRecordsPerPage&quot;
  307. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiMaxRecordsPerPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  308. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  309. NAME=&quot;CiRestriction&quot;
  310. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiRestriction<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  311. &lt;INPUT TYPE=&quot;HIDDEN&quot;
  312. NAME=&quot;CiScope&quot;
  313. VALUE=&quot;<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiScope<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->&quot; &gt;
  314. &lt;INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;Next <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->CiRecordsOnNextPage<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> Hits&quot;&gt;
  315. &lt;/FORM&gt;
  316. <!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>&lt;%</code></font><!--VERMEER BOT=HTMLMarkup EndSpan -->endif<!--VERMEER BOT=HTMLMarkup StartSpan --><font size=3><code>%&gt;</code></font><!--VERMEER BOT=HTMLMarkup EndSpan --> &lt;/TD&gt;
  317. &lt;/TR&gt; &lt;/TABLE&gt; </font></pre>
  318. <hr>
  319. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="formatvar">Variables Affecting the Formatting of Results </a></h1>
  320. <p>Some variables that can be set in the .idq file affect the formatting of data in the .htx file. The variable <a href="idq-vars.htm#CiLocale"><b>CiLocale</b></a> may be set to
  321. affect the formatting of dates, times, currency values, and floating point numbers according to <a href="glossary.htm#NLS">NLS conventions</a>. If <b>CiLocale</b> is
  322. not set, the locale is set from the client&#146;s browser or the server&#146;s default locale, in order of priority.</p>
  323. <p>To change the formatting of datatypes, modify settings in the <strong>Regional Settings</strong> in the Windows NT <strong>Control Panel</strong>. </p>
  324. <p>A <a href="idq-vars.htm#vecvars">set of variables</a> taken from the .idq file will be used to enclose and separate elements of column values that are vectors.
  325. Unlike all other variables set in the .idq file, these variables cannot be referred to explicitly in the .htx file. </p>
  326. <hr>
  327. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="httpvar">HTTP Variables </a></h1>
  328. <p>Several variables in HTML extension files can give a lot of information about the environment and Web client connected to the
  329. server. In addition, all headers sent by the client are available. For Index Server to access these headers, you must convert
  330. them: </p>
  331. <ol>
  332. <li>Add HTTP_ to the beginning </li>
  333. <li>Convert all dashes to underscores. </li>
  334. <li>Convert all letters to uppercase. </li>
  335. </ol>
  336. <p>The following list gives a listing of default variables.</p>
  337. <dl>
  338. <dt><strong>ALL_HTTP</strong></dt>
  339. <dd>All HTTP headers that were not already parsed into one of the listed variables. These variables are of the form
  340. HTTP_<em>header field name</em> with successive variables separated by a newline character, for example:</dd>
  341. </dl>
  342. <blockquote>
  343. <pre>HTTP_ACCEPT: */*, q=0.300, audio/x-aiff, audio/basic, image/jpeg, image/gif, text/plain, text/html
  344. HTTP_USER_AGENT: Microsoft Internet Explorer/0.1 (Win32)
  345. HTTP_REFERER: http://webserver/samples/dbsamp/dbsamp3.htm
  346. HTTP_CONTENT_TYPE: application/x-www-form-urlenPRE: 10
  347. HTTP_EXTENSION: Security/Digest</pre>
  348. </blockquote>
  349. <dl>
  350. <dt><strong>AUTH_TYPE</strong></dt>
  351. <dd>The type of authorization in use. If the user name has been authenticated by the server, this will contain Basic.
  352. Otherwise, it will not be present.</dd>
  353. <dd>&#160;</dd>
  354. <dt><strong>CONTENT_LENGTH</strong></dt>
  355. <dd>The number of bytes that the script can expect to receive from the client.</dd>
  356. <dd>&#160;</dd>
  357. <dt><strong>CONTENT_TYPE</strong></dt>
  358. <dd>The content type of the information supplied in the body of a POST request.</dd>
  359. <dd>&#160;</dd>
  360. <dt><strong>GATEWAY_INTERFACE</strong></dt>
  361. <dd>The revision of the CGI (Common Gateway Interface) specification with which this server complies. The current version
  362. is CGI/1.1.</dd>
  363. </dl>
  364. <dl>
  365. <dt><strong>HTTP_ACCEPT</strong> </dt>
  366. <dd>Special-case HTTP header. Values of the Accept: fields are concatenated, separated by &#147;, &#148;; for example, if the
  367. following lines are part of the HTTP header: accept: */*; q=0.1 accept: text/html accept: image/jpeg then the
  368. <strong>HTTP_ACCEPT</strong> variable will have a value of: */*; q=0.1, text/html, image/jpeg.</dd>
  369. <dd>&#160;</dd>
  370. <dt><strong>PATH_INFO</strong></dt>
  371. <dd>Additional path information, as given by the client. This comprises the trailing part of the URL after the script name but
  372. before the query string (if any).</dd>
  373. <dd>&#160;</dd>
  374. <dt><strong>PATH_TRANSLATED</strong></dt>
  375. <dd>This is the value of <strong>PATH_INFO</strong>, but with any virtual path name expanded into a directory specification.</dd>
  376. <dd>&#160;</dd>
  377. <dt><strong>QUERY_STRING</strong></dt>
  378. <dd>The information that follows the question mark (?) in the URL that referenced this script.</dd>
  379. <dd>&#160;</dd>
  380. <dt><strong>REMOTE_ADDR</strong></dt>
  381. <dd>The IP address of the client.</dd>
  382. <dd>&#160;</dd>
  383. <dt><strong>REMOTE_HOST</strong></dt>
  384. <dd>The hostname of the client.</dd>
  385. <dd>&#160;</dd>
  386. <dt><strong>REMOTE_USER</strong></dt>
  387. <dd>This contains the user name supplied by the client and authenticated by the server.</dd>
  388. <dd>&#160;</dd>
  389. <dt><strong>REQUEST_METHOD</strong></dt>
  390. <dd>The HTTP request method.</dd>
  391. <dd>&#160;</dd>
  392. <dt><strong>SCRIPT_NAME</strong></dt>
  393. <dd>The name of the script program being run.</dd>
  394. <dd>&#160;</dd>
  395. <dt><strong>SERVER_NAME</strong></dt>
  396. <dd>The server&#146;s hostname (or IP address) as it should appear in self-referencing URLs.</dd>
  397. <dd>&#160;</dd>
  398. <dt><strong>SERVER_PORT</strong></dt>
  399. <dd>The TCP/IP port on which the request was received.</dd>
  400. <dd>&#160;</dd>
  401. <dt><strong>SERVER_PROTOCOL</strong></dt>
  402. <dd>The name and version of the information-retrieval protocol relating to this request, usually HTTP/1.0.</dd>
  403. <dd>&#160;</dd>
  404. <dt><strong>SERVER_SOFTWARE</strong></dt>
  405. <dd>The name and version of the Web server under which the Internet Server Extension is running.</dd>
  406. </dl>
  407. <hr>
  408. <h1><a href="#TOP"><img src="up.gif" alt="To Top" align=middle border=0 width=14 height=11></a><a name="errors">Error Pages </a></h1>
  409. <p>Through settings in the Windows NT registry, it is possible to configure HTTP Extension pages that are displayed in case of
  410. errors encountered while executing a search. Any of the following error types can cause an error page to be displayed: </p>
  411. <blockquote>
  412. <dl>
  413. <dt>Query error</dt>
  414. <dd>An error in a query specification (<strong>CiRestriction</strong>). This is most likely a user error.<br>
  415. </dd>
  416. <dt>Error in HTTP Extension file</dt>
  417. <dd>An error was found while formatting the HTTP Extension file. This is probably a configuration error.<br>
  418. </dd>
  419. <dt>Error in Internet Data Query file</dt>
  420. <dd>An error was found in the query parameter file. This is probably a configuration error, although it might
  421. also occur due to unexpected data input from a form.<br>
  422. </dd>
  423. <dt>Some other error</dt>
  424. <dd>An unspecified error occurred. </dd>
  425. </dl>
  426. </blockquote>
  427. <p>Error pages have access to some of the variables available to HTTP Extension files. In addition, there is a variable
  428. <b>CiErrorMessage</b>, which gives a message describing the error. See the <a href="errorhlp.htm">Error Messages</a> page for a list of the possible values
  429. of <b>CiErrorMessage</b>. </p>
  430. <!--Footerbegin--><hr>
  431. <p align=center><a href="default.htm#Top"><img src="toc.gif" alt=" Contents" align=middle border=0 width=89 height=31></a> <a href="idqhelp.htm"><img src="previous.gif" alt="Previous" align=middle border=0 width=32 height=31></a> <a href="#TOP"><img src="up_end.gif" alt="To Top" align=middle border=0 width=32 height=31></a> <a href="idq-vars.htm"><img src="next.gif" alt="Next" align=middle border=0 width=32 height=31></a> </p>
  432. <hr>
  433. <p align=center><em>&#169; 1996 by Microsoft Corporation. All rights reserved.<!--Footerend--></em></p>
  434. </body>
  435. </html>