Commit a37aab84 authored by Daniel Veillard's avatar Daniel Veillard

applied a patch from Gman for building docs applied a patch from Gary

* doc/*: applied a patch from Gman for building docs
* valid.c xmllint.c include/libxml/valid.h: applied a patch from
  Gary Pennington to provide an allocator for xmlValidCtxt
* xmlreader.c: applied patch from Jacek Konieczny fixing bug
  #113580 about data not being passed immediately.
Daniel
parent e1326114
Mon Jun 9 11:06:09 CEST 2003 Daniel Veillard <daniel@veillard.com>
* doc/*: applied a patch from Gman for building docs
* valid.c xmllint.c include/libxml/valid.h: applied a patch from
Gary Pennington to provide an allocator for xmlValidCtxt
* xmlreader.c: applied patch from Jacek Konieczny fixing bug
#113580 about data not being passed immediately.
Thu Jun 5 11:31:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
* tree.c: applied a couple of patches from Mark Itzcovitz
......
......@@ -56,14 +56,14 @@ xmlcatalog.1: xmlcatalog_man.xml
-@(xsltproc --nonet xmlcatalog_man.xml)
scan:
-gtkdoc-scan --module=libxml --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h triop.h config-mac.h XMLTestPrefix2.h XMLTestPrefix.h triodef.h trionan.h xlink.h libxml.h libxml2-py.h libxml_wrap.h"
-gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h triop.h config-mac.h XMLTestPrefix2.h XMLTestPrefix.h triodef.h trionan.h xlink.h libxml.h libxml2-py.h libxml_wrap.h"
templates: scan
-gtkdoc-mktmpl --module=libxml
-gtkdoc-mktmpl --module=$(DOC_MODULE)
xml: templates
if test -d xml ; then rm xml/* ; else mkdir xml ; fi
-gtkdoc-mkdb --module=libxml --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_XML_FILE)
-gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_XML_FILE)
libxml2-api.xml: apibuild.py ../include/libxml/*.h
......@@ -93,7 +93,7 @@ install-data-local:
-@INSTALL@ -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(TARGET_DIR)
-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(TARGET_DIR)
-@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR)
-(cd $(DESTDIR); gtkdoc-fixxref --module=libxml --html-dir=$(HTML_DIR))
-(cd $(DESTDIR); gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR))
-@(tar cf - tutorial | (cd $(DESTDIR)$(TARGET_DIR) && tar xvf -))
.PHONY : html xml templates scan
......@@ -17,7 +17,7 @@ please visit the <a href="http://mail.gnome.org/mailman/listinfo/xml">associated
follow the instructions. <strong>Do not send code, I won't debug it</strong>
(but patches are really appreciated!).</p><p>Check the following <strong><span style="color: #FF0000">before
posting</span></strong>:</p><ul><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>
search engine</a> to get information related to your problem.</li>
<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>
<li>Check the <a href="http://mail.gnome.org/archives/xml/">list
......@@ -28,20 +28,20 @@ posting</span></strong>:</p><ul><li>Read the <a href="FAQ.html">FAQ</a> and <a h
programs found in source in the distribution.</li>
<li>Please send the command showing the error as well as the input (as an
attachment)</li>
</ul><p>Then send the bug with associated informations to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
</ul><p>Then send the bug with associated information to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it. Please do not send mail to me directly, it makes
things really hard to track and in some cases I am not the best person to
answer a given question, ask on the list.</p><p>To <span style="color: #E50000">be really clear about support</span>:</p><ul><li>Support or help <span style="color: #E50000">request MUST be sent to
answer a given question, ask on the list.</p><p>To <span style="color: #E50000">be really clear about support</span>:</p><ul><li>Support or help <span style="color: #E50000">requests MUST be sent to
the list or on bugzilla</span> in case of problems, so that the Question
and Answers can be shared publicly. Failing to do so carries the implicit
message &quot;I want free support but I don't want to share the benefits with
others&quot; and is not welcome. I will automatically Carbon-Copy the
xml@gnome.org mailing list for any technical reply made about libxml2 or
libxslt.</li>
<li>There is <span style="color: #E50000">no garantee for support</span>,
<li>There is <span style="color: #E50000">no garantee of support</span>,
if your question remains unanswered after a week, repost it, making sure
you gave all the detail needed and the informations requested.</li>
<li>Failing to provide informations as requested or double checking first
you gave all the detail needed and the information requested.</li>
<li>Failing to provide information as requested or double checking first
for prior feedback also carries the implicit message &quot;the time of the
library maintainers is less valuable than my time&quot; and might not be
welcome.</li>
......
This diff is collapsed.
......@@ -501,7 +501,7 @@ follow the instructions. <strong>Do not send code, I won't debug it</strong>
posting</span></strong>:</p>
<ul>
<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>
search engine</a> to get information related to your problem.</li>
<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>
<li>Check the <a href="http://mail.gnome.org/archives/xml/">list
......@@ -515,7 +515,7 @@ posting</span></strong>:</p>
attachment)</li>
</ul>
<p>Then send the bug with associated informations to reproduce it to the <a
<p>Then send the bug with associated information to reproduce it to the <a
href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
related I will approve it. Please do not send mail to me directly, it makes
things really hard to track and in some cases I am not the best person to
......@@ -523,17 +523,17 @@ answer a given question, ask on the list.</p>
<p>To <span style="color: #E50000">be really clear about support</span>:</p>
<ul>
<li>Support or help <span style="color: #E50000">request MUST be sent to
<li>Support or help <span style="color: #E50000">requests MUST be sent to
the list or on bugzilla</span> in case of problems, so that the Question
and Answers can be shared publicly. Failing to do so carries the implicit
message "I want free support but I don't want to share the benefits with
others" and is not welcome. I will automatically Carbon-Copy the
xml@gnome.org mailing list for any technical reply made about libxml2 or
libxslt.</li>
<li>There is <span style="color: #E50000">no garantee for support</span>,
<li>There is <span style="color: #E50000">no garantee of support</span>,
if your question remains unanswered after a week, repost it, making sure
you gave all the detail needed and the informations requested.</li>
<li>Failing to provide informations as requested or double checking first
you gave all the detail needed and the information requested.</li>
<li>Failing to provide information as requested or double checking first
for prior feedback also carries the implicit message "the time of the
library maintainers is less valuable than my time" and might not be
welcome.</li>
......
......@@ -127,6 +127,10 @@ typedef xmlIDTable *xmlIDTablePtr;
typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;
/* Allocate/Release Validation Contexts */
xmlValidCtxtPtr xmlNewValidCtxt(void);
void xmlFreeValidCtxt(xmlValidCtxtPtr);
/* Notation */
xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
......
......@@ -680,6 +680,36 @@ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
* *
****************************************************************/
/**
* xmlNewValidCtxt:
*
* Allocate a validation context structure.
*
* Returns NULL if not, otherwise the new validation context structure
*/
xmlValidCtxtPtr
xmlNewValidCtxt(void) {
xmlValidCtxtPtr ret;
if ((ret = xmlMalloc(sizeof (xmlValidCtxt))) == NULL)
return (NULL);
(void) memset(ret, 0, sizeof (xmlValidCtxt));
return (ret);
}
/**
* xmlFreeValidCtxt:
* @cur: the validation context to free
*
* Free a validation context structure.
*/
void
xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
xmlFree(cur);
}
/**
* xmlNewElementContent:
* @name: the subelement name or NULL
......
......@@ -1081,14 +1081,21 @@ static void parseAndPrintFile(char *filename) {
"Could not parse DTD %s\n", dtdvalid);
progresult = 2;
} else {
xmlValidCtxt cvp;
xmlValidCtxtPtr cvp;
if ((cvp = xmlNewValidCtxt()) == NULL) {
xmlGenericError(xmlGenericErrorContext,
"Couldn't allocate validation context\n");
exit(-1);
}
cvp->userData = (void *) stderr;
cvp->error = (xmlValidityErrorFunc) fprintf;
cvp->warning = (xmlValidityWarningFunc) fprintf;
if ((timing) && (!repeat)) {
startTimer();
}
cvp.userData = (void *) stderr;
cvp.error = (xmlValidityErrorFunc) fprintf;
cvp.warning = (xmlValidityWarningFunc) fprintf;
if (!xmlValidateDtd(&cvp, doc, dtd)) {
if (!xmlValidateDtd(cvp, doc, dtd)) {
xmlGenericError(xmlGenericErrorContext,
"Document %s does not validate against %s\n",
filename, dtdvalid);
......@@ -1097,17 +1104,25 @@ static void parseAndPrintFile(char *filename) {
if ((timing) && (!repeat)) {
endTimer("Validating against DTD");
}
xmlFreeValidCtxt(cvp);
xmlFreeDtd(dtd);
}
} else if (postvalid) {
xmlValidCtxt cvp;
xmlValidCtxtPtr cvp;
if ((cvp = xmlNewValidCtxt()) == NULL) {
xmlGenericError(xmlGenericErrorContext,
"Couldn't allocate validation context\n");
exit(-1);
}
if ((timing) && (!repeat)) {
startTimer();
}
cvp.userData = (void *) stderr;
cvp.error = (xmlValidityErrorFunc) fprintf;
cvp.warning = (xmlValidityWarningFunc) fprintf;
if (!xmlValidateDocument(&cvp, doc)) {
cvp->userData = (void *) stderr;
cvp->error = (xmlValidityErrorFunc) fprintf;
cvp->warning = (xmlValidityWarningFunc) fprintf;
if (!xmlValidateDocument(cvp, doc)) {
xmlGenericError(xmlGenericErrorContext,
"Document %s does not validate\n", filename);
progresult = 3;
......@@ -1115,6 +1130,7 @@ static void parseAndPrintFile(char *filename) {
if ((timing) && (!repeat)) {
endTimer("Validating");
}
xmlFreeValidCtxt(cvp);
#ifdef LIBXML_SCHEMAS_ENABLED
} else if (relaxngschemas != NULL) {
xmlRelaxNGValidCtxtPtr ctxt;
......
......@@ -688,6 +688,8 @@ xmlTextReaderDoExpand(xmlTextReaderPtr reader) {
do {
if (xmlTextReaderGetSuccessor(reader->node) != NULL)
return(1);
if (reader->ctxt->nodeNr <= reader->depth)
return(1);
if (reader->mode == XML_TEXTREADER_MODE_EOF)
return(1);
val = xmlTextReaderPushData(reader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment