fix some potential leaks in error cases. added --sax, to allow testing of

* parser.c: fix some potential leaks in error cases.
* xmllint.c: added --sax, to allow testing of --schemas --sax and
  various other combinations.
* xmlschemas.c: fix a couple of tiny problems in
  xmlSchemaValidateStream()
Daniel
diff --git a/xmlschemas.c b/xmlschemas.c
index 0bd6423..7dbada0 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -24402,6 +24402,7 @@
         return (-1);
     old_sax = pctxt->sax;
     pctxt->sax = &schemas_sax;
+    pctxt->userData = &split_block;
 #if 0
     if (options)
         xmlCtxtUseOptions(pctxt, options);
@@ -24409,7 +24410,7 @@
     pctxt->linenumbers = 1;
     pctxt->userData = (void *) ctxt;
 
-    inputStream = xmlNewIOInputStream(pctxt, input, XML_CHAR_ENCODING_NONE);;
+    inputStream = xmlNewIOInputStream(pctxt, input, enc);;
     if (inputStream == NULL) {
         ret = -1;
 	goto done;