implemented GetModuleHandleExA/W(), LdrAddRefDll() and RtlPcToFileHeader() (untested)
[reactos.git] / reactos / lib / libxml2 / doc / search.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5 <link rel="SHORTCUT ICON" href="/favicon.ico">
6 <style type="text/css"><!--
7 TD {font-family: Verdana,Arial,Helvetica}
8 BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
9 H1 {font-family: Verdana,Arial,Helvetica}
10 H2 {font-family: Verdana,Arial,Helvetica}
11 H3 {font-family: Verdana,Arial,Helvetica}
12 A:link, A:visited, A:active { text-decoration: underline }
13 --></style>
14 <title>Search the documentation on XMLSoft.org</title>
15 </head>
16 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
17 <table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr>
18 <td width="180">
19 <a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo"></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo"></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo"></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"></a></div>
20 </td>
21 <td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center">
22 <h1>The XML C library for Gnome</h1>
23 <h2>Search engine</h2>
24 </td></tr></table></td></tr></table></td>
25 </tr></table>
26 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr>
27 <td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td>
28 <table width="100%" border="0" cellspacing="1" cellpadding="3">
29 <tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr>
30 <tr><td bgcolor="#fffacd"><ul>
31 <li><a href="index.html">Home</a></li>
32 <li><a href="intro.html">Introduction</a></li>
33 <li><a href="FAQ.html">FAQ</a></li>
34 <li><a href="docs.html">Documentation</a></li>
35 <li><a href="bugs.html">Reporting bugs and getting help</a></li>
36 <li><a href="help.html">How to help</a></li>
37 <li><a href="downloads.html">Downloads</a></li>
38 <li><a href="news.html">News</a></li>
39 <li><a href="XMLinfo.html">XML</a></li>
40 <li><a href="XSLT.html">XSLT</a></li>
41 <li><a href="python.html">Python and bindings</a></li>
42 <li><a href="architecture.html">libxml architecture</a></li>
43 <li><a href="tree.html">The tree output</a></li>
44 <li><a href="interface.html">The SAX interface</a></li>
45 <li><a href="xmldtd.html">Validation &amp; DTDs</a></li>
46 <li><a href="xmlmem.html">Memory Management</a></li>
47 <li><a href="encoding.html">Encodings support</a></li>
48 <li><a href="xmlio.html">I/O Interfaces</a></li>
49 <li><a href="catalog.html">Catalog support</a></li>
50 <li><a href="library.html">The parser interfaces</a></li>
51 <li><a href="entities.html">Entities or no entities</a></li>
52 <li><a href="namespaces.html">Namespaces</a></li>
53 <li><a href="upgrade.html">Upgrading 1.x code</a></li>
54 <li><a href="threads.html">Thread safety</a></li>
55 <li><a href="DOM.html">DOM Principles</a></li>
56 <li><a href="example.html">A real example</a></li>
57 <li><a href="contribs.html">Contributions</a></li>
58 <li><a href="tutorial/index.html">Tutorial</a></li>
59 <li>
60 <a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a>
61 </li>
62 </ul></td></tr>
63 </table>
64 <table width="100%" border="0" cellspacing="1" cellpadding="3">
65 <tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr>
66 <tr><td bgcolor="#fffacd"><ul>
67 <li><a href="APIchunk0.html">Alphabetic</a></li>
68 <li><a href="APIconstructors.html">Constructors</a></li>
69 <li><a href="APIfunctions.html">Functions/Types</a></li>
70 <li><a href="APIfiles.html">Modules</a></li>
71 <li><a href="APIsymbols.html">Symbols</a></li>
72 </ul></td></tr>
73 </table>
74 <table width="100%" border="0" cellspacing="1" cellpadding="3">
75 <tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr>
76 <tr><td bgcolor="#fffacd"><ul>
77 <li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
78 <li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
79 <li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
80 <li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
81 <li><a href="ftp://xmlsoft.org/">FTP</a></li>
82 <li><a href="http://ww.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
83 <li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
84 <li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li>
85 <li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
86 <li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml&amp;product=libxml2">Bug Tracker</a></li>
87 </ul></td></tr>
88 </table>
89 </td></tr></table></td>
90 <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
91 <?php
92 $query = $HTTP_GET_VARS[ "query" ];
93 $scope = $HTTP_GET_VARS[ "scope" ];
94 // We handle only the first argument so far
95 $query = $_GET['query'];
96 $query = ltrim ($query);
97 if (! $query) {
98 echo "<h1 align='center'>Search the documentation on XMLSoft.org</h1>";
99 }
100 if ($scope == NULL)
101 $scope = "any";
102 $scope = ltrim ($scope);
103 if ($scope == "")
104 $scope = "any";
105
106 ?>
107 <p> The search service indexes the libxml2 and libxslt APIs and documentation as well as the xml@gnome.org and xslt@gnome.org mailing-list archives. To use it simply provide a set of keywords:
108 <p>
109 <form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
110 enctype="application/x-www-form-urlencoded" method="GET">
111 <input name="query" type="TEXT" size="50" value="<?php echo $query?>">
112 <select name="scope">
113 <option value="any">Search All</option>
114 <option value="XML" <?php if ($scope == 'XML') print "selected"?>>XML resources</option>
115 <option value="XSLT" <?php if ($scope == 'XSLT') print "selected"?>>XSLT resources</option>
116 <option value="API" <?php if ($scope == 'API') print "selected"?>>Only the APIs</option>
117 <option value="XMLAPI" <?php if ($scope == 'XMLAPI') print "selected"?>>Only the XML API</option>
118 <option value="XSLTAPI" <?php if ($scope == 'XSLTAPI') print "selected"?>>Only the XSLT API</option>
119 <option value="DOCS" <?php if ($scope == 'DOCS') print "selected"?>>Only the Documentation</option>
120 <option value="XMLDOC" <?php if ($scope == 'XMLDOC') print "selected"?>>Only the XML Documentation</option>
121 <option value="XSLTDOC" <?php if ($scope == 'XSLTDOC') print "selected"?>>Only the XSLT Documentation</option>
122 <option value="LISTS" <?php if ($scope == 'LISTS') print "selected"?>>Only the lists archives</option>
123 <option value="XMLLIST" <?php if ($scope == 'XMLLIST') print "selected"?>>Only the XML list archive</option>
124 <option value="XSLTLIST" <?php if ($scope == 'XSLTLIST') print "selected"?>>Only the XSLT list archive</option>
125 </select>
126 <input name=submit type=submit value="Search ...">
127 </form>
128 <?php
129 function logQueryWord($word) {
130 $result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
131 if ($result) {
132 $i = mysql_num_rows($result);
133 if ($i == 0) {
134 mysql_free_result($result);
135 mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
136 } else {
137 $id = mysql_result($result, 0, 0);
138 $count = mysql_result($result, 0, 1);
139 $count ++;
140 mysql_query ("UPDATE Queries SET Count=$count WHERE ID=$id");
141 }
142 } else {
143 mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
144 }
145 }
146 function queryWord($word) {
147 $result = NULL;
148 $j = 0;
149 if ($word) {
150 $result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
151 if ($result) {
152 $j = mysql_num_rows($result);
153 if ($j == 0)
154 mysql_free_result($result);
155 }
156 logQueryWord($word);
157 }
158 return array($result, $j);
159 }
160 function queryHTMLWord($word) {
161 $result = NULL;
162 $j = 0;
163 if ($word) {
164 $result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
165 if ($result) {
166 $j = mysql_num_rows($result);
167 if ($j == 0)
168 mysql_free_result($result);
169 }
170 logQueryWord($word);
171 }
172 return array($result, $j);
173 }
174 function queryArchiveWord($word) {
175 $result = NULL;
176 $j = 0;
177 if ($word) {
178 $result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'xml-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
179 if ($result) {
180 $j = mysql_num_rows($result);
181 if ($j == 0)
182 mysql_free_result($result);
183 }
184 logQueryWord($word);
185 }
186 return array($result, $j);
187 }
188 function XSLTqueryWord($word) {
189 $result = NULL;
190 $j = 0;
191 if ($word) {
192 $result = mysql_query ("SELECT XSLTwords.relevance, XSLTsymbols.name, XSLTsymbols.type, XSLTsymbols.module, XSLTsymbols.descr FROM XSLTwords, XSLTsymbols WHERE LCASE(XSLTwords.name) LIKE LCASE('$word') and XSLTwords.symbol = XSLTsymbols.name ORDER BY XSLTwords.relevance DESC LIMIT 75");
193 if ($result) {
194 $j = mysql_num_rows($result);
195 if ($j == 0)
196 mysql_free_result($result);
197 }
198 logQueryWord($word);
199 }
200 return array($result, $j);
201 }
202 function XSLTqueryHTMLWord($word) {
203 $result = NULL;
204 $j = 0;
205 if ($word) {
206 $result = mysql_query ("SELECT relevance, name, id, resource, section FROM XSLTwordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
207 if ($result) {
208 $j = mysql_num_rows($result);
209 if ($j == 0)
210 mysql_free_result($result);
211 }
212 logQueryWord($word);
213 }
214 return array($result, $j);
215 }
216 function XSLTqueryArchiveWord($word) {
217 $result = NULL;
218 $j = 0;
219 if ($word) {
220 $result = mysql_query ("SELECT XSLTwordsArchive.relevance, XSLTwordsArchive.name, 'xslt-list', archives.resource, archives.title FROM XSLTwordsArchive, archives WHERE LCASE(XSLTwordsArchive.name) LIKE LCASE('$word') and XSLTwordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
221 if ($result) {
222 $j = mysql_num_rows($result);
223 if ($j == 0)
224 mysql_free_result($result);
225 }
226 logQueryWord($word);
227 }
228 return array($result, $j);
229 }
230 function resSort ($a, $b) {
231 list($ra,$ta,$ma,$na,$da) = $a;
232 list($rb,$tb,$mb,$nb,$db) = $b;
233 if ($ra == $rb) return 0;
234 return ($ra > $rb) ? -1 : 1;
235 }
236 if (($query) && (strlen($query) <= 50)) {
237 $link = mysql_connect ("localhost", "nobody");
238 if (!$link) {
239 echo "<p> Could not connect to the database: ", mysql_error();
240 } else {
241 mysql_select_db("xmlsoft", $link);
242 $list = explode (" ", $query);
243 $results = array();
244 $number = 0;
245 for ($number = 0;$number < count($list);$number++) {
246
247 $word = $list[$number];
248 if (($scope == 'any') || ($scope == 'XML') ||
249 ($scope == 'API') || ($scope == 'XMLAPI')) {
250 list($result, $j) = queryWord($word);
251 if ($j > 0) {
252 for ($i = 0; $i < $j; $i++) {
253 $relevance = mysql_result($result, $i, 0);
254 $name = mysql_result($result, $i, 1);
255 $type = mysql_result($result, $i, 2);
256 $module = mysql_result($result, $i, 3);
257 $desc = mysql_result($result, $i, 4);
258 if (array_key_exists($name, $results)) {
259 list($r,$t,$m,$d,$w,$u) = $results[$name];
260 $results[$name] = array(($r + $relevance) * 2,
261 $t,$m,$d,$w,$u);
262 } else {
263 $id = $name;
264 $m = strtolower($module);
265 $url = "html/libxml-$module.html#$id";
266 $results[$name] = array($relevance,$type,
267 $module, $desc, $name, $url);
268 }
269 }
270 mysql_free_result($result);
271 }
272 }
273 if (($scope == 'any') || ($scope == 'XSLT') ||
274 ($scope == 'API') || ($scope == 'XSLTAPI')) {
275 list($result, $j) = XSLTqueryWord($word);
276 if ($j > 0) {
277 for ($i = 0; $i < $j; $i++) {
278 $relevance = mysql_result($result, $i, 0);
279 $name = mysql_result($result, $i, 1);
280 $type = mysql_result($result, $i, 2);
281 $module = mysql_result($result, $i, 3);
282 $desc = mysql_result($result, $i, 4);
283 if (array_key_exists($name, $results)) {
284 list($r,$t,$m,$d,$w,$u) = $results[$name];
285 $results[$name] = array(($r + $relevance) * 2,
286 $t,$m,$d,$w,$u);
287 } else {
288 $id = $name;
289 $m = strtolower($module);
290 $url = "XSLT/html/libxslt-$module.html#$id";
291 $results[$name] = array($relevance,$type,
292 $module, $desc, $name, $url);
293 }
294 }
295 mysql_free_result($result);
296 }
297 }
298 if (($scope == 'any') || ($scope == 'XML') ||
299 ($scope == 'DOCS') || ($scope == 'XMLDOC')) {
300 list($result, $k) = queryHTMLWord($word);
301 if ($k > 0) {
302 for ($i = 0; $i < $k; $i++) {
303 $relevance = mysql_result($result, $i, 0);
304 $name = mysql_result($result, $i, 1);
305 $id = mysql_result($result, $i, 2);
306 $module = mysql_result($result, $i, 3);
307 $desc = mysql_result($result, $i, 4);
308 $url = $module;
309 if ($id != "") {
310 $url = $url + "#$id";
311 }
312 $results["$name _html_ $number _ $i"] =
313 array($relevance, "XML docs",
314 $module, $desc, $name, $url);
315 }
316 mysql_free_result($result);
317 }
318 }
319 if (($scope == 'any') || ($scope == 'XSLT') ||
320 ($scope == 'DOCS') || ($scope == 'XSLTDOC')) {
321 list($result, $k) = XSLTqueryHTMLWord($word);
322 if ($k > 0) {
323 for ($i = 0; $i < $k; $i++) {
324 $relevance = mysql_result($result, $i, 0);
325 $name = mysql_result($result, $i, 1);
326 $id = mysql_result($result, $i, 2);
327 $module = mysql_result($result, $i, 3);
328 $desc = mysql_result($result, $i, 4);
329 $url = "XSLT/$module";
330 if ($id != "") {
331 $url = $url + "#$id";
332 }
333 $results["$name xslthtml $number _ $i "] =
334 array($relevance, "XSLT docs",
335 $module, $desc, $name, $url);
336 }
337 mysql_free_result($result);
338 }
339 }
340 if (($scope == 'any') || ($scope == 'XML') ||
341 ($scope == 'LISTS') || ($scope == 'XMLLIST')) {
342 list($result, $j) = queryArchiveWord($word);
343 if ($j > 0) {
344 for ($i = 0; $i < $j; $i++) {
345 $relevance = mysql_result($result, $i, 0);
346 $name = mysql_result($result, $i, 1);
347 $type = mysql_result($result, $i, 2);
348 $url = mysql_result($result, $i, 3);
349 $desc = mysql_result($result, $i, 4);
350 if (array_key_exists($url, $results)) {
351 list($r,$t,$m,$d,$w,$u) = $results[$url];
352 $results[$name] = array(($r + $relevance) * 2,
353 $t,$m,$d,$w,$u);
354 } else {
355 $id = $name;
356 $m = strtolower($module);
357 $u = str_replace(
358 "http://mail.gnome.org/archives/xml/", "", $url);
359 $results[$url] = array($relevance,$type,
360 $u, $desc, $name, $url);
361 }
362 }
363 mysql_free_result($result);
364 }
365 }
366 if (($scope == 'any') || ($scope == 'XSLT') ||
367 ($scope == 'LISTS') || ($scope == 'XSLTLIST')) {
368 list($result, $j) = XSLTqueryArchiveWord($word);
369 if ($j > 0) {
370 for ($i = 0; $i < $j; $i++) {
371 $relevance = mysql_result($result, $i, 0);
372 $name = mysql_result($result, $i, 1);
373 $type = mysql_result($result, $i, 2);
374 $url = mysql_result($result, $i, 3);
375 $desc = mysql_result($result, $i, 4);
376 if (array_key_exists($url, $results)) {
377 list($r,$t,$m,$d,$w,$u) = $results[$url];
378 $results[$name] = array(($r + $relevance) * 2,
379 $t,$m,$d,$w,$u);
380 } else {
381 $id = $name;
382 $m = strtolower($module);
383 $u = str_replace(
384 "http://mail.gnome.org/archives/xslt/", "", $url);
385 $results[$url] = array($relevance,$type,
386 $u, $desc, $name, $url);
387 }
388 }
389 mysql_free_result($result);
390 }
391 }
392 }
393 if ((count($results) == 0) && (count($list) == 1)) {
394 $word = $list[0];
395 if (($scope == 'any') || ($scope == 'XML') ||
396 ($scope == 'API') || ($scope == 'XMLAPI')) {
397 list($result, $j) = queryWord("xml$word");
398 if ($j > 0) {
399 for ($i = 0; $i < $j; $i++) {
400 $relevance = mysql_result($result, $i, 0);
401 $name = mysql_result($result, $i, 1);
402 $type = mysql_result($result, $i, 2);
403 $module = mysql_result($result, $i, 3);
404 $desc = mysql_result($result, $i, 4);
405 if (array_key_exists($name, $results)) {
406 list($r,$t,$m,$d,$w,$u) = $results[$name];
407 $results[$name] = array(($r + $relevance) * 2,
408 $t,$m,$d,$w,$u);
409 } else {
410 $id = $name;
411 $m = strtolower($module);
412 $url = "html/libxml-$module.html#$id";
413 $results[$name] = array($relevance,$type,
414 $module, $desc, $name, $url);
415 }
416 }
417 mysql_free_result($result);
418 }
419 }
420 if (($scope == 'any') || ($scope == 'XSLT') ||
421 ($scope == 'API') || ($scope == 'XSLTAPI')) {
422 list($result, $j) = XSLTqueryWord("xslt$word");
423 if ($j > 0) {
424 for ($i = 0; $i < $j; $i++) {
425 $relevance = mysql_result($result, $i, 0);
426 $name = mysql_result($result, $i, 1);
427 $type = mysql_result($result, $i, 2);
428 $module = mysql_result($result, $i, 3);
429 $desc = mysql_result($result, $i, 4);
430 if (array_key_exists($name, $results)) {
431 list($r,$t,$m,$d,$w,$u) = $results[$name];
432 $results[$name] = array(($r + $relevance) * 2,
433 $t,$m,$d,$w,$u);
434 } else {
435 $id = $name;
436 $m = strtolower($module);
437 $url = "XSLT/html/libxslt-$module.html#$id";
438 $results[$name] = array($relevance,$type,
439 $module, $desc, $name, $url);
440 }
441 }
442 mysql_free_result($result);
443 }
444 }
445 }
446 mysql_close($link);
447 $nb = count($results);
448 echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
449 usort($results, "resSort");
450
451 if ($nb > 0) {
452 printf("<table><tbody>\n");
453 printf("<tr><td>Quality</td><td>Symbol</td><td>Type</td><td>module</td><td>Description</td></tr>\n");
454 $i = 0;
455 while (list ($name, $val) = each ($results)) {
456 list($r,$t,$m,$d,$s,$u) = $val;
457 $m = str_replace("<", "&lt;", $m);
458 $s = str_replace("<", "&lt;", $s);
459 $d = str_replace("<", "&lt;", $d);
460 echo "<tr><td>$r</td><td><a href='$u'>$s</a></td><td>$t</td><td>$m</td><td>$d</td></tr>";
461 $i = $i + 1;
462 if ($i > 75)
463 break;
464 }
465 printf("</tbody></table>\n");
466 }
467 }
468 }
469 ?>
470
471 </td></tr></table></td></tr></table></td></tr></table></td>
472 </tr></table></td></tr></table>
473 </body>
474 </html>
475