--- xmlreader.c	2005-01-04 09:50:38.000000000 -0800
+++ xmlreader.c.new	2005-01-18 21:58:54.000000000 -0800
@@ -823,7 +823,7 @@
 		          (const char *) &inbuf->content[reader->cur],
 			  CHUNK_SIZE, 0);
 	    reader->cur += CHUNK_SIZE;
-	    if ((val != 0) || (reader->ctxt->wellFormed == 0))
+	    if ((val != 0 && reader->ctxt->lastError.level == XML_ERR_FATAL) || (reader->ctxt->wellFormed == 0))
 		return(-1);
 	} else {
 	    s = inbuf->use - reader->cur;
@@ -831,8 +831,9 @@
 		          (const char *) &inbuf->content[reader->cur],
 			  s, 0);
 	    reader->cur += s;
-	    if ((val != 0) || (reader->ctxt->wellFormed == 0))
+	    if ((val != 0 && reader->ctxt->lastError.level == XML_ERR_FATAL) || (reader->ctxt->wellFormed == 0)) {
 		return(-1);
+            }
 	    break;
 	}
     }
@@ -864,7 +865,7 @@
 		    s, 1);
 	    reader->cur = inbuf->use;
 	    reader->mode = XML_TEXTREADER_DONE;
-	    if ((val != 0) || (reader->ctxt->wellFormed == 0))
+	    if ((val != 0 && reader->ctxt->lastError.level == XML_ERR_FATAL) || (reader->ctxt->wellFormed == 0))
 	        return(-1);
 	}
     }
@@ -3215,7 +3216,7 @@
 	node = reader->node;
 
     if ((node->type == XML_ELEMENT_NODE) &&
-	((node->properties != NULL) || (node->nsDef != NULL)))
+	(node->properties != NULL))
 	return(1);
     /* TODO: handle the xmlDecl */
     return(0);
@@ -3569,43 +3570,6 @@
     return(-1);
 }
 
-
-/**
- * xmlTextReaderGetParserLineNumber:
- * @reader: the user data (XML reader context)
- *
- * Provide the line number of the current parsing point.
- *
- * Returns an int or 0 if not available
- */
-int
-xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader)
-{
-    if ((reader == NULL) || (reader->ctxt == NULL) ||
-        (reader->ctxt->input == NULL)) {
-        return (0);
-    }
-    return (reader->ctxt->input->line);
-}
-
-/**
- * xmlTextReaderGetParserColumnNumber:
- * @reader: the user data (XML reader context)
- *
- * Provide the column number of the current parsing point.
- *
- * Returns an int or 0 if not available
- */
-int
-xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader)
-{
-    if ((reader == NULL) || (reader->ctxt == NULL) ||
-        (reader->ctxt->input == NULL)) {
-        return (0);
-    }
-    return (reader->ctxt->input->col);
-}
-
 /**
  * xmlTextReaderCurrentNode:
  * @reader:  the xmlTextReaderPtr used
