1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

applied patch from Mark Vakoc except the API change, preserved it. updated

* debugXML.c: applied patch from Mark Vakoc except the API
  change, preserved it.
* doc/*: updated the docs to point to the search engine for
  information lookup or before bug/help reports.
Daniel
This commit is contained in:
Daniel Veillard 2002-10-08 21:26:42 +00:00
parent d7960a8a76
commit 321be0c5bf
9 changed files with 148 additions and 83 deletions

View File

@ -1,3 +1,10 @@
Tue Oct 8 23:24:20 CEST 2002 Daniel Veillard <daniel@veillard.com>
* debugXML.c: applied patch from Mark Vakoc except the API
change, preserved it.
* doc/*: updated the docs to point to the search engine for
information lookup or before bug/help reports.
Tue Oct 8 18:53:31 CEST 2002 Daniel Veillard <daniel@veillard.com> Tue Oct 8 18:53:31 CEST 2002 Daniel Veillard <daniel@veillard.com>
* doc/index.py doc/search.php: added mailing-list archives * doc/index.py doc/search.php: added mailing-list archives

View File

@ -1346,38 +1346,53 @@ xmlShellPrintXPathError(int errorType, const char *arg)
/** /**
* xmlShellPrintNode: * xmlShellPrintNodeCtxt:
* @node : a non-null node to print to stdout * @ctxt : a non-null shell context
* @node : a non-null node to print to the output FILE
* *
* Print node to stdout * Print node to the output FILE
*/
static void
xmlShellPrintNodeCtxt(xmlShellCtxtPtr ctxt,xmlNodePtr node)
{
if (!ctxt || !node)
return;
if (node->type == XML_DOCUMENT_NODE)
xmlDocDump(ctxt->output, (xmlDocPtr) node);
else if (node->type == XML_ATTRIBUTE_NODE)
xmlDebugDumpAttrList(ctxt->output, (xmlAttrPtr) node, 0);
else
xmlElemDump(ctxt->output, node->doc, node);
fprintf(ctxt->output, "\n");
}
/**
* xmlShellPrintNode:
* @node : a non-null node to print to the output FILE
*
* Print node to the output FILE
*/ */
void void
xmlShellPrintNode(xmlNodePtr node) xmlShellPrintNode(xmlNodePtr node)
{ {
if (!node) xmlShellPrintNodeCtxt(NULL, node);
return;
if (node->type == XML_DOCUMENT_NODE)
xmlDocDump(stdout, (xmlDocPtr) node);
else if (node->type == XML_ATTRIBUTE_NODE)
xmlDebugDumpAttrList(stdout, (xmlAttrPtr) node, 0);
else
xmlElemDump(stdout, node->doc, node);
fprintf(stdout, "\n");
} }
/** /**
* xmlShellPrintXPathResult: * xmlShellPrintXPathResultCtxt:
* @ctxt: a valid shell context
* @list: a valid result generated by an xpath evaluation * @list: a valid result generated by an xpath evaluation
* *
* Prints result to stdout * Prints result to the output FILE
*/ */
void static void
xmlShellPrintXPathResult(xmlXPathObjectPtr list) xmlShellPrintXPathResultCtxt(xmlShellCtxtPtr ctxt,xmlXPathObjectPtr list)
{ {
int i = 0; int i = 0;
if (!ctxt)
return;
if (list != NULL) { if (list != NULL) {
switch (list->type) { switch (list->type) {
@ -1389,8 +1404,8 @@ xmlShellPrintXPathResult(xmlXPathObjectPtr list)
indx++) { indx++) {
if (i > 0) if (i > 0)
fprintf(stderr, " -------\n"); fprintf(stderr, " -------\n");
xmlShellPrintNode(list->nodesetval-> xmlShellPrintNodeCtxt(ctxt,
nodeTab[indx]); list->nodesetval->nodeTab[indx]);
} }
} else { } else {
xmlGenericError(xmlGenericErrorContext, xmlGenericError(xmlGenericErrorContext,
@ -1418,6 +1433,18 @@ xmlShellPrintXPathResult(xmlXPathObjectPtr list)
} }
} }
/**
* xmlShellPrintXPathResult:
* @list: a valid result generated by an xpath evaluation
*
* Prints result to the output FILE
*/
void
xmlShellPrintXPathResult(xmlXPathObjectPtr list)
{
xmlShellPrintXPathResultCtxt(NULL, list);
}
/** /**
* xmlShellList: * xmlShellList:
* @ctxt: the shell context * @ctxt: the shell context
@ -1431,29 +1458,31 @@ xmlShellPrintXPathResult(xmlXPathObjectPtr list)
* Returns 0 * Returns 0
*/ */
int int
xmlShellList(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlShellList(xmlShellCtxtPtr ctxt,
char *arg ATTRIBUTE_UNUSED, xmlNodePtr node, char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
xmlNodePtr node2 ATTRIBUTE_UNUSED) xmlNodePtr node2 ATTRIBUTE_UNUSED)
{ {
xmlNodePtr cur; xmlNodePtr cur;
if (!ctxt)
return (0);
if (node == NULL) { if (node == NULL) {
fprintf(stdout, "NULL\n"); fprintf(ctxt->output, "NULL\n");
return (0); return (0);
} }
if ((node->type == XML_DOCUMENT_NODE) || if ((node->type == XML_DOCUMENT_NODE) ||
(node->type == XML_HTML_DOCUMENT_NODE)) { (node->type == XML_HTML_DOCUMENT_NODE)) {
cur = ((xmlDocPtr) node)->children; cur = ((xmlDocPtr) node)->children;
} else if (node->type == XML_NAMESPACE_DECL) { } else if (node->type == XML_NAMESPACE_DECL) {
xmlLsOneNode(stdout, node); xmlLsOneNode(ctxt->output, node);
return (0); return (0);
} else if (node->children != NULL) { } else if (node->children != NULL) {
cur = node->children; cur = node->children;
} else { } else {
xmlLsOneNode(stdout, node); xmlLsOneNode(ctxt->output, node);
return (0); return (0);
} }
while (cur != NULL) { while (cur != NULL) {
xmlLsOneNode(stdout, cur); xmlLsOneNode(ctxt->output, cur);
cur = cur->next; cur = cur->next;
} }
return (0); return (0);
@ -1472,22 +1501,24 @@ xmlShellList(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
* Returns 0 * Returns 0
*/ */
int int
xmlShellBase(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlShellBase(xmlShellCtxtPtr ctxt,
char *arg ATTRIBUTE_UNUSED, xmlNodePtr node, char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
xmlNodePtr node2 ATTRIBUTE_UNUSED) xmlNodePtr node2 ATTRIBUTE_UNUSED)
{ {
xmlChar *base; xmlChar *base;
if (!ctxt)
return 0;
if (node == NULL) { if (node == NULL) {
fprintf(stdout, "NULL\n"); fprintf(ctxt->output, "NULL\n");
return (0); return (0);
} }
base = xmlNodeGetBase(node->doc, node); base = xmlNodeGetBase(node->doc, node);
if (base == NULL) { if (base == NULL) {
fprintf(stdout, " No base found !!!\n"); fprintf(ctxt->output, " No base found !!!\n");
} else { } else {
fprintf(stdout, "%s\n", base); fprintf(ctxt->output, "%s\n", base);
xmlFree(base); xmlFree(base);
} }
return (0); return (0);
@ -1531,17 +1562,19 @@ xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
char *arg ATTRIBUTE_UNUSED, xmlNodePtr node, char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
xmlNodePtr node2 ATTRIBUTE_UNUSED) xmlNodePtr node2 ATTRIBUTE_UNUSED)
{ {
if (!ctxt)
return (0);
if (node == NULL) { if (node == NULL) {
fprintf(stdout, "NULL\n"); fprintf(ctxt->output, "NULL\n");
return (0); return (0);
} }
if ((node->type == XML_DOCUMENT_NODE) || if ((node->type == XML_DOCUMENT_NODE) ||
(node->type == XML_HTML_DOCUMENT_NODE)) { (node->type == XML_HTML_DOCUMENT_NODE)) {
xmlDebugDumpDocumentHead(stdout, (xmlDocPtr) node); xmlDebugDumpDocumentHead(ctxt->output, (xmlDocPtr) node);
} else if (node->type == XML_ATTRIBUTE_NODE) { } else if (node->type == XML_ATTRIBUTE_NODE) {
xmlDebugDumpAttr(stdout, (xmlAttrPtr) node, 0); xmlDebugDumpAttr(ctxt->output, (xmlAttrPtr) node, 0);
} else { } else {
xmlDebugDumpOneNode(stdout, node, 0); xmlDebugDumpOneNode(ctxt->output, node, 0);
} }
return (0); return (0);
} }
@ -1562,29 +1595,31 @@ int
xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED, xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
xmlNodePtr node, xmlNodePtr node2 ATTRIBUTE_UNUSED) xmlNodePtr node, xmlNodePtr node2 ATTRIBUTE_UNUSED)
{ {
if (!ctxt)
return (0);
if (node == NULL) { if (node == NULL) {
fprintf(stdout, "NULL\n"); fprintf(ctxt->output, "NULL\n");
return (0); return (0);
} }
if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) { if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) {
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
if (node->type == XML_HTML_DOCUMENT_NODE) if (node->type == XML_HTML_DOCUMENT_NODE)
htmlDocDump(stdout, (htmlDocPtr) node); htmlDocDump(ctxt->output, (htmlDocPtr) node);
else else
htmlNodeDumpFile(stdout, ctxt->doc, node); htmlNodeDumpFile(ctxt->output, ctxt->doc, node);
#else #else
if (node->type == XML_DOCUMENT_NODE) if (node->type == XML_DOCUMENT_NODE)
xmlDocDump(stdout, (xmlDocPtr) node); xmlDocDump(ctxt->output, (xmlDocPtr) node);
else else
xmlElemDump(stdout, ctxt->doc, node); xmlElemDump(ctxt->output, ctxt->doc, node);
#endif /* LIBXML_HTML_ENABLED */ #endif /* LIBXML_HTML_ENABLED */
} else { } else {
if (node->type == XML_DOCUMENT_NODE) if (node->type == XML_DOCUMENT_NODE)
xmlDocDump(stdout, (xmlDocPtr) node); xmlDocDump(ctxt->output, (xmlDocPtr) node);
else else
xmlElemDump(stdout, ctxt->doc, node); xmlElemDump(ctxt->output, ctxt->doc, node);
} }
fprintf(stdout, "\n"); fprintf(ctxt->output, "\n");
return (0); return (0);
} }
@ -1615,7 +1650,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
doc = htmlParseFile(filename, NULL); doc = htmlParseFile(filename, NULL);
#else #else
fprintf(stdout, "HTML support not compiled in\n"); fprintf(ctxt->output, "HTML support not compiled in\n");
doc = NULL; doc = NULL;
#endif /* LIBXML_HTML_ENABLED */ #endif /* LIBXML_HTML_ENABLED */
} else { } else {
@ -1822,24 +1857,27 @@ xmlShellValidate(xmlShellCtxtPtr ctxt, char *dtd,
* Returns 0 or -1 in case of error * Returns 0 or -1 in case of error
*/ */
int int
xmlShellDu(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlShellDu(xmlShellCtxtPtr ctxt,
char *arg ATTRIBUTE_UNUSED, xmlNodePtr tree, char *arg ATTRIBUTE_UNUSED, xmlNodePtr tree,
xmlNodePtr node2 ATTRIBUTE_UNUSED) xmlNodePtr node2 ATTRIBUTE_UNUSED)
{ {
xmlNodePtr node; xmlNodePtr node;
int indent = 0, i; int indent = 0, i;
if (!ctxt)
return (-1);
if (tree == NULL) if (tree == NULL)
return (-1); return (-1);
node = tree; node = tree;
while (node != NULL) { while (node != NULL) {
if ((node->type == XML_DOCUMENT_NODE) || if ((node->type == XML_DOCUMENT_NODE) ||
(node->type == XML_HTML_DOCUMENT_NODE)) { (node->type == XML_HTML_DOCUMENT_NODE)) {
fprintf(stdout, "/\n"); fprintf(ctxt->output, "/\n");
} else if (node->type == XML_ELEMENT_NODE) { } else if (node->type == XML_ELEMENT_NODE) {
for (i = 0; i < indent; i++) for (i = 0; i < indent; i++)
fprintf(stdout, " "); fprintf(ctxt->output, " ");
fprintf(stdout, "%s\n", node->name); fprintf(ctxt->output, "%s\n", node->name);
} else { } else {
} }
@ -1934,7 +1972,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer,
* @doc: the initial document * @doc: the initial document
* @filename: the output buffer * @filename: the output buffer
* @input: the line reading function * @input: the line reading function
* @output: the output FILE* * @output: the output FILE*, defaults to stdout if NULL
* *
* Implements the XML shell * Implements the XML shell
* This allow to load, validate, view, modify and save a document * This allow to load, validate, view, modify and save a document
@ -1960,7 +1998,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
if (input == NULL) if (input == NULL)
return; return;
if (output == NULL) if (output == NULL)
return; output = stdout;
ctxt = (xmlShellCtxtPtr) xmlMalloc(sizeof(xmlShellCtxt)); ctxt = (xmlShellCtxtPtr) xmlMalloc(sizeof(xmlShellCtxt));
if (ctxt == NULL) if (ctxt == NULL)
return; return;
@ -2038,26 +2076,26 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
if (!strcmp(command, "bye")) if (!strcmp(command, "bye"))
break; break;
if (!strcmp(command, "help")) { if (!strcmp(command, "help")) {
fprintf(stdout, "\tbase display XML base of the node\n"); fprintf(ctxt->output, "\tbase display XML base of the node\n");
fprintf(stdout, "\tsetbase URI change the XML base of the node\n"); fprintf(ctxt->output, "\tsetbase URI change the XML base of the node\n");
fprintf(stdout, "\tbye leave shell\n"); fprintf(ctxt->output, "\tbye leave shell\n");
fprintf(stdout, "\tcat [node] display node or current node\n"); fprintf(ctxt->output, "\tcat [node] display node or current node\n");
fprintf(stdout, "\tcd [path] change directory to path or to root\n"); fprintf(ctxt->output, "\tcd [path] change directory to path or to root\n");
fprintf(stdout, "\tdir [path] dumps informations about the node (namespace, attributes, content)\n"); fprintf(ctxt->output, "\tdir [path] dumps informations about the node (namespace, attributes, content)\n");
fprintf(stdout, "\tdu [path] show the structure of the subtree under path or the current node\n"); fprintf(ctxt->output, "\tdu [path] show the structure of the subtree under path or the current node\n");
fprintf(stdout, "\texit leave shell\n"); fprintf(ctxt->output, "\texit leave shell\n");
fprintf(stdout, "\thelp display this help\n"); fprintf(ctxt->output, "\thelp display this help\n");
fprintf(stdout, "\tfree display memory usage\n"); fprintf(ctxt->output, "\tfree display memory usage\n");
fprintf(stdout, "\tload [name] load a new document with name\n"); fprintf(ctxt->output, "\tload [name] load a new document with name\n");
fprintf(stdout, "\tls [path] list contents of path or the current directory\n"); fprintf(ctxt->output, "\tls [path] list contents of path or the current directory\n");
#ifdef LIBXML_XPATH_ENABLED #ifdef LIBXML_XPATH_ENABLED
fprintf(stdout, "\txpath expr evaluate the XPath expression in that context and print the result\n"); fprintf(ctxt->output, "\txpath expr evaluate the XPath expression in that context and print the result\n");
#endif /* LIBXML_XPATH_ENABLED */ #endif /* LIBXML_XPATH_ENABLED */
fprintf(stdout, "\tpwd display current working directory\n"); fprintf(ctxt->output, "\tpwd display current working directory\n");
fprintf(stdout, "\tquit leave shell\n"); fprintf(ctxt->output, "\tquit leave shell\n");
fprintf(stdout, "\tsave [name] save this document to name or the original name\n"); fprintf(ctxt->output, "\tsave [name] save this document to name or the original name\n");
fprintf(stdout, "\tvalidate check the document for errors\n"); fprintf(ctxt->output, "\tvalidate check the document for errors\n");
fprintf(stdout, "\twrite [name] write the current node to the filename\n"); fprintf(ctxt->output, "\twrite [name] write the current node to the filename\n");
} else if (!strcmp(command, "validate")) { } else if (!strcmp(command, "validate")) {
xmlShellValidate(ctxt, arg, NULL, NULL); xmlShellValidate(ctxt, arg, NULL, NULL);
} else if (!strcmp(command, "load")) { } else if (!strcmp(command, "load")) {
@ -2068,18 +2106,18 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlShellWrite(ctxt, arg, NULL, NULL); xmlShellWrite(ctxt, arg, NULL, NULL);
} else if (!strcmp(command, "free")) { } else if (!strcmp(command, "free")) {
if (arg[0] == 0) { if (arg[0] == 0) {
xmlMemShow(stdout, 0); xmlMemShow(ctxt->output, 0);
} else { } else {
int len = 0; int len = 0;
sscanf(arg, "%d", &len); sscanf(arg, "%d", &len);
xmlMemShow(stdout, len); xmlMemShow(ctxt->output, len);
} }
} else if (!strcmp(command, "pwd")) { } else if (!strcmp(command, "pwd")) {
char dir[500]; char dir[500];
if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL)) if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL))
fprintf(stdout, "%s\n", dir); fprintf(ctxt->output, "%s\n", dir);
} else if (!strcmp(command, "du")) { } else if (!strcmp(command, "du")) {
xmlShellDu(ctxt, NULL, ctxt->node, NULL); xmlShellDu(ctxt, NULL, ctxt->node, NULL);
} else if (!strcmp(command, "base")) { } else if (!strcmp(command, "base")) {
@ -2092,7 +2130,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
} else { } else {
ctxt->pctxt->node = ctxt->node; ctxt->pctxt->node = ctxt->node;
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt); list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
xmlXPathDebugDumpObject(stdout, list, 0); xmlXPathDebugDumpObject(ctxt->output, list, 0);
xmlXPathFreeObject(list); xmlXPathFreeObject(list);
} }
#endif /* LIBXML_XPATH_ENABLED */ #endif /* LIBXML_XPATH_ENABLED */
@ -2283,7 +2321,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
indx < list->nodesetval->nodeNr; indx < list->nodesetval->nodeNr;
indx++) { indx++) {
if (i > 0) if (i > 0)
fprintf(stdout, " -------\n"); fprintf(ctxt->output, " -------\n");
xmlShellCat(ctxt, NULL, xmlShellCat(ctxt, NULL,
list->nodesetval-> list->nodesetval->
nodeTab[indx], NULL); nodeTab[indx], NULL);

View File

@ -106,7 +106,8 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
<p>Check the following <strong><span style="color: #FF0000">before <p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p> posting</span></strong>:</p>
<ul> <ul>
<li>Read the <a href="FAQ.html">FAQ</a>.</li> <li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
search engine</a> to get informations related to your problem.</li>
<li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent <li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent
version</a>, and that the problem still shows up in a recent version.</li> version</a>, and that the problem still shows up in a recent version.</li>
<li>Check the <a href="http://mail.gnome.org/archives/xml/">list <li>Check the <a href="http://mail.gnome.org/archives/xml/">list

View File

@ -95,7 +95,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<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"> <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">
<p>There are several on-line resources related to using libxml:</p> <p>There are several on-line resources related to using libxml:</p>
<ol> <ol>
<li>Check the <a href="FAQ.html">FAQ.</a> <li>Use the <a href="search.php">search engine</a> to lookup
informations.</li>
<li>Check the <a href="FAQ.html">FAQ.</a>
</li> </li>
<li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
documentation</a> automatically extracted from code comments (using <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk documentation</a> automatically extracted from code comments (using <a href="http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&amp;dir=gtk-doc">gtk

View File

@ -96,7 +96,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>The latest versions of libxml can be found on <a href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</a>, <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> either <p>The latest versions of libxml can be found on <a href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</a>, <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> either
as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.4/">source as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.4/">source
archive</a> archive</a>
, Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
mirror in Austria</a>. (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> mirror in Austria</a>. (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
packages installed to compile applications using libxml.) <a href="mailto:igor@stud.fh-frankfurt.de">Igor Zlatkovic</a> is now the packages installed to compile applications using libxml.) <a href="mailto:igor@stud.fh-frankfurt.de">Igor Zlatkovic</a> is now the
maintainer of the Windows port, <a href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he maintainer of the Windows port, <a href="http://www.fh-frankfurt.de/~igor/projects/libxml/index.html">he

View File

@ -152,6 +152,17 @@ def checkTables(db):
if not tables.has_key(table): if not tables.has_key(table):
print "table %s missing" % (table) print "table %s missing" % (table)
createTable(db, table) createTable(db, table)
try:
ret = c.execute("SELECT count(*) from %s" % table);
row = c.fetchone()
print "Table %s contains %d records" % (table, row[0])
except:
print "Troubles with table %s : repairing" % (table)
ret = c.execute("repair table %s" % table);
print "repairing returned %d" % (ret)
ret = c.execute("SELECT count(*) from %s" % table);
row = c.fetchone()
print "Table %s contains %d records" % (table, row[0])
print "checkTables finished" print "checkTables finished"
# make sure apache can access the tables read-only # make sure apache can access the tables read-only
@ -1118,7 +1129,7 @@ def analyzeArchives(t = None, force = 0):
print "Found %d associations in HTML pages" % (i) print "Found %d associations in HTML pages" % (i)
def analyzeHTML(): def analyzeHTMLTop():
global wordsDictHTML global wordsDictHTML
ret = analyzeHTMLPages() ret = analyzeHTMLPages()
@ -1138,8 +1149,9 @@ def analyzeHTML():
print "Found %d associations in HTML pages" % (i) print "Found %d associations in HTML pages" % (i)
def analyzeAPI(): def analyzeAPITop():
global wordsDict global wordsDict
global API
try: try:
doc = loadAPI(API) doc = loadAPI(API)
@ -1205,9 +1217,9 @@ def main():
print "Failed to index month archive:" print "Failed to index month archive:"
print sys.exc_type, sys.exc_value print sys.exc_type, sys.exc_value
elif args[i] == '--API': elif args[i] == '--API':
analyzeAPI() analyzeAPITop()
elif args[i] == '--docs': elif args[i] == '--docs':
analyzeHTML() analyzeHTMLTop()
else: else:
usage() usage()
i = i + 1 i = i + 1

View File

@ -113,7 +113,7 @@ to test those</p>
<li>Better handling of Windows file paths, improvement of Makefiles (Igor, <li>Better handling of Windows file paths, improvement of Makefiles (Igor,
Daniel Gehriger, Mark Vakoc)</li> Daniel Gehriger, Mark Vakoc)</li>
<li>Improved the python I/O bindings, the tests, added resolver and regexp <li>Improved the python I/O bindings, the tests, added resolver and regexp
APIs </li> APIs</li>
<li>New logos from Marc Liyanage</li> <li>New logos from Marc Liyanage</li>
<li>Tutorial improvements: John Fleck, Christopher Harris</li> <li>Tutorial improvements: John Fleck, Christopher Harris</li>
<li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe <li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe

View File

@ -416,6 +416,8 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
<p>There are several on-line resources related to using libxml:</p> <p>There are several on-line resources related to using libxml:</p>
<ol> <ol>
<li>Use the <a href="search.php">search engine</a> to lookup
informations.</li>
<li>Check the <a href="FAQ.html">FAQ.</a></li> <li>Check the <a href="FAQ.html">FAQ.</a></li>
<li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
documentation</a> automatically extracted from code comments (using <a documentation</a> automatically extracted from code comments (using <a
@ -462,7 +464,8 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
<p>Check the following <strong><span style="color: #FF0000">before <p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p> posting</span></strong>:</p>
<ul> <ul>
<li>Read the <a href="FAQ.html">FAQ</a>.</li> <li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
search engine</a> to get informations related to your problem.</li>
<li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent <li>Make sure you are <a href="ftp://xmlsoft.org/">using a recent
version</a>, and that the problem still shows up in a recent version.</li> version</a>, and that the problem still shows up in a recent version.</li>
<li>Check the <a href="http://mail.gnome.org/archives/xml/">list <li>Check the <a href="http://mail.gnome.org/archives/xml/">list
@ -526,7 +529,7 @@ as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.4/">source
archive</a><!-- commenting this out because they seem to have disappeared or <a archive</a><!-- commenting this out because they seem to have disappeared or <a
href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM
packages</a> --> packages</a> -->
, Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a , Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
mirror in Austria</a>. (NOTE that you need both the <a mirror in Austria</a>. (NOTE that you need both the <a
href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a
href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a> href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
@ -590,7 +593,7 @@ to test those</p>
<li>Better handling of Windows file paths, improvement of Makefiles (Igor, <li>Better handling of Windows file paths, improvement of Makefiles (Igor,
Daniel Gehriger, Mark Vakoc)</li> Daniel Gehriger, Mark Vakoc)</li>
<li>Improved the python I/O bindings, the tests, added resolver and regexp <li>Improved the python I/O bindings, the tests, added resolver and regexp
APIs </li> APIs</li>
<li>New logos from Marc Liyanage</li> <li>New logos from Marc Liyanage</li>
<li>Tutorial improvements: John Fleck, Christopher Harris</li> <li>Tutorial improvements: John Fleck, Christopher Harris</li>
<li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe <li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe
@ -2688,6 +2691,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre> } </pre>
</li> </li>
<li>And then use it to save the document: <li>And then use it to save the document:

View File

@ -247,6 +247,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre> } </pre>
</li> </li>
<li>And then use it to save the document: <li>And then use it to save the document: