1 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
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
}
14 <title
>Search the documentation on XMLSoft
.org
</title
>
16 <body bgcolor
="#8b7765" text
="#000000" link
="#000000" vlink
="#000000">
17 <table border
="0" width
="100%" cellpadding
="5" cellspacing
="0" align
="center"><tr
>
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
>
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
>
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
&
; 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
>
60 <a href
="xml.html">flat page
</a
>, <a href
="site.xsl">stylesheet
</a
>
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
>
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&product=libxml2">Bug Tracker
</a
></li
>
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">
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);
98 echo "<h1 align='center'>Search the documentation on XMLSoft.org</h1>";
102 $scope = ltrim ($scope);
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
:
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
>
126 <input name
=submit type
=submit value
="Search ...">
129 function logQueryWord($word) {
130 $result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
132 $i = mysql_num_rows($result);
134 mysql_free_result($result);
135 mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
137 $id = mysql_result($result, 0, 0);
138 $count = mysql_result($result, 0, 1);
140 mysql_query ("UPDATE Queries SET Count=$count WHERE ID=$id");
143 mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
146 function queryWord($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");
152 $j = mysql_num_rows($result);
154 mysql_free_result($result);
158 return array($result, $j);
160 function queryHTMLWord($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");
166 $j = mysql_num_rows($result);
168 mysql_free_result($result);
172 return array($result, $j);
174 function queryArchiveWord($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");
180 $j = mysql_num_rows($result);
182 mysql_free_result($result);
186 return array($result, $j);
188 function XSLTqueryWord($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");
194 $j = mysql_num_rows($result);
196 mysql_free_result($result);
200 return array($result, $j);
202 function XSLTqueryHTMLWord($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");
208 $j = mysql_num_rows($result);
210 mysql_free_result($result);
214 return array($result, $j);
216 function XSLTqueryArchiveWord($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");
222 $j = mysql_num_rows($result);
224 mysql_free_result($result);
228 return array($result, $j);
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;
236 if (($query) && (strlen($query) <= 50)) {
237 $link = mysql_connect ("localhost", "nobody");
239 echo "<p> Could not connect to the database: ", mysql_error();
241 mysql_select_db("xmlsoft", $link);
242 $list = explode (" ", $query);
245 for ($number = 0;$number < count($list);$number++
) {
247 $word = $list[$number];
248 if (($scope == 'any') ||
($scope == 'XML') ||
249 ($scope == 'API') ||
($scope == 'XMLAPI')) {
250 list($result, $j) = queryWord($word);
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,
264 $m = strtolower($module);
265 $url = "html/libxml-$module.html#$id";
266 $results[$name] = array($relevance,$type,
267 $module, $desc, $name, $url);
270 mysql_free_result($result);
273 if (($scope == 'any') ||
($scope == 'XSLT') ||
274 ($scope == 'API') ||
($scope == 'XSLTAPI')) {
275 list($result, $j) = XSLTqueryWord($word);
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,
289 $m = strtolower($module);
290 $url = "XSLT/html/libxslt-$module.html#$id";
291 $results[$name] = array($relevance,$type,
292 $module, $desc, $name, $url);
295 mysql_free_result($result);
298 if (($scope == 'any') ||
($scope == 'XML') ||
299 ($scope == 'DOCS') ||
($scope == 'XMLDOC')) {
300 list($result, $k) = queryHTMLWord($word);
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);
310 $url = $url +
"#$id";
312 $results["$name _html_ $number _ $i"] =
313 array($relevance, "XML docs",
314 $module, $desc, $name, $url);
316 mysql_free_result($result);
319 if (($scope == 'any') ||
($scope == 'XSLT') ||
320 ($scope == 'DOCS') ||
($scope == 'XSLTDOC')) {
321 list($result, $k) = XSLTqueryHTMLWord($word);
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";
331 $url = $url +
"#$id";
333 $results["$name xslthtml $number _ $i "] =
334 array($relevance, "XSLT docs",
335 $module, $desc, $name, $url);
337 mysql_free_result($result);
340 if (($scope == 'any') ||
($scope == 'XML') ||
341 ($scope == 'LISTS') ||
($scope == 'XMLLIST')) {
342 list($result, $j) = queryArchiveWord($word);
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,
356 $m = strtolower($module);
358 "http://mail.gnome.org/archives/xml/", "", $url);
359 $results[$url] = array($relevance,$type,
360 $u, $desc, $name, $url);
363 mysql_free_result($result);
366 if (($scope == 'any') ||
($scope == 'XSLT') ||
367 ($scope == 'LISTS') ||
($scope == 'XSLTLIST')) {
368 list($result, $j) = XSLTqueryArchiveWord($word);
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,
382 $m = strtolower($module);
384 "http://mail.gnome.org/archives/xslt/", "", $url);
385 $results[$url] = array($relevance,$type,
386 $u, $desc, $name, $url);
389 mysql_free_result($result);
393 if ((count($results) == 0) && (count($list) == 1)) {
395 if (($scope == 'any') ||
($scope == 'XML') ||
396 ($scope == 'API') ||
($scope == 'XMLAPI')) {
397 list($result, $j) = queryWord("xml$word");
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,
411 $m = strtolower($module);
412 $url = "html/libxml-$module.html#$id";
413 $results[$name] = array($relevance,$type,
414 $module, $desc, $name, $url);
417 mysql_free_result($result);
420 if (($scope == 'any') ||
($scope == 'XSLT') ||
421 ($scope == 'API') ||
($scope == 'XSLTAPI')) {
422 list($result, $j) = XSLTqueryWord("xslt$word");
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,
436 $m = strtolower($module);
437 $url = "XSLT/html/libxslt-$module.html#$id";
438 $results[$name] = array($relevance,$type,
439 $module, $desc, $name, $url);
442 mysql_free_result($result);
447 $nb = count($results);
448 echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
449 usort($results, "resSort");
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");
455 while (list ($name, $val) = each ($results)) {
456 list($r,$t,$m,$d,$s,$u) = $val;
457 $m = str_replace("<", "<", $m);
458 $s = str_replace("<", "<", $s);
459 $d = str_replace("<", "<", $d);
460 echo "<tr><td>$r</td><td><a href='$u'>$s</a></td><td>$t</td><td>$m</td><td>$d</td></tr>";
465 printf("</tbody></table>\n");
471 </td
></tr
></table
></td
></tr
></table
></td
></tr
></table
></td
>
472 </tr
></table
></td
></tr
></table
>