added a dumb rule to able to compile tst.c when people submit a sample

* Makefile.am: added a dumb rule to able to compile tst.c
  when people submit a sample test program
* xmlschemas.c: applied small patch from Eric Haszlakiewicz
  to document xmlSchemasSetValidErrors() limitations, #141827
* error.c: Add information in generic and structured error
  setter functions that this need to be done per thread #144308
* xmlsave.c: fixed bug whith missing NOTATION(s) serialization
  bug #144162
* doc/xmllint.xml: typo fix #144840
Daniel
diff --git a/ChangeLog b/ChangeLog
index 7114b31..f3eef60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sat Aug 14 13:18:57 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+	* Makefile.am: added a dumb rule to able to compile tst.c
+	  when people submit a sample test program
+	* xmlschemas.c: applied small patch from Eric Haszlakiewicz
+	  to document xmlSchemasSetValidErrors() limitations, #141827
+	* error.c: Add information in generic and structured error
+	  setter functions that this need to be done per thread #144308
+	* xmlsave.c: fixed bug whith missing NOTATION(s) serialization
+	  bug #144162
+	* doc/xmllint.xml: typo fix #144840
+
 Tue Aug 10 07:19:31 PDT 2004 Daniel Veillard <daniel@veillard.com>
 
 	* configure.in xmlregexp.c xmlschemas.c xmlschemastypes.c
diff --git a/Makefile.am b/Makefile.am
index 995559e..4c73419 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1000,3 +1000,6 @@
 	-@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
 	-@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
 	-@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
+
+tst: tst.c
+	$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
diff --git a/config.h.in b/config.h.in
index 9646f75..f54d0bf 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,245 +1,284 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if you have the strftime function.  */
-#undef HAVE_STRFTIME
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if you have the _stat function.  */
-#undef HAVE__STAT
-
-/* Define if you have the class function.  */
-#undef HAVE_CLASS
-
-/* Define if you have the finite function.  */
-#undef HAVE_FINITE
-
-/* Define if you have the fp_class function.  */
-#undef HAVE_FP_CLASS
-
-/* Define if you have the fpclass function.  */
-#undef HAVE_FPCLASS
-
-/* Define if you have the fprintf function.  */
-#undef HAVE_FPRINTF
-
-/* Define if you have the ftime function.  */
-#undef HAVE_FTIME
-
-/* Define if you have the gettimeofday function.  */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define if you have the isnand function.  */
-#undef HAVE_ISNAND
-
-/* Define if you have the localtime function.  */
-#undef HAVE_LOCALTIME
-
-/* Define if you have the printf function.  */
-#undef HAVE_PRINTF
-
-/* Define if you have the signal function.  */
-#undef HAVE_SIGNAL
-
-/* Define if you have the snprintf function.  */
-#undef HAVE_SNPRINTF
-
-/* Define if you have the sprintf function.  */
-#undef HAVE_SPRINTF
-
-/* Define if you have the sscanf function.  */
-#undef HAVE_SSCANF
-
-/* Define if you have the stat function.  */
-#undef HAVE_STAT
-
-/* Define if you have the strdup function.  */
-#undef HAVE_STRDUP
-
-/* Define if you have the strerror function.  */
-#undef HAVE_STRERROR
-
-/* Define if you have the strftime function.  */
-#undef HAVE_STRFTIME
-
-/* Define if you have the strndup function.  */
-#undef HAVE_STRNDUP
-
-/* Define if you have the vfprintf function.  */
-#undef HAVE_VFPRINTF
-
-/* Define if you have the vsnprintf function.  */
-#undef HAVE_VSNPRINTF
-
-/* Define if you have the vsprintf function.  */
-#undef HAVE_VSPRINTF
-
-/* Define if you have the <ansidecl.h> header file.  */
-#undef HAVE_ANSIDECL_H
-
-/* Define if you have the <arpa/inet.h> header file.  */
-#undef HAVE_ARPA_INET_H
-
-/* Define if you have the <arpa/nameser.h> header file.  */
-#undef HAVE_ARPA_NAMESER_H
-
-/* Define if you have the <ctype.h> header file.  */
-#undef HAVE_CTYPE_H
-
-/* Define if you have the <dirent.h> header file.  */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <dlfcn.h> header file.  */
-#undef HAVE_DLFCN_H
-
-/* Define if you have the <errno.h> header file.  */
-#undef HAVE_ERRNO_H
-
-/* Define if you have the <fcntl.h> header file.  */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <float.h> header file.  */
-#undef HAVE_FLOAT_H
-
-/* Define if you have the <fp_class.h> header file.  */
-#undef HAVE_FP_CLASS_H
-
-/* Define if you have the <ieeefp.h> header file.  */
-#undef HAVE_IEEEFP_H
-
-/* Define if you have the <limits.h> header file.  */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <malloc.h> header file.  */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <math.h> header file.  */
-#undef HAVE_MATH_H
-
-/* Define if you have the <nan.h> header file.  */
-#undef HAVE_NAN_H
-
-/* Define if you have the <ndir.h> header file.  */
-#undef HAVE_NDIR_H
-
-/* Define if you have the <netdb.h> header file.  */
-#undef HAVE_NETDB_H
-
-/* Define if you have the <netinet/in.h> header file.  */
-#undef HAVE_NETINET_IN_H
-
-/* Define if you have the <resolv.h> header file.  */
-#undef HAVE_RESOLV_H
-
-/* Define if you have the <signal.h> header file.  */
-#undef HAVE_SIGNAL_H
-
-/* Define if you have the <stdarg.h> header file.  */
-#undef HAVE_STDARG_H
-
-/* Define if you have the <stdlib.h> header file.  */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
-
-/* Define if you have the <sys/dir.h> header file.  */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <sys/mman.h> header file.  */
-#undef HAVE_SYS_MMAN_H
-
-/* Define if you have the <sys/ndir.h> header file.  */
-#undef HAVE_SYS_NDIR_H
-
-/* Define if you have the <sys/select.h> header file.  */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/socket.h> header file.  */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define if you have the <sys/stat.h> header file.  */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <sys/timeb.h> header file.  */
-#undef HAVE_SYS_TIMEB_H
-
-/* Define if you have the <sys/types.h> header file.  */
-#undef HAVE_SYS_TYPES_H
-
-/* Define if you have the <time.h> header file.  */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <zlib.h> header file.  */
-#undef HAVE_ZLIB_H
-
-/* Define if you have the inet library (-linet).  */
-#undef HAVE_LIBINET
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
-
-/* Name of package */
+/* config.h.in.  Generated from configure.in by autoheader.  */
 #undef PACKAGE
