preparing release of 2.4.29 rebuilt the docs and API a few more fixes for

* configure.in: preparing release of 2.4.29
* doc/*: rebuilt the docs and API
* xmlreader.c: a few more fixes for the XmlTextReader API
Daniel
diff --git a/ChangeLog b/ChangeLog
index 173201f..931d166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Dec 11 20:26:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+	* configure.in: preparing release of 2.4.29
+	* doc/*: rebuilt the docs and API
+	* xmlreader.c: a few more fixes for the XmlTextReader API
+
 Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
 
 	* include/win32config.h: applied mingw patch from Magnus Henoch
diff --git a/configure.in b/configure.in
index d318f70..9652deb 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@
 
 LIBXML_MAJOR_VERSION=2
 LIBXML_MINOR_VERSION=4
-LIBXML_MICRO_VERSION=28
+LIBXML_MICRO_VERSION=29
 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
 
diff --git a/doc/FAQ.html b/doc/FAQ.html
index da93c88..63ac2a2 100644
--- a/doc/FAQ.html
+++ b/doc/FAQ.html
@@ -262,7 +262,7 @@
     <p><em>but it does not work. If I change it to</em></p>
     <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
     <p><em>then it works.  Can someone explain it to me.</em></p>
-    <p>
+    <p></p>
     <p>In XML all characters in the content of the document are significant
     <strong>including blanks and formatting line breaks</strong>.</p>
     <p>The extra nodes you are wondering about are just that, text nodes with
@@ -365,7 +365,7 @@
   </li>
   <li>etc ...</li>
 </ol>
-<p>
+<p></p>
 <p><a href="bugs.html">Daniel Veillard</a></p>
 </td></tr></table></td></tr></table></td></tr></table></td>
 </tr></table></td></tr></table>
diff --git a/doc/architecture.html b/doc/architecture.html
index bced3b9..462c615 100644
--- a/doc/architecture.html
+++ b/doc/architecture.html
@@ -111,7 +111,7 @@
 </ul>
 <p>Graphically this gives the following:</p>
 <p><img src="libxml.gif" alt="a graphical view of the various"></p>
-<p>
+<p></p>
 <p><a href="bugs.html">Daniel Veillard</a></p>
 </td></tr></table></td></tr></table></td></tr></table></td>
 </tr></table></td></tr></table>
diff --git a/doc/catalog.html b/doc/catalog.html
index 2bac13a..49098df 100644
--- a/doc/catalog.html
+++ b/doc/catalog.html
@@ -147,7 +147,7 @@
     Catalogs</a> is far more flexible, more recent, uses an XML syntax and
     should scale quite better. This is the default option of libxml.</li>
 </ul>
-<p>
+<p></p>
 <h3><a name="Simple">Using catalog</a></h3>
 <p>In a normal environment libxml will by default check the presence of a
 catalog in /etc/xml/catalog, and assuming it has been correctly populated,
@@ -386,7 +386,7 @@
 try to avoid troubles in multithreaded environments. The code is now thread
 safe assuming that the libxml library has been compiled with threads
 support.</p>
-<p>
+<p></p>
 <h3><a name="Other">Other resources</a></h3>
 <p>The XML Catalog specification is relatively recent so there isn't much
 literature to point at:</p>
diff --git a/doc/contribs.html b/doc/contribs.html
index 0cb439d..20b6721 100644
--- a/doc/contribs.html
+++ b/doc/contribs.html
@@ -134,7 +134,7 @@
     Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a>
 </li>
 </ul>
-<p>
+<p></p>
 <p><a href="bugs.html">Daniel Veillard</a></p>
 </td></tr></table></td></tr></table></td></tr></table></td>
 </tr></table></td></tr></table>
diff --git a/doc/index.html b/doc/index.html
index 7208ee3..2037c26 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -93,7 +93,7 @@
 </table>
 </td></tr></table></td>
 <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
-<p>
+<p></p>
 <p>Libxml is the XML C library developed for the Gnome project.  XML itself
 is a metalanguage to design markup languages, i.e. text language where
 semantic and structure are added to the content using extra &quot;markup&quot;
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 195e0cc..13bfb2a 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -4339,20 +4339,20 @@
       <info>Do a complete resolution lookup of an External Identifier</info>
       <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
       <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+      <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
     </function>
     <function name='xmlACatalogResolvePublic' file='catalog'>
       <info>Try to lookup the system ID associated to a public ID in that catalog</info>
       <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
       <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
     </function>
     <function name='xmlACatalogResolveSystem' file='catalog'>
       <info>Try to lookup the catalog resource for a system ID</info>
       <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
       <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='sysID' type='const xmlChar *' info='the public ID string'/>
     </function>
     <function name='xmlACatalogResolveURI' file='catalog'>
       <info>Do a complete resolution lookup of an URI</info>
@@ -4769,12 +4769,12 @@
     <function name='xmlCatalogGetPublic' file='catalog'>
       <info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</info>
       <return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
     </function>
     <function name='xmlCatalogGetSystem' file='catalog'>
       <info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolveSystem()</info>
       <return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
     </function>
     <function name='xmlCatalogIsEmpty' file='catalog'>
       <info>Check is a catalog is empty</info>
@@ -4785,8 +4785,8 @@
       <info>Do a complete resolution lookup of an External Identifier using a document&apos;s private catalog list</info>
       <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
       <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+      <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
     </function>
     <function name='xmlCatalogLocalResolveURI' file='catalog'>
       <info>Do a complete resolution lookup of an URI using a document&apos;s private catalog list</info>
@@ -4802,18 +4802,18 @@
     <function name='xmlCatalogResolve' file='catalog'>
       <info>Do a complete resolution lookup of an External Identifier</info>
       <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+      <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
     </function>
     <function name='xmlCatalogResolvePublic' file='catalog'>
       <info>Try to lookup the system ID associated to a public ID</info>
       <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
-      <arg name='pubID' type='const xmlChar *' info=''/>
+      <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
     </function>
     <function name='xmlCatalogResolveSystem' file='catalog'>
       <info>Try to lookup the catalog resource for a system ID</info>
       <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
-      <arg name='sysID' type='const xmlChar *' info=''/>
+      <arg name='sysID' type='const xmlChar *' info='the public ID string'/>
     </function>
     <function name='xmlCatalogResolveURI' file='catalog'>
       <info>Do a complete resolution lookup of an URI</info>
@@ -6274,7 +6274,7 @@
     <function name='xmlLoadCatalogs' file='catalog'>
       <info>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</info>
       <return type='void'/>
-      <arg name='pathss' type='const char *' info=''/>
+      <arg name='pathss' type='const char *' info='a list of directories separated by a colon or a space.'/>
     </function>
     <function name='xmlLoadExternalEntity' file='parser'>
       <info>Load an external entity, note that the use of this function for unparsed entities may generate problems TODO: a more generic External entity API must be designed</info>
@@ -8452,9 +8452,9 @@
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderIsDefault' file='xmlreader'>
-      <info></info>
-      <return type='int' info=''/>
-      <arg name='reader' type='xmlTextReaderPtr' info=''/>
+      <info>Whether an Attribute  node was generated from the default value defined in the DTD or schema.</info>
+      <return type='int' info='0 if not defaulted, 1 if defaulted, and -1 in case of error'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderIsEmptyElement' file='xmlreader'>
       <info>Check if the current node is empty</info>
@@ -8487,9 +8487,9 @@
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderQuoteChar' file='xmlreader'>
-      <info></info>
-      <return type='int' info=''/>
-      <arg name='reader' type='xmlTextReaderPtr' info=''/>
+      <info>The quotation mark character used to enclose the value of an attribute.</info>
+      <return type='int' info='&quot; or &apos; and -1 in case of error'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderRead' file='xmlreader'>
       <info>Moves the position of the current instance to the next node in the stream, exposing its properties.</info>
@@ -8497,9 +8497,9 @@
       <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderValue' file='xmlreader'>
-      <info></info>
-      <return type='xmlChar *' info=''/>
-      <arg name='reader' type='xmlTextReaderPtr' info=''/>
+      <info>Provides the text value of the node if present</info>
+      <return type='xmlChar *' info='the string or NULL if not available. The retsult must be deallocated with xmlFree()'/>
+      <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
     </function>
     <function name='xmlTextReaderXmlLang' file='xmlreader'>
       <info>The xml:lang scope within which the node resides.</info>
diff --git a/doc/news.html b/doc/news.html
index 812f377..44976a2 100644
--- a/doc/news.html
+++ b/doc/news.html
@@ -102,6 +102,20 @@
     Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a>
 </li>
 </ul>
+<h3>2.4.29: Dec 11 2002</h3>
+<ul>
+<li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
+    (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
+  <li>Fix for prev in python bindings (ERDI Gergo)</li>
+  <li>Fix for entities handling (Marcus Clarke)</li>
+  <li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
+    dump</li>
+  <li>Fix for URI parsing when handling URNs with fragment identifiers</li>
+  <li>Fix for HTTP URL escaping problem</li>
+  <li>added an TextXmlReader (C#) like API (work in progress)</li>
+  <li>Rewrote the API in XML generation script, includes a C parser and saves
+    more informations needed for C# bindings</li>
+</ul>
 <h3>2.4.28: Nov 22 2002</h3>
 <ul>
 <li>a couple of python binding fixes</li>
@@ -110,7 +124,7 @@
   <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
   <li>added encoding support for XInclude parse=&quot;text&quot;</li>
   <li>autodetection of XHTML1 and specific serialization rules added</li>
-  <li>nasty threading bug fixed (William Brack) </li>
+  <li>nasty threading bug fixed (William Brack)</li>
 </ul>
 <h3>2.4.27: Nov 17 2002</h3>
 <ul>
diff --git a/doc/xml.html b/doc/xml.html
index bd9e672..c088ca3 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -589,6 +589,21 @@
     Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a></li>
 </ul>
 
+<h3>2.4.29: Dec 11 2002</h3>
+<ul>
+  <li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
+    (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
+  <li>Fix for prev in python bindings (ERDI Gergo)</li>
+  <li>Fix for entities handling (Marcus Clarke)</li>
+  <li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
+    dump</li>
+  <li>Fix for URI parsing when handling URNs with fragment identifiers</li>
+  <li>Fix for HTTP URL escaping problem</li>
+  <li>added an TextXmlReader (C#) like API (work in progress)</li>
+  <li>Rewrote the API in XML generation script, includes a C parser and saves
+    more informations needed for C# bindings</li>
+</ul>
+
 <h3>2.4.28: Nov 22 2002</h3>
 <ul>
   <li>a couple of python binding fixes</li>
@@ -597,7 +612,7 @@
   <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
   <li>added encoding support for XInclude parse="text"</li>
   <li>autodetection of XHTML1 and specific serialization rules added</li>
-  <li>nasty threading bug fixed (William Brack) </li>
+  <li>nasty threading bug fixed (William Brack)</li>
 </ul>
 
 <h3>2.4.27: Nov 17 2002</h3>
@@ -2737,6 +2752,7 @@
 
 
 
+
 } </pre>
   </li>
   <li>And then use it to save the document:
diff --git a/doc/xmldtd.html b/doc/xmldtd.html
index 362b637..84a11c6 100644
--- a/doc/xmldtd.html
+++ b/doc/xmldtd.html
@@ -247,7 +247,7 @@
 <p>I suggest looking at the examples found under test/valid/dtd and any of
 the large number of books available on XML. The dia example in test/valid
 should be both simple and complete enough to allow you to build your own.</p>
-<p>
+<p></p>
 <p><a href="bugs.html">Daniel Veillard</a></p>
 </td></tr></table></td></tr></table></td></tr></table></td>
 </tr></table></td></tr></table>
diff --git a/doc/xmlio.html b/doc/xmlio.html
index f0523d3..3a2bb83 100644
--- a/doc/xmlio.html
+++ b/doc/xmlio.html
@@ -252,6 +252,7 @@
 
 
 
+
 } </pre>
   </li>
   <li>And then use it to save the document:
diff --git a/doc/xmlmem.html b/doc/xmlmem.html
index 5867c65..7fb6ce8 100644
--- a/doc/xmlmem.html
+++ b/doc/xmlmem.html
@@ -216,7 +216,7 @@
     validation, DOM, XPath or XPointer, but really need to work fixed memory
     requirements, then the SAX interface should be used.</li>
 </ul>
-<p>
+<p></p>
 <p><a href="bugs.html">Daniel Veillard</a></p>
 </td></tr></table></td></tr></table></td></tr></table></td>
 </tr></table></td></tr></table>
diff --git a/xmlreader.c b/xmlreader.c
index 9768492..65ca8e8 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -604,7 +604,7 @@
 	return(NULL);
     if ((reader->node->type != XML_ELEMENT_NODE) &&
 	(reader->node->type != XML_ATTRIBUTE_NODE))
-	return(NULL);
+	return(xmlTextReaderName(reader));
     return(xmlStrdup(reader->node->name));
 }
 
@@ -622,16 +622,51 @@
 
     if ((reader == NULL) || (reader->node == NULL))
 	return(NULL);
-    if ((reader->node->type != XML_ELEMENT_NODE) &&
-	(reader->node->type != XML_ATTRIBUTE_NODE))
-	return(NULL);
-    if ((reader->node->ns == NULL) || (reader->node->ns->prefix == NULL))
-	return(xmlStrdup(reader->node->name));
-    
-    ret = xmlStrdup(reader->node->ns->prefix);
-    ret = xmlStrcat(ret, BAD_CAST ":");
-    ret = xmlStrcat(ret, reader->node->name);
-    return(ret);
+    switch (reader->node->type) {
+        case XML_ELEMENT_NODE:
+        case XML_ATTRIBUTE_NODE:
+	    if ((reader->node->ns == NULL) ||
+		(reader->node->ns->prefix == NULL))
+		return(xmlStrdup(reader->node->name));
+	    
+	    ret = xmlStrdup(reader->node->ns->prefix);
+	    ret = xmlStrcat(ret, BAD_CAST ":");
+	    ret = xmlStrcat(ret, reader->node->name);
+	    return(ret);
+        case XML_TEXT_NODE:
+	    return(xmlStrdup(BAD_CAST "#text"));
+        case XML_CDATA_SECTION_NODE:
+	    return(xmlStrdup(BAD_CAST "#cdata-section"));
+        case XML_ENTITY_NODE:
+        case XML_ENTITY_REF_NODE:
+	    return(xmlStrdup(reader->node->name));
+        case XML_PI_NODE:
+	    return(xmlStrdup(reader->node->name));
+        case XML_COMMENT_NODE:
+	    return(xmlStrdup(BAD_CAST "#comment"));
+        case XML_DOCUMENT_NODE:
+        case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+        case XML_DOCB_DOCUMENT_NODE:
+#endif
+	    return(xmlStrdup(BAD_CAST "#document"));
+        case XML_DOCUMENT_FRAG_NODE:
+	    return(xmlStrdup(BAD_CAST "#document-fragment"));
+        case XML_NOTATION_NODE:
+	    return(xmlStrdup(reader->node->name));
+        case XML_DOCUMENT_TYPE_NODE:
+        case XML_DTD_NODE:
+	    return(xmlStrdup(reader->node->name));
+
+        case XML_ELEMENT_DECL:
+        case XML_ATTRIBUTE_DECL:
+        case XML_ENTITY_DECL:
+        case XML_NAMESPACE_DECL:
+        case XML_XINCLUDE_START:
+        case XML_XINCLUDE_END:
+	    return(NULL);
+    }
+    return(NULL);
 }
 
 /**
@@ -744,15 +779,89 @@
     if (reader->node == NULL)
 	return(0);
 
-    TODO
+    switch (reader->node->type) {
+        case XML_ATTRIBUTE_NODE:
+        case XML_TEXT_NODE:
+        case XML_CDATA_SECTION_NODE:
+        case XML_PI_NODE:
+        case XML_COMMENT_NODE:
+	    return(1);
+	default:
+	    return(0);
+    }
     return(0);
 }
 
-/*
-int		xmlTextReaderIsDefault	(xmlTextReaderPtr reader);
-int		xmlTextReaderQuoteChar	(xmlTextReaderPtr reader);
-xmlChar *	xmlTextReaderValue	(xmlTextReaderPtr reader);
+/**
+ * xmlTextReaderValue:
+ * @reader:  the xmlTextReaderPtr used
+ *
+ * Provides the text value of the node if present
+ *
+ * Returns the string or NULL if not available. The retsult must be deallocated
+ *     with xmlFree()
  */
+xmlChar *
+xmlTextReaderValue(xmlTextReaderPtr reader) {
+    if (reader == NULL)
+	return(NULL);
+    if (reader->node == NULL)
+	return(NULL);
+
+    switch (reader->node->type) {
+        case XML_ATTRIBUTE_NODE:{
+	    xmlAttrPtr attr = (xmlAttrPtr) reader->node;
+
+	    if (attr->parent != NULL)
+		return (xmlNodeListGetString
+			(attr->parent->doc, attr->children, 1));
+	    else
+		return (xmlNodeListGetString(NULL, attr->children, 1));
+	    break;
+	}
+        case XML_TEXT_NODE:
+        case XML_CDATA_SECTION_NODE:
+        case XML_PI_NODE:
+        case XML_COMMENT_NODE:
+            if (reader->node->content != NULL)
+                return (xmlStrdup(reader->node->content));
+	default:
+	    return(NULL);
+    }
+    return(NULL);
+}
+
+/**
+ * xmlTextReaderIsDefault:
+ * @reader:  the xmlTextReaderPtr used
+ *
+ * Whether an Attribute  node was generated from the default value
+ * defined in the DTD or schema.
+ *
+ * Returns 0 if not defaulted, 1 if defaulted, and -1 in case of error
+ */
+int
+xmlTextReaderIsDefault(xmlTextReaderPtr reader) {
+    if (reader == NULL)
+	return(-1);
+    return(0);
+}
+
+/**
+ * xmlTextReaderQuoteChar:
+ * @reader:  the xmlTextReaderPtr used
+ *
+ * The quotation mark character used to enclose the value of an attribute.
+ *
+ * Returns " or ' and -1 in case of error
+ */
+int
+xmlTextReaderQuoteChar(xmlTextReaderPtr reader) {
+    if (reader == NULL)
+	return(-1);
+    /* TODO maybe lookup the attribute value for " first */
+    return((int) '"');
+}
 
 /**
  * xmlTextReaderXmlLang: