added --schema option to run WXS schema validation tried to improve error

* xmllint.c: added --schema option to run WXS schema validation
* xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h:
  tried to improve error reporting in the Schema code, some cleanup
  too.
Daniel
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 831721a..44ecab9 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1739,7 +1739,13 @@
         case XML_SCHEMAS_ID:
 	    ret = xmlValidateNCName(value, 1);
 	    if ((ret == 0) && (val != NULL)) {
-		TODO;
+		v = xmlSchemaNewValue(XML_SCHEMAS_ID);
+		if (v != NULL) {
+		    v->value.str = xmlStrdup(value);
+		    *val = v;
+		} else {
+		    goto error;
+		}
 	    }
 	    if ((ret == 0) && (node != NULL) &&
 		(node->type == XML_ATTRIBUTE_NODE)) {