-
-/* Version number of package */
 #undef VERSION
-
-/* Define if compiler has function prototypes */
-#undef PROTOTYPES
-
-/* Have compression library */
 #undef HAVE_LIBZ
-
-/* Determine what socket length (socklen_t) data type is */
+#undef HAVE_LIBM
+#undef HAVE_ISINF
+#undef HAVE_ISNAN
+#undef HAVE_LIBHISTORY
+#undef HAVE_LIBREADLINE
 #undef SOCKLEN_T
+#undef HAVE_LIBPTHREAD
+#undef HAVE_PTHREAD_H
 
-/* Support for IPv6 */
+/* Define if IPV6 support is there */
 #undef SUPPORT_IP6
 
 /* Define if getaddrinfo is there */
 #undef HAVE_GETADDRINFO
 
-/* Define if isnan is there */
-#undef HAVE_ISNAN
+/* Define to 1 if you have the <ansidecl.h> header file. */
+#undef HAVE_ANSIDECL_H
 
-/* Define if isnan is there */
-#undef HAVE_ISNAN
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
+/* Define to 1 if you have the `class' function. */
+#undef HAVE_CLASS
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define to 1 if you have the `fprintf' function. */
+#undef HAVE_FPRINTF
+
+/* Define to 1 if you have the `fp_class' function. */
+#undef HAVE_FP_CLASS
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+#undef HAVE_FP_CLASS_H
+
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
+/* Define if getaddrinfo is there */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
 
 /* Define if isinf is there */
 #undef HAVE_ISINF
 
-/* Define if isinf is there */
-#undef HAVE_ISINF
+/* Define if isnan is there */
+#undef HAVE_ISNAN
 
