Added xmlRelaxNGSetParserStructuredErrors() to the API.

* relaxng.c include/libxml/relaxng.h: Added
  xmlRelaxNGSetParserStructuredErrors() to the API.
diff --git a/ChangeLog b/ChangeLog
index 5bdce6c..94ce642 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan  9 17:27:15 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+	* relaxng.c include/libxml/relaxng.h: Added
+	  xmlRelaxNGSetParserStructuredErrors() to the API.
+
 Mon Jan  9 15:33:16 CET 2006 Daniel Veillard <daniel@veillard.com>
 
 	* parser.c: reverted first patches for #319279 which led to #326295
diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h
index c75aba2..6acd467 100644
--- a/include/libxml/relaxng.h
+++ b/include/libxml/relaxng.h
@@ -127,6 +127,11 @@
 					 xmlRelaxNGValidityErrorFunc *err,
 					 xmlRelaxNGValidityWarningFunc *warn,
 					 void **ctx);
+XMLPUBFUN void XMLCALL
+		    xmlRelaxNGSetParserStructuredErrors(
+					 xmlRelaxNGParserCtxtPtr ctxt,
+					 xmlStructuredErrorFunc serror,
+					 void *ctx);
 XMLPUBFUN xmlRelaxNGPtr XMLCALL	
 		    xmlRelaxNGParse		(xmlRelaxNGParserCtxtPtr ctxt);
 XMLPUBFUN void XMLCALL		
diff --git a/relaxng.c b/relaxng.c
index 7e92057..be962eb 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -7510,6 +7510,20 @@
     return (0);
 }
 
+void
+xmlRelaxNGSetParserStructuredErrors(
+				    xmlRelaxNGParserCtxtPtr ctxt,
+				    xmlStructuredErrorFunc serror,
+				    void *ctx)
+{
+    if (ctxt == NULL)
+        return;
+    ctxt->serror = serror;
+    ctxt->error = NULL;
+    ctxt->warning = NULL;
+    ctxt->userData = ctx;
+}
+
 #ifdef LIBXML_OUTPUT_ENABLED
 
 /************************************************************************