relaxed id() to not check taht the name(s) passed are actually NCName,

* xpath.c: relaxed id() to not check taht the name(s) passed
  are actually NCName, decided this in agreement with Aleksey Sanin
  since existing specs like Visa3D broke that conformance checking
  and other tools seems to not implement it sigh...
* SAX2.c: check attribute decls for xml:id and the value is an
  NCName.
* test/xmlid/id_err* result/xmlid/id_err*: added error testing
Daniel
diff --git a/xpath.c b/xpath.c
index ccf6c6c..554350d 100644
--- a/xpath.c
+++ b/xpath.c
@@ -6089,18 +6089,23 @@
 
         ID = xmlStrndup(ids, cur - ids);
 	if (ID != NULL) {
-	    if (xmlValidateNCName(ID, 1) == 0) {
-		attr = xmlGetID(doc, ID);
-		if (attr != NULL) {
-		    if (attr->type == XML_ATTRIBUTE_NODE)
-			elem = attr->parent;
-		    else if (attr->type == XML_ELEMENT_NODE)
-			elem = (xmlNodePtr) attr;
-		    else
-			elem = NULL;
-		    if (elem != NULL)
-			xmlXPathNodeSetAdd(ret, elem);
-		}
+	    /*
+	     * We used to check the fact that the value passed
+	     * was an NCName, but this generated much troubles for
+	     * me and Aleksey Sanin, people blatantly violated that
+	     * constaint, like Visa3D spec.
+	     * if (xmlValidateNCName(ID, 1) == 0)
+	     */
+	    attr = xmlGetID(doc, ID);
+	    if (attr != NULL) {
+		if (attr->type == XML_ATTRIBUTE_NODE)
+		    elem = attr->parent;
+		else if (attr->type == XML_ELEMENT_NODE)
+		    elem = (xmlNodePtr) attr;
+		else
+		    elem = NULL;
+		if (elem != NULL)
+		    xmlXPathNodeSetAdd(ret, elem);
 	    }
 	    xmlFree(ID);
 	}