fixed the data callback on transition functionality which was broken when

* xmlregexp.c: fixed the data callback on transition functionality
  which was broken when using the compact form
* result/schemas/*: updated the results, less verbose, all tests
  pass like before
* DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c
  testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c
  xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of
  annoying warnings
* xpath.c: try to provide better error report when possible
Daniel
diff --git a/ChangeLog b/ChangeLog
index c566e62..437fbc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Tue Sep 24 16:08:17 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+	* xmlregexp.c: fixed the data callback on transition functionality
+	  which was broken when using the compact form
+	* result/schemas/*: updated the results, less verbose, all tests
+	  pass like before
+	* DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c
+	  testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c
+	  xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of
+	  annoying warnings
+	* xpath.c: try to provide better error report when possible
+
 Sat Sep 21 14:56:37 CEST 2002 Daniel Veillard <daniel@veillard.com>
 
 	* Makefile.am: fixed a breakage raised by Jacob
diff --git a/DOCBparser.c b/DOCBparser.c
index ddb08a2..33f5255 100644
--- a/DOCBparser.c
+++ b/DOCBparser.c
@@ -6025,7 +6025,8 @@
     }
     memset(inputStream, 0, sizeof(docbParserInput));
 
-    inputStream->filename = xmlNormalizeWindowsPath(filename);
+    inputStream->filename = (char *)
+	xmlNormalizeWindowsPath((const xmlChar *)filename);
     inputStream->line = 1;
     inputStream->col = 1;
     inputStream->buf = buf;
diff --git a/python/libxml.c b/python/libxml.c
index fd76ea8..2cc543a 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -156,7 +156,7 @@
 #endif
     file = (PyObject *) context;
     if (file == NULL) return(-1);
-    ret = PyEval_CallMethod(file, "close", "()");
+    ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
     if (ret != NULL) {
 	Py_DECREF(ret);
     }
@@ -186,7 +186,7 @@
 #endif
     file = (PyObject *) context;
     if (file == NULL) return(-1);
-    ret = PyEval_CallMethod(file, "read", "(i)", len);
+    ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
     if (ret == NULL) {
 	printf("xmlPythonFileReadRaw: result is NULL\n");
 	return(-1);
@@ -227,7 +227,7 @@
 #endif
     file = (PyObject *) context;
     if (file == NULL) return(-1);
-    ret = PyEval_CallMethod(file, "io_read", "(i)", len);
+    ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len);
     if (ret == NULL) {
 	printf("xmlPythonFileRead: result is NULL\n");
 	return(-1);
@@ -270,7 +270,7 @@
     if (file == NULL) return(-1);
     string = PyString_FromStringAndSize(buffer, len);
     if (string == NULL) return(-1);
-    ret = PyEval_CallMethod(file, "io_write", "(O)", string);
+    ret = PyEval_CallMethod(file, (char *) "io_write", (char *) "(O)", string);
     Py_DECREF(string);
     if (ret == NULL) {
 	printf("xmlPythonFileWrite: result is NULL\n");
@@ -303,7 +303,7 @@
 #endif
     file = (PyObject *) context;
     if (file == NULL) return(-1);
-    ret = PyEval_CallMethod(file, "io_close", "()");
+    ret = PyEval_CallMethod(file, (char *) "io_close", (char *) "()");
     if (ret != NULL) {
 	Py_DECREF(ret);
     }
@@ -320,7 +320,7 @@
  *
  * Returns the new parser output or NULL
  */
-xmlOutputBufferPtr
+static xmlOutputBufferPtr
 xmlOutputBufferCreatePythonFile(PyObject *file, 
 	                        xmlCharEncodingHandlerPtr encoder) {
     xmlOutputBufferPtr ret;
@@ -351,7 +351,7 @@
 		&file, &encoding))
 	return(NULL);
     if ((encoding != NULL) && (encoding[0] != 0)) {
-	handler = xmlFindCharEncodingHandler(encoding);
+	handler = xmlFindCharEncodingHandler((const char *) encoding);
     }
     buffer = xmlOutputBufferCreatePythonFile(file, handler);
     if (buffer == NULL)
@@ -371,7 +371,7 @@
  *
  * Returns the new parser output or NULL
  */
-xmlParserInputBufferPtr
+static xmlParserInputBufferPtr
 xmlParserInputBufferCreatePythonFile(PyObject *file, 
 	                        xmlCharEncoding encoding) {
     xmlParserInputBufferPtr ret;
@@ -402,7 +402,7 @@
 		&file, &encoding))
 	return(NULL);
     if ((encoding != NULL) && (encoding[0] != 0)) {
-	enc = xmlParseCharEncoding(encoding);
+	enc = xmlParseCharEncoding((const char *) encoding);
     }
     buffer = xmlParserInputBufferCreatePythonFile(file, enc);
     if (buffer == NULL)
@@ -434,7 +434,7 @@
 #endif
 
 	ret = PyObject_CallFunction(pythonExternalEntityLoaderObjext,
-		      "(ssO)", URL, ID, ctxtobj);
+		      (char *) "(ssO)", URL, ID, ctxtobj);
 #ifdef DEBUG_LOADER
 	printf("pythonExternalEntityLoader: result ");
 	PyObject_Print(ret, stdout, 0);
@@ -442,7 +442,7 @@
 #endif
 
 	if (ret != NULL) {
-	    if (PyObject_HasAttrString(ret, "read")) {
+	    if (PyObject_HasAttrString(ret, (char *) "read")) {
 		xmlParserInputBufferPtr buf;
 
 		buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
diff --git a/python/libxml2class.txt b/python/libxml2class.txt
index 0aaa7fb..f528fa3 100644
--- a/python/libxml2class.txt
+++ b/python/libxml2class.txt
@@ -351,38 +351,38 @@
 
     # functions from module xpath
     xpathNewContext()
+Class xpathContext()
+    # accessors
+    contextDoc()
+    contextNode()
+    contextPosition()
+    contextSize()
+    function()
+    functionURI()
+    setContextDoc()
+    setContextNode()
+
+    # functions from module python
+    registerXPathFunction()
+
+    # functions from module xpath
+    xpathEval()
+    xpathEvalExpression()
+    xpathFreeContext()
+
+    # functions from module xpathInternals
+    xpathNewParserContext()
+    xpathNsLookup()
+    xpathRegisterAllFunctions()
+    xpathRegisterNs()
+    xpathRegisteredFuncsCleanup()
+    xpathRegisteredNsCleanup()
+    xpathRegisteredVariablesCleanup()
+    xpathVariableLookup()
+    xpathVariableLookupNS()
 
 
 Class xmlAttribute(xmlNode)
-
-
-Class xmlNs(xmlNode)
-
-    # functions from module tree
-    copyNamespace()
-    copyNamespaceList()
-    freeNs()
-    freeNsList()
-    newNodeEatName()
-
-    # functions from module xpathInternals
-    xpathNodeSetFreeNs()
-
-
-Class xmlDtd(xmlNode)
-
-    # functions from module debugXML
-    debugDumpDTD()
-
-    # functions from module tree
-    copyDtd()
-    freeDtd()
-
-    # functions from module valid
-    dtdAttrDesc()
-    dtdElementDesc()
-    dtdQAttrDesc()
-    dtdQElementDesc()
 Class catalog()
 
     # functions from module catalog
@@ -396,6 +396,27 @@
     resolvePublic()
     resolveSystem()
     resolveURI()
+
+
+Class xmlElement(xmlNode)
+
+
+Class xmlAttr(xmlNode)
+
+    # functions from module debugXML
+    debugDumpAttr()
+    debugDumpAttrList()
+
+    # functions from module tree
+    freeProp()
+    freePropList()
+    removeProp()
+
+
+Class xmlEntity(xmlNode)
+
+    # functions from module parserInternals
+    handleEntity()
 Class xpathParserContext()
     # accessors
     context()
@@ -519,6 +540,44 @@
     stringDecodeEntities()
 
 
+Class xmlDtd(xmlNode)
+
+    # functions from module debugXML
+    debugDumpDTD()
+
+    # functions from module tree
+    copyDtd()
+    freeDtd()
+
+    # functions from module valid
+    dtdAttrDesc()
+    dtdElementDesc()
+    dtdQAttrDesc()
+    dtdQElementDesc()
+
+
+Class xmlNs(xmlNode)
+
+    # functions from module tree
+    copyNamespace()
+    copyNamespaceList()
+    freeNs()
+    freeNsList()
+    newNodeEatName()
+
+    # functions from module xpathInternals
+    xpathNodeSetFreeNs()
+
+
+Class inputBuffer(ioReadWrapper)
+
+    # functions from module xmlIO
+    freeParserInputBuffer()
+    grow()
+    push()
+    read()
+
+
 Class outputBuffer(ioWriteWrapper)
 
     # functions from module xmlIO
@@ -526,27 +585,6 @@
     flush()
     write()
     writeString()
-
-
-Class xmlElement(xmlNode)
-
-
-Class xmlEntity(xmlNode)
-
-    # functions from module parserInternals
-    handleEntity()
-
-
-Class xmlAttr(xmlNode)
-
-    # functions from module debugXML
-    debugDumpAttr()
-    debugDumpAttrList()
-
-    # functions from module tree
-    freeProp()
-    freePropList()
-    removeProp()
 Class URI()
     # accessors
     authority()
@@ -573,41 +611,3 @@
     parseURIReference()
     printURI()
     saveUri()
-Class xpathContext()
-    # accessors
-    contextDoc()
-    contextNode()
-    contextPosition()
-    contextSize()
-    function()
-    functionURI()
-    setContextDoc()
-    setContextNode()
-
-    # functions from module python
-    registerXPathFunction()
-
-    # functions from module xpath
-    xpathEval()
-    xpathEvalExpression()
-    xpathFreeContext()
-
-    # functions from module xpathInternals
-    xpathNewParserContext()
-    xpathNsLookup()
-    xpathRegisterAllFunctions()
-    xpathRegisterNs()
-    xpathRegisteredFuncsCleanup()
-    xpathRegisteredNsCleanup()
-    xpathRegisteredVariablesCleanup()
-    xpathVariableLookup()
-    xpathVariableLookupNS()
-
-
-Class inputBuffer(ioReadWrapper)
-
-    # functions from module xmlIO
-    freeParserInputBuffer()
-    grow()
-    push()
-    read()
diff --git a/result/schemas/all_0_0.err b/result/schemas/all_0_0.err
index 2ab1885..7b8499c 100644
--- a/result/schemas/all_0_0.err
+++ b/result/schemas/all_0_0.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: c, c, c
diff --git a/result/schemas/all_0_1.err b/result/schemas/all_0_1.err
index 6a0b941..08f22ae 100644
--- a/result/schemas/all_0_1.err
+++ b/result/schemas/all_0_1.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: c, c, c
 xmlSchemaValidateCallback: a, a, a
diff --git a/result/schemas/all_0_2.err b/result/schemas/all_0_2.err
index 12fb41a..8e71efe 100644
--- a/result/schemas/all_0_2.err
+++ b/result/schemas/all_0_2.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: c, c, c
diff --git a/result/schemas/all_0_3.err b/result/schemas/all_0_3.err
index d89fba3..e741304 100644
--- a/result/schemas/all_0_3.err
+++ b/result/schemas/all_0_3.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 Element doc content check failed
diff --git a/result/schemas/all_0_4.err b/result/schemas/all_0_4.err
index 32c13be..fd3ece1 100644
--- a/result/schemas/all_0_4.err
+++ b/result/schemas/all_0_4.err
@@ -2,21 +2,4 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 Element doc content check failed
diff --git a/result/schemas/all_0_5.err b/result/schemas/all_0_5.err
index d89fba3..e741304 100644
--- a/result/schemas/all_0_5.err
+++ b/result/schemas/all_0_5.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_0.xsd:4 :elements
 Type of all2 : ./test/schemas/all_0.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: all transition, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 Element doc content check failed
diff --git a/result/schemas/all_1_0.err b/result/schemas/all_1_0.err
index 08abd1e..86b8717 100644
--- a/result/schemas/all_1_0.err
+++ b/result/schemas/all_1_0.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: c, c, c
diff --git a/result/schemas/all_1_1.err b/result/schemas/all_1_1.err
index c27bfeb..027f9bd 100644
--- a/result/schemas/all_1_1.err
+++ b/result/schemas/all_1_1.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: c, c, c
 xmlSchemaValidateCallback: a, a, a
diff --git a/result/schemas/all_1_2.err b/result/schemas/all_1_2.err
index c0aacff..de38e8e 100644
--- a/result/schemas/all_1_2.err
+++ b/result/schemas/all_1_2.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: c, c, c
diff --git a/result/schemas/all_1_3.err b/result/schemas/all_1_3.err
index 9efeb99..d87926e 100644
--- a/result/schemas/all_1_3.err
+++ b/result/schemas/all_1_3.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 Element doc content check succeeded
diff --git a/result/schemas/all_1_4.err b/result/schemas/all_1_4.err
index ab7b3de..05d3b94 100644
--- a/result/schemas/all_1_4.err
+++ b/result/schemas/all_1_4.err
@@ -2,21 +2,4 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 Element doc content check succeeded
diff --git a/result/schemas/all_1_5.err b/result/schemas/all_1_5.err
index 6c950fc..24c9a24 100644
--- a/result/schemas/all_1_5.err
+++ b/result/schemas/all_1_5.err
@@ -2,23 +2,6 @@
 Type of anontype1 : ./test/schemas/all_1.xsd:4 :elements
 Type of all2 : ./test/schemas/all_1.xsd:5 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-3 atoms:
- 00  atom: string onceonly 'a' 
- 01  atom: string onceonly 'b' 
- 02  atom: string onceonly 'c' 
-2 states:
- state: 0, 4 transitions:
-  trans: counted 0, atom 0, to 0
-  trans: counted 1, atom 1, to 0
-  trans: counted 2, atom 2, to 0
-  trans: count based 1193047, epsilon to 1
- state: FINAL 1, 0 transitions:
-3 counters:
- 0: min 1 max 1
- 1: min 1 max 1
- 2: min 1 max 1
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 Element doc content check failed
diff --git a/result/schemas/choice_0_0.err b/result/schemas/choice_0_0.err
index 8523ba7..f7f6064 100644
--- a/result/schemas/choice_0_0.err
+++ b/result/schemas/choice_0_0.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check succeeded
diff --git a/result/schemas/choice_0_1.err b/result/schemas/choice_0_1.err
index 0ee55be..d926e25 100644
--- a/result/schemas/choice_0_1.err
+++ b/result/schemas/choice_0_1.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: b, b, b
 Element doc content check succeeded
diff --git a/result/schemas/choice_0_2.err b/result/schemas/choice_0_2.err
index d6adfd7..6cc2fdc 100644
--- a/result/schemas/choice_0_2.err
+++ b/result/schemas/choice_0_2.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_0_3.err b/result/schemas/choice_0_3.err
index d6adfd7..6cc2fdc 100644
--- a/result/schemas/choice_0_3.err
+++ b/result/schemas/choice_0_3.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_0_4.err b/result/schemas/choice_0_4.err
index 03ad8b0..60d615d 100644
--- a/result/schemas/choice_0_4.err
+++ b/result/schemas/choice_0_4.err
@@ -3,19 +3,4 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 Element doc content check failed
diff --git a/result/schemas/choice_0_5.err b/result/schemas/choice_0_5.err
index d6adfd7..6cc2fdc 100644
--- a/result/schemas/choice_0_5.err
+++ b/result/schemas/choice_0_5.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_0_6.err b/result/schemas/choice_0_6.err
index d6adfd7..6cc2fdc 100644
--- a/result/schemas/choice_0_6.err
+++ b/result/schemas/choice_0_6.err
@@ -3,20 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_0.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_0.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_1_0.err b/result/schemas/choice_1_0.err
index 4fa615d..05ea214 100644
--- a/result/schemas/choice_1_0.err
+++ b/result/schemas/choice_1_0.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check succeeded
diff --git a/result/schemas/choice_1_1.err b/result/schemas/choice_1_1.err
index 1308b57..cedd203 100644
--- a/result/schemas/choice_1_1.err
+++ b/result/schemas/choice_1_1.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: b, b, b
 Element doc content check succeeded
diff --git a/result/schemas/choice_1_2.err b/result/schemas/choice_1_2.err
index ffaba04..aece906 100644
--- a/result/schemas/choice_1_2.err
+++ b/result/schemas/choice_1_2.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_1_3.err b/result/schemas/choice_1_3.err
index ffaba04..aece906 100644
--- a/result/schemas/choice_1_3.err
+++ b/result/schemas/choice_1_3.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_1_4.err b/result/schemas/choice_1_4.err
index a35d8df..cd53b46 100644
--- a/result/schemas/choice_1_4.err
+++ b/result/schemas/choice_1_4.err
@@ -3,20 +3,4 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 Element doc content check succeeded
diff --git a/result/schemas/choice_1_5.err b/result/schemas/choice_1_5.err
index ffaba04..aece906 100644
--- a/result/schemas/choice_1_5.err
+++ b/result/schemas/choice_1_5.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_1_6.err b/result/schemas/choice_1_6.err
index ffaba04..aece906 100644
--- a/result/schemas/choice_1_6.err
+++ b/result/schemas/choice_1_6.err
@@ -3,21 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_1.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_1.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-4 states:
- state: FINAL 0, 3 transitions:
-  trans: atom 0, to 2
-  trans: atom 1, to 3
-  trans: removed
- state: FINAL 1, 0 transitions:
- state: FINAL 2, 1 transitions:
-  trans: removed
- state: FINAL 3, 1 transitions:
-  trans: removed
-0 counters:
 xmlSchemaValidateCallback: a, a, a
 Element doc content check failed
diff --git a/result/schemas/choice_2_0.err b/result/schemas/choice_2_0.err
index 5b3ad9c..9fde3d7 100644
--- a/result/schemas/choice_2_0.err
+++ b/result/schemas/choice_2_0.err
@@ -3,36 +3,5 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: a, a, a
 Element doc content check succeeded
diff --git a/result/schemas/choice_2_1.err b/result/schemas/choice_2_1.err
index 9580fe6..151657f 100644
--- a/result/schemas/choice_2_1.err
+++ b/result/schemas/choice_2_1.err
@@ -3,37 +3,6 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: b, b, b
 Element doc content check succeeded
 (nil) : Freed()
diff --git a/result/schemas/choice_2_2.err b/result/schemas/choice_2_2.err
index 0926747..68ef78e 100644
--- a/result/schemas/choice_2_2.err
+++ b/result/schemas/choice_2_2.err
@@ -3,37 +3,6 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 Element doc content check succeeded
diff --git a/result/schemas/choice_2_3.err b/result/schemas/choice_2_3.err
index 3bb98fe..768ed22 100644
--- a/result/schemas/choice_2_3.err
+++ b/result/schemas/choice_2_3.err
@@ -3,37 +3,6 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: a, a, a
 Element doc content check succeeded
diff --git a/result/schemas/choice_2_4.err b/result/schemas/choice_2_4.err
index 7a0d189..d030d72 100644
--- a/result/schemas/choice_2_4.err
+++ b/result/schemas/choice_2_4.err
@@ -3,35 +3,4 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 Element doc content check failed
diff --git a/result/schemas/choice_2_5.err b/result/schemas/choice_2_5.err
index c47f842..746cfa6 100644
--- a/result/schemas/choice_2_5.err
+++ b/result/schemas/choice_2_5.err
@@ -3,37 +3,6 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: a, a, a
diff --git a/result/schemas/choice_2_6.err b/result/schemas/choice_2_6.err
index ed38bb6..5ae0ac7 100644
--- a/result/schemas/choice_2_6.err
+++ b/result/schemas/choice_2_6.err
@@ -3,37 +3,6 @@
 Type of sequence 2 : ./test/schemas/choice_2.xsd:5 :elements
 Type of choice 3 : ./test/schemas/choice_2.xsd:6 :elements
 Building content model for doc
-Content model of doc:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'a' 
- 01  atom: string once 'b' 
-5 states:
- state: 0, 2 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
- state: FINAL 1, 0 transitions:
- state: 2, 4 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 3, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
- state: 4, 6 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-1 counters:
- 0: min 0 max 2
 xmlSchemaValidateCallback: a, a, a
 xmlSchemaValidateCallback: b, b, b
 xmlSchemaValidateCallback: a, a, a
diff --git a/result/schemas/date_0_0.err b/result/schemas/date_0_0.err
index 90e6688..6a9efe5 100644
--- a/result/schemas/date_0_0.err
+++ b/result/schemas/date_0_0.err
@@ -25,377 +25,6 @@
 Type of restriction 17 : ./test/schemas/date_0.xsd:64 :empty
 Type of restriction 24 : ./test/schemas/date_0.xsd:102 :empty
 Building content model for date
-Content model of date:
- regexp: '(null)' 
-12 atoms:
- 00  atom: string once 'time' 
- 01  atom: string once 'time1' 
- 02  atom: string once 'time2' 
- 03  atom: string once 'date1' 
- 04  atom: string once 'date2' 
- 05  atom: string once 'dt1' 
- 06  atom: string once 'dt2' 
- 07  atom: string once 'hol' 
- 08  atom: string once 'year1' 
- 09  atom: string once 'yearmon1' 
- 10  atom: string once 'mon1' 
- 11  atom: string once 'day1' 
-15 states:
- state: 0, 12 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
-  trans: atom 2, to 5
-  trans: atom 3, to 6
-  trans: atom 4, to 7
-  trans: atom 5, to 8
-  trans: atom 6, to 9
-  trans: atom 7, to 10
-  trans: atom 8, to 11
-  trans: atom 9, to 12
-  trans: atom 10, to 13
-  trans: atom 11, to 14
- state: FINAL 1, 0 transitions:
- state: 2, 14 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 3, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 4, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 5, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 6, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 7, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 8, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 9, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 10, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 11, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 12, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 13, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
- state: 14, 26 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: counted 0, atom 7, to 10
-  trans: counted 0, atom 8, to 11
-  trans: counted 0, atom 9, to 12
-  trans: counted 0, atom 10, to 13
-  trans: counted 0, atom 11, to 14
-1 counters:
- 0: min 0 max 1073741823
 xmlSchemaValidateCallback: time, time, time
 xmlSchemaValidateCallback: time1, time1, time1
 xmlSchemaValidateCallback: time2, time2, time2
diff --git a/result/schemas/dur_0_0.err b/result/schemas/dur_0_0.err
index 168f3b1..1aa3a82 100644
--- a/result/schemas/dur_0_0.err
+++ b/result/schemas/dur_0_0.err
@@ -31,157 +31,6 @@
 Type of sequence 2 : ./test/schemas/dur_0.xsd:10 :elements
 Type of choice 3 : ./test/schemas/dur_0.xsd:11 :elements
 Building content model for duration
-Content model of duration:
- regexp: '(null)' 
-7 atoms:
- 00  atom: string once 'second1' 
- 01  atom: string once 'second2' 
- 02  atom: string once 'month1' 
- 03  atom: string once 'month2' 
- 04  atom: string once 'month3' 
- 05  atom: string once 'year1' 
- 06  atom: string once 'year2' 
-10 states:
- state: 0, 7 transitions:
-  trans: atom 0, to 3
-  trans: atom 1, to 4
-  trans: atom 2, to 5
-  trans: atom 3, to 6
-  trans: atom 4, to 7
-  trans: atom 5, to 8
-  trans: atom 6, to 9
- state: FINAL 1, 0 transitions:
- state: 2, 9 transitions:
-  trans: removed
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 3, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 4, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 5, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 6, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 7, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 8, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
- state: 9, 16 transitions:
-  trans: removed
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-  trans: count based 0, epsilon to 1
-  trans: counted 0, atom 0, to 3
-  trans: counted 0, atom 1, to 4
-  trans: counted 0, atom 2, to 5
-  trans: counted 0, atom 3, to 6
-  trans: counted 0, atom 4, to 7
-  trans: counted 0, atom 5, to 8
-  trans: counted 0, atom 6, to 9
-1 counters:
- 0: min 0 max 1073741823
 xmlSchemaValidateCallback: second1, second1, second1
 xmlSchemaValidateCallback: second2, second2, second2
 xmlSchemaValidateCallback: second2, second2, second2
diff --git a/result/schemas/empty_0_0.err b/result/schemas/empty_0_0.err
index 237ab4c..734d0f3 100644
--- a/result/schemas/empty_0_0.err
+++ b/result/schemas/empty_0_0.err
@@ -4,10 +4,4 @@
 Type of complexContent 2 : ./test/schemas/empty_0.xsd:5 :empty
 Type of restriction 3 : ./test/schemas/empty_0.xsd:6 :empty
 Building content model for internationalPrice
-Content model of internationalPrice:
- regexp: '(null)' 
-0 atoms:
-1 states:
- state: FINAL 0, 0 transitions:
-0 counters:
 Element internationalPrice content check succeeded
diff --git a/result/schemas/empty_1_0.err b/result/schemas/empty_1_0.err
index c6cd598..4d5f744 100644
--- a/result/schemas/empty_1_0.err
+++ b/result/schemas/empty_1_0.err
@@ -1,9 +1,3 @@
 Type of anontype1 : ./test/schemas/empty_1.xsd:4 :empty
 Building content model for internationalPrice
-Content model of internationalPrice:
- regexp: '(null)' 
-0 atoms:
-1 states:
- state: FINAL 0, 0 transitions:
-0 counters:
 Element internationalPrice content check succeeded
diff --git a/result/schemas/extension0_0_0.err b/result/schemas/extension0_0_0.err
index 2888b09..aa9fb99 100644
--- a/result/schemas/extension0_0_0.err
+++ b/result/schemas/extension0_0_0.err
@@ -10,33 +10,6 @@
 Type of sequence 4 : ./test/schemas/extension0_0.xsd:13 :elements
 Type of sequence 1 : ./test/schemas/extension0_0.xsd:4 :elements
 Building content model for addressee
-Content model of addressee:
- regexp: '(null)' 
-4 atoms:
- 00  atom: string once 'title' 
- 01  atom: string once 'forename' 
- 02  atom: string once 'surname' 
- 03  atom: string once 'generation' 
-5 states:
- state: 0, 4 transitions:
-  trans: atom 0, to 1
-  trans: removed
-  trans: atom 1, to 2
-  trans: atom 2, to 3
- state: 1, 3 transitions:
-  trans: atom 1, to 2
-  trans: removed
-  trans: atom 2, to 3
- state: 2, 4 transitions:
-  trans: removed
-  trans: atom 2, to 3
-  trans: atom 1, to 2
-  trans: atom 2, to 3
- state: FINAL 3, 2 transitions:
-  trans: atom 3, to 4
-  trans: removed
- state: FINAL 4, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: forename, forename, forename
 xmlSchemaValidateCallback: forename, forename, forename
 xmlSchemaValidateCallback: surname, surname, surname
diff --git a/result/schemas/item_0_0.err b/result/schemas/item_0_0.err
index 37b42eb..78b3282 100644
--- a/result/schemas/item_0_0.err
+++ b/result/schemas/item_0_0.err
@@ -8,30 +8,6 @@
 Type of restriction 1 : ./test/schemas/item_0.xsd:6 :empty
 Type of SKU : ./test/schemas/item_0.xsd:5 :simple
 Building content model for Item
-Content model of Item:
- regexp: '(null)' 
-5 atoms:
- 00  atom: string once 'productName' 
- 01  atom: string once 'quantity' 
- 02  atom: string once 'USPrice' 
- 03  atom: string once 'comment' 
- 04  atom: string once 'shipDate' 
-6 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 1 transitions:
-  trans: atom 2, to 3
- state: FINAL 3, 3 transitions:
-  trans: atom 3, to 4
-  trans: removed
-  trans: atom 4, to 5
- state: FINAL 4, 2 transitions:
-  trans: atom 4, to 5
-  trans: removed
- state: FINAL 5, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: productName, productName, productName
 xmlSchemaValidateCallback: quantity, quantity, quantity
 xmlSchemaValidateCallback: USPrice, USPrice, USPrice
diff --git a/result/schemas/item_1_0.err b/result/schemas/item_1_0.err
index 125cd70..19643a6 100644
--- a/result/schemas/item_1_0.err
+++ b/result/schemas/item_1_0.err
@@ -8,30 +8,6 @@
 Type of restriction 1 : ./test/schemas/item_1.xsd:6 :empty
 Type of SKU : ./test/schemas/item_1.xsd:5 :simple
 Building content model for Item
-Content model of Item:
- regexp: '(null)' 
-5 atoms:
- 00  atom: string once 'productName' 
- 01  atom: string once 'quantity' 
- 02  atom: string once 'USPrice' 
- 03  atom: string once 'comment' 
- 04  atom: string once 'shipDate' 
-6 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 1 transitions:
-  trans: atom 2, to 3
- state: FINAL 3, 3 transitions:
-  trans: atom 3, to 4
-  trans: removed
-  trans: atom 4, to 5
- state: FINAL 4, 2 transitions:
-  trans: atom 4, to 5
-  trans: removed
- state: FINAL 5, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: productName, productName, productName
 xmlSchemaValidateCallback: quantity, quantity, quantity
 xmlSchemaValidateCallback: USPrice, USPrice, USPrice
diff --git a/result/schemas/length2_0_0.err b/result/schemas/length2_0_0.err
index d1235d6..dd19dab 100644
--- a/result/schemas/length2_0_0.err
+++ b/result/schemas/length2_0_0.err
@@ -7,18 +7,6 @@
 Type of length2 : ./test/schemas/length2_0.xsd:3 :elements
 Type of restriction 2 : ./test/schemas/length2_0.xsd:5 :elements
 Building content model for depth
-Content model of depth:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'size' 
- 01  atom: string once 'unit' 
-3 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: FINAL 2, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: size, size, size
 xmlSchemaValidateCallback: unit, unit, unit
 Element depth content check succeeded
diff --git a/result/schemas/length3_0_0.err b/result/schemas/length3_0_0.err
index 32f7f6b..6e08d37 100644
--- a/result/schemas/length3_0_0.err
+++ b/result/schemas/length3_0_0.err
@@ -3,18 +3,6 @@
 Type of length3 : ./test/schemas/length3_0.xsd:3 :elements
 Type of sequence 1 : ./test/schemas/length3_0.xsd:4 :elements
 Building content model for depth
-Content model of depth:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'size' 
- 01  atom: string once 'unit' 
-3 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: FINAL 2, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: size, size, size
 xmlSchemaValidateCallback: unit, unit, unit
 Element depth content check succeeded
diff --git a/result/schemas/po0_0_0.err b/result/schemas/po0_0_0.err
index 118781f..6b25ef3 100644
--- a/result/schemas/po0_0_0.err
+++ b/result/schemas/po0_0_0.err
@@ -15,108 +15,10 @@
 Type of sequence 1 : ./test/schemas/po0_0.xsd:12 :elements
 Type of SKU : ./test/schemas/po0_0.xsd:53 :simple
 Building content model for purchaseOrder
-Content model of purchaseOrder:
- regexp: '(null)' 
-4 atoms:
- 00  atom: string once 'shipTo' 
- 01  atom: string once 'billTo' 
- 02  atom: string once 'comment' 
- 03  atom: string once 'items' 
-5 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 3 transitions:
-  trans: atom 2, to 3
-  trans: removed
-  trans: atom 3, to 4
- state: 3, 1 transitions:
-  trans: atom 3, to 4
- state: FINAL 4, 0 transitions:
-0 counters:
 Building content model for items
-Content model of items:
- regexp: '(null)' 
-1 atoms:
- 00  atom: string once 'item' 
-2 states:
- state: FINAL 0, 2 transitions:
-  trans: atom 0, to 1
-  trans: removed
- state: FINAL 1, 2 transitions:
-  trans: removed
-  trans: atom 0, to 1
-0 counters:
 Building content model for item
-Content model of item:
- regexp: '(null)' 
-5 atoms:
- 00  atom: string once 'productName' 
- 01  atom: string once 'quantity' 
- 02  atom: string once 'USPrice' 
- 03  atom: string once 'comment' 
- 04  atom: string once 'shipDate' 
-6 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 1 transitions:
-  trans: atom 2, to 3
- state: FINAL 3, 3 transitions:
-  trans: atom 3, to 4
-  trans: removed
-  trans: atom 4, to 5
- state: FINAL 4, 2 transitions:
-  trans: atom 4, to 5
-  trans: removed
- state: FINAL 5, 0 transitions:
-0 counters:
 Building content model for shipTo
-Content model of shipTo:
- regexp: '(null)' 
-5 atoms:
- 00  atom: string once 'name' 
- 01  atom: string once 'street' 
- 02  atom: string once 'city' 
- 03  atom: string once 'state' 
- 04  atom: string once 'zip' 
-6 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 1 transitions:
-  trans: atom 2, to 3
- state: 3, 1 transitions:
-  trans: atom 3, to 4
- state: 4, 1 transitions:
-  trans: atom 4, to 5
- state: FINAL 5, 0 transitions:
-0 counters:
 Building content model for billTo
-Content model of billTo:
- regexp: '(null)' 
-5 atoms:
- 00  atom: string once 'name' 
- 01  atom: string once 'street' 
- 02  atom: string once 'city' 
- 03  atom: string once 'state' 
- 04  atom: string once 'zip' 
-6 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: 2, 1 transitions:
-  trans: atom 2, to 3
- state: 3, 1 transitions:
-  trans: atom 3, to 4
- state: 4, 1 transitions:
-  trans: atom 4, to 5
- state: FINAL 5, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: shipTo, shipTo, shipTo
 xmlSchemaValidateCallback: name, name, name
 xmlSchemaValidateCallback: street, street, street
diff --git a/result/schemas/restriction0_0_0.err b/result/schemas/restriction0_0_0.err
index e269b0d..64c79a2 100644
--- a/result/schemas/restriction0_0_0.err
+++ b/result/schemas/restriction0_0_0.err
@@ -9,18 +9,6 @@
 Type of complexContent 2 : ./test/schemas/restriction0_0.xsd:11 :elements
 Type of simpleName : ./test/schemas/restriction0_0.xsd:10 :elements
 Building content model for who
-Content model of who:
- regexp: '(null)' 
-2 atoms:
- 00  atom: string once 'forename' 
- 01  atom: string once 'surname' 
-3 states:
- state: 0, 1 transitions:
-  trans: atom 0, to 1
- state: 1, 1 transitions:
-  trans: atom 1, to 2
- state: FINAL 2, 0 transitions:
-0 counters:
 xmlSchemaValidateCallback: forename, forename, forename
 xmlSchemaValidateCallback: surname, surname, surname
 Element who content check succeeded
diff --git a/testAutomata.c b/testAutomata.c
index 77e29e5..747d13e 100644
--- a/testAutomata.c
+++ b/testAutomata.c
@@ -36,7 +36,7 @@
     xmlAutomataPtr am;
     xmlAutomataStatePtr states[1000];
     xmlRegexpPtr regexp = NULL;
-    xmlRegExecCtxtPtr exec;
+    xmlRegExecCtxtPtr exec = NULL;
 
     for (i = 0;i<1000;i++)
 	states[i] = NULL;
diff --git a/testC14N.c b/testC14N.c
index 14236fa..099707d 100644
--- a/testC14N.c
+++ b/testC14N.c
@@ -189,7 +189,7 @@
 	return(NULL);
     }
 
-    len = strlen(str);
+    len = xmlStrlen(str);
     if((str[0] == '\'') && (str[len - 1] == '\'')) {
 	str[len - 1] = '\0';
 	str++;
diff --git a/testSchemas.c b/testSchemas.c
index a22c429..b25a139 100644
--- a/testSchemas.c
+++ b/testSchemas.c
@@ -36,6 +36,7 @@
 #include <libxml/xmlmemory.h>
 #include <libxml/debugXML.h>
 #include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
 
 #ifdef LIBXML_DEBUG_ENABLED
 static int debug = 0;
diff --git a/testThreads.c b/testThreads.c
index c88b563..375a977 100644
--- a/testThreads.c
+++ b/testThreads.c
@@ -126,7 +126,7 @@
 
 #else /* !LIBXML_THREADS_ENABLED */
 int
-main()
+main(void)
 {
     fprintf(stderr, "libxml was not compiled with thread or catalog support\n");
     return (0);
diff --git a/testXPath.c b/testXPath.c
index ee0ebae..98f482d 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -71,14 +71,6 @@
    <title>Chapter 3</title>\n\
    <p>this is chapter 3 ...</p>\n\
   </chapter>\n\
-  <chapter>\n\
-   <title>Chapter 4</title>\n\
-   <p>this is chapter 4 ...</p>\n\
-  </chapter>\n\
-  <chapter>\n\
-   <title>Chapter 5</title>\n\
-   <p>this is chapter 5 ...</p>\n\
-  </chapter>\n\
 </EXAMPLE>\n\
 ";
 
diff --git a/valid.c b/valid.c
index fbdc766..9ebdbf5 100644
--- a/valid.c
+++ b/valid.c
@@ -110,6 +110,7 @@
 #define SET_OCCURRENCE ctxt->vstate->occurs |= (1 << DEPTH)
 #define RESET_OCCURRENCE ctxt->vstate->occurs &= ((1 << DEPTH) - 1)
 
+#ifndef LIBXML_REGEXP_ENABLED
 static int
 vstateVPush(xmlValidCtxtPtr ctxt, xmlElementContentPtr cont,
 	    xmlNodePtr node, unsigned char depth, long occurs,
@@ -160,6 +161,8 @@
     return(ctxt->vstateNr);
 }
 
+#endif /* LIBXML_REGEXP_ENABLED */
+
 PUSH_AND_POP(static, xmlNodePtr, node)
 
 #ifdef DEBUG_VALID_ALGO
@@ -3814,6 +3817,7 @@
     return(ret);
 }
 
+#ifndef  LIBXML_REGEXP_ENABLED
 /**
  * xmlValidateSkipIgnorable:
  * @ctxt:  the validation context
@@ -3849,7 +3853,6 @@
     return(child);
 }
 
-#ifndef  LIBXML_REGEXP_ENABLED
 /**
  * xmlValidateElementType:
  * @ctxt:  the validation context
diff --git a/xinclude.c b/xinclude.c
index 7650952..7421293 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -369,7 +369,8 @@
  * The XInclude recursive nature is handled at this point.
  */
 static void
-xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, const xmlURL url) {
+xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
+	              ATTRIBUTE_UNUSED const xmlURL url) {
     xmlXIncludeCtxtPtr newctxt;
     int i;
 
@@ -1236,6 +1237,7 @@
     return(0);
 }
 
+#if 0
 /**
  * xmlXIncludePreloadNode:
  * @ctxt: an XInclude context
@@ -1373,6 +1375,7 @@
     xmlFree(URL);
     return(0);
 }
+#endif
 
 /**
  * xmlXIncludeLoadNode:
diff --git a/xmllint.c b/xmllint.c
index 08ca48c..fce097f 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -175,7 +175,7 @@
  *           type argument
  */
 static void
-endTimer(const char *format, ...)
+endTimer(const char *fmt, ...)
 {
     long msec;
     va_list ap;
@@ -188,8 +188,8 @@
 #ifndef HAVE_STDARG_H
 #error "endTimer required stdarg functions"
 #endif
-    va_start(ap, format);
-    vfprintf(stderr, format, ap);
+    va_start(ap, fmt);
+    vfprintf(stderr, fmt, ap);
     va_end(ap);
 
     fprintf(stderr, " took %ld ms\n", msec);
diff --git a/xmlregexp.c b/xmlregexp.c
index c4cf681..d6bcb77 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -247,6 +247,7 @@
      */
     int nbstates;
     int *compact;
+    void **transdata;
     int nbstrings;
     xmlChar **stringMap;
 };
@@ -352,12 +353,14 @@
 
     if ((ret->determinist != 0) &&
 	(ret->nbCounters == 0) &&
+	(ret->atoms != NULL) &&
 	(ret->atoms[0] != NULL) &&
 	(ret->atoms[0]->type == XML_REGEXP_STRING)) {
 	int i, j, nbstates = 0, nbatoms = 0;
 	int *stateRemap;
 	int *stringRemap;
 	int *transitions;
+	void **transdata;
 	xmlChar **stringMap;
         xmlChar *value;
 
@@ -416,6 +419,7 @@
 	 * state correspond to the state type.
 	 */
 	transitions = (int *) xmlMalloc(nbstates * (nbatoms + 1) * sizeof(int));
+	transdata = NULL;
 	memset(transitions, 0, nbstates * (nbatoms + 1) * sizeof(int));
 
 	for (i = 0;i < ret->nbStates;i++) {
@@ -435,6 +439,13 @@
 		if ((trans->to == -1) || (trans->atom == NULL))
 		    continue;
                 atomno = stringRemap[trans->atom->no];
+		if ((trans->atom->data != NULL) && (transdata == NULL)) {
+		    transdata = (void **) xmlMalloc(nbstates * nbatoms *
+			                            sizeof(void *));
+		    if (transdata != NULL)
+			memset(transdata, 0,
+			       nbstates * nbatoms * sizeof(void *));
+		}
 		targetno = stateRemap[trans->to];
 		/*
 		 * if the same atome can generate transition to 2 different
@@ -452,6 +463,8 @@
 			printf("       previous to is %d\n", prev);
 #endif
 			ret->determinist = 0;
+			if (transdata != NULL)
+			    xmlFree(transdata);
 			xmlFree(transitions);
 			xmlFree(stateRemap);
 			xmlFree(stringRemap);
@@ -466,7 +479,10 @@
 			   i, j, trans->atom->no, trans->to, atomno, targetno);
 #endif
 		    transitions[stateno * (nbatoms + 1) + atomno + 1] =
-			targetno + 1;; /* to avoid 0 */
+			targetno + 1; /* to avoid 0 */
+		    if (transdata != NULL)
+			transdata[stateno * nbatoms + atomno] =
+			    trans->atom->data;
 		}
 	    }
 	}
@@ -502,6 +518,7 @@
 	ret->nbAtoms = 0;
 
 	ret->compact = transitions;
+	ret->transdata = transdata;
 	ret->stringMap = stringMap;
 	ret->nbstrings = nbatoms;
 	ret->nbstates = nbstates;
@@ -2407,6 +2424,10 @@
 	    target--; /* to avoid 0 */
 	    if (xmlStrEqual(comp->stringMap[i], value)) {
 		exec->index = target;
+		if ((exec->callback != NULL) && (comp->transdata != NULL)) {
+		    exec->callback(exec->data, value,
+			  comp->transdata[state * comp->nbstrings + i], data);
+		}
 #ifdef DEBUG_PUSH
 		printf("entering state %d\n", target);
 #endif
@@ -3871,6 +3892,8 @@
 	xmlFree(regexp->counters);
     if (regexp->compact != NULL)
 	xmlFree(regexp->compact);
+    if (regexp->transdata != NULL)
+	xmlFree(regexp->transdata);
     if (regexp->stringMap != NULL) {
 	for (i = 0; i < regexp->nbstrings;i++)
 	    xmlFree(regexp->stringMap[i]);
diff --git a/xmlschemas.c b/xmlschemas.c
index 79e376d..40bb57e 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -28,6 +28,7 @@
 #define DEBUG 1                 /* very verbose output */
 #define DEBUG_CONTENT 1
 #define DEBUG_TYPE 1
+/* #define DEBUG_CONTENT_REGEXP 1 */
 /* #define DEBUG_AUTOMATA 1 */
 
 #define UNBOUNDED (1 << 30)
@@ -3269,7 +3270,7 @@
 	ctxt->err = XML_SCHEMAS_ERR_NOTDETERMINIST;
 	ctxt->state = NULL;
     } else {
-#ifdef DEBUG_CONTENT
+#ifdef DEBUG_CONTENT_REGEXP
 	xmlGenericError(xmlGenericErrorContext,
 			"Content model of %s:\n", name);
 	xmlRegexpPrint(stderr, elem->contModel);
@@ -3495,6 +3496,7 @@
 	    case XML_SCHEMA_TYPE_UR:
 	    case XML_SCHEMA_TYPE_ELEMENT:
 	    case XML_SCHEMA_TYPE_ATTRIBUTE:
+	    case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
 	    case XML_SCHEMA_TYPE_NOTATION:
 	    case XML_SCHEMA_TYPE_LIST:
 	    case XML_SCHEMA_TYPE_UNION:
@@ -4866,6 +4868,9 @@
 	case XML_SCHEMA_FACET_MINLENGTH:
 	    TODO
 	    break;
+	case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+	    TODO
+	    break;
     }
     xmlSchemaValidateAttributes(ctxt, node, type->attributes);
 
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 8dc4d11..90814ee 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -668,8 +668,8 @@
  *         and -1 in case of internal or API error.
  */
 static int
-xmlSchemaValidateDates (xmlSchemaTypePtr type, const xmlChar *dateTime,
-                        xmlSchemaValPtr *val) {
+xmlSchemaValidateDates (ATTRIBUTE_UNUSED xmlSchemaTypePtr type,
+	                const xmlChar *dateTime, xmlSchemaValPtr *val) {
     xmlSchemaValPtr dt;
     int ret;
     const xmlChar *cur = dateTime;
@@ -827,8 +827,8 @@
  *         and -1 in case of internal or API error.
  */
 static int
-xmlSchemaValidateDuration (xmlSchemaTypePtr type, const xmlChar *duration,
-                        xmlSchemaValPtr *val) {
+xmlSchemaValidateDuration (ATTRIBUTE_UNUSED xmlSchemaTypePtr type,
+	                   const xmlChar *duration, xmlSchemaValPtr *val) {
     const xmlChar  *cur = duration;
     xmlSchemaValPtr dur;
     int isneg = 0;
@@ -1792,7 +1792,8 @@
  *     number otherwise and -1 in case of internal or API error.
  */
 int
-xmlSchemaValidateFacet(xmlSchemaTypePtr base, xmlSchemaFacetPtr facet,
+xmlSchemaValidateFacet(ATTRIBUTE_UNUSED xmlSchemaTypePtr base,
+	               xmlSchemaFacetPtr facet,
 	               const xmlChar *value, xmlSchemaValPtr val)
 {
     int ret;
@@ -1854,7 +1855,7 @@
 	    if ((facet->val != NULL) &&
 		(facet->val->type == XML_SCHEMAS_DECIMAL) &&
 		(facet->val->value.decimal.frac == 0)) {
-		int len;
+		unsigned int len;
 
 		if (facet->val->value.decimal.sign == 1)
 		    return(1);
diff --git a/xpath.c b/xpath.c
index 333d200..9aa8a3a 100644
--- a/xpath.c
+++ b/xpath.c
@@ -67,7 +67,8 @@
     NULL,
     XML_NAMESPACE_DECL,
     XML_XML_NAMESPACE,
-    BAD_CAST "xml"
+    BAD_CAST "xml",
+    NULL
 };
 static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
 #ifndef LIBXML_THREAD_ENABLED
@@ -249,6 +250,7 @@
     int maxStep;
     xmlXPathStepOp *steps;        /* ops for computation */
     int last;
+    xmlChar *expr;
 #ifdef DEBUG_EVAL_COUNTS
     int nb;
     xmlChar *string;
@@ -330,6 +332,9 @@
         xmlFree(comp->string);
     }
 #endif
+    if (comp->expr != NULL) {
+        xmlFree(comp->expr);
+    }
 
     xmlFree(comp);
 }
@@ -1285,17 +1290,22 @@
     const xmlChar *cur;
     const xmlChar *base;
 
-/*    xmlGenericError(xmlGenericErrorContext,
-	    "Error %s:%d: %s\n", file, line,
-            xmlXPathErrorMessages[no]);
-*/
-    xmlGenericError(xmlGenericErrorContext,
-	    "Error %s\n", xmlXPathErrorMessages[no]);
-
     cur = ctxt->cur;
     base = ctxt->base;
-    if ((cur == NULL) || (base == NULL))
+    if ((cur == NULL) || (base == NULL)) {
+	if ((ctxt->comp != NULL) && (ctxt->comp->expr != NULL)) {
+	    xmlGenericError(xmlGenericErrorContext,
+		    "XPath error %s in %s\n", xmlXPathErrorMessages[no],
+			    ctxt->comp->expr);
+	} else {
+	    xmlGenericError(xmlGenericErrorContext,
+		    "XPath error %s\n", xmlXPathErrorMessages[no]);
+	}
+
 	return;
+    }
+    xmlGenericError(xmlGenericErrorContext,
+	    "XPath error %s\n", xmlXPathErrorMessages[no]);
 
     while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) {
 	cur--;
@@ -10572,6 +10582,7 @@
 	ctxt->comp = NULL;
     }
     xmlXPathFreeParserContext(ctxt);
+    comp->expr = xmlStrdup(str);
 #ifdef DEBUG_EVAL_COUNTS
     if (comp != NULL) {
 	comp->string = xmlStrdup(str);
@@ -10826,7 +10837,7 @@
  *  returns "gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles%23ocean"
  *
  */
-void
+static void
 xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
     xmlXPathObjectPtr str;
     int escape_reserved;