-/* Define if pthread library is there (-lpthread) */
-#undef HAVE_LIBPTHREAD
-
-/* Define if <pthread.h> is there */
-#undef HAVE_PTHREAD_H
+/* Define to 1 if you have the `isnand' function. */
+#undef HAVE_ISNAND
 
 /* Define if history library is there (-lhistory) */
 #undef HAVE_LIBHISTORY
 
+/* Define to 1 if you have the `inet' library (-linet). */
+#undef HAVE_LIBINET
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define if pthread library is there (-lpthread) */
+#undef HAVE_LIBPTHREAD
+
 /* Define if readline library is there (-lreadline) */
 #undef HAVE_LIBREADLINE
 
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Have compression library */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `localtime' function. */
+#undef HAVE_LOCALTIME
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `printf' function. */
+#undef HAVE_PRINTF
+
+/* Define if <pthread.h> is there */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `sprintf' function. */
+#undef HAVE_SPRINTF
+
+/* Define to 1 if you have the `sscanf' function. */
+#undef HAVE_SSCANF
+
+/* Define to 1 if you have the `stat' function. */
+#undef HAVE_STAT
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vfprintf' function. */
+#undef HAVE_VFPRINTF
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have the `vsprintf' function. */
+#undef HAVE_VSPRINTF
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if you have the `_stat' function. */
+#undef HAVE__STAT
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if the C compiler supports function prototypes. */
+#undef PROTOTYPES
+
+/* Determine what socket length (socklen_t) data type is */
+#undef SOCKLEN_T
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Support for IPv6 */
+#undef SUPPORT_IP6
+
+/* Version number of package */
+#undef VERSION
+
 /* Using the Win32 Socket implementation */
 #undef _WINSOCKAPI_
 
+/* Define like PROTOTYPES; this can be used by system headers. */
+#undef __PROTOTYPES
+
 /* Win32 Std C name mangling work-around */
 #undef snprintf
 
 /* Win32 Std C name mangling work-around */
 #undef vsnprintf
-
diff --git a/doc/xmllint.xml b/doc/xmllint.xml
index 92db49d..f74cb20 100644
--- a/doc/xmllint.xml
+++ b/doc/xmllint.xml
@@ -457,7 +457,7 @@
       <varlistentry>
 	<term><option>--chkregister</option></term>
 	<listitem>
-	  <simpara>Turn on node registration. Useful for developeres testing
+	  <simpara>Turn on node registration. Useful for developers testing
 	  libxml2 node tracking code.</simpara>
 	</listitem>
       </varlistentry>
diff --git a/error.c b/error.c
index 362851c..8eb6161 100644
--- a/error.c
+++ b/error.c
@@ -102,6 +102,7 @@
  * be passed as first argument to @handler
  * One can simply force messages to be emitted to another FILE * than
  * stderr by setting @ctx to this file handle and @handler to NULL.
+ * For multi-threaded applications, this must be set separately for each thread.
  */
 void
 xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
@@ -122,6 +123,7 @@
  * This simply means that @handler will be called for subsequent
  * error messages while not parsing nor validating. And @ctx will
  * be passed as first argument to @handler
+ * For multi-threaded applications, this must be set separately for each thread.
  */
 void
 xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
diff --git a/xmlsave.c b/xmlsave.c
index 7698991..1e8e0d7 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -523,6 +523,10 @@
 	return;
     }
     xmlOutputBufferWrite(buf, 3, " [\n");
+    /* Dump the notations first they are not in the DTD children list */
+    if (dtd->notations != NULL) {
+        xmlDumpNotationTable(buf->buffer, (xmlNotationTablePtr) dtd->notations);
+    }
     format = ctxt->format;
     level = ctxt->level;
     doc = ctxt->doc;
diff --git a/xmlschemas.c b/xmlschemas.c
index c95caf0..9f4f9bd 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -13100,7 +13100,11 @@
  * @warn: the warning function
  * @ctx: the functions context
  *
- * Set the error and warning callback informations
+ * Set the callback functions for errors and warning found while
+ * validating a document using the provided validation context.
+ * These function will be passed only a basic error string that doesn't
+ * include various useful things, such as line numbers.
+ * For a more useful API, see xmlSetStructuredErrorFunc().
  */
 void
 xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt,