Added XPath code (http://www.w3.org/TR/xpath), updated HTML support and docs, Daniel
diff --git a/ChangeLog b/ChangeLog
index d440cd0..748e177 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Jul 15 16:17:16 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+	* configure.in: upgraded to version 1.4.0
+	* xpath.c, xpath.h, testXPath.c, makefile.am: added code for the XPath
+	  draft from W3C. Will be used by XPointer, Xlink, XSL, and possibly
+	  XML query language, see http://www.w3.org/TR/xpath for more details.
+	* parser.c, parser.h: added CHAR* related string functions for XPath
+	* HTMLparser.[ch], HTMLtree.c: a bit of cleanup on entities.
+	* doc/gnome-xml.sgml, doc/html/* : added XPath and HTML documentation,
+	  rebuild the docs.
+	* Makefile.am, test/XPath/*, result/XPath/*: added an XPathtests target
+	  and regression testing capabilities for XPath.
+
 Mon Jul 12 12:36:39 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
 
 	* parser.c, HTMLparser.c: applied patch from John Ellson <ellson@lucent.com>
diff --git a/HTMLparser.c b/HTMLparser.c
index 7772444..ce39a4b 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -456,6 +456,7 @@
  */
 { 34,	"quot",	"quotation mark = APL quote, U+0022 ISOnum" },
 { 38,	"amp",	"ampersand, U+0026 ISOnum" },
+{ 39,	"apos",	"single quote" },
 { 60,	"lt",	"less-than sign, U+003C ISOnum" },
 { 62,	"gt",	"greater-than sign, U+003E ISOnum" },
 
diff --git a/HTMLtree.c b/HTMLtree.c
index 0d4b45f..2a05b3e 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -37,8 +37,10 @@
     if (cur->ExternalID != NULL) {
 	xmlBufferWriteChar(buf, " PUBLIC ");
 	xmlBufferWriteQuotedString(buf, cur->ExternalID);
-	xmlBufferWriteChar(buf, " ");
-	xmlBufferWriteQuotedString(buf, cur->SystemID);
+	if (cur->SystemID != NULL) {
+	    xmlBufferWriteChar(buf, " ");
+	    xmlBufferWriteQuotedString(buf, cur->SystemID);
+	} 
     }  else if (cur->SystemID != NULL) {
 	xmlBufferWriteChar(buf, " SYSTEM ");
 	xmlBufferWriteQuotedString(buf, cur->SystemID);
@@ -127,7 +129,6 @@
  */
 static void
 htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
-    int i;
     htmlElemDescPtr info;
 
     if (cur == NULL) {
diff --git a/Makefile.am b/Makefile.am
index 0f239c3..294bcde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@
 
 VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
 
-noinst_PROGRAMS=tester testSAX testHTML
+noinst_PROGRAMS=tester testSAX testHTML testXPath
 
 bin_SCRIPTS=xml-config
 
@@ -21,9 +21,10 @@
 		error.c \
 		parser.c \
 		HTMLparser.c \
+		HTMLtree.c \
 		debugXML.c \
 		tree.c \
-		HTMLtree.c \
+		xpath.c \
 		valid.c
 
 xmlincdir = $(includedir)/gnome-xml
@@ -32,10 +33,12 @@
 		encoding.h \
 		parser.h \
 		HTMLparser.h \
+		HTMLtree.h \
 		parserInternals.h \
 		debugXML.h \
 		xml-error.h \
 		tree.h \
+		xpath.h \
 		xmlIO.h \
 		valid.h
 
@@ -57,9 +60,14 @@
 testHTML_DEPENDENCIES = $(DEPS)
 testHTML_LDADD= $(LDADDS)
 
+testXPath_SOURCES=testXPath.c
+testXPath_LDFLAGS = 
+testXPath_DEPENDENCIES = $(DEPS)
+testXPath_LDADD= $(LDADDS)
+
 check-local: tests
 
-testall : tests SVGtests SAXtests
+testall : tests SVGtests SAXtests XPathtests
 
 tests: HTMLtests XMLtests
 HTMLtests : testHTML
@@ -110,6 +118,35 @@
 	      rm result.`basename $$i` result2.`basename $$i` ; \
 	  fi ; fi ; done)
 
+XPathtests : testXPath
+	@(DIR=`pwd`; cd $(srcdir) ;  \
+	  for i in test/XPath/expr/* ; do \
+	  if [ ! -d $$i ] ; then \
+	  if [ ! -f result/XPath/expr/`basename $$i` ] ; then \
+	      echo New test file `basename $$i` ; \
+	      $$DIR/testXPath -f --expr $$i > result/XPath/expr/`basename $$i` ; \
+	  else \
+	      echo Testing `basename $$i` ; \
+	      $$DIR/testXPath -f --expr $$i > result.`basename $$i` ; \
+	      diff result/XPath/expr/`basename $$i` result.`basename $$i` ; \
+	      rm result.`basename $$i` ; \
+	  fi ; fi ; done)
+	@(DIR=`pwd`; cd $(srcdir) ;  \
+	  for i in test/XPath/docs/* ; do \
+	  if [ ! -d $$i ] ; then \
+	  name=`basename $$i`; \
+	  for j in test/XPath/tests/$$name* ; do \
+	  if [ ! -d $$j ] ; then \
+	  if [ ! -f result/XPath/tests/`basename $$j` ] ; then \
+	      echo New test file `basename $$i` ; \
+	      $$DIR/testXPath -f -i $$i $$j > result/XPath/tests/`basename $$j` ; \
+	  else \
+	      echo Testing `basename $$j` ; \
+	      $$DIR/testXPath -f -i $$i $$j > result.`basename $$j` ; \
+	      diff result/XPath/tests/`basename $$j` result.`basename $$j` ; \
+	      rm result.`basename $$j` ; \
+	  fi ; fi ; done ; fi ; done)
+
 SAXtests : testSAX
 	@(DIR=`pwd`; cd $(srcdir) ;  \
 	  for i in test/* ; do \
@@ -124,20 +161,6 @@
 	      rm result.`basename $$i` ; \
 	  fi ; fi ; done)
 
-#tests : tester
-#	@(for i in $(srcdir)/test/* ; do \
-#	  if [ ! -d $$i ] ; then \
-#	  j=`echo $$i | sed -e 's,^.*/,,'`; \
-#	  if [ ! -f $(srcdir)/result/$$j ] ; then \
-#	      echo New test file $$j ; \
-#	      ./tester $$i > $(srcdir)/result/$$j ; \
-#	  else \
-#	      echo Testing $$j ; \
-#	      ./tester $$i > result.$$j ; \
-#	      diff $(srcdir)/result/$$j result.$$j ; \
-#	      rm result.$$j ; \
-#	  fi ; fi ; done)
-
 ## Put `exec' in the name because this should be installed by
 ## `install-exec', not `install-data'.
 
diff --git a/configure.in b/configure.in
index 83c5c4c..9332805 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@
 AM_CONFIG_HEADER(config.h)
 
 LIBXML_MAJOR_VERSION=1
-LIBXML_MINOR_VERSION=3
+LIBXML_MINOR_VERSION=4
 LIBXML_MICRO_VERSION=0
 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/debugXML.c b/debugXML.c
index 5abec63..c47c0b3 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -113,7 +113,7 @@
     }
 }
 
-void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth) {
+void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) {
     int i;
     char shift[100];
 
@@ -187,6 +187,10 @@
 	if (ent != NULL)
 	    xmlDebugDumpEntity(output, ent, depth + 1);
     }
+}
+
+void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth) {
+    xmlDebugDumpOneNode(output, node, depth);
     if (node->childs != NULL)
 	xmlDebugDumpNodeList(output, node->childs, depth + 1);
 }
diff --git a/debugXML.h b/debugXML.h
index 2be4826..556d1fe 100644
--- a/debugXML.h
+++ b/debugXML.h
@@ -12,6 +12,7 @@
 extern void xmlDebugDumpString(FILE *output, const CHAR *str);
 extern void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth);
 extern void xmlDebugDumpAttrList(FILE *output, xmlAttrPtr attr, int depth);
+extern void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpNodeList(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpDocument(FILE *output, xmlDocPtr doc);
diff --git a/doc/gnome-xml.sgml b/doc/gnome-xml.sgml
index e7442bd..96eb97a 100644
--- a/doc/gnome-xml.sgml
+++ b/doc/gnome-xml.sgml
@@ -4,6 +4,10 @@
 <!entity entities SYSTEM "sgml/entities.sgml">
 <!entity error SYSTEM "sgml/xml-error.sgml">
 <!entity valid SYSTEM "sgml/valid.sgml">
+<!entity xpath SYSTEM "sgml/xpath.sgml">
+<!entity SAX SYSTEM "sgml/SAX.sgml">
+<!entity HTMLparser SYSTEM "sgml/HTMLparser.sgml">
+<!entity HTMLtree SYSTEM "sgml/HTMLtree.sgml">
 <!entity parserInternals SYSTEM "sgml/parserInternals.sgml">
 ]>
 
@@ -15,11 +19,15 @@
   <chapter id="libxml">
     <title>Gnome XML Library</title>
     &parser; The parser general interfaces
+    &SAX; The parser SAX interfaces
     &tree; Manipulation the tree generated by the parser
     &entities; Routines for handling entities
     &valid; All the stuff defined in DTDs
     &error; Callbacks in case of parsing error
     &parserInternals; Access to the parser internal routines
+    &HTMLparser; parsing HTML and generating a tree
+    &HTMLtree; printing HTML trees
+    &xpath; A on-going XPath implementation
   </chapter>
 </book>
 
diff --git a/doc/html/book1.html b/doc/html/book1.html
index 8f8a608..09efeb7 100644
--- a/doc/html/book1.html
+++ b/doc/html/book1.html
@@ -83,6 +83,21 @@
 HREF="gnome-xml-parserinternals.html"
 >parserInternals</A
 > &#8212; </DT
+><DT
+><A
+HREF="gnome-xml-htmlparser.html"
+>HTMLparser</A
+> &#8212; </DT
+><DT
+><A
+HREF="gnome-xml-htmltree.html"
+>HTMLtree</A
+> &#8212; </DT
+><DT
+><A
+HREF="gnome-xml-xpath.html"
+>xpath</A
+> &#8212; </DT
 ></DL
 ></DD
 ></DL
diff --git a/doc/html/gnome-xml-entities.html b/doc/html/gnome-xml-entities.html
index a8dc09c..98d3156 100644
--- a/doc/html/gnome-xml-entities.html
+++ b/doc/html/gnome-xml-entities.html
@@ -115,7 +115,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN3522"
+NAME="AEN3575"
 ></A
 ><H2
 >Name</H2
@@ -123,7 +123,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN3525"
+NAME="AEN3578"
 ></A
 ><H2
 >Synopsis</H2
@@ -260,13 +260,27 @@
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
 > *name);
+const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>* <A
+HREF="gnome-xml-entities.html#XMLENCODEENTITIES"
+>xmlEncodeEntities</A
+>               (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> doc,
+                                             const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *input);
 <A
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
 >*       <A
-HREF="gnome-xml-entities.html#XMLENCODEENTITIES"
->xmlEncodeEntities</A
->               (<A
+HREF="gnome-xml-entities.html#XMLENCODEENTITIESREENTRANT"
+>xmlEncodeEntitiesReentrant</A
+>      (<A
 HREF="gnome-xml-tree.html#XMLDOCPTR"
 >xmlDocPtr</A
 > doc,
@@ -316,7 +330,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3574"
+NAME="AEN3631"
 ></A
 ><H2
 >Description</H2
@@ -326,14 +340,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3577"
+NAME="AEN3634"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3579"
+NAME="AEN3636"
 ></A
 ><H3
 ><A
@@ -349,7 +363,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_INTERNAL_GENERAL_ENTITY		1</PRE
+>#define     XML_INTERNAL_GENERAL_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -359,7 +373,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3584"
+NAME="AEN3641"
 ></A
 ><H3
 ><A
@@ -375,7 +389,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_EXTERNAL_GENERAL_PARSED_ENTITY	2</PRE
+>#define     XML_EXTERNAL_GENERAL_PARSED_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -385,7 +399,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3589"
+NAME="AEN3646"
 ></A
 ><H3
 ><A
@@ -401,7 +415,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY	3</PRE
+>#define     XML_EXTERNAL_GENERAL_UNPARSED_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -411,7 +425,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3594"
+NAME="AEN3651"
 ></A
 ><H3
 ><A
@@ -427,7 +441,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_INTERNAL_PARAMETER_ENTITY		4</PRE
+>#define     XML_INTERNAL_PARAMETER_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -437,7 +451,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3599"
+NAME="AEN3656"
 ></A
 ><H3
 ><A
@@ -453,7 +467,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_EXTERNAL_PARAMETER_ENTITY		5</PRE
+>#define     XML_EXTERNAL_PARAMETER_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -463,7 +477,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3604"
+NAME="AEN3661"
 ></A
 ><H3
 ><A
@@ -479,7 +493,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_INTERNAL_PREDEFINED_ENTITY		6</PRE
+>#define     XML_INTERNAL_PREDEFINED_ENTITY</PRE
 ></TD
 ></TR
 ></TABLE
@@ -489,33 +503,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3609"
+NAME="AEN3666"
 ></A
 ><H3
 ><A
 NAME="XMLENTITYPTR"
 ></A
 >xmlEntityPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlEntity *xmlEntityPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3614"
+NAME="AEN3670"
 ></A
 ><H3
 ><A
@@ -531,7 +532,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_MIN_ENTITIES_TABLE	32</PRE
+>#define     XML_MIN_ENTITIES_TABLE</PRE
 ></TD
 ></TR
 ></TABLE
@@ -541,33 +542,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3619"
+NAME="AEN3675"
 ></A
 ><H3
 ><A
 NAME="XMLENTITIESTABLEPTR"
 ></A
 >xmlEntitiesTablePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlEntitiesTable *xmlEntitiesTablePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3624"
+NAME="AEN3679"
 ></A
 ><H3
 ><A
@@ -637,7 +625,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -654,7 +642,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -671,7 +659,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity type XML_xxx_yyy_ENTITY</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -688,7 +676,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity external ID if available</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -705,7 +693,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity system ID if available</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -722,7 +710,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity content</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -732,7 +720,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3664"
+NAME="AEN3719"
 ></A
 ><H3
 ><A
@@ -802,7 +790,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -819,7 +807,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -836,7 +824,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity type XML_xxx_yyy_ENTITY</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -853,7 +841,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity external ID if available</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -870,7 +858,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity system ID if available</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -887,7 +875,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity content</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -897,7 +885,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3704"
+NAME="AEN3759"
 ></A
 ><H3
 ><A
@@ -953,7 +941,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -968,7 +956,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->NULL if not, othervise the entity</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -978,7 +966,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3725"
+NAME="AEN3780"
 ></A
 ><H3
 ><A
@@ -1040,7 +1028,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document referencing the entity</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1057,7 +1045,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1072,7 +1060,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->A pointer to the entity structure or NULL if not found.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1082,7 +1070,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3751"
+NAME="AEN3806"
 ></A
 ><H3
 ><A
@@ -1143,7 +1131,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document referencing the entity</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1160,7 +1148,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1175,7 +1163,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->A pointer to the entity structure or NULL if not found.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1185,7 +1173,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3777"
+NAME="AEN3832"
 ></A
 ><H3
 ><A
@@ -1201,10 +1189,10 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
-><A
+>const <A
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
->*       xmlEncodeEntities               (<A
+>* xmlEncodeEntities               (<A
 HREF="gnome-xml-tree.html#XMLDOCPTR"
 >xmlDocPtr</A
 > doc,
@@ -1222,6 +1210,119 @@
 >TODO !!!! Once moved to UTF-8 internal encoding, the encoding of non-ascii
 get erroneous.</P
 ><P
+>TODO This routine is not reentrant, the interface
+should not be modified though.</P
+><P
+>People must migrate their code to xmlEncodeEntitiesReentrant !</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>doc</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>input</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN3861"
+></A
+><H3
+><A
+NAME="XMLENCODEENTITIESREENTRANT"
+></A
+>xmlEncodeEntitiesReentrant ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>*       xmlEncodeEntitiesReentrant      (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> doc,
+                                             const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *input);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Do a global encoding of a string, replacing the predefined entities
+and non ASCII values with their entities and CharRef counterparts.
+Contrary to xmlEncodeEntities, this routine is reentrant, and result
+must be deallocated.</P
+><P
+>TODO !!!! Once moved to UTF-8 internal encoding, the encoding of non-ascii
+get erroneous.</P
+><P
 ></P
 ><DIV
 CLASS="INFORMALTABLE"
@@ -1249,7 +1350,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document containing the string</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1266,7 +1367,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  A string to convert to XML.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1281,7 +1382,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->A newly allocated string with the substitution done.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1291,7 +1392,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3804"
+NAME="AEN3888"
 ></A
 ><H3
 ><A
@@ -1342,7 +1443,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the xmlEntitiesTablePtr just created or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1352,7 +1453,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3820"
+NAME="AEN3904"
 ></A
 ><H3
 ><A
@@ -1408,7 +1509,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An entity table</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1423,7 +1524,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new xmlEntitiesTablePtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1433,7 +1534,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3841"
+NAME="AEN3925"
 ></A
 ><H3
 ><A
@@ -1486,7 +1587,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An entity table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1496,7 +1597,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3857"
+NAME="AEN3941"
 ></A
 ><H3
 ><A
@@ -1553,7 +1654,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An XML buffer.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1570,7 +1671,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An entity table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
diff --git a/doc/html/gnome-xml-htmlparser.html b/doc/html/gnome-xml-htmlparser.html
new file mode 100644
index 0000000..91500b6
--- /dev/null
+++ b/doc/html/gnome-xml-htmlparser.html
@@ -0,0 +1,1409 @@
+<HTML
+><HEAD
+><TITLE
+>HTMLparser</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
+REL="HOME"
+TITLE="Gnome XML Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Gnome XML Library"
+HREF="libxml.html"><LINK
+REL="PREVIOUS"
+TITLE="parserInternals"
+HREF="gnome-xml-parserinternals.html"><LINK
+REL="NEXT"
+TITLE="HTMLtree"
+HREF="gnome-xml-htmltree.html"></HEAD
+><BODY
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>Gnome XML Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-parserinternals.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-htmltree.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+>HTMLparser</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6377"
+></A
+><H2
+>Name</H2
+>HTMLparser &#8212; </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN6380"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>&#13;
+
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXT"
+>htmlParserCtxt</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERNODEINFO"
+>htmlParserNodeInfo</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLER"
+>htmlSAXHandler</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
+>htmlSAXHandlerPtr</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUT"
+>htmlParserInput</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERINPUTPTR"
+>htmlParserInputPtr</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>;
+typedef     <A
+HREF="gnome-xml-htmlparser.html#HTMLNODEPTR"
+>htmlNodePtr</A
+>;
+<GTKDOCLINK
+HREF="HTMLELEMDESCPTR"
+>htmlElemDescPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP"
+>htmlTagLookup</A
+>               (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *tag);
+<GTKDOCLINK
+HREF="HTMLENTITYDESCPTR"
+>htmlEntityDescPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP"
+>htmlEntityLookup</A
+>          (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *name);
+<GTKDOCLINK
+HREF="HTMLENTITYDESCPTR"
+>htmlEntityDescPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSEENTITYREF"
+>htmlParseEntityRef</A
+>        (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> **str);
+int         <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
+>htmlParseCharRef</A
+>                (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt);
+void        <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSEELEMENT"
+>htmlParseElement</A
+>                (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt);
+<A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
+>htmlSAXParseDoc</A
+>                 (<A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *cur,
+                                             const char *encoding,
+                                             <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
+>htmlSAXHandlerPtr</A
+> sax,
+                                             void *userData);
+<A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
+>htmlParseDoc</A
+>                    (<A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *cur,
+                                             const char *encoding);
+<A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEFILE"
+>htmlSAXParseFile</A
+>                (const char *filename,
+                                             const char *encoding,
+                                             <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
+>htmlSAXHandlerPtr</A
+> sax,
+                                             void *userData);
+<A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  <A
+HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
+>htmlParseFile</A
+>                   (const char *filename,
+                                             const char *encoding);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6418"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6421"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6423"
+></A
+><H3
+><A
+NAME="HTMLPARSERCTXT"
+></A
+>htmlParserCtxt</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6427"
+></A
+><H3
+><A
+NAME="HTMLPARSERCTXTPTR"
+></A
+>htmlParserCtxtPtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6431"
+></A
+><H3
+><A
+NAME="HTMLPARSERNODEINFO"
+></A
+>htmlParserNodeInfo</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6435"
+></A
+><H3
+><A
+NAME="HTMLSAXHANDLER"
+></A
+>htmlSAXHandler</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6439"
+></A
+><H3
+><A
+NAME="HTMLSAXHANDLERPTR"
+></A
+>htmlSAXHandlerPtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6443"
+></A
+><H3
+><A
+NAME="HTMLPARSERINPUT"
+></A
+>htmlParserInput</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6447"
+></A
+><H3
+><A
+NAME="HTMLPARSERINPUTPTR"
+></A
+>htmlParserInputPtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6451"
+></A
+><H3
+><A
+NAME="HTMLDOCPTR"
+></A
+>htmlDocPtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6455"
+></A
+><H3
+><A
+NAME="HTMLNODEPTR"
+></A
+>htmlNodePtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6459"
+></A
+><H3
+><A
+NAME="HTMLTAGLOOKUP"
+></A
+>htmlTagLookup ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="HTMLELEMDESCPTR"
+>htmlElemDescPtr</GTKDOCLINK
+> htmlTagLookup               (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *tag);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Lookup the HTML tag in the ElementTable</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>tag</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6480"
+></A
+><H3
+><A
+NAME="HTMLENTITYLOOKUP"
+></A
+>htmlEntityLookup ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="HTMLENTITYDESCPTR"
+>htmlEntityDescPtr</GTKDOCLINK
+> htmlEntityLookup          (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *name);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Lookup the given entity in EntitiesTable</P
+><P
+>TODO: the linear scan is really ugly, an hash table is really needed.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>name</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6502"
+></A
+><H3
+><A
+NAME="HTMLPARSEENTITYREF"
+></A
+>htmlParseEntityRef ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="HTMLENTITYDESCPTR"
+>htmlEntityDescPtr</GTKDOCLINK
+> htmlParseEntityRef        (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> **str);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML ENTITY references</P
+><P
+>[68] EntityRef ::= '&amp;' Name ';'</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>str</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6529"
+></A
+><H3
+><A
+NAME="HTMLPARSECHARREF"
+></A
+>htmlParseCharRef ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int         htmlParseCharRef                (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse Reference declarations</P
+><P
+>[66] CharRef ::= '&amp;#' [0-9]+ ';' |
+'&amp;<GTKDOCLINK
+HREF="X"
+>x</GTKDOCLINK
+>' [0-9a-fA-F]+ ';'</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6551"
+></A
+><H3
+><A
+NAME="HTMLPARSEELEMENT"
+></A
+>htmlParseElement ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        htmlParseElement                (<A
+HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
+>htmlParserCtxtPtr</A
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML element, this is highly recursive</P
+><P
+>[39] element ::= EmptyElemTag | STag content ETag</P
+><P
+>[41] Attribute ::= Name Eq AttValue</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6569"
+></A
+><H3
+><A
+NAME="HTMLSAXPARSEDOC"
+></A
+>htmlSAXParseDoc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  htmlSAXParseDoc                 (<A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *cur,
+                                             const char *encoding,
+                                             <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
+>htmlSAXHandlerPtr</A
+> sax,
+                                             void *userData);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML in-memory document and build a tree.
+It use the given SAX function block to handle the parsing callback.
+If sax is NULL, fallback to the default DOM tree building routines.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cur</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encoding</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>sax</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>userData</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6603"
+></A
+><H3
+><A
+NAME="HTMLPARSEDOC"
+></A
+>htmlParseDoc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  htmlParseDoc                    (<A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *cur,
+                                             const char *encoding);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML in-memory document and build a tree.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cur</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encoding</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6628"
+></A
+><H3
+><A
+NAME="HTMLSAXPARSEFILE"
+></A
+>htmlSAXParseFile ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  htmlSAXParseFile                (const char *filename,
+                                             const char *encoding,
+                                             <A
+HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR"
+>htmlSAXHandlerPtr</A
+> sax,
+                                             void *userData);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
+compressed document is provided by default if found at compile-time.
+It use the given SAX function block to handle the parsing callback.
+If sax is NULL, fallback to the default DOM tree building routines.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>filename</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encoding</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>sax</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>userData</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6661"
+></A
+><H3
+><A
+NAME="HTMLPARSEFILE"
+></A
+>htmlParseFile ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
+>htmlDocPtr</A
+>  htmlParseFile                   (const char *filename,
+                                             const char *encoding);</PRE
+></TD
+></TR
+></TABLE
+><P
+>parse an HTML file and build a tree. Automatic support for ZLIB/Compress
+compressed document is provided by default if found at compile-time.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>filename</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>encoding</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-parserinternals.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-htmltree.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>parserInternals</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>HTMLtree</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gnome-xml-htmltree.html b/doc/html/gnome-xml-htmltree.html
new file mode 100644
index 0000000..83ba56b
--- /dev/null
+++ b/doc/html/gnome-xml-htmltree.html
@@ -0,0 +1,671 @@
+<HTML
+><HEAD
+><TITLE
+>HTMLtree</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
+REL="HOME"
+TITLE="Gnome XML Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Gnome XML Library"
+HREF="libxml.html"><LINK
+REL="PREVIOUS"
+TITLE="HTMLparser"
+HREF="gnome-xml-htmlparser.html"><LINK
+REL="NEXT"
+TITLE="xpath"
+HREF="gnome-xml-xpath.html"></HEAD
+><BODY
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>Gnome XML Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-htmlparser.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-xpath.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+>HTMLtree</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6690"
+></A
+><H2
+>Name</H2
+>HTMLtree &#8212; </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN6693"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>&#13;
+
+#define     <A
+HREF="gnome-xml-htmltree.html#HTML-TEXT-NODE"
+>HTML_TEXT_NODE</A
+>
+#define     <A
+HREF="gnome-xml-htmltree.html#HTML-ENTITY-REF-NODE"
+>HTML_ENTITY_REF_NODE</A
+>
+#define     <A
+HREF="gnome-xml-htmltree.html#HTML-COMMENT-NODE"
+>HTML_COMMENT_NODE</A
+>
+void        <A
+HREF="gnome-xml-htmltree.html#HTMLDOCDUMPMEMORY"
+>htmlDocDumpMemory</A
+>               (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> **mem,
+                                             int *size);
+void        <A
+HREF="gnome-xml-htmltree.html#HTMLDOCDUMP"
+>htmlDocDump</A
+>                     (<GTKDOCLINK
+HREF="FILE"
+>FILE</GTKDOCLINK
+> *f,
+                                             <A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur);
+int         <A
+HREF="gnome-xml-htmltree.html#HTMLSAVEFILE"
+>htmlSaveFile</A
+>                    (const char *filename,
+                                             <A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6707"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6710"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6712"
+></A
+><H3
+><A
+NAME="HTML-TEXT-NODE"
+></A
+>HTML_TEXT_NODE</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define HTML_TEXT_NODE		XML_TEXT_NODE</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6717"
+></A
+><H3
+><A
+NAME="HTML-ENTITY-REF-NODE"
+></A
+>HTML_ENTITY_REF_NODE</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define HTML_ENTITY_REF_NODE	XML_ENTITY_REF_NODE</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6722"
+></A
+><H3
+><A
+NAME="HTML-COMMENT-NODE"
+></A
+>HTML_COMMENT_NODE</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define HTML_COMMENT_NODE	XML_COMMENT_NODE</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6727"
+></A
+><H3
+><A
+NAME="HTMLDOCDUMPMEMORY"
+></A
+>htmlDocDumpMemory ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        htmlDocDumpMemory               (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> **mem,
+                                             int *size);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Dump an HTML document in memory and return the CHAR * and it's size.
+It's up to the caller to free the memory.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cur</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the document</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>mem</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  OUT: the memory pointer</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>size</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  OUT: the memory lenght</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6752"
+></A
+><H3
+><A
+NAME="HTMLDOCDUMP"
+></A
+>htmlDocDump ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        htmlDocDump                     (<GTKDOCLINK
+HREF="FILE"
+>FILE</GTKDOCLINK
+> *f,
+                                             <A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Dump an HTML document to an open FILE.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>f</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the FILE*</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cur</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the document</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6773"
+></A
+><H3
+><A
+NAME="HTMLSAVEFILE"
+></A
+>htmlSaveFile ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int         htmlSaveFile                    (const char *filename,
+                                             <A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> cur);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Dump an HTML document to a file.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>filename</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the filename</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>cur</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the document</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> the number of byte written or -1 in case of failure.</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-htmlparser.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-xpath.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>HTMLparser</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>xpath</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gnome-xml-parser.html b/doc/html/gnome-xml-parser.html
index 696b3fd..03433c0 100644
--- a/doc/html/gnome-xml-parser.html
+++ b/doc/html/gnome-xml-parser.html
@@ -443,6 +443,10 @@
 HREF="gnome-xml-parser.html#XMLSAXHANDLERPTR"
 >xmlSAXHandlerPtr</A
 >;
+extern      const char *<A
+HREF="gnome-xml-parser.html#XMLPARSERVERSION"
+>xmlParserVersion</A
+>;
 extern      xmlSAXLocator <A
 HREF="gnome-xml-parser.html#XMLDEFAULTSAXLOCATOR"
 >xmlDefaultSAXLocator</A
@@ -451,6 +455,10 @@
 HREF="gnome-xml-parser.html#XMLDEFAULTSAXHANDLER"
 >xmlDefaultSAXHandler</A
 >;
+extern      xmlSAXHandler <A
+HREF="gnome-xml-parser.html#HTMLDEFAULTSAXHANDLER"
+>htmlDefaultSAXHandler</A
+>;
 <A
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
@@ -476,6 +484,18 @@
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
 >*       <A
+HREF="gnome-xml-parser.html#XMLSTRSUB"
+>xmlStrsub</A
+>                       (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             int start,
+                                             int len);
+const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>* <A
 HREF="gnome-xml-parser.html#XMLSTRCHR"
 >xmlStrchr</A
 >                       (const <A
@@ -486,6 +506,20 @@
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
 > val);
+const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>* <A
+HREF="gnome-xml-parser.html#XMLSTRSTR"
+>xmlStrstr</A
+>                       (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *val);
 int         <A
 HREF="gnome-xml-parser.html#XMLSTRCMP"
 >xmlStrcmp</A
@@ -761,7 +795,11 @@
 void        <A
 HREF="gnome-xml-parser.html#XMLDEFAULTSAXHANDLERINIT"
 >xmlDefaultSAXHandlerInit</A
->        (void);</PRE
+>        (void);
+void        <A
+HREF="gnome-xml-parser.html#HTMLDEFAULTSAXHANDLERINIT"
+>htmlDefaultSAXHandlerInit</A
+>       (void);</PRE
 ></TD
 ></TR
 ></TABLE
@@ -769,7 +807,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN178"
+NAME="AEN188"
 ></A
 ><H2
 >Description</H2
@@ -779,14 +817,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN181"
+NAME="AEN191"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN183"
+NAME="AEN193"
 ></A
 ><H3
 ><A
@@ -802,7 +840,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_DEFAULT_VERSION	"1.0"</PRE
+>#define     XML_DEFAULT_VERSION</PRE
 ></TD
 ></TR
 ></TABLE
@@ -812,7 +850,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN188"
+NAME="AEN198"
 ></A
 ><H3
 ><A
@@ -873,156 +911,65 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN203"
+NAME="AEN213"
 ></A
 ><H3
 ><A
 NAME="XMLPARSERINPUTPTR"
 ></A
 >xmlParserInputPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlParserInput *xmlParserInputPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN208"
+NAME="AEN217"
 ></A
 ><H3
 ><A
 NAME="XMLPARSERNODEINFO"
 ></A
 >xmlParserNodeInfo</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlParserNodeInfo xmlParserNodeInfo;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN213"
+NAME="AEN221"
 ></A
 ><H3
 ><A
 NAME="XMLPARSERNODEINFOSEQ"
 ></A
 >xmlParserNodeInfoSeq</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN218"
+NAME="AEN225"
 ></A
 ><H3
 ><A
 NAME="XMLPARSERNODEINFOSEQPTR"
 ></A
 >xmlParserNodeInfoSeqPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN223"
+NAME="AEN229"
 ></A
 ><H3
 ><A
 NAME="XMLPARSERCTXT"
 ></A
 >xmlParserCtxt</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlParserCtxt xmlParserCtxt;</PRE
-></TD
-></TR
-></TABLE
-><P
-></P
-></DIV
-><HR><DIV
-CLASS="REFSECT2"
-><A
-NAME="AEN228"
-></A
-><H3
-><A
-NAME="XMLPARSERCTXTPTR"
-></A
->xmlParserCtxtPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlParserCtxt *xmlParserCtxtPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
@@ -1033,55 +980,42 @@
 ></A
 ><H3
 ><A
-NAME="XMLSAXLOCATOR"
+NAME="XMLPARSERCTXTPTR"
 ></A
->xmlSAXLocator</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlSAXLocator xmlSAXLocator;</PRE
-></TD
-></TR
-></TABLE
+>xmlParserCtxtPtr</H3
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN238"
+NAME="AEN237"
+></A
+><H3
+><A
+NAME="XMLSAXLOCATOR"
+></A
+>xmlSAXLocator</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN241"
 ></A
 ><H3
 ><A
 NAME="XMLSAXLOCATORPTR"
 ></A
 >xmlSAXLocatorPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlSAXLocator *xmlSAXLocatorPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN243"
+NAME="AEN245"
 ></A
 ><H3
 ><A
@@ -1199,7 +1133,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN272"
+NAME="AEN274"
 ></A
 ><H3
 ><A
@@ -1320,7 +1254,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN301"
+NAME="AEN303"
 ></A
 ><H3
 ><A
@@ -1417,7 +1351,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN325"
+NAME="AEN327"
 ></A
 ><H3
 ><A
@@ -1577,7 +1511,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN363"
+NAME="AEN365"
 ></A
 ><H3
 ><A
@@ -1698,7 +1632,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN392"
+NAME="AEN394"
 ></A
 ><H3
 ><A
@@ -1876,7 +1810,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN434"
+NAME="AEN436"
 ></A
 ><H3
 ><A
@@ -1994,7 +1928,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN462"
+NAME="AEN464"
 ></A
 ><H3
 ><A
@@ -2136,7 +2070,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN496"
+NAME="AEN498"
 ></A
 ><H3
 ><A
@@ -2215,7 +2149,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN515"
+NAME="AEN517"
 ></A
 ><H3
 ><A
@@ -2273,7 +2207,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN529"
+NAME="AEN531"
 ></A
 ><H3
 ><A
@@ -2331,7 +2265,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN543"
+NAME="AEN545"
 ></A
 ><H3
 ><A
@@ -2431,7 +2365,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN567"
+NAME="AEN569"
 ></A
 ><H3
 ><A
@@ -2510,7 +2444,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN586"
+NAME="AEN588"
 ></A
 ><H3
 ><A
@@ -2610,7 +2544,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN610"
+NAME="AEN612"
 ></A
 ><H3
 ><A
@@ -2689,7 +2623,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN629"
+NAME="AEN631"
 ></A
 ><H3
 ><A
@@ -2786,7 +2720,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN652"
+NAME="AEN654"
 ></A
 ><H3
 ><A
@@ -2883,7 +2817,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN675"
+NAME="AEN677"
 ></A
 ><H3
 ><A
@@ -2983,7 +2917,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN699"
+NAME="AEN701"
 ></A
 ><H3
 ><A
@@ -3062,7 +2996,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN718"
+NAME="AEN720"
 ></A
 ><H3
 ><A
@@ -3156,7 +3090,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN740"
+NAME="AEN742"
 ></A
 ><H3
 ><A
@@ -3250,7 +3184,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN762"
+NAME="AEN764"
 ></A
 ><H3
 ><A
@@ -3344,7 +3278,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN784"
+NAME="AEN786"
 ></A
 ><H3
 ><A
@@ -3417,7 +3351,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN802"
+NAME="AEN804"
 ></A
 ><H3
 ><A
@@ -3490,7 +3424,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN820"
+NAME="AEN822"
 ></A
 ><H3
 ><A
@@ -3563,13 +3497,26 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN838"
+NAME="AEN840"
 ></A
 ><H3
 ><A
 NAME="XMLSAXHANDLERPTR"
 ></A
 >xmlSAXHandlerPtr</H3
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN844"
+></A
+><H3
+><A
+NAME="XMLPARSERVERSION"
+></A
+>xmlParserVersion</H3
 ><TABLE
 BORDER="0"
 BGCOLOR="#D6E8FF"
@@ -3579,7 +3526,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->typedef xmlSAXHandler *xmlSAXHandlerPtr;</PRE
+>extern const char *xmlParserVersion;</PRE
 ></TD
 ></TR
 ></TABLE
@@ -3589,7 +3536,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN843"
+NAME="AEN849"
 ></A
 ><H3
 ><A
@@ -3615,7 +3562,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN848"
+NAME="AEN854"
 ></A
 ><H3
 ><A
@@ -3641,7 +3588,33 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN853"
+NAME="AEN859"
+></A
+><H3
+><A
+NAME="HTMLDEFAULTSAXHANDLER"
+></A
+>htmlDefaultSAXHandler</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>extern xmlSAXHandler htmlDefaultSAXHandler;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN864"
 ></A
 ><H3
 ><A
@@ -3697,7 +3670,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the input CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3712,7 +3685,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new CHAR * or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3722,7 +3695,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN874"
+NAME="AEN885"
 ></A
 ><H3
 ><A
@@ -3779,7 +3752,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the input CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3796,12 +3769,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the len of <TT
-CLASS="PARAMETER"
-><I
->cur</I
-></TT
-></TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3816,7 +3784,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new CHAR * or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3826,7 +3794,124 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN900"
+NAME="AEN910"
+></A
+><H3
+><A
+NAME="XMLSTRSUB"
+></A
+>xmlStrsub ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>*       xmlStrsub                       (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             int start,
+                                             int len);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Extract a substring of a given string</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>str</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>start</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>len</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN939"
 ></A
 ><H3
 ><A
@@ -3842,10 +3927,10 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
-><A
+>const <A
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
->*       xmlStrchr                       (const <A
+>* xmlStrchr                       (const <A
 HREF="gnome-xml-tree.html#CHAR"
 >CHAR</A
 > *str,
@@ -3886,7 +3971,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR * array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3903,7 +3988,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR to search</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3918,7 +4003,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the CHAR * for the first occurence or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3928,7 +4013,109 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN926"
+NAME="AEN965"
+></A
+><H3
+><A
+NAME="XMLSTRSTR"
+></A
+>xmlStrstr ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+>* xmlStrstr                       (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *val);</PRE
+></TD
+></TR
+></TABLE
+><P
+>a strstr for CHAR's</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>str</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>val</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN991"
 ></A
 ><H3
 ><A
@@ -3985,7 +4172,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4002,7 +4189,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the second CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4017,7 +4204,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the integer result of the comparison</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4027,7 +4214,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN951"
+NAME="AEN1016"
 ></A
 ><H3
 ><A
@@ -4085,7 +4272,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4102,7 +4289,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the second CHAR *</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4119,7 +4306,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the max comparison length</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4134,7 +4321,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the integer result of the comparison</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4144,7 +4331,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN980"
+NAME="AEN1045"
 ></A
 ><H3
 ><A
@@ -4197,7 +4384,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR * array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4212,7 +4399,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the number of CHAR contained in the ARRAY.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4222,7 +4409,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1000"
+NAME="AEN1065"
 ></A
 ><H3
 ><A
@@ -4282,7 +4469,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the original CHAR * array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4299,7 +4486,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR * array added</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4314,7 +4501,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new CHAR * containing the concatenated string.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4324,7 +4511,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1026"
+NAME="AEN1091"
 ></A
 ><H3
 ><A
@@ -4385,7 +4572,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the original CHAR * array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4402,7 +4589,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR * array added</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4419,12 +4606,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the length of <TT
-CLASS="PARAMETER"
-><I
->add</I
-></TT
-></TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4439,7 +4621,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new CHAR * containing the concatenated string.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4449,7 +4631,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1057"
+NAME="AEN1121"
 ></A
 ><H3
 ><A
@@ -4505,7 +4687,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a pointer to an array of CHAR</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4520,7 +4702,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4530,7 +4712,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1078"
+NAME="AEN1142"
 ></A
 ><H3
 ><A
@@ -4584,7 +4766,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an pointer to a char array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4601,7 +4783,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the size of the array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4616,7 +4798,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4626,7 +4808,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1102"
+NAME="AEN1166"
 ></A
 ><H3
 ><A
@@ -4680,7 +4862,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4695,7 +4877,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4705,7 +4887,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1122"
+NAME="AEN1186"
 ></A
 ><H3
 ><A
@@ -4763,7 +4945,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  int 0 or 1 </TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4778,7 +4960,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the last value for 0 for no substitution, 1 for substitution.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4788,7 +4970,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1142"
+NAME="AEN1206"
 ></A
 ><H3
 ><A
@@ -4845,7 +5027,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a pointer to an array of CHAR</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4860,7 +5042,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4870,7 +5052,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1163"
+NAME="AEN1227"
 ></A
 ><H3
 ><A
@@ -4925,7 +5107,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an pointer to a char array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4942,7 +5124,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the size of the array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4957,7 +5139,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4967,7 +5149,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1187"
+NAME="AEN1251"
 ></A
 ><H3
 ><A
@@ -5022,7 +5204,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5037,7 +5219,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5047,7 +5229,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1207"
+NAME="AEN1271"
 ></A
 ><H3
 ><A
@@ -5105,7 +5287,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5120,8 +5302,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->0, -1 in case of error. the parser context is augmented
-as a result of the parsing.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5131,7 +5312,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1229"
+NAME="AEN1293"
 ></A
 ><H3
 ><A
@@ -5194,7 +5375,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the SAX handler block</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5211,7 +5392,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a pointer to an array of CHAR</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5228,8 +5409,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  work in recovery mode, i.e. tries to read no Well Formed
-documents</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5244,7 +5424,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5254,7 +5434,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1259"
+NAME="AEN1323"
 ></A
 ><H3
 ><A
@@ -5315,7 +5495,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the SAX handler block</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5332,7 +5512,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an pointer to a char array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5349,7 +5529,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the siwe of the array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5366,8 +5546,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  work in recovery mode, i.e. tries to read no Well Formed
-documents</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5382,7 +5561,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5392,7 +5571,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1292"
+NAME="AEN1356"
 ></A
 ><H3
 ><A
@@ -5453,7 +5632,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the SAX handler block</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5470,7 +5649,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5487,8 +5666,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  work in recovery mode, i.e. tries to read no Well Formed
-documents</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5503,7 +5681,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting document tree</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5513,7 +5691,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1321"
+NAME="AEN1385"
 ></A
 ><H3
 ><A
@@ -5573,7 +5751,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a NAME* containing the External ID of the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5590,7 +5768,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a NAME* containing the URL to the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5605,7 +5783,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting xmlDtdPtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5615,7 +5793,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1347"
+NAME="AEN1411"
 ></A
 ><H3
 ><A
@@ -5679,7 +5857,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the SAX handler block</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5696,7 +5874,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a NAME* containing the External ID of the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5713,7 +5891,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a NAME* containing the URL to the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5728,7 +5906,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the resulting xmlDtdPtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5738,7 +5916,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1378"
+NAME="AEN1442"
 ></A
 ><H3
 ><A
@@ -5791,7 +5969,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5801,7 +5979,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1394"
+NAME="AEN1458"
 ></A
 ><H3
 ><A
@@ -5854,7 +6032,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5864,7 +6042,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1410"
+NAME="AEN1474"
 ></A
 ><H3
 ><A
@@ -5924,7 +6102,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5941,7 +6119,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a CHAR * buffer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5958,7 +6136,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a file name</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5968,7 +6146,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1435"
+NAME="AEN1499"
 ></A
 ><H3
 ><A
@@ -6029,7 +6207,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6046,7 +6224,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML node within the tree</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6061,7 +6239,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->an xmlParserNodeInfo block pointer or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6071,7 +6249,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1461"
+NAME="AEN1525"
 ></A
 ><H3
 ><A
@@ -6124,7 +6302,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a node info sequence pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6134,7 +6312,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1477"
+NAME="AEN1541"
 ></A
 ><H3
 ><A
@@ -6188,7 +6366,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a node info sequence pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6198,7 +6376,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1493"
+NAME="AEN1557"
 ></A
 ><H3
 ><A
@@ -6259,7 +6437,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a node info sequence pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6276,7 +6454,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML node pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6291,7 +6469,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a long indicating the position of the record</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6301,7 +6479,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1519"
+NAME="AEN1583"
 ></A
 ><H3
 ><A
@@ -6358,7 +6536,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6375,7 +6553,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a node info sequence pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6385,7 +6563,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1540"
+NAME="AEN1604"
 ></A
 ><H3
 ><A
@@ -6410,6 +6588,34 @@
 ><P
 ></P
 ></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN1610"
+></A
+><H3
+><A
+NAME="HTMLDEFAULTSAXHANDLERINIT"
+></A
+>htmlDefaultSAXHandlerInit ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        htmlDefaultSAXHandlerInit       (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Initialize the default SAX handler</P
+><P
+></P
+></DIV
 ></DIV
 ><DIV
 CLASS="NAVFOOTER"
diff --git a/doc/html/gnome-xml-parserinternals.html b/doc/html/gnome-xml-parserinternals.html
index f4a3361..3f55c5f 100644
--- a/doc/html/gnome-xml-parserinternals.html
+++ b/doc/html/gnome-xml-parserinternals.html
@@ -13,7 +13,10 @@
 HREF="libxml.html"><LINK
 REL="PREVIOUS"
 TITLE="xml-error"
-HREF="gnome-xml-xml-error.html"></HEAD
+HREF="gnome-xml-xml-error.html"><LINK
+REL="NEXT"
+TITLE="HTMLparser"
+HREF="gnome-xml-htmlparser.html"></HEAD
 ><BODY
 BGCOLOR="#FFFFFF"
 TEXT="#000000"
@@ -94,7 +97,16 @@
 WIDTH="25%"
 BGCOLOR="#C00000"
 ALIGN="right"
->&nbsp;</TD
+><A
+HREF="gnome-xml-htmlparser.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
 ></TR
 ></TABLE
 ></DIV
@@ -103,7 +115,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN4471"
+NAME="AEN4552"
 ></A
 ><H2
 >Name</H2
@@ -111,7 +123,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN4474"
+NAME="AEN4555"
 ></A
 ><H2
 >Synopsis</H2
@@ -816,7 +828,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN4669"
+NAME="AEN4750"
 ></A
 ><H2
 >Description</H2
@@ -826,14 +838,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN4672"
+NAME="AEN4753"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4674"
+NAME="AEN4755"
 ></A
 ><H3
 ><A
@@ -891,7 +903,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4688"
+NAME="AEN4769"
 ></A
 ><H3
 ><A
@@ -949,7 +961,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4702"
+NAME="AEN4783"
 ></A
 ><H3
 ><A
@@ -1007,7 +1019,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4716"
+NAME="AEN4797"
 ></A
 ><H3
 ><A
@@ -1065,7 +1077,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4730"
+NAME="AEN4811"
 ></A
 ><H3
 ><A
@@ -1123,7 +1135,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4744"
+NAME="AEN4825"
 ></A
 ><H3
 ><A
@@ -1181,7 +1193,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4758"
+NAME="AEN4839"
 ></A
 ><H3
 ><A
@@ -1239,7 +1251,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4772"
+NAME="AEN4853"
 ></A
 ><H3
 ><A
@@ -1297,7 +1309,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4786"
+NAME="AEN4867"
 ></A
 ><H3
 ><A
@@ -1355,7 +1367,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4800"
+NAME="AEN4881"
 ></A
 ><H3
 ><A
@@ -1413,7 +1425,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4814"
+NAME="AEN4895"
 ></A
 ><H3
 ><A
@@ -1471,7 +1483,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4828"
+NAME="AEN4909"
 ></A
 ><H3
 ><A
@@ -1529,7 +1541,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4842"
+NAME="AEN4923"
 ></A
 ><H3
 ><A
@@ -1556,6 +1568,8 @@
 ></TR
 ></TABLE
 ><P
+>Create a parser context for an XML in-memory document.</P
+><P
 ></P
 ><DIV
 CLASS="INFORMALTABLE"
@@ -1608,7 +1622,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4862"
+NAME="AEN4944"
 ></A
 ><H3
 ><A
@@ -1663,7 +1677,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1678,7 +1692,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new parser context or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1688,7 +1702,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4882"
+NAME="AEN4964"
 ></A
 ><H3
 ><A
@@ -1742,7 +1756,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an pointer to a char array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1759,7 +1773,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the siwe of the array</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1774,7 +1788,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new parser context or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1784,7 +1798,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4906"
+NAME="AEN4988"
 ></A
 ><H3
 ><A
@@ -1838,7 +1852,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1848,7 +1862,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4922"
+NAME="AEN5004"
 ></A
 ><H3
 ><A
@@ -1907,7 +1921,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1924,7 +1938,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML entity pointer.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1934,7 +1948,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4943"
+NAME="AEN5025"
 ></A
 ><H3
 ><A
@@ -1994,7 +2008,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2011,7 +2025,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an Entity pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2026,7 +2040,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new input stream</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2036,7 +2050,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4969"
+NAME="AEN5051"
 ></A
 ><H3
 ><A
@@ -2094,7 +2108,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2111,7 +2125,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser input fragment (entity, XML fragment ...).</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2121,7 +2135,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4990"
+NAME="AEN5072"
 ></A
 ><H3
 ><A
@@ -2180,7 +2194,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2195,7 +2209,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the current CHAR in the parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2205,7 +2219,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5012"
+NAME="AEN5094"
 ></A
 ><H3
 ><A
@@ -2258,7 +2272,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an xmlParserInputPtr</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2268,7 +2282,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5028"
+NAME="AEN5110"
 ></A
 ><H3
 ><A
@@ -2325,7 +2339,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2342,7 +2356,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename to use as entity</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2357,7 +2371,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new input stream or NULL in case of error</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2367,7 +2381,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5053"
+NAME="AEN5135"
 ></A
 ><H3
 ><A
@@ -2433,7 +2447,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2450,7 +2464,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a CHAR ** </TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2465,8 +2479,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the function returns the local part, and prefix is updated
-to get the Prefix if any.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2476,7 +2489,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5082"
+NAME="AEN5164"
 ></A
 ><H3
 ><A
@@ -2537,7 +2550,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2552,7 +2565,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the namespace name or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2562,7 +2575,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5105"
+NAME="AEN5187"
 ></A
 ><H3
 ><A
@@ -2628,7 +2641,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2645,7 +2658,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a CHAR ** </TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2660,8 +2673,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the function returns the local part, and prefix is updated
-to get the Prefix if any.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2671,7 +2683,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5134"
+NAME="AEN5216"
 ></A
 ><H3
 ><A
@@ -2731,7 +2743,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2746,7 +2758,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the namespace name</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2756,7 +2768,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5157"
+NAME="AEN5239"
 ></A
 ><H3
 ><A
@@ -2812,7 +2824,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2827,7 +2839,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the string parser or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2837,7 +2849,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5178"
+NAME="AEN5260"
 ></A
 ><H3
 ><A
@@ -2894,7 +2906,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2904,7 +2916,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5195"
+NAME="AEN5277"
 ></A
 ><H3
 ><A
@@ -2967,7 +2979,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2982,7 +2994,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the Name parsed or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2992,7 +3004,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5219"
+NAME="AEN5301"
 ></A
 ><H3
 ><A
@@ -3052,7 +3064,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3067,7 +3079,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the Nmtoken parsed or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3077,7 +3089,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5242"
+NAME="AEN5324"
 ></A
 ><H3
 ><A
@@ -3140,7 +3152,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3157,7 +3169,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  if non-NULL store a copy of the original entity value</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3172,7 +3184,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the EntityValue parsed with reference substitued or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3182,7 +3194,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5269"
+NAME="AEN5351"
 ></A
 ><H3
 ><A
@@ -3244,7 +3256,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3259,7 +3271,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the AttValue parsed or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3269,7 +3281,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5291"
+NAME="AEN5373"
 ></A
 ><H3
 ><A
@@ -3327,7 +3339,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3342,7 +3354,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the SystemLiteral parsed or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3352,7 +3364,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5313"
+NAME="AEN5395"
 ></A
 ><H3
 ><A
@@ -3410,7 +3422,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3425,7 +3437,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the PubidLiteral parsed or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3435,7 +3447,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5335"
+NAME="AEN5417"
 ></A
 ><H3
 ><A
@@ -3492,7 +3504,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3509,7 +3521,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  int indicating whether we are within a CDATA section</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3519,7 +3531,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5356"
+NAME="AEN5438"
 ></A
 ><H3
 ><A
@@ -3588,7 +3600,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3605,7 +3617,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a CHAR** receiving PubidLiteral</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3622,8 +3634,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> indicate whether we should restrict parsing to only
-production [75], see NOTE below</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3638,9 +3649,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the function returns SystemLiteral and in the second
-case publicID receives PubidLiteral, is strict is off
-it is possible to return NULL and have publicID set.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3650,7 +3659,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5389"
+NAME="AEN5471"
 ></A
 ><H3
 ><A
@@ -3709,7 +3718,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3726,7 +3735,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> should we create a node, or just skip the content</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3736,7 +3745,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5410"
+NAME="AEN5492"
 ></A
 ><H3
 ><A
@@ -3794,7 +3803,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3809,7 +3818,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the PITarget name or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3819,7 +3828,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5432"
+NAME="AEN5514"
 ></A
 ><H3
 ><A
@@ -3876,7 +3885,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3886,7 +3895,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5450"
+NAME="AEN5532"
 ></A
 ><H3
 ><A
@@ -3951,7 +3960,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3961,7 +3970,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5470"
+NAME="AEN5552"
 ></A
 ><H3
 ><A
@@ -4026,7 +4035,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4036,7 +4045,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5492"
+NAME="AEN5574"
 ></A
 ><H3
 ><A
@@ -4104,7 +4113,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4121,7 +4130,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  Receive a possible fixed default value for the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4136,8 +4145,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED
-or XML_ATTRIBUTE_FIXED. </TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4147,7 +4155,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5521"
+NAME="AEN5603"
 ></A
 ><H3
 ><A
@@ -4207,7 +4215,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4222,7 +4230,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the notation attribute tree built while parsing</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4232,7 +4240,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5544"
+NAME="AEN5626"
 ></A
 ><H3
 ><A
@@ -4290,7 +4298,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4305,7 +4313,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the enumeration attribute tree built while parsing</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4315,7 +4323,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5566"
+NAME="AEN5648"
 ></A
 ><H3
 ><A
@@ -4376,7 +4384,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4393,7 +4401,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the enumeration tree built while parsing</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4408,7 +4416,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4418,7 +4426,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5593"
+NAME="AEN5675"
 ></A
 ><H3
 ><A
@@ -4482,7 +4490,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4499,7 +4507,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the enumeration tree built while parsing</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4514,7 +4522,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the attribute type</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4524,7 +4532,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5621"
+NAME="AEN5703"
 ></A
 ><H3
 ><A
@@ -4581,7 +4589,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4591,7 +4599,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5639"
+NAME="AEN5721"
 ></A
 ><H3
 ><A
@@ -4658,7 +4666,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4673,7 +4681,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the list of the xmlElementContentPtr describing the element choices</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4683,7 +4691,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5663"
+NAME="AEN5745"
 ></A
 ><H3
 ><A
@@ -4749,7 +4757,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4764,8 +4772,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the tree of xmlElementContentPtr describing the element 
-hierarchy.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4775,7 +4782,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5688"
+NAME="AEN5770"
 ></A
 ><H3
 ><A
@@ -4839,7 +4846,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4856,7 +4863,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the name of the element being defined.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4873,7 +4880,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the Element Content pointer will be stored here if any</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4888,7 +4895,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the type of element content XML_ELEMENT_TYPE_xxx</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4898,7 +4905,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5719"
+NAME="AEN5801"
 ></A
 ><H3
 ><A
@@ -4955,7 +4962,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4970,7 +4977,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the type of the element, or -1 in case of error</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4980,7 +4987,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5741"
+NAME="AEN5823"
 ></A
 ><H3
 ><A
@@ -5038,7 +5045,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5048,7 +5055,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5759"
+NAME="AEN5841"
 ></A
 ><H3
 ><A
@@ -5107,7 +5114,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5122,7 +5129,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the value parsed (as an int)</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5132,7 +5139,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5781"
+NAME="AEN5863"
 ></A
 ><H3
 ><A
@@ -5190,7 +5197,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5205,7 +5212,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the xmlEntityPtr if found, or NULL otherwise.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5215,7 +5222,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5803"
+NAME="AEN5885"
 ></A
 ><H3
 ><A
@@ -5279,7 +5286,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5289,7 +5296,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5822"
+NAME="AEN5904"
 ></A
 ><H3
 ><A
@@ -5346,7 +5353,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5356,7 +5363,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5839"
+NAME="AEN5921"
 ></A
 ><H3
 ><A
@@ -5412,7 +5419,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5422,7 +5429,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5856"
+NAME="AEN5938"
 ></A
 ><H3
 ><A
@@ -5493,7 +5500,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5510,7 +5517,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a CHAR ** used to store the value of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5525,7 +5532,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the attribute name, and the value in *value.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5535,7 +5542,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5887"
+NAME="AEN5969"
 ></A
 ><H3
 ><A
@@ -5602,7 +5609,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5617,7 +5624,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the element name parsed</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5627,7 +5634,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5913"
+NAME="AEN5995"
 ></A
 ><H3
 ><A
@@ -5690,7 +5697,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5707,7 +5714,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the tag name as parsed in the opening tag.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5717,7 +5724,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5937"
+NAME="AEN6019"
 ></A
 ><H3
 ><A
@@ -5778,7 +5785,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5788,7 +5795,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5957"
+NAME="AEN6039"
 ></A
 ><H3
 ><A
@@ -5843,7 +5850,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5853,7 +5860,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5974"
+NAME="AEN6056"
 ></A
 ><H3
 ><A
@@ -5910,7 +5917,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5920,7 +5927,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN5992"
+NAME="AEN6074"
 ></A
 ><H3
 ><A
@@ -5978,7 +5985,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5993,7 +6000,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the string giving the XML version number, or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6003,7 +6010,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6014"
+NAME="AEN6096"
 ></A
 ><H3
 ><A
@@ -6063,7 +6070,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6078,7 +6085,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the version string, e.g. "1.0"</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6088,7 +6095,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6037"
+NAME="AEN6119"
 ></A
 ><H3
 ><A
@@ -6146,7 +6153,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6161,7 +6168,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the encoding name value or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6171,7 +6178,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6059"
+NAME="AEN6141"
 ></A
 ><H3
 ><A
@@ -6231,7 +6238,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6246,7 +6253,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the encoding value or NULL</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6256,7 +6263,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6082"
+NAME="AEN6164"
 ></A
 ><H3
 ><A
@@ -6312,7 +6319,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6327,7 +6334,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->1 if standalone, 0 otherwise</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6337,7 +6344,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6103"
+NAME="AEN6185"
 ></A
 ><H3
 ><A
@@ -6392,7 +6399,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6402,7 +6409,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6120"
+NAME="AEN6202"
 ></A
 ><H3
 ><A
@@ -6457,7 +6464,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an XML parser context</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6467,7 +6474,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6137"
+NAME="AEN6219"
 ></A
 ><H3
 ><A
@@ -6483,7 +6490,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_SUBSTITUTE_NONE	0</PRE
+>#define     XML_SUBSTITUTE_NONE</PRE
 ></TD
 ></TR
 ></TABLE
@@ -6493,7 +6500,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6142"
+NAME="AEN6224"
 ></A
 ><H3
 ><A
@@ -6509,7 +6516,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_SUBSTITUTE_REF	1</PRE
+>#define     XML_SUBSTITUTE_REF</PRE
 ></TD
 ></TR
 ></TABLE
@@ -6519,7 +6526,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6147"
+NAME="AEN6229"
 ></A
 ><H3
 ><A
@@ -6535,7 +6542,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_SUBSTITUTE_PEREF	2</PRE
+>#define     XML_SUBSTITUTE_PEREF</PRE
 ></TD
 ></TR
 ></TABLE
@@ -6545,7 +6552,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6152"
+NAME="AEN6234"
 ></A
 ><H3
 ><A
@@ -6561,7 +6568,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_SUBSTITUTE_BOTH 	3</PRE
+>#define     XML_SUBSTITUTE_BOTH</PRE
 ></TD
 ></TR
 ></TABLE
@@ -6571,7 +6578,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6157"
+NAME="AEN6239"
 ></A
 ><H3
 ><A
@@ -6643,7 +6650,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the parser context</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6660,7 +6667,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the len to decode (in bytes !), -1 for no size limit</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6677,7 +6684,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6694,7 +6701,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an end marker CHAR, 0 if none</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6711,7 +6718,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an end marker CHAR, 0 if none</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6728,7 +6735,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  an end marker CHAR, 0 if none</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6743,8 +6750,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->A newly allocated string with the substitution done. The caller
-must deallocate it !</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6754,7 +6760,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6202"
+NAME="AEN6284"
 ></A
 ><H3
 ><A
@@ -6851,7 +6857,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6226"
+NAME="AEN6308"
 ></A
 ><H3
 ><A
@@ -6930,7 +6936,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6246"
+NAME="AEN6328"
 ></A
 ><H3
 ><A
@@ -7027,7 +7033,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN6270"
+NAME="AEN6352"
 ></A
 ><H3
 ><A
@@ -7171,7 +7177,16 @@
 WIDTH="25%"
 BGCOLOR="#C00000"
 ALIGN="right"
->&nbsp;</TD
+><A
+HREF="gnome-xml-htmlparser.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
 ></TR
 ><TR
 ><TD
@@ -7187,7 +7202,13 @@
 ><TD
 COLSPAN="2"
 ALIGN="right"
->&nbsp;</TD
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>HTMLparser</B
+></FONT
+></TD
 ></TR
 ></TABLE
 ></DIV
diff --git a/doc/html/gnome-xml-tree.html b/doc/html/gnome-xml-tree.html
index 197b89b..7842b2b 100644
--- a/doc/html/gnome-xml-tree.html
+++ b/doc/html/gnome-xml-tree.html
@@ -115,7 +115,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN1551"
+NAME="AEN1621"
 ></A
 ><H2
 >Name</H2
@@ -123,7 +123,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN1554"
+NAME="AEN1624"
 ></A
 ><H2
 >Synopsis</H2
@@ -1031,7 +1031,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN1800"
+NAME="AEN1870"
 ></A
 ><H2
 >Description</H2
@@ -1041,14 +1041,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN1803"
+NAME="AEN1873"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1805"
+NAME="AEN1875"
 ></A
 ><H3
 ><A
@@ -1087,7 +1087,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1810"
+NAME="AEN1880"
 ></A
 ><H3
 ><A
@@ -1100,33 +1100,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1814"
+NAME="AEN1884"
 ></A
 ><H3
 ><A
 NAME="XMLNOTATIONPTR"
 ></A
 >xmlNotationPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlNotation *xmlNotationPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1819"
+NAME="AEN1888"
 ></A
 ><H3
 ><A
@@ -1163,7 +1150,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1824"
+NAME="AEN1893"
 ></A
 ><H3
 ><A
@@ -1194,59 +1181,33 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1829"
+NAME="AEN1898"
 ></A
 ><H3
 ><A
 NAME="XMLENUMERATIONPTR"
 ></A
 >xmlEnumerationPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlEnumeration *xmlEnumerationPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1834"
+NAME="AEN1902"
 ></A
 ><H3
 ><A
 NAME="XMLATTRIBUTEPTR"
 ></A
 >xmlAttributePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlAttribute *xmlAttributePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1839"
+NAME="AEN1906"
 ></A
 ><H3
 ><A
@@ -1277,7 +1238,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1844"
+NAME="AEN1911"
 ></A
 ><H3
 ><A
@@ -1308,33 +1269,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1849"
+NAME="AEN1916"
 ></A
 ><H3
 ><A
 NAME="XMLELEMENTCONTENTPTR"
 ></A
 >xmlElementContentPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlElementContent *xmlElementContentPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1854"
+NAME="AEN1920"
 ></A
 ><H3
 ><A
@@ -1365,33 +1313,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1859"
+NAME="AEN1925"
 ></A
 ><H3
 ><A
 NAME="XMLELEMENTPTR"
 ></A
 >xmlElementPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlElement *xmlElementPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1864"
+NAME="AEN1929"
 ></A
 ><H3
 ><A
@@ -1420,241 +1355,124 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1869"
+NAME="AEN1934"
 ></A
 ><H3
 ><A
 NAME="XMLNSPTR"
 ></A
 >xmlNsPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlNs *xmlNsPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1874"
+NAME="AEN1938"
 ></A
 ><H3
 ><A
 NAME="XMLDTDPTR"
 ></A
 >xmlDtdPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlDtd *xmlDtdPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1879"
+NAME="AEN1942"
 ></A
 ><H3
 ><A
 NAME="XMLATTRPTR"
 ></A
 >xmlAttrPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlAttr *xmlAttrPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1884"
+NAME="AEN1946"
 ></A
 ><H3
 ><A
 NAME="XMLNODE"
 ></A
 >xmlNode</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlNode xmlNode;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1889"
+NAME="AEN1950"
 ></A
 ><H3
 ><A
 NAME="XMLNODEPTR"
 ></A
 >xmlNodePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlNode *xmlNodePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1894"
+NAME="AEN1954"
 ></A
 ><H3
 ><A
 NAME="XMLDOC"
 ></A
 >xmlDoc</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlDoc xmlDoc;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1899"
+NAME="AEN1958"
 ></A
 ><H3
 ><A
 NAME="XMLDOCPTR"
 ></A
 >xmlDocPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlDoc *xmlDocPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1904"
+NAME="AEN1962"
 ></A
 ><H3
 ><A
 NAME="XMLBUFFER"
 ></A
 >xmlBuffer</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef _xmlBuffer xmlBuffer;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1909"
+NAME="AEN1966"
 ></A
 ><H3
 ><A
 NAME="XMLBUFFERPTR"
 ></A
 >xmlBufferPtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlBuffer *xmlBufferPtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1914"
+NAME="AEN1970"
 ></A
 ><H3
 ><A
@@ -1680,7 +1498,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1919"
+NAME="AEN1975"
 ></A
 ><H3
 ><A
@@ -1706,7 +1524,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1924"
+NAME="AEN1980"
 ></A
 ><H3
 ><A
@@ -1732,7 +1550,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1929"
+NAME="AEN1985"
 ></A
 ><H3
 ><A
@@ -1783,7 +1601,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new structure.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1793,7 +1611,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1945"
+NAME="AEN2001"
 ></A
 ><H3
 ><A
@@ -1846,7 +1664,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the buffer to free</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1856,7 +1674,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1961"
+NAME="AEN2017"
 ></A
 ><H3
 ><A
@@ -1913,7 +1731,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the file output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1930,7 +1748,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the buffer to dump</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1945,7 +1763,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the number of CHAR written</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1955,7 +1773,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN1986"
+NAME="AEN2042"
 ></A
 ><H3
 ><A
@@ -2013,7 +1831,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the buffer to dump</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2030,7 +1848,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR string</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2047,7 +1865,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the number of CHAR to add</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2057,7 +1875,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2011"
+NAME="AEN2067"
 ></A
 ><H3
 ><A
@@ -2114,7 +1932,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the buffer to dump</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2131,7 +1949,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the CHAR string</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2141,7 +1959,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2032"
+NAME="AEN2088"
 ></A
 ><H3
 ><A
@@ -2195,7 +2013,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the buffer to dump</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2212,7 +2030,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the C char string</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2222,7 +2040,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2052"
+NAME="AEN2108"
 ></A
 ><H3
 ><A
@@ -2290,7 +2108,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2307,7 +2125,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the DTD name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2324,7 +2142,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the external ID</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2341,7 +2159,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the system ID</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2356,7 +2174,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new DTD structure</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2366,7 +2184,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2088"
+NAME="AEN2144"
 ></A
 ><H3
 ><A
@@ -2434,7 +2252,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2451,7 +2269,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the DTD name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2468,7 +2286,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the external ID</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2485,7 +2303,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the system ID</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2500,7 +2318,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new DTD structure</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2510,7 +2328,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2124"
+NAME="AEN2180"
 ></A
 ><H3
 ><A
@@ -2563,7 +2381,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the DTD structure to free up</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2573,7 +2391,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2140"
+NAME="AEN2196"
 ></A
 ><H3
 ><A
@@ -2637,7 +2455,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document carrying the namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2654,7 +2472,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the URI associated</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2671,7 +2489,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the prefix for the namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2686,7 +2504,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->returns a new namespace pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2696,7 +2514,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2171"
+NAME="AEN2227"
 ></A
 ><H3
 ><A
@@ -2760,7 +2578,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the element carrying the namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2777,7 +2595,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the URI associated</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2794,7 +2612,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the prefix for the namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2809,7 +2627,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->returns a new namespace pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2819,7 +2637,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2202"
+NAME="AEN2258"
 ></A
 ><H3
 ><A
@@ -2872,7 +2690,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the namespace pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2882,7 +2700,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2218"
+NAME="AEN2274"
 ></A
 ><H3
 ><A
@@ -2938,7 +2756,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  CHAR string giving the version of XML "1.0"</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2953,7 +2771,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new document</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2963,7 +2781,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2239"
+NAME="AEN2295"
 ></A
 ><H3
 ><A
@@ -3016,8 +2834,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  pointer to the document
-@:  </TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3027,7 +2844,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2255"
+NAME="AEN2311"
 ></A
 ><H3
 ><A
@@ -3091,7 +2908,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3108,7 +2925,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the name of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3125,7 +2942,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the value of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3140,7 +2957,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the attribute</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3150,7 +2967,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2286"
+NAME="AEN2342"
 ></A
 ><H3
 ><A
@@ -3214,7 +3031,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the holding node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3231,7 +3048,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the name of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3248,7 +3065,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the value of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3263,7 +3080,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the attribute</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3273,7 +3090,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2317"
+NAME="AEN2373"
 ></A
 ><H3
 ><A
@@ -3326,7 +3143,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first property in the list</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3336,7 +3153,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2333"
+NAME="AEN2389"
 ></A
 ><H3
 ><A
@@ -3389,7 +3206,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first property in the list</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3399,7 +3216,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2349"
+NAME="AEN2405"
 ></A
 ><H3
 ><A
@@ -3455,7 +3272,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3470,7 +3287,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlAttrPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3480,7 +3297,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2370"
+NAME="AEN2426"
 ></A
 ><H3
 ><A
@@ -3536,7 +3353,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3551,7 +3368,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlAttrPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3561,7 +3378,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2391"
+NAME="AEN2447"
 ></A
 ><H3
 ><A
@@ -3617,7 +3434,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the dtd</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3632,7 +3449,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlDtdPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3642,7 +3459,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2412"
+NAME="AEN2468"
 ></A
 ><H3
 ><A
@@ -3700,7 +3517,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3717,7 +3534,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  if 1 do a recursive copy.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3732,7 +3549,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlDocPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3742,7 +3559,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2437"
+NAME="AEN2493"
 ></A
 ><H3
 ><A
@@ -3821,7 +3638,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3838,7 +3655,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  namespace if any</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3855,7 +3672,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3872,7 +3689,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text content if any</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3887,7 +3704,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -3897,7 +3714,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2475"
+NAME="AEN2531"
 ></A
 ><H3
 ><A
@@ -3969,7 +3786,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  namespace if any</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -3986,7 +3803,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4001,7 +3818,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4011,7 +3828,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2503"
+NAME="AEN2559"
 ></A
 ><H3
 ><A
@@ -4096,7 +3913,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the parent node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4113,7 +3930,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a namespace if any</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4130,7 +3947,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the name of the child</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4147,7 +3964,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the content of the child if any.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4162,7 +3979,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4172,7 +3989,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2542"
+NAME="AEN2598"
 ></A
 ><H3
 ><A
@@ -4232,7 +4049,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4249,7 +4066,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4264,7 +4081,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4274,7 +4091,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2568"
+NAME="AEN2624"
 ></A
 ><H3
 ><A
@@ -4330,7 +4147,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4345,7 +4162,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4355,7 +4172,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2589"
+NAME="AEN2645"
 ></A
 ><H3
 ><A
@@ -4417,7 +4234,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4434,7 +4251,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4451,7 +4268,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text len.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4466,7 +4283,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4476,7 +4293,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2619"
+NAME="AEN2675"
 ></A
 ><H3
 ><A
@@ -4533,7 +4350,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4550,7 +4367,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the text len.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4565,7 +4382,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4575,7 +4392,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2644"
+NAME="AEN2700"
 ></A
 ><H3
 ><A
@@ -4635,7 +4452,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4652,7 +4469,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the comment content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4667,7 +4484,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4677,7 +4494,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2670"
+NAME="AEN2726"
 ></A
 ><H3
 ><A
@@ -4733,7 +4550,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the comment content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4748,7 +4565,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4758,7 +4575,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2691"
+NAME="AEN2747"
 ></A
 ><H3
 ><A
@@ -4818,7 +4635,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4835,7 +4652,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the reference name, or the reference string with &amp; and ;</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4850,7 +4667,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the new node object.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4860,7 +4677,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2717"
+NAME="AEN2773"
 ></A
 ><H3
 ><A
@@ -4917,7 +4734,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4934,7 +4751,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  if 1 do a recursive copy.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -4949,7 +4766,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlNodePtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -4959,7 +4776,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2742"
+NAME="AEN2798"
 ></A
 ><H3
 ><A
@@ -5015,7 +4832,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first node in the list.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5030,7 +4847,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlNodePtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5040,7 +4857,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2763"
+NAME="AEN2819"
 ></A
 ><H3
 ><A
@@ -5096,7 +4913,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the parent node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5111,7 +4928,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the last child or NULL if none.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5121,7 +4938,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2784"
+NAME="AEN2840"
 ></A
 ><H3
 ><A
@@ -5174,7 +4991,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5189,7 +5006,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->1 yes, 0 no</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5199,7 +5016,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2804"
+NAME="AEN2860"
 ></A
 ><H3
 ><A
@@ -5264,7 +5081,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the parent node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5281,7 +5098,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the child node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5296,7 +5113,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the child or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5306,7 +5123,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2831"
+NAME="AEN2887"
 ></A
 ><H3
 ><A
@@ -5359,7 +5176,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5369,7 +5186,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2847"
+NAME="AEN2903"
 ></A
 ><H3
 ><A
@@ -5429,7 +5246,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first text node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5446,7 +5263,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the second text node being merged</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5461,7 +5278,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the first text node augmented</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5471,7 +5288,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2873"
+NAME="AEN2929"
 ></A
 ><H3
 ><A
@@ -5529,7 +5346,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5546,7 +5363,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5563,12 +5380,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  <TT
-CLASS="PARAMETER"
-><I
->content</I
-></TT
-> lenght</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5578,7 +5390,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2899"
+NAME="AEN2954"
 ></A
 ><H3
 ><A
@@ -5632,7 +5444,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first node in the list</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5642,7 +5454,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2915"
+NAME="AEN2970"
 ></A
 ><H3
 ><A
@@ -5695,7 +5507,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5705,7 +5517,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2931"
+NAME="AEN2986"
 ></A
 ><H3
 ><A
@@ -5777,7 +5589,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5794,7 +5606,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the current node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5811,7 +5623,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the namespace string</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5826,7 +5638,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the namespace pointer or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5836,7 +5648,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2963"
+NAME="AEN3018"
 ></A
 ><H3
 ><A
@@ -5901,7 +5713,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5918,7 +5730,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the current node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5935,7 +5747,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the namespace value</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -5950,7 +5762,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the namespace pointer or NULL.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -5960,7 +5772,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN2994"
+NAME="AEN3049"
 ></A
 ><H3
 ><A
@@ -6017,7 +5829,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a node in the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6034,7 +5846,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a namespace pointer</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6044,7 +5856,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3015"
+NAME="AEN3070"
 ></A
 ><H3
 ><A
@@ -6100,7 +5912,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6115,7 +5927,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlNsPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6125,7 +5937,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3036"
+NAME="AEN3091"
 ></A
 ><H3
 ><A
@@ -6181,7 +5993,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the first namespace</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6196,7 +6008,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> a new xmlNsPtr, or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6206,7 +6018,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3057"
+NAME="AEN3112"
 ></A
 ><H3
 ><A
@@ -6270,7 +6082,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6287,7 +6099,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6304,7 +6116,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute value</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6319,7 +6131,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the attribute pointer.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6329,7 +6141,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3088"
+NAME="AEN3143"
 ></A
 ><H3
 ><A
@@ -6390,7 +6202,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6407,7 +6219,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6422,7 +6234,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the attribute value or NULL if not found.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6432,7 +6244,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3114"
+NAME="AEN3169"
 ></A
 ><H3
 ><A
@@ -6493,7 +6305,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6510,7 +6322,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the value of the attribute</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6525,7 +6337,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the first child</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6535,7 +6347,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3140"
+NAME="AEN3195"
 ></A
 ><H3
 ><A
@@ -6597,7 +6409,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6614,7 +6426,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the value of the text</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6631,7 +6443,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the length of the string value</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6646,7 +6458,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the first child</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6656,7 +6468,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3170"
+NAME="AEN3225"
 ></A
 ><H3
 ><A
@@ -6718,7 +6530,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6735,7 +6547,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  a Node list</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6752,7 +6564,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  should we replace entity contents or show their external form</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6767,7 +6579,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a pointer to the string copy, the calller must free it.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6777,7 +6589,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3200"
+NAME="AEN3255"
 ></A
 ><H3
 ><A
@@ -6834,7 +6646,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node being modified</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6851,7 +6663,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the new value of the content</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6861,7 +6673,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3221"
+NAME="AEN3276"
 ></A
 ><H3
 ><A
@@ -6919,7 +6731,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node being modified</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6936,7 +6748,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the new value of the content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -6953,12 +6765,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the size of <TT
-CLASS="PARAMETER"
-><I
->content</I
-></TT
-></TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -6968,7 +6775,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3247"
+NAME="AEN3301"
 ></A
 ><H3
 ><A
@@ -7025,7 +6832,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node being modified</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7042,7 +6849,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  extra content</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7052,7 +6859,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3268"
+NAME="AEN3322"
 ></A
 ><H3
 ><A
@@ -7110,7 +6917,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node being modified</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7127,7 +6934,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  extra content</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7144,12 +6951,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the size of <TT
-CLASS="PARAMETER"
-><I
->content</I
-></TT
-></TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7159,7 +6961,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3294"
+NAME="AEN3347"
 ></A
 ><H3
 ><A
@@ -7218,7 +7020,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the node being read</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7233,8 +7035,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->a new CHAR * or NULL if no content is available.
-It's up to the caller to free the memory.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7244,7 +7045,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3315"
+NAME="AEN3368"
 ></A
 ><H3
 ><A
@@ -7302,7 +7103,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7319,7 +7120,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the string to add</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7329,7 +7130,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3336"
+NAME="AEN3389"
 ></A
 ><H3
 ><A
@@ -7384,7 +7185,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7401,7 +7202,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the string to add</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7411,7 +7212,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3356"
+NAME="AEN3409"
 ></A
 ><H3
 ><A
@@ -7470,7 +7271,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7487,7 +7288,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the string to add</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7497,7 +7298,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3377"
+NAME="AEN3430"
 ></A
 ><H3
 ><A
@@ -7556,7 +7357,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7573,7 +7374,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  OUT: the memory pointer</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7590,7 +7391,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  OUT: the memory lenght</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7600,7 +7401,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3402"
+NAME="AEN3455"
 ></A
 ><H3
 ><A
@@ -7657,7 +7458,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the FILE*</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7674,7 +7475,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7684,7 +7485,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3423"
+NAME="AEN3476"
 ></A
 ><H3
 ><A
@@ -7739,7 +7540,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the filename</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7756,7 +7557,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7771,7 +7572,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
-> the number of file written or -1 in case of failure.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7781,7 +7582,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3447"
+NAME="AEN3500"
 ></A
 ><H3
 ><A
@@ -7834,7 +7635,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7849,7 +7650,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->0 (uncompressed) to 9 (max compression)</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7859,7 +7660,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3467"
+NAME="AEN3520"
 ></A
 ><H3
 ><A
@@ -7914,7 +7715,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the document</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -7931,7 +7732,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the compression ratio</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7941,7 +7742,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3487"
+NAME="AEN3540"
 ></A
 ><H3
 ><A
@@ -7989,7 +7790,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->0 (uncompressed) to 9 (max compression)</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -7999,7 +7800,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3502"
+NAME="AEN3555"
 ></A
 ><H3
 ><A
@@ -8050,7 +7851,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the compression ratio</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
diff --git a/doc/html/gnome-xml-valid.html b/doc/html/gnome-xml-valid.html
index 8aba6ef..65dba3c 100644
--- a/doc/html/gnome-xml-valid.html
+++ b/doc/html/gnome-xml-valid.html
@@ -115,7 +115,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN3883"
+NAME="AEN3967"
 ></A
 ><H2
 >Name</H2
@@ -123,7 +123,7 @@
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN3886"
+NAME="AEN3970"
 ></A
 ><H2
 >Synopsis</H2
@@ -377,7 +377,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3953"
+NAME="AEN4037"
 ></A
 ><H2
 >Description</H2
@@ -387,14 +387,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN3956"
+NAME="AEN4040"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3958"
+NAME="AEN4042"
 ></A
 ><H3
 ><A
@@ -410,7 +410,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_MIN_NOTATION_TABLE	32</PRE
+>#define     XML_MIN_NOTATION_TABLE</PRE
 ></TD
 ></TR
 ></TABLE
@@ -420,33 +420,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3963"
+NAME="AEN4047"
 ></A
 ><H3
 ><A
 NAME="XMLNOTATIONTABLEPTR"
 ></A
 >xmlNotationTablePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlNotationTable *xmlNotationTablePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3968"
+NAME="AEN4051"
 ></A
 ><H3
 ><A
@@ -462,7 +449,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_MIN_ELEMENT_TABLE	32</PRE
+>#define     XML_MIN_ELEMENT_TABLE</PRE
 ></TD
 ></TR
 ></TABLE
@@ -472,33 +459,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3973"
+NAME="AEN4056"
 ></A
 ><H3
 ><A
 NAME="XMLELEMENTTABLEPTR"
 ></A
 >xmlElementTablePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlElementTable *xmlElementTablePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3978"
+NAME="AEN4060"
 ></A
 ><H3
 ><A
@@ -514,7 +488,7 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->#define XML_MIN_ATTRIBUTE_TABLE	32</PRE
+>#define     XML_MIN_ATTRIBUTE_TABLE</PRE
 ></TD
 ></TR
 ></TABLE
@@ -524,33 +498,20 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3983"
+NAME="AEN4065"
 ></A
 ><H3
 ><A
 NAME="XMLATTRIBUTETABLEPTR"
 ></A
 >xmlAttributeTablePtr</H3
-><TABLE
-BORDER="0"
-BGCOLOR="#D6E8FF"
-WIDTH="100%"
-CELLPADDING="6"
-><TR
-><TD
-><PRE
-CLASS="PROGRAMLISTING"
->typedef xmlAttributeTable *xmlAttributeTablePtr;</PRE
-></TD
-></TR
-></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN3988"
+NAME="AEN4069"
 ></A
 ><H3
 ><A
@@ -618,7 +579,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  pointer to the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -635,7 +596,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -652,7 +613,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the public identifier or NULL</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -669,7 +630,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the system identifier or NULL</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -684,7 +645,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->NULL if not, othervise the entity</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -694,7 +655,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4024"
+NAME="AEN4105"
 ></A
 ><H3
 ><A
@@ -750,7 +711,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  A notation table</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -765,7 +726,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new xmlNotationTablePtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -775,7 +736,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4045"
+NAME="AEN4126"
 ></A
 ><H3
 ><A
@@ -828,7 +789,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An notation table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -838,7 +799,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4061"
+NAME="AEN4142"
 ></A
 ><H3
 ><A
@@ -895,7 +856,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -912,7 +873,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  A notation table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -922,7 +883,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4082"
+NAME="AEN4163"
 ></A
 ><H3
 ><A
@@ -979,7 +940,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the subelement name or NULL</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -996,7 +957,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the type of element content decl</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1011,7 +972,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->NULL if not, othervise the new element content structure</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1021,7 +982,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4107"
+NAME="AEN4188"
 ></A
 ><H3
 ><A
@@ -1077,7 +1038,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An element content pointer.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1092,7 +1053,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new xmlElementContentPtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1102,7 +1063,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4128"
+NAME="AEN4209"
 ></A
 ><H3
 ><A
@@ -1155,7 +1116,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the element content tree to free</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1165,7 +1126,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4144"
+NAME="AEN4225"
 ></A
 ><H3
 ><A
@@ -1230,7 +1191,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  pointer to the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1247,7 +1208,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the entity name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1264,7 +1225,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the element type</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1281,7 +1242,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the element content tree or NULL</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1296,7 +1257,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->NULL if not, othervise the entity</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1306,7 +1267,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4179"
+NAME="AEN4260"
 ></A
 ><H3
 ><A
@@ -1362,7 +1323,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An element table</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1377,7 +1338,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new xmlElementTablePtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1387,7 +1348,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4200"
+NAME="AEN4281"
 ></A
 ><H3
 ><A
@@ -1440,7 +1401,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An element table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1450,7 +1411,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4216"
+NAME="AEN4297"
 ></A
 ><H3
 ><A
@@ -1507,7 +1468,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1524,7 +1485,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An element table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1534,7 +1495,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4237"
+NAME="AEN4318"
 ></A
 ><H3
 ><A
@@ -1590,7 +1551,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the enumeration name or NULL</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1605,8 +1566,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the xmlEnumerationPtr just created or NULL in case
-of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1616,7 +1576,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4258"
+NAME="AEN4339"
 ></A
 ><H3
 ><A
@@ -1669,7 +1629,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the tree to free.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1679,7 +1639,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4274"
+NAME="AEN4355"
 ></A
 ><H3
 ><A
@@ -1735,7 +1695,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the tree to copy.</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1750,8 +1710,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the xmlEnumerationPtr just created or NULL in case
-of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1761,7 +1720,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4295"
+NAME="AEN4376"
 ></A
 ><H3
 ><A
@@ -1835,7 +1794,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  pointer to the DTD</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1852,7 +1811,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the element name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1869,7 +1828,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute name</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1886,7 +1845,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute type</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1903,7 +1862,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute default type</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1920,7 +1879,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the attribute default value</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1937,7 +1896,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  if it's an enumeration, the associated list</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -1952,7 +1911,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->NULL if not, othervise the entity</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -1962,7 +1921,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4344"
+NAME="AEN4425"
 ></A
 ><H3
 ><A
@@ -2018,7 +1977,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An attribute table</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2033,7 +1992,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->the new xmlAttributeTablePtr or NULL in case of error.</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2043,7 +2002,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4365"
+NAME="AEN4446"
 ></A
 ><H3
 ><A
@@ -2096,7 +2055,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An attribute table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
@@ -2106,7 +2065,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN4381"
+NAME="AEN4462"
 ></A
 ><H3
 ><A
@@ -2163,7 +2122,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  the XML buffer output</TD
+>&nbsp;</TD
 ></TR
 ><TR
 ><TD
@@ -2180,7 +2139,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->  An attribute table</TD
+>&nbsp;</TD
 ></TR
 ></TABLE
 ><P
diff --git a/doc/html/gnome-xml-xml-error.html b/doc/html/gnome-xml-xml-error.html
new file mode 100644
index 0000000..b432aa8
--- /dev/null
+++ b/doc/html/gnome-xml-xml-error.html
@@ -0,0 +1,473 @@
+<HTML
+><HEAD
+><TITLE
+>xml-error</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
+REL="HOME"
+TITLE="Gnome XML Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Gnome XML Library"
+HREF="libxml.html"><LINK
+REL="PREVIOUS"
+TITLE="valid"
+HREF="gnome-xml-valid.html"><LINK
+REL="NEXT"
+TITLE="parserInternals"
+HREF="gnome-xml-parserinternals.html"></HEAD
+><BODY
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>Gnome XML Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-valid.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-parserinternals.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+></TABLE
+></DIV
+><H1
+>xml-error</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN4488"
+></A
+><H2
+>Name</H2
+>xml-error &#8212; </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN4491"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>&#13;
+
+void        <A
+HREF="gnome-xml-xml-error.html#XMLPARSERERROR"
+>xmlParserError</A
+>                  (void *ctx,
+                                             const char *msg,
+                                             ...);
+void        <A
+HREF="gnome-xml-xml-error.html#XMLPARSERWARNING"
+>xmlParserWarning</A
+>                (void *ctx,
+                                             const char *msg,
+                                             ...);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4496"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN4499"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4501"
+></A
+><H3
+><A
+NAME="XMLPARSERERROR"
+></A
+>xmlParserError ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlParserError                  (void *ctx,
+                                             const char *msg,
+                                             ...);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Display and format an error messages, gives file, line, position and
+extra parameters.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctx</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>msg</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>...</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN4524"
+></A
+><H3
+><A
+NAME="XMLPARSERWARNING"
+></A
+>xmlParserWarning ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlParserWarning                (void *ctx,
+                                             const char *msg,
+                                             ...);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Display and format a warning messages, gives file, line, position and
+extra parameters.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctx</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>msg</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>...</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-valid.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+><A
+HREF="gnome-xml-parserinternals.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Next Page &#62;&#62;&#62;</B
+></FONT
+></A
+></TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>valid</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>parserInternals</B
+></FONT
+></TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/gnome-xml-xpath.html b/doc/html/gnome-xml-xpath.html
new file mode 100644
index 0000000..2c0172c
--- /dev/null
+++ b/doc/html/gnome-xml-xpath.html
@@ -0,0 +1,1027 @@
+<HTML
+><HEAD
+><TITLE
+>xpath</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
+REL="HOME"
+TITLE="Gnome XML Library Reference Manual"
+HREF="book1.html"><LINK
+REL="UP"
+TITLE="Gnome XML Library"
+HREF="libxml.html"><LINK
+REL="PREVIOUS"
+TITLE="HTMLtree"
+HREF="gnome-xml-htmltree.html"></HEAD
+><BODY
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="4"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="5"
+>Gnome XML Library Reference Manual</FONT
+></TH
+></TR
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-htmltree.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+>&nbsp;</TD
+></TR
+></TABLE
+></DIV
+><H1
+>xpath</H1
+><DIV
+CLASS="REFNAMEDIV"
+><A
+NAME="AEN6802"
+></A
+><H2
+>Name</H2
+>xpath &#8212; </DIV
+><DIV
+CLASS="REFSYNOPSISDIV"
+><A
+NAME="AEN6805"
+></A
+><H2
+>Synopsis</H2
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="SYNOPSIS"
+>&#13;
+
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-UNDEFINED"
+>XPATH_UNDEFINED</A
+>
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-NODESET"
+>XPATH_NODESET</A
+>
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-BOOLEAN"
+>XPATH_BOOLEAN</A
+>
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-NUMBER"
+>XPATH_NUMBER</A
+>
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-STRING"
+>XPATH_STRING</A
+>
+#define     <A
+HREF="gnome-xml-xpath.html#XPATH-MARKER"
+>XPATH_MARKER</A
+>
+void        (<A
+HREF="gnome-xml-xpath.html#XMLXPATHFUNCTION"
+>*xmlXPathFunction</A
+>)             (<GTKDOCLINK
+HREF="XMLXPATHPARSERCONTEXTPTR"
+>xmlXPathParserContextPtr</GTKDOCLINK
+> ctxt,
+                                             int nargs);
+<GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-xpath.html#XMLXPATHNEWCONTEXT"
+>xmlXPathNewContext</A
+>       (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> doc,
+                                             void *variables,
+                                             void *functions,
+                                             void *namespaces);
+void        <A
+HREF="gnome-xml-xpath.html#XMLXPATHFREECONTEXT"
+>xmlXPathFreeContext</A
+>             (<GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);
+<GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-xpath.html#XMLXPATHEVAL"
+>xmlXPathEval</A
+>              (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);
+void        <A
+HREF="gnome-xml-xpath.html#XMLXPATHFREEOBJECT"
+>xmlXPathFreeObject</A
+>              (<GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> obj);
+<GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> <A
+HREF="gnome-xml-xpath.html#XMLXPATHEVALEXPRESSION"
+>xmlXPathEvalExpression</A
+>    (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6831"
+></A
+><H2
+>Description</H2
+><P
+></P
+></DIV
+><DIV
+CLASS="REFSECT1"
+><A
+NAME="AEN6834"
+></A
+><H2
+>Details</H2
+><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6836"
+></A
+><H3
+><A
+NAME="XPATH-UNDEFINED"
+></A
+>XPATH_UNDEFINED</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_UNDEFINED</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6841"
+></A
+><H3
+><A
+NAME="XPATH-NODESET"
+></A
+>XPATH_NODESET</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_NODESET</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6846"
+></A
+><H3
+><A
+NAME="XPATH-BOOLEAN"
+></A
+>XPATH_BOOLEAN</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_BOOLEAN</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6851"
+></A
+><H3
+><A
+NAME="XPATH-NUMBER"
+></A
+>XPATH_NUMBER</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_NUMBER</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6856"
+></A
+><H3
+><A
+NAME="XPATH-STRING"
+></A
+>XPATH_STRING</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_STRING</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6861"
+></A
+><H3
+><A
+NAME="XPATH-MARKER"
+></A
+>XPATH_MARKER</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>#define     XPATH_MARKER</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6866"
+></A
+><H3
+><A
+NAME="XMLXPATHFUNCTION"
+></A
+>xmlXPathFunction ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        (*xmlXPathFunction)             (<GTKDOCLINK
+HREF="XMLXPATHPARSERCONTEXTPTR"
+>xmlXPathParserContextPtr</GTKDOCLINK
+> ctxt,
+                                             int nargs);</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>nargs</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6885"
+></A
+><H3
+><A
+NAME="XMLXPATHNEWCONTEXT"
+></A
+>xmlXPathNewContext ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> xmlXPathNewContext       (<A
+HREF="gnome-xml-tree.html#XMLDOCPTR"
+>xmlDocPtr</A
+> doc,
+                                             void *variables,
+                                             void *functions,
+                                             void *namespaces);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Create a new xmlXPathContext</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>doc</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>variables</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>functions</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>namespaces</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6918"
+></A
+><H3
+><A
+NAME="XMLXPATHFREECONTEXT"
+></A
+>xmlXPathFreeContext ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlXPathFreeContext             (<GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free up an xmlXPathContext</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6934"
+></A
+><H3
+><A
+NAME="XMLXPATHEVAL"
+></A
+>xmlXPathEval ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> xmlXPathEval              (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluate the XPath Location Path in the given context.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>str</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6960"
+></A
+><H3
+><A
+NAME="XMLXPATHFREEOBJECT"
+></A
+>xmlXPathFreeObject ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlXPathFreeObject              (<GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> obj);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Free up an xmlXPathObjectPtr object.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>obj</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN6976"
+></A
+><H3
+><A
+NAME="XMLXPATHEVALEXPRESSION"
+></A
+>xmlXPathEvalExpression ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><GTKDOCLINK
+HREF="XMLXPATHOBJECTPTR"
+>xmlXPathObjectPtr</GTKDOCLINK
+> xmlXPathEvalExpression    (const <A
+HREF="gnome-xml-tree.html#CHAR"
+>CHAR</A
+> *str,
+                                             <GTKDOCLINK
+HREF="XMLXPATHCONTEXTPTR"
+>xmlXPathContextPtr</GTKDOCLINK
+> ctxt);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Evaluate the XPath expression in the given context.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>str</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>ctxt</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>&nbsp;</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><BR><BR><TABLE
+WIDTH="100%"
+BORDER="0"
+BGCOLOR="#000000"
+CELLPADDING="1"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="left"
+><A
+HREF="gnome-xml-htmltree.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>&#60;&#60;&#60; Previous Page</B
+></FONT
+></A
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#0000C0"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="book1.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Home</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#00C000"
+ALIGN="center"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+><A
+HREF="libxml.html"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>Up</B
+></FONT
+></A
+></B
+></FONT
+></TD
+><TD
+WIDTH="25%"
+BGCOLOR="#C00000"
+ALIGN="right"
+>&nbsp;</TD
+></TR
+><TR
+><TD
+COLSPAN="2"
+ALIGN="left"
+><FONT
+COLOR="#FFFFFF"
+SIZE="3"
+><B
+>HTMLtree</B
+></FONT
+></TD
+><TD
+COLSPAN="2"
+ALIGN="right"
+>&nbsp;</TD
+></TR
+></TABLE
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/doc/html/index.sgml b/doc/html/index.sgml
index a0bdb07..69a2907 100644
--- a/doc/html/index.sgml
+++ b/doc/html/index.sgml
@@ -35,11 +35,15 @@
 <ANCHOR id ="HASINTERNALSUBSETSAXFUNC" href="gnome-xml/gnome-xml-parser.html#HASINTERNALSUBSETSAXFUNC">
 <ANCHOR id ="HASEXTERNALSUBSETSAXFUNC" href="gnome-xml/gnome-xml-parser.html#HASEXTERNALSUBSETSAXFUNC">
 <ANCHOR id ="XMLSAXHANDLERPTR" href="gnome-xml/gnome-xml-parser.html#XMLSAXHANDLERPTR">
+<ANCHOR id ="XMLPARSERVERSION" href="gnome-xml/gnome-xml-parser.html#XMLPARSERVERSION">
 <ANCHOR id ="XMLDEFAULTSAXLOCATOR" href="gnome-xml/gnome-xml-parser.html#XMLDEFAULTSAXLOCATOR">
 <ANCHOR id ="XMLDEFAULTSAXHANDLER" href="gnome-xml/gnome-xml-parser.html#XMLDEFAULTSAXHANDLER">
+<ANCHOR id ="HTMLDEFAULTSAXHANDLER" href="gnome-xml/gnome-xml-parser.html#HTMLDEFAULTSAXHANDLER">
 <ANCHOR id ="XMLSTRDUP" href="gnome-xml/gnome-xml-parser.html#XMLSTRDUP">
 <ANCHOR id ="XMLSTRNDUP" href="gnome-xml/gnome-xml-parser.html#XMLSTRNDUP">
+<ANCHOR id ="XMLSTRSUB" href="gnome-xml/gnome-xml-parser.html#XMLSTRSUB">
 <ANCHOR id ="XMLSTRCHR" href="gnome-xml/gnome-xml-parser.html#XMLSTRCHR">
+<ANCHOR id ="XMLSTRSTR" href="gnome-xml/gnome-xml-parser.html#XMLSTRSTR">
 <ANCHOR id ="XMLSTRCMP" href="gnome-xml/gnome-xml-parser.html#XMLSTRCMP">
 <ANCHOR id ="XMLSTRNCMP" href="gnome-xml/gnome-xml-parser.html#XMLSTRNCMP">
 <ANCHOR id ="XMLSTRLEN" href="gnome-xml/gnome-xml-parser.html#XMLSTRLEN">
@@ -67,6 +71,7 @@
 <ANCHOR id ="XMLPARSERFINDNODEINFOINDEX" href="gnome-xml/gnome-xml-parser.html#XMLPARSERFINDNODEINFOINDEX">
 <ANCHOR id ="XMLPARSERADDNODEINFO" href="gnome-xml/gnome-xml-parser.html#XMLPARSERADDNODEINFO">
 <ANCHOR id ="XMLDEFAULTSAXHANDLERINIT" href="gnome-xml/gnome-xml-parser.html#XMLDEFAULTSAXHANDLERINIT">
+<ANCHOR id ="HTMLDEFAULTSAXHANDLERINIT" href="gnome-xml/gnome-xml-parser.html#HTMLDEFAULTSAXHANDLERINIT">
 <ANCHOR id ="GNOME-XML-TREE" href="gnome-xml/gnome-xml-tree.html">
 <ANCHOR id ="XMLELEMENTTYPE" href="gnome-xml/gnome-xml-tree.html#XMLELEMENTTYPE">
 <ANCHOR id ="CHAR" href="gnome-xml/gnome-xml-tree.html#CHAR">
@@ -176,6 +181,7 @@
 <ANCHOR id ="XMLGETDOCENTITY" href="gnome-xml/gnome-xml-entities.html#XMLGETDOCENTITY">
 <ANCHOR id ="XMLGETDTDENTITY" href="gnome-xml/gnome-xml-entities.html#XMLGETDTDENTITY">
 <ANCHOR id ="XMLENCODEENTITIES" href="gnome-xml/gnome-xml-entities.html#XMLENCODEENTITIES">
+<ANCHOR id ="XMLENCODEENTITIESREENTRANT" href="gnome-xml/gnome-xml-entities.html#XMLENCODEENTITIESREENTRANT">
 <ANCHOR id ="XMLCREATEENTITIESTABLE" href="gnome-xml/gnome-xml-entities.html#XMLCREATEENTITIESTABLE">
 <ANCHOR id ="XMLCOPYENTITIESTABLE" href="gnome-xml/gnome-xml-entities.html#XMLCOPYENTITIESTABLE">
 <ANCHOR id ="XMLFREEENTITIESTABLE" href="gnome-xml/gnome-xml-entities.html#XMLFREEENTITIESTABLE">
@@ -288,3 +294,42 @@
 <ANCHOR id ="NODEPOP" href="gnome-xml/gnome-xml-parserinternals.html#NODEPOP">
 <ANCHOR id ="INPUTPUSH" href="gnome-xml/gnome-xml-parserinternals.html#INPUTPUSH">
 <ANCHOR id ="INPUTPOP" href="gnome-xml/gnome-xml-parserinternals.html#INPUTPOP">
+<ANCHOR id ="GNOME-XML-HTMLPARSER" href="gnome-xml/gnome-xml-htmlparser.html">
+<ANCHOR id ="HTMLPARSERCTXT" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSERCTXT">
+<ANCHOR id ="HTMLPARSERCTXTPTR" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR">
+<ANCHOR id ="HTMLPARSERNODEINFO" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSERNODEINFO">
+<ANCHOR id ="HTMLSAXHANDLER" href="gnome-xml/gnome-xml-htmlparser.html#HTMLSAXHANDLER">
+<ANCHOR id ="HTMLSAXHANDLERPTR" href="gnome-xml/gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR">
+<ANCHOR id ="HTMLPARSERINPUT" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSERINPUT">
+<ANCHOR id ="HTMLPARSERINPUTPTR" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSERINPUTPTR">
+<ANCHOR id ="HTMLDOCPTR" href="gnome-xml/gnome-xml-htmlparser.html#HTMLDOCPTR">
+<ANCHOR id ="HTMLNODEPTR" href="gnome-xml/gnome-xml-htmlparser.html#HTMLNODEPTR">
+<ANCHOR id ="HTMLTAGLOOKUP" href="gnome-xml/gnome-xml-htmlparser.html#HTMLTAGLOOKUP">
+<ANCHOR id ="HTMLENTITYLOOKUP" href="gnome-xml/gnome-xml-htmlparser.html#HTMLENTITYLOOKUP">
+<ANCHOR id ="HTMLPARSEENTITYREF" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSEENTITYREF">
+<ANCHOR id ="HTMLPARSECHARREF" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSECHARREF">
+<ANCHOR id ="HTMLPARSEELEMENT" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSEELEMENT">
+<ANCHOR id ="HTMLSAXPARSEDOC" href="gnome-xml/gnome-xml-htmlparser.html#HTMLSAXPARSEDOC">
+<ANCHOR id ="HTMLPARSEDOC" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSEDOC">
+<ANCHOR id ="HTMLSAXPARSEFILE" href="gnome-xml/gnome-xml-htmlparser.html#HTMLSAXPARSEFILE">
+<ANCHOR id ="HTMLPARSEFILE" href="gnome-xml/gnome-xml-htmlparser.html#HTMLPARSEFILE">
+<ANCHOR id ="GNOME-XML-HTMLTREE" href="gnome-xml/gnome-xml-htmltree.html">
+<ANCHOR id ="HTML-TEXT-NODE" href="gnome-xml/gnome-xml-htmltree.html#HTML-TEXT-NODE">
+<ANCHOR id ="HTML-ENTITY-REF-NODE" href="gnome-xml/gnome-xml-htmltree.html#HTML-ENTITY-REF-NODE">
+<ANCHOR id ="HTML-COMMENT-NODE" href="gnome-xml/gnome-xml-htmltree.html#HTML-COMMENT-NODE">
+<ANCHOR id ="HTMLDOCDUMPMEMORY" href="gnome-xml/gnome-xml-htmltree.html#HTMLDOCDUMPMEMORY">
+<ANCHOR id ="HTMLDOCDUMP" href="gnome-xml/gnome-xml-htmltree.html#HTMLDOCDUMP">
+<ANCHOR id ="HTMLSAVEFILE" href="gnome-xml/gnome-xml-htmltree.html#HTMLSAVEFILE">
+<ANCHOR id ="GNOME-XML-XPATH" href="gnome-xml/gnome-xml-xpath.html">
+<ANCHOR id ="XPATH-UNDEFINED" href="gnome-xml/gnome-xml-xpath.html#XPATH-UNDEFINED">
+<ANCHOR id ="XPATH-NODESET" href="gnome-xml/gnome-xml-xpath.html#XPATH-NODESET">
+<ANCHOR id ="XPATH-BOOLEAN" href="gnome-xml/gnome-xml-xpath.html#XPATH-BOOLEAN">
+<ANCHOR id ="XPATH-NUMBER" href="gnome-xml/gnome-xml-xpath.html#XPATH-NUMBER">
+<ANCHOR id ="XPATH-STRING" href="gnome-xml/gnome-xml-xpath.html#XPATH-STRING">
+<ANCHOR id ="XPATH-MARKER" href="gnome-xml/gnome-xml-xpath.html#XPATH-MARKER">
+<ANCHOR id ="XMLXPATHFUNCTION" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHFUNCTION">
+<ANCHOR id ="XMLXPATHNEWCONTEXT" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHNEWCONTEXT">
+<ANCHOR id ="XMLXPATHFREECONTEXT" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHFREECONTEXT">
+<ANCHOR id ="XMLXPATHEVAL" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHEVAL">
+<ANCHOR id ="XMLXPATHFREEOBJECT" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHFREEOBJECT">
+<ANCHOR id ="XMLXPATHEVALEXPRESSION" href="gnome-xml/gnome-xml-xpath.html#XMLXPATHEVALEXPRESSION">
diff --git a/doc/html/libxml.html b/doc/html/libxml.html
index 8abd792..c12cb2f 100644
--- a/doc/html/libxml.html
+++ b/doc/html/libxml.html
@@ -106,11 +106,15 @@
 >Gnome XML Library</A
 ></H1
 >The parser general interfaces
+     The parser SAX interfaces
     Manipulation the tree generated by the parser
     Routines for handling entities
     All the stuff defined in DTDs
     Callbacks in case of parsing error
     Access to the parser internal routines
+    parsing HTML and generating a tree
+    printing HTML trees
+    A on-going XPath implementation
   </DIV
 ><DIV
 CLASS="NAVFOOTER"
diff --git a/include/libxml/debugXML.h b/include/libxml/debugXML.h
index 2be4826..556d1fe 100644
--- a/include/libxml/debugXML.h
+++ b/include/libxml/debugXML.h
@@ -12,6 +12,7 @@
 extern void xmlDebugDumpString(FILE *output, const CHAR *str);
 extern void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth);
 extern void xmlDebugDumpAttrList(FILE *output, xmlAttrPtr attr, int depth);
+extern void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpNodeList(FILE *output, xmlNodePtr node, int depth);
 extern void xmlDebugDumpDocument(FILE *output, xmlDocPtr doc);
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 63fa549..65433d8 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -190,7 +190,9 @@
  */
 CHAR *xmlStrdup(const CHAR *cur);
 CHAR *xmlStrndup(const CHAR *cur, int len);
-CHAR *xmlStrchr(const CHAR *str, CHAR val);
+CHAR *xmlStrsub(const CHAR *str, int start, int len);
+const CHAR *xmlStrchr(const CHAR *str, CHAR val);
+const CHAR *xmlStrstr(const CHAR *str, CHAR *val);
 int xmlStrcmp(const CHAR *str1, const CHAR *str2);
 int xmlStrncmp(const CHAR *str1, const CHAR *str2, int len);
 int xmlStrlen(const CHAR *str);
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
new file mode 100644
index 0000000..fb06e23
--- /dev/null
+++ b/include/libxml/xpath.h
@@ -0,0 +1,108 @@
+/*
+ * xpath.c: interface for XML Path Language implementation
+ *
+ * Reference: W3C Working Draft 5 July 1999
+ *            http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html
+ *
+ * See COPYRIGHT for the status of this software
+ *
+ * Author: Daniel.Veillard@w3.org
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include "tree.h"
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates) 
+ */
+typedef struct xmlNodeSet {
+    int nodeNr;			/* # of node in the set */
+    int nodeMax;		/* allocated space */
+    xmlNodePtr *nodeTab;	/* array of nodes in no particular order */
+} xmlNodeSet, *xmlNodeSetPtr;
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ *   - node-set
+ *   - boolean
+ *   - number
+ *   - string
+ */
+
+#define XPATH_UNDEFINED	0
+#define XPATH_NODESET	1
+#define XPATH_BOOLEAN	2
+#define XPATH_NUMBER	3
+#define XPATH_STRING	4
+#define XPATH_MARKER	5  /* used for func call checks */
+
+typedef struct xmlXPathObject {
+    int type;
+    xmlNodeSetPtr nodesetval;
+    int boolval;
+    float floatval;
+    CHAR *stringval;
+} xmlXPathObject, *xmlXPathObjectPtr;
+
+/* 
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ *    - a node (the context node) 
+ *    - a node list (the context node list) 
+ *    - a set of variable bindings 
+ *    - a function library 
+ *    - the set of namespace declarations in scope for the expression 
+ */
+
+typedef struct xmlXPathContext {
+    xmlDocPtr doc;			/* The current document */
+    xmlNodePtr node;			/* The current node */
+    xmlNodeSetPtr nodelist;		/* The current node list */
+    void *variables; /* TODO !!!! */
+    void *functions; /* TODO !!!! */
+    void *namespaces; /* TODO !!!! */
+} xmlXPathContext, *xmlXPathContextPtr;
+
+/*
+ * An XPath parser context, it contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+ */
+typedef struct xmlXPathParserContext {
+    const CHAR *cur;			/* the current char being parsed */
+    const CHAR *base;			/* the full expression */
+
+    int error;				/* error code */
+
+    xmlXPathContextPtr  context;	/* the evaluation context */
+    xmlXPathObjectPtr     value;	/* the current value */
+    int                 valueNr;	/* number of values stacked */
+    int                valueMax;	/* max number of values stacked */
+    xmlXPathObjectPtr *valueTab;	/* stack of values */
+} xmlXPathParserContext, *xmlXPathParserContextPtr;
+
+/*
+ * An XPath function
+ * The arguments (if any) are popped out of the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/************************************************************************
+ *									*
+ *			Public API					*
+ *									*
+ ************************************************************************/
+
+xmlXPathContextPtr xmlXPathNewContext(xmlDocPtr doc, void *variables,
+                                      void *functions, void *namespaces);
+void xmlXPathFreeContext(xmlXPathContextPtr ctxt);
+xmlXPathObjectPtr xmlXPathEval(const CHAR *str, xmlXPathContextPtr ctxt);
+void xmlXPathFreeObject(xmlXPathObjectPtr obj);
+xmlXPathObjectPtr xmlXPathEvalExpression(const CHAR *str,
+                                         xmlXPathContextPtr ctxt);
+
+#endif /* ! __XML_XPATH_H__ */
diff --git a/parser.c b/parser.c
index e2ee736..97c2add 100644
--- a/parser.c
+++ b/parser.c
@@ -786,7 +786,7 @@
  * Returns the CHAR * for the first occurence or NULL.
  */
 
-CHAR *
+const CHAR *
 xmlStrchr(const CHAR *str, CHAR val) {
     while (*str != 0) {
         if (*str == val) return((CHAR *) str);
@@ -796,6 +796,61 @@
 }
 
 /**
+ * xmlStrstr:
+ * @str:  the CHAR * array (haystack)
+ * @val:  the CHAR to search (needle)
+ *
+ * a strstr for CHAR's
+ *
+ * Returns the CHAR * for the first occurence or NULL.
+ */
+
+const CHAR *
+xmlStrstr(const CHAR *str, CHAR *val) {
+    int n;
+    
+    if (str == NULL) return(NULL);
+    if (val == NULL) return(NULL);
+    n = xmlStrlen(val);
+
+    if (n == 0) return(str);
+    while (*str != 0) {
+        if (*str == *val) {
+	    if (!xmlStrncmp(str, val, n)) return((const CHAR *) str);
+	}
+	str++;
+    }
+    return(NULL);
+}
+
+/**
+ * xmlStrsub:
+ * @str:  the CHAR * array (haystack)
+ * @start:  the index of the first char (zero based)
+ * @len:  the length of the substring
+ *
+ * Extract a substring of a given string
+ *
+ * Returns the CHAR * for the first occurence or NULL.
+ */
+
+CHAR *
+xmlStrsub(const CHAR *str, int start, int len) {
+    int i;
+    
+    if (str == NULL) return(NULL);
+    if (start < 0) return(NULL);
+    if (len < 0) return(NULL);
+
+    for (i = 0;i < start;i++) {
+        if (*str == 0) return(NULL);
+	str++;
+    }
+    if (*str == 0) return(NULL);
+    return(xmlStrndup(str, len));
+}
+
+/**
  * xmlStrlen:
  * @str:  the CHAR * array
  *
diff --git a/parser.h b/parser.h
index 63fa549..65433d8 100644
--- a/parser.h
+++ b/parser.h
@@ -190,7 +190,9 @@
  */
 CHAR *xmlStrdup(const CHAR *cur);
 CHAR *xmlStrndup(const CHAR *cur, int len);
-CHAR *xmlStrchr(const CHAR *str, CHAR val);
+CHAR *xmlStrsub(const CHAR *str, int start, int len);
+const CHAR *xmlStrchr(const CHAR *str, CHAR val);
+const CHAR *xmlStrstr(const CHAR *str, CHAR *val);
 int xmlStrcmp(const CHAR *str1, const CHAR *str2);
 int xmlStrncmp(const CHAR *str1, const CHAR *str2, int len);
 int xmlStrlen(const CHAR *str);
diff --git a/result/XPath/expr/base b/result/XPath/expr/base
new file mode 100644
index 0000000..2f1ebda
--- /dev/null
+++ b/result/XPath/expr/base
@@ -0,0 +1,5 @@
+Object is a number : 1
+Object is a number : 3
+Object is a number : 6
+Object is a number : 11
+Object is a number : 21
diff --git a/result/XPath/expr/functions b/result/XPath/expr/functions
new file mode 100644
index 0000000..3e40603
--- /dev/null
+++ b/result/XPath/expr/functions
@@ -0,0 +1,5 @@
+Object is a Boolean : true
+Object is a Boolean : false
+Object is a number : 1.5
+Object is a string : tititoto
+Object is a string : tititototatalast
diff --git a/result/XPath/expr/strings b/result/XPath/expr/strings
new file mode 100644
index 0000000..e405715
--- /dev/null
+++ b/result/XPath/expr/strings
@@ -0,0 +1,19 @@
+Object is a string : 5
+Object is a string : 0.5
+Object is a string : -0.5
+Object is a string : true
+Object is a string : false
+Object is a string : tititoto
+Object is a string : tititototata
+Object is a Boolean : true
+Object is a Boolean : false
+Object is a Boolean : true
+Object is a Boolean : true
+Object is a Boolean : true
+Object is a Boolean : false
+Object is a string : 234
+Object is a string : 2345
+Object is a string : 234
+Object is a string : 12
+Object is a number : 0
+Object is a number : 4
diff --git a/result/XPath/tests/chaptersbase b/result/XPath/tests/chaptersbase
new file mode 100644
index 0000000..43cc053
--- /dev/null
+++ b/result/XPath/tests/chaptersbase
@@ -0,0 +1,36 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT head
+Object is a Node Set :
+Set contains 6 nodes:
+1    ELEMENT head
+2    ELEMENT chapter
+3    ELEMENT chapter
+4    ELEMENT chapter
+5    ELEMENT chapter
+6    ELEMENT chapter
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT title
+Object is a Node Set :
+Set contains 1 nodes:
+1    TEXT
+    content=Welcome to Gnome
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT title
+Object is a Node Set :
+Set contains 6 nodes:
+1    ELEMENT title
+2    ELEMENT title
+3    ELEMENT title
+4    ELEMENT title
+5    ELEMENT title
+6    ELEMENT title
+Object is a Node Set :
+Set contains 5 nodes:
+1    ELEMENT chapter
+2    ELEMENT chapter
+3    ELEMENT chapter
+4    ELEMENT chapter
+5    ELEMENT chapter
diff --git a/result/XPath/tests/simpleabbr b/result/XPath/tests/simpleabbr
new file mode 100644
index 0000000..cca499d
--- /dev/null
+++ b/result/XPath/tests/simpleabbr
@@ -0,0 +1,25 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT chapter
+Object is a Node Set :
+Set contains 2 nodes:
+1    ELEMENT p
+2    ELEMENT p
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT image
+      ATTRIBUTE href
+        TEXT
+        content=linus.gif
+Object is a Node Set :
+Set contains 2 nodes:
+1    TEXT
+    content=bla bla bla ...
+2    TEXT
+    content=...
+Object is a Node Set :
+Set contains 1 nodes:
+1    TEXT
+    content=bla bla bla ...
+Object is a Node Set :
+Set contains 0 nodes:
diff --git a/result/XPath/tests/simplebase b/result/XPath/tests/simplebase
new file mode 100644
index 0000000..32a84bb
--- /dev/null
+++ b/result/XPath/tests/simplebase
@@ -0,0 +1,24 @@
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT head
+Object is a Node Set :
+Set contains 2 nodes:
+1    ELEMENT head
+2    ELEMENT chapter
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT title
+Object is a Node Set :
+Set contains 1 nodes:
+1    TEXT
+    content=Welcome to Gnome
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT title
+Object is a Node Set :
+Set contains 2 nodes:
+1    ELEMENT title
+2    ELEMENT title
+Object is a Node Set :
+Set contains 1 nodes:
+1    ELEMENT chapter
diff --git a/test/XPath/docs/chapters b/test/XPath/docs/chapters
new file mode 100644
index 0000000..bf402d1
--- /dev/null
+++ b/test/XPath/docs/chapters
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
+  <head>
+   <title>Welcome to Gnome</title>
+  </head>
+  <chapter>
+   <title>The Linux adventure</title>
+   <p>bla bla bla ...</p>
+   <image href="linus.gif"/>
+   <p>...</p>
+  </chapter>
+  <chapter>
+   <title>Chapter 2</title>
+   <p>this is chapter 2 ...</p>
+  </chapter>
+  <chapter>
+   <title>Chapter 3</title>
+   <p>this is chapter 3 ...</p>
+  </chapter>
+  <chapter>
+   <title>Chapter 4</title>
+   <p>this is chapter 4 ...</p>
+  </chapter>
+  <chapter>
+   <title>Chapter 5</title>
+   <p>this is chapter 5 ...</p>
+  </chapter>
+</EXAMPLE>
diff --git a/test/XPath/docs/simple b/test/XPath/docs/simple
new file mode 100644
index 0000000..ca665a2
--- /dev/null
+++ b/test/XPath/docs/simple
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<EXAMPLE prop1="gnome is great" prop2="&amp; linux too">
+  <head>
+   <title>Welcome to Gnome</title>
+  </head>
+  <chapter>
+   <title>The Linux adventure</title>
+   <p>bla bla bla ...</p>
+   <image href="linus.gif"/>
+   <p>...</p>
+  </chapter>
+</EXAMPLE>
diff --git a/test/XPath/expr/base b/test/XPath/expr/base
new file mode 100644
index 0000000..9aaed4f
--- /dev/null
+++ b/test/XPath/expr/base
@@ -0,0 +1,5 @@
+1
+1+2
+2*3
+1+2*3+4
+(1+2)*(3+4)
diff --git a/test/XPath/expr/functions b/test/XPath/expr/functions
new file mode 100644
index 0000000..d2cba4e
--- /dev/null
+++ b/test/XPath/expr/functions
@@ -0,0 +1,5 @@
+true()
+false()
+number("1.5")
+concat("titi",'toto')
+concat("titi",'toto',"tata","last")
diff --git a/test/XPath/expr/strings b/test/XPath/expr/strings
new file mode 100644
index 0000000..299b300
--- /dev/null
+++ b/test/XPath/expr/strings
@@ -0,0 +1,19 @@
+string(5)
+string(0.5)
+string(-0.5)
+string(true())
+string(false())
+concat("titi","toto")
+concat("titi","toto","tata")
+starts-with("tititoto","titi")
+starts-with("tititoto","to")
+contains("tititototata","titi")
+contains("tititototata","toto")
+contains("tititototata","tata")
+contains("tititototata","tita")
+substring("12345",2,3)
+substring("12345",2)
+substring("12345",1.5,2.6)
+substring("12345",0,3)
+string-length("")
+string-length("titi")
diff --git a/test/XPath/tests/chaptersbase b/test/XPath/tests/chaptersbase
new file mode 100644
index 0000000..997d8c8
--- /dev/null
+++ b/test/XPath/tests/chaptersbase
@@ -0,0 +1,7 @@
+/child::head
+/child::*
+/child::head/child::title
+/child::head/child::title/child::text()
+/child::head/node()
+/descendant::title
+/descendant::p/ancestor::chapter
diff --git a/test/XPath/tests/simpleabbr b/test/XPath/tests/simpleabbr
new file mode 100644
index 0000000..b443122
--- /dev/null
+++ b/test/XPath/tests/simpleabbr
@@ -0,0 +1,6 @@
+/chapter[1]
+//p
+//chapter/image
+//p/text()
+//p/text()[position()=1]
+//p/text()[position()=last()]
diff --git a/test/XPath/tests/simplebase b/test/XPath/tests/simplebase
new file mode 100644
index 0000000..997d8c8
--- /dev/null
+++ b/test/XPath/tests/simplebase
@@ -0,0 +1,7 @@
+/child::head
+/child::*
+/child::head/child::title
+/child::head/child::title/child::text()
+/child::head/node()
+/descendant::title
+/descendant::p/ancestor::chapter
diff --git a/testXPath.c b/testXPath.c
new file mode 100644
index 0000000..cf856f0
--- /dev/null
+++ b/testXPath.c
@@ -0,0 +1,193 @@
+/*
+ * testXPath.c : a small tester program for XPath.
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel.Veillard@w3.org
+ */
+
+#ifdef WIN32
+#define HAVE_FCNTL_H
+#include <io.h>
+#else
+#include <config.h>
+#endif
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "xpath.h"
+#include "tree.h"
+#include "parser.h"
+#include "debugXML.h"
+
+static int debug = 0;
+static int expr = 0;
+static xmlDocPtr document = NULL;
+
+/*
+ * Default document
+ */
+static CHAR buffer[] = 
+"<?xml version=\"1.0\"?>\n\
+<EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
+  <head>\n\
+   <title>Welcome to Gnome</title>\n\
+  </head>\n\
+  <chapter>\n\
+   <title>The Linux adventure</title>\n\
+   <p>bla bla bla ...</p>\n\
+   <image href=\"linus.gif\"/>\n\
+   <p>...</p>\n\
+  </chapter>\n\
+  <chapter>\n\
+   <title>Chapter 2</title>\n\
+   <p>this is chapter 2 ...</p>\n\
+  </chapter>\n\
+  <chapter>\n\
+   <title>Chapter 3</title>\n\
+   <p>this is chapter 3 ...</p>\n\
+  </chapter>\n\
+  <chapter>\n\
+   <title>Chapter 4</title>\n\
+   <p>this is chapter 4 ...</p>\n\
+  </chapter>\n\
+  <chapter>\n\
+   <title>Chapter 5</title>\n\
+   <p>this is chapter 5 ...</p>\n\
+  </chapter>\n\
+</EXAMPLE>\n\
+";
+
+void xmlXPAthDebugDumpNodeSet(FILE *output, xmlNodeSetPtr cur) {
+    int i;
+
+    if (cur == NULL) {
+	fprintf(output, "NodeSet is NULL !\n");
+	return;
+        
+    }
+
+    fprintf(output, "Set contains %d nodes:\n", cur->nodeNr);
+    for (i = 0;i < cur->nodeNr;i++) {
+        fprintf(output, "%d", i + 1);
+	xmlDebugDumpOneNode(output, cur->nodeTab[i], 2);
+    }
+}
+
+void xmlXPAthDebugDumpObject(FILE *output, xmlXPathObjectPtr cur) {
+    if (cur == NULL) {
+        fprintf(output, "Object is empty (NULL)\n");
+	return;
+    }
+    switch(cur->type) {
+        case XPATH_UNDEFINED:
+	    fprintf(output, "Object is uninitialized\n");
+	    break;
+        case XPATH_NODESET:
+	    fprintf(output, "Object is a Node Set :\n");
+	    xmlXPAthDebugDumpNodeSet(output, cur->nodesetval);
+	    break;
+        case XPATH_BOOLEAN:
+	    fprintf(output, "Object is a Boolean : ");
+	    if (cur->boolval) fprintf(output, "true\n");
+	    else fprintf(output, "false\n");
+	    break;
+        case XPATH_NUMBER:
+	    fprintf(output, "Object is a number : %0g\n", cur->floatval);
+	    break;
+        case XPATH_STRING:
+	    fprintf(output, "Object is a string : ");
+	    xmlDebugDumpString(output, cur->stringval);
+	    fprintf(output, "\n");
+	    break;
+    }
+}
+
+void testXPath(const char *str) {
+    xmlXPathObjectPtr res;
+    xmlXPathContextPtr ctxt;
+    
+    ctxt = xmlXPathNewContext(document, NULL, NULL, NULL);
+    if (expr)
+	res = xmlXPathEvalExpression(str, ctxt);
+    else
+	res = xmlXPathEval(str, ctxt);
+    xmlXPAthDebugDumpObject(stdout, res);
+    xmlXPathFreeObject(res);
+}
+
+void testXPathFile(const char *filename) {
+    FILE *input;
+    char expr[5000];
+
+    input = fopen(filename, "r");
+    if (input == NULL) {
+        fprintf(stderr, "Cannot open %s for reading\n", filename);
+	return;
+    }
+    while (fscanf(input, "%s", expr) != EOF) {
+        testXPath(expr);
+    }
+
+    fclose(input);
+}
+
+int main(int argc, char **argv) {
+    int i;
+    int strings = 0;
+    int usefile = 0;
+    char *filename = NULL;
+
+    for (i = 1; i < argc ; i++) {
+	if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+	    debug++;
+	if ((!strcmp(argv[i], "-expr")) || (!strcmp(argv[i], "--expr")))
+	    expr++;
+	if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input")))
+	    filename = argv[++i];
+	if ((!strcmp(argv[i], "-f")) || (!strcmp(argv[i], "--file")))
+	    usefile++;
+    }
+    if (document == NULL) {
+        if (filename == NULL)
+	    document = xmlParseDoc(buffer);
+	else
+	    document = xmlParseFile(filename);
+    }
+    for (i = 1; i < argc ; i++) {
+	if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) {
+	    i++; continue;
+	}
+	if (argv[i][0] != '-') {
+	    if (usefile)
+	        testXPathFile(argv[i]);
+	    else
+		testXPath(argv[i]);
+	    strings ++;
+	}
+    }
+    if (strings == 0) {
+	printf("Usage : %s [--debug] [--copy] stringsorfiles ...\n",
+	       argv[0]);
+	printf("\tParse the XPath strings and output the result of the parsing\n");
+	printf("\t--debug : dump a debug version of the result\n");
+	printf("\t--expr : debug XPath expressions only\n");
+	printf("\t--input filename : or\n");
+	printf("\t-i filename      : read the document from filename\n");
+	printf("\t--file : or\n");
+	printf("\t-f     : read queries from files, args\n");
+    }
+
+    return(0);
+}
diff --git a/tester.c b/tester.c
index 5836fc6..43005f1 100644
--- a/tester.c
+++ b/tester.c
@@ -37,7 +37,6 @@
 
 /*
  * Note: there is a couple of errors introduced on purpose.
- */
 static CHAR buffer[] = 
 "<?xml version=\"1.0\"?>\n\
 <?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\
@@ -57,6 +56,7 @@
 </D:propertyupdate>\n\
 \n\
 ";
+ */
 
 /************************************************************************
  *									*
diff --git a/xpath.c b/xpath.c
new file mode 100644
index 0000000..d6c8f7e
--- /dev/null
+++ b/xpath.c
@@ -0,0 +1,3698 @@
+/*
+ * xpath.c: XML Path Language implementation
+ *          XPath is a language for addressing parts of an XML document,
+ *          designed to be used by both XSLT and XPointer.
+ *
+ * Reference: W3C Working Draft internal 5 July 1999
+ *     http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html
+ * Public reference:
+ *     http://www.w3.org/TR/WD-xpath/
+ *
+ * See COPYRIGHT for the status of this software
+ *
+ * Author: Daniel.Veillard@w3.org
+ */
+
+#include <malloc.h>
+#include <math.h>
+#include <stdio.h>
+#include "tree.h"
+#include "xpath.h"
+#include "parserInternals.h"
+
+/*
+ * TODO: create a pseudo document element and affect it as the 
+ *       actual root.
+ */
+/*
+ * That sucks but I couldn't find NAN on a PeeCee Linux Glibc 2.1
+ */
+#ifndef NAN
+#define NAN 12345679
+#endif
+
+/* #define DEBUG */
+/* #define DEBUG_STEP */
+/* #define DEBUG_EXPR */
+
+FILE *xmlXPathDebug = NULL;
+
+#define TODO 								\
+    fprintf(xmlXPathDebug, "Unimplemented block at %s:%d\n",		\
+            __FILE__, __LINE__);
+
+#define STRANGE 							\
+    fprintf(xmlXPathDebug, "Internal error at %s:%d\n",			\
+            __FILE__, __LINE__);
+
+float xmlXPathStringEvalNumber(const CHAR *str);
+
+/************************************************************************
+ *									*
+ * 		Parser stacks related functions and macros		*
+ *									*
+ ************************************************************************/
+
+/*
+ * Generic function for accessing stacks in the Parser Context
+ */
+
+#define PUSH_AND_POP(type, name)					\
+extern int name##Push(xmlXPathParserContextPtr ctxt, type value) {	\
+    if (ctxt->name##Nr >= ctxt->name##Max) {				\
+	ctxt->name##Max *= 2;						\
+        ctxt->name##Tab = (void *) realloc(ctxt->name##Tab,		\
+	             ctxt->name##Max * sizeof(ctxt->name##Tab[0]));	\
+        if (ctxt->name##Tab == NULL) {					\
+	    fprintf(xmlXPathDebug, "realloc failed !\n");			\
+	    exit(1);							\
+	}								\
+    }									\
+    ctxt->name##Tab[ctxt->name##Nr] = value;				\
+    ctxt->name = value;							\
+    return(ctxt->name##Nr++);						\
+}									\
+extern type name##Pop(xmlXPathParserContextPtr ctxt) {			\
+    type ret;								\
+    if (ctxt->name##Nr <= 0) return(0);					\
+    ctxt->name##Nr--;							\
+    if (ctxt->name##Nr > 0)						\
+	ctxt->name = ctxt->name##Tab[ctxt->name##Nr - 1];		\
+    else								\
+        ctxt->name = NULL;						\
+    ret = ctxt->name##Tab[ctxt->name##Nr];				\
+    ctxt->name##Tab[ctxt->name##Nr] = 0;				\
+    return(ret);							\
+}									\
+
+PUSH_AND_POP(xmlXPathObjectPtr, value)
+
+/*
+ * Macros for accessing the content. Those should be used only by the parser,
+ * and not exported.
+ *
+ * Dirty macros, i.e. one need to make assumption on the context to use them
+ *
+ *   CUR_PTR return the current pointer to the CHAR to be parsed.
+ *   CUR     returns the current CHAR value, i.e. a 8 bit value if compiled
+ *           in ISO-Latin or UTF-8, and the current 16 bit value if compiled
+ *           in UNICODE mode. This should be used internally by the parser
+ *           only to compare to ASCII values otherwise it would break when
+ *           running with UTF-8 encoding.
+ *   NXT(n)  returns the n'th next CHAR. Same as CUR is should be used only
+ *           to compare on ASCII based substring.
+ *   SKIP(n) Skip n CHAR, and must also be used only to skip ASCII defined
+ *           strings within the parser.
+ *   CURRENT Returns the current char value, with the full decoding of
+ *           UTF-8 if we are using this mode. It returns an int.
+ *   NEXT    Skip to the next character, this does the proper decoding
+ *           in UTF-8 mode. It also pop-up unfinished entities on the fly.
+ *           It returns the pointer to the current CHAR.
+ */
+
+#define CUR (*ctxt->cur)
+#define SKIP(val) ctxt->cur += (val)
+#define NXT(val) ctxt->cur[(val)]
+#define CUR_PTR ctxt->cur
+
+#define SKIP_BLANKS 							\
+    while (IS_BLANK(*(ctxt->cur))) NEXT
+
+#ifndef USE_UTF_8
+#define CURRENT (*ctxt->cur)
+#define NEXT ((*ctxt->cur) ?  ctxt->cur++: ctxt->cur)
+#else
+#endif
+
+/************************************************************************
+ *									*
+ *			Error handling routines				*
+ *									*
+ ************************************************************************/
+
+#define XPATH_EXPRESSION_OK		0
+#define XPATH_NUMBER_ERROR		1
+#define XPATH_UNFINISHED_LITERAL_ERROR	2
+#define XPATH_START_LITERAL_ERROR	3
+#define XPATH_VARIABLE_REF_ERROR	4
+#define XPATH_UNDEF_VARIABLE_ERROR	5
+#define XPATH_INVALID_PREDICATE_ERROR	6
+#define XPATH_EXPR_ERROR		7
+#define XPATH_UNCLOSED_ERROR		8
+#define XPATH_UNKNOWN_FUNC_ERROR	9
+#define XPATH_INVALID_OPERAND		10
+#define XPATH_INVALID_TYPE		11
+#define XPATH_INVALID_ARITY		12
+
+const char *xmlXPathErrorMessages[] = {
+    "Ok",
+    "Number encoding",
+    "Unfinished litteral",
+    "Start of litteral",
+    "Expected $ for variable reference",
+    "Undefined variable",
+    "Invalid predicate",
+    "Invalid expression",
+    "Missing closing curly brace",
+    "Unregistered function",
+    "Invalid operand",
+    "Invalid type",
+    "Invalid number of arguments",
+};
+
+/**
+ * xmlXPathError:
+ * @ctxt:  the XPath Parser context
+ * @file:  the file name
+ * @line:  the line number
+ * @no:  the error number
+ *
+ * Create a new xmlNodeSetPtr of type float and of value @val
+ *
+ * Returns the newly created object.
+ */
+void
+xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file,
+              int line, int no) {
+    int n;
+    const char *cur;
+    const char *base;
+
+    fprintf(xmlXPathDebug, "Error %s:%d: %s\n", file, line,
+            xmlXPathErrorMessages[no]);
+
+    cur = ctxt->cur;
+    base = ctxt->base;
+    while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) {
+	cur--;
+    }
+    n = 0;
+    while ((n++ < 80) && (cur > base) && (*cur != '\n') && (*cur != '\r'))
+        cur--;
+    if ((*cur == '\n') || (*cur == '\r')) cur++;
+    base = cur;
+    n = 0;
+    while ((*cur != 0) && (*cur != '\n') && (*cur != '\r') && (n < 79)) {
+        fprintf(xmlXPathDebug, "%c", (unsigned char) *cur++);
+	n++;
+    }
+    fprintf(xmlXPathDebug, "\n");
+    cur = ctxt->cur;
+    while ((*cur == '\n') || (*cur == '\r'))
+	cur--;
+    n = 0;
+    while ((cur != base) && (n++ < 80)) {
+        fprintf(xmlXPathDebug, " ");
+        base++;
+    }
+    fprintf(xmlXPathDebug,"^\n");
+}
+
+#define CHECK_ERROR							\
+    if (ctxt->error != XPATH_EXPRESSION_OK) return
+
+#define ERROR(X)							\
+    { xmlXPatherror(ctxt, __FILE__, __LINE__, X);			\
+      ctxt->error = (X); return; }
+
+#define CHECK_TYPE(typeval)						\
+    if ((ctxt->value == NULL) || (ctxt->value->type != typeval))	\
+        ERROR(XPATH_INVALID_TYPE)					\
+
+
+/************************************************************************
+ *									*
+ *			Routines to handle NodeSets			*
+ *									*
+ ************************************************************************/
+
+#define XML_NODESET_DEFAULT	10
+/**
+ * xmlXPathNodeSetCreate:
+ * @val:  an initial xmlNodePtr, or NULL
+ *
+ * Create a new xmlNodeSetPtr of type float and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlNodeSetPtr
+xmlXPathNodeSetCreate(xmlNodePtr val) {
+    xmlNodeSetPtr ret;
+
+    ret = (xmlNodeSetPtr) malloc(sizeof(xmlNodeSet));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewNodeSet: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlNodeSet));
+    if (val != NULL) {
+        ret->nodeTab = (xmlNodePtr *) malloc(XML_NODESET_DEFAULT *
+					     sizeof(xmlNodePtr));
+	if (ret->nodeTab == NULL) {
+	    fprintf(xmlXPathDebug, "xmlXPathNewNodeSet: out of memory\n");
+	    return(NULL);
+	}
+	memset(ret->nodeTab, 0 ,
+	       XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
+        ret->nodeMax = XML_NODESET_DEFAULT;
+	ret->nodeTab[ret->nodeNr++] = val;
+    }
+    return(ret);
+}
+
+/**
+ * xmlXPathNodeSetAdd:
+ * @cur:  the initial node set
+ * @val:  a new xmlNodePtr
+ *
+ * add a new xmlNodePtr ot an existing NodeSet
+ */
+void
+xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
+    int i;
+
+    if (val == NULL) return;
+
+    /*
+     * check against doublons
+     */
+    for (i = 0;i < cur->nodeNr;i++)
+        if (cur->nodeTab[i] == val) return;
+
+    /*
+     * grow the nodeTab if needed
+     */
+    if (cur->nodeMax == 0) {
+        cur->nodeTab = (xmlNodePtr *) malloc(XML_NODESET_DEFAULT *
+					     sizeof(xmlNodePtr));
+	if (cur->nodeTab == NULL) {
+	    fprintf(xmlXPathDebug, "xmlXPathNodeSetAdd: out of memory\n");
+	    return;
+	}
+	memset(cur->nodeTab, 0 ,
+	       XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
+        cur->nodeMax = XML_NODESET_DEFAULT;
+    } else if (cur->nodeNr == cur->nodeMax) {
+        xmlNodePtr *temp;
+
+        cur->nodeMax *= 2;
+	temp = (xmlNodePtr *) realloc(cur->nodeTab, cur->nodeMax *
+				      sizeof(xmlNodePtr));
+	if (temp == NULL) {
+	    fprintf(xmlXPathDebug, "xmlXPathNodeSetAdd: out of memory\n");
+	    return;
+	}
+    }
+    cur->nodeTab[cur->nodeNr++] = val;
+}
+
+/**
+ * xmlXPathNodeSetMerge:
+ * @val1:  the first NodeSet
+ * @val2:  the second NodeSet
+ *
+ * Merges two nodesets, all nodes from @val2 are added to @val1
+ *
+ * Returns val1 once extended or NULL in case of error.
+ */
+xmlNodeSetPtr
+xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
+    int i;
+
+    if (val1 == NULL) return(NULL);
+    if (val2 == NULL) return(val1);
+
+    /*
+     * !!!!! this can be optimized a lot, knowing that both
+     *       val1 and val2 already have unicity of their values.
+     */
+
+    for (i = 0;i < val2->nodeNr;i++)
+        xmlXPathNodeSetAdd(val1, val2->nodeTab[i]);
+
+    return(val1);
+}
+
+/**
+ * xmlXPathNodeSetDel:
+ * @cur:  the initial node set
+ * @val:  an xmlNodePtr
+ *
+ * Removes an xmlNodePtr from an existing NodeSet
+ */
+void
+xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val) {
+    int i;
+
+    if (cur == NULL) return;
+    if (val == NULL) return;
+
+    /*
+     * check against doublons
+     */
+    for (i = 0;i < cur->nodeNr;i++)
+        if (cur->nodeTab[i] == val) break;
+
+    if (i >= cur->nodeNr) {
+#ifdef DEBUG
+        fprintf(xmlXPathDebug, 
+	        "xmlXPathNodeSetDel: Node %s wasn't found in NodeList\n",
+		val->name);
+#endif
+        return;
+    }
+    cur->nodeNr--;
+    for (;i < cur->nodeNr;i++)
+        cur->nodeTab[i] = cur->nodeTab[i + 1];
+    cur->nodeTab[cur->nodeNr] = NULL;
+}
+
+/**
+ * xmlXPathNodeSetRemove:
+ * @cur:  the initial node set
+ * @val:  the index to remove
+ *
+ * Removes an entry from an existing NodeSet list.
+ */
+void
+xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val) {
+    if (cur == NULL) return;
+    if (val >= cur->nodeNr) return;
+    cur->nodeNr--;
+    for (;val < cur->nodeNr;val++)
+        cur->nodeTab[val] = cur->nodeTab[val + 1];
+    cur->nodeTab[cur->nodeNr] = NULL;
+}
+
+/**
+ * xmlXPathFreeNodeSet:
+ * @obj:  the xmlNodeSetPtr to free
+ *
+ * Free the NodeSet compound (not the actual nodes !).
+ */
+void
+xmlXPathFreeNodeSet(xmlNodeSetPtr obj) {
+    if (obj == NULL) return;
+    if (obj->nodeTab != NULL) {
+#ifdef DEBUG
+	memset(obj->nodeTab, 0xB , sizeof(xmlNodePtr) * obj->nodeMax);
+#endif
+	free(obj->nodeTab);
+    }
+#ifdef DEBUG
+    memset(obj, 0xB , sizeof(xmlNodeSet));
+#endif
+    free(obj);
+}
+
+#ifdef DEBUG
+/**
+ * xmlXPathDebugNodeSet:
+ * @output:  a FILE * for the output
+ * @obj:  the xmlNodeSetPtr to free
+ *
+ * Quick display of a NodeSet
+ */
+void
+xmlXPathDebugNodeSet(FILE *output, xmlNodeSetPtr obj) {
+    int i;
+
+    if (output == NULL) output = xmlXPathDebug;
+    if (obj == NULL)  {
+        fprintf(output, "NodeSet == NULL !\n");
+	return;
+    }
+    if (obj->nodeNr == 0) {
+        fprintf(output, "NodeSet is empty\n");
+	return;
+    }
+    if (obj->nodeTab == NULL) {
+	fprintf(output, " nodeTab == NULL !\n");
+	return;
+    }
+    for (i = 0; i < obj->nodeNr; i++) {
+        if (obj->nodeTab[i] == NULL) {
+	    fprintf(output, " NULL !\n");
+	    return;
+        }
+	if (obj->nodeTab[i]->name == NULL)
+	    fprintf(output, " noname!");
+	else fprintf(output, " %s", obj->nodeTab[i]->name);
+    }
+    fprintf(output, "\n");
+}
+#endif
+
+/************************************************************************
+ *									*
+ *			Routines to handle Variable			*
+ *									*
+ *			UNIMPLEMENTED CURRENTLY				*
+ *									*
+ ************************************************************************/
+
+/**
+ * xmlXPathVariablelookup:
+ * @ctxt:  the XPath Parser context
+ * @prefix:  the variable name namespace if any
+ * @name:  the variable name
+ *
+ * Search in the Variable array of the context for the given
+ * variable value.
+ *
+ * UNIMPLEMENTED: always return NULL.
+ *
+ * Returns the value or NULL if not found
+ */
+xmlXPathObjectPtr
+xmlXPathVariablelookup(xmlXPathParserContextPtr ctxt,
+                       const CHAR *prefix, const CHAR *name) {
+    return(NULL);
+}
+
+/************************************************************************
+ *									*
+ *			Routines to handle Values			*
+ *									*
+ ************************************************************************/
+
+/* Allocations are terrible, one need to optimize all this !!! */
+
+/**
+ * xmlXPathNewFloat:
+ * @val:  the float value
+ *
+ * Create a new xmlXPathObjectPtr of type float and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewFloat(float val) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_NUMBER;
+    ret->floatval = val;
+    return(ret);
+}
+
+/**
+ * xmlXPathNewBoolean:
+ * @val:  the boolean value
+ *
+ * Create a new xmlXPathObjectPtr of type boolean and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewBoolean(int val) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_BOOLEAN;
+    ret->boolval = (val != 0);
+    return(ret);
+}
+
+/**
+ * xmlXPathNewMarker:
+ *
+ * Create a new xmlXPathObjectPtr of a special marker type for functions
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewMarker(void) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_MARKER;
+    return(ret);
+}
+
+/**
+ * xmlXPathNewBoolean:
+ * @val:  the CHAR * value
+ *
+ * Create a new xmlXPathObjectPtr of type string and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewString(const CHAR *val) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_STRING;
+    ret->stringval = xmlStrdup(val);
+    return(ret);
+}
+
+/**
+ * xmlXPathNewNodeSet:
+ * @val:  the NodePtr value
+ *
+ * Create a new xmlXPathObjectPtr of type NodeSet and initialize
+ * it with the single Node @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewNodeSet(xmlNodePtr val) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_NODESET;
+    ret->nodesetval = xmlXPathNodeSetCreate(val);
+    return(ret);
+}
+
+/**
+ * xmlXPathNewNodeSetList:
+ * @val:  an existing NodeSet
+ *
+ * Create a new xmlXPathObjectPtr of type NodeSet and initialize
+ * it with the Nodeset @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewNodeSetList(xmlNodeSetPtr val) {
+    xmlXPathObjectPtr ret;
+
+    ret = (xmlXPathObjectPtr) malloc(sizeof(xmlXPathObject));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewFloat: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathObject));
+    ret->type = XPATH_NODESET;
+    ret->nodesetval = val;
+    return(ret);
+}
+
+/**
+ * xmlXPathFreeObject:
+ * @obj:  the object to free
+ *
+ * Free up an xmlXPathObjectPtr object.
+ */
+void
+xmlXPathFreeObject(xmlXPathObjectPtr obj) {
+    if (obj == NULL) return;
+    if (obj->nodesetval != NULL)
+        xmlXPathFreeNodeSet(obj->nodesetval);
+    if (obj->stringval != NULL)
+        free(obj->stringval);
+#ifdef DEBUG
+    memset(obj, 0xB , sizeof(xmlXPathObject));
+#endif
+    free(obj);
+}
+
+/************************************************************************
+ *									*
+ *		Routines to handle XPath contexts			*
+ *									*
+ ************************************************************************/
+
+/**
+ * xmlXPathNewContext:
+ * @doc:  the XML document
+ * @variables:  the variable list
+ * @functions:  the function list
+ * @namespaces:  the namespace list
+ *
+ * Create a new xmlXPathContext
+ *
+ * Returns the xmlXPathContext just allocated.
+ */
+xmlXPathContextPtr
+xmlXPathNewContext(xmlDocPtr doc, void *variables, void *functions,
+                   void *namespaces) {
+    xmlXPathContextPtr ret;
+
+    ret = (xmlXPathContextPtr) malloc(sizeof(xmlXPathContext));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewContext: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathContext));
+    ret->doc = doc;
+    ret->variables = variables;
+    ret->functions = functions;
+    ret->namespaces = namespaces;
+    return(ret);
+}
+
+/**
+ * xmlXPathFreeContext:
+ * @ctxt:  the context to free
+ *
+ * Free up an xmlXPathContext
+ */
+void
+xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
+#ifdef DEBUG
+    memset(ctxt, 0xB , sizeof(xmlXPathContext));
+#endif
+    free(ctxt);
+}
+
+/************************************************************************
+ *									*
+ *		Routines to handle XPath parser contexts		*
+ *									*
+ ************************************************************************/
+
+#define CHECK_CTXT							\
+    if (ctxt == NULL) { 						\
+        fprintf(xmlXPathDebug, "%s:%d Internal error: ctxt == NULL\n",	\
+	        __FILE__, __LINE__);					\
+    }									\
+
+
+#define CHECK_CONTEXT							\
+    if (ctxt == NULL) { 						\
+        fprintf(xmlXPathDebug, "%s:%d Internal error: no context\n",	\
+	        __FILE__, __LINE__);					\
+    }									\
+    if (ctxt->doc == NULL) { 						\
+        fprintf(xmlXPathDebug, "%s:%d Internal error: no document\n",	\
+	        __FILE__, __LINE__);					\
+    }									\
+    if (ctxt->doc->root == NULL) { 					\
+        fprintf(xmlXPathDebug,						\
+	        "%s:%d Internal error: document without root\n",	\
+	        __FILE__, __LINE__);					\
+    }									\
+
+
+/**
+ * xmlXPathNewParserContext:
+ * @str:  the XPath expression
+ * @ctxt:  the XPath context
+ *
+ * Create a new xmlXPathParserContext
+ *
+ * Returns the xmlXPathParserContext just allocated.
+ */
+xmlXPathParserContextPtr
+xmlXPathNewParserContext(const CHAR *str, xmlXPathContextPtr ctxt) {
+    xmlXPathParserContextPtr ret;
+
+    ret = (xmlXPathParserContextPtr) malloc(sizeof(xmlXPathParserContext));
+    if (ret == NULL) {
+        fprintf(xmlXPathDebug, "xmlXPathNewParserContext: out of memory\n");
+	return(NULL);
+    }
+    memset(ret, 0 , sizeof(xmlXPathParserContext));
+    ret->cur = ret->base = str;
+    ret->context = ctxt;
+
+    /* Allocate the value stack */
+    ret->valueTab = (xmlXPathObjectPtr *) 
+                     malloc(10 * sizeof(xmlXPathObjectPtr));
+    ret->valueNr = 0;
+    ret->valueMax = 10;
+    ret->value = NULL;
+    return(ret);
+}
+
+/**
+ * xmlXPathFreeParserContext:
+ * @ctxt:  the context to free
+ *
+ * Free up an xmlXPathParserContext
+ */
+void
+xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt) {
+    if (ctxt->valueTab != NULL) {
+#ifdef DEBUG
+        memset(ctxt->valueTab, 0xB , 10 * sizeof(xmlXPathObjectPtr));
+#endif
+        free(ctxt->valueTab);
+    }
+#ifdef DEBUG
+    memset(ctxt, 0xB , sizeof(xmlXPathParserContext));
+#endif
+    free(ctxt);
+}
+
+/************************************************************************
+ *									*
+ *		The implicit core function library			*
+ *									*
+ ************************************************************************/
+
+/*
+ * TODO: check the semantic for all these operations in case of operands
+ *       with different types, Cast function probably need to be provided
+ *       to simplify the coding.
+ */
+
+/*
+ * Auto-pop and cast to a number
+ */
+void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+#define CHECK_ARITY(x)						\
+    if (nargs != (x)) {						\
+        ERROR(XPATH_INVALID_ARITY);				\
+    }								\
+
+
+#define POP_FLOAT						\
+    arg = valuePop(ctxt);					\
+    if (arg == NULL) {						\
+	ERROR(XPATH_INVALID_OPERAND);				\
+    }								\
+    if (arg->type != XPATH_NUMBER) {				\
+        valuePush(ctxt, arg);					\
+        xmlXPathNumberFunction(ctxt, 1);				\
+	arg = valuePop(ctxt);					\
+    }
+
+/**
+ * xmlXPathEqualValues:
+ * @arg1:  first XPath object argument
+ * @arg2:  second XPath object argument
+ *
+ * Implement the equal operation on XPath objects content: @arg1 == @arg2
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ * TODO: rewrite using the stack for evaluation
+ */
+int
+xmlXPathEqualValues(xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2) {
+    if (arg1 == arg2) {
+#ifdef DEBUG_EXPR
+        fprintf(xmlXPathDebug, "Equal: by pointer\n");
+#endif
+        return(1);
+    }
+    if ((arg1 == NULL) || (arg2 == NULL)) {
+#ifdef DEBUG_EXPR
+        fprintf(xmlXPathDebug, "Equal: arg NULL\n");
+#endif
+        return(0);
+    }
+    if (arg1->type != arg2->type) {
+        /* TODO : see 4.3 Boolean section !!!!!!!!!!! */
+#ifdef DEBUG_EXPR
+        fprintf(xmlXPathDebug, "Equal: distinct types\n");
+#endif
+        return(0);
+    }
+    switch (arg1->type) {
+        case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+	    fprintf(xmlXPathDebug, "Equal: undefined\n");
+#endif
+	    return(0);
+        case XPATH_NODESET:
+	    TODO /* compare nodesets */
+	    break;
+        case XPATH_BOOLEAN:
+#ifdef DEBUG_EXPR
+	    fprintf(xmlXPathDebug, "Equal: %d boolean %d \n",
+	            arg1->boolval, arg2->boolval);
+#endif
+	    return(arg1->boolval == arg2->boolval);
+        case XPATH_NUMBER:
+#ifdef DEBUG_EXPR
+	    fprintf(xmlXPathDebug, "Equal: %f number %f \n",
+	            arg1->floatval, arg2->floatval);
+#endif
+	    return(arg1->floatval == arg2->floatval);
+        case XPATH_STRING:
+#ifdef DEBUG_EXPR
+	    fprintf(xmlXPathDebug, "Equal: %s string %s \n",
+	            arg1->stringval, arg2->stringval);
+#endif
+	    return(!xmlStrcmp(arg1->stringval, arg2->stringval));
+    }
+    return(1);
+}
+
+/**
+ * xmlXPathCompareValues:
+ * @inf:  less than (1) or greater than (2)
+ * @strict:  is the comparison strict
+ * @arg1:  first XPath object argument
+ * @arg2:  second XPath object argument
+ *
+ * Implement the compare operation on XPath objects: 
+ *     @arg1 < @arg2    (1, 1, ...
+ *     @arg1 <= @arg2   (1, 0, ...
+ *     @arg1 > @arg2    (0, 1, ...
+ *     @arg1 >= @arg2   (0, 0, ...
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+int
+xmlXPathCompareValues(int inf, int strict, xmlXPathObjectPtr arg1,
+                      xmlXPathObjectPtr arg2) {
+    TODO /* compare */
+    return(0);
+}
+
+/**
+ * xmlXPathValueFlipSign:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the unary - operation on an XPath object
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    
+    POP_FLOAT
+    arg->floatval = -arg->floatval;
+    valuePush(ctxt, arg);
+}
+
+/**
+ * xmlXPathAddValues:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the add operation on XPath objects: @arg1 + @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathAddValues(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    float val;
+
+    POP_FLOAT
+    val = arg->floatval;
+    xmlXPathFreeObject(arg);
+
+    POP_FLOAT
+    arg->floatval += val;
+    valuePush(ctxt, arg);
+}
+
+/**
+ * xmlXPathSubValues:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the substraction operation on XPath objects: @arg1 - @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathSubValues(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    float val;
+
+    POP_FLOAT
+    val = arg->floatval;
+    xmlXPathFreeObject(arg);
+
+    POP_FLOAT
+    arg->floatval -= val;
+    valuePush(ctxt, arg);
+}
+
+/**
+ * xmlXPathMultValues:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the multiply operation on XPath objects: @arg1 * @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathMultValues(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    float val;
+
+    POP_FLOAT
+    val = arg->floatval;
+    xmlXPathFreeObject(arg);
+
+    POP_FLOAT
+    arg->floatval *= val;
+    valuePush(ctxt, arg);
+}
+
+/**
+ * xmlXPathDivValues:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the div operation on XPath objects: @arg1 / @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathDivValues(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    float val;
+
+    POP_FLOAT
+    val = arg->floatval;
+    xmlXPathFreeObject(arg);
+
+    POP_FLOAT
+    arg->floatval /= val;
+    valuePush(ctxt, arg);
+}
+
+/**
+ * xmlXPathModValues:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the div operation on XPath objects: @arg1 / @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathModValues(xmlXPathParserContextPtr ctxt) {
+    xmlXPathObjectPtr arg;
+    float val;
+
+    POP_FLOAT
+    val = arg->floatval;
+    xmlXPathFreeObject(arg);
+
+    POP_FLOAT
+    arg->floatval /= val;
+    valuePush(ctxt, arg);
+}
+
+/************************************************************************
+ *									*
+ *		The traversal functions					*
+ *									*
+ ************************************************************************/
+
+#define AXIS_ANCESTOR			1
+#define AXIS_ANCESTOR_OR_SELF		2
+#define AXIS_ATTRIBUTE			3
+#define AXIS_CHILD			4
+#define AXIS_DESCENDANT			5
+#define AXIS_DESCENDANT_OR_SELF		6
+#define AXIS_FOLLOWING			7
+#define AXIS_FOLLOWING_SIBLING		8
+#define AXIS_NAMESPACE			9
+#define AXIS_PARENT			10
+#define AXIS_PRECEDING			11
+#define AXIS_PRECEDING_SIBLING		12
+#define AXIS_SELF			13
+
+/*
+ * A traversal function enumerates nodes along an axis.
+ * Initially it must be called with NULL, and it indicates
+ * termination on the axis by returning NULL.
+ */
+typedef xmlNodePtr (*xmlXPathTraversalFunction)
+                    (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
+
+/**
+ * mlXPathNextSelf:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "self" direction
+ * he self axis contains just the context node itself
+ */
+xmlNodePtr
+xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node);
+    return(NULL);
+}
+
+/**
+ * mlXPathNextChild:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "child" direction
+ * The child axis contains the children of the context node in document order.
+ */
+xmlNodePtr
+xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->childs);
+    return(cur->next);
+}
+
+/**
+ * mlXPathNextDescendant:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "descendant" direction
+ * the descendant axis contains the descendants of the context node in document
+ * order; a descendant is a child or a child of a child and so on.
+ */
+xmlNodePtr
+xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->childs);
+
+    if (cur->childs != NULL) return(cur->childs);
+    if (cur->next != NULL) return(cur->next);
+    
+    do {
+        cur = cur->parent;
+	if (cur == NULL) return(NULL);
+	if (cur == ctxt->context->node) return(NULL);
+	if (cur->next != NULL) {
+	    cur = cur->next;
+	    return(cur);
+	}
+    } while (cur != NULL);
+    return(cur);
+}
+
+/**
+ * mlXPathNextDescendantOrSelf:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "descendant-or-self" direction
+ * the descendant-or-self axis contains the context node and the descendants
+ * of the context node in document order; thus the context node is the first
+ * node on the axis, and the first child of the context node is the second node
+ * on the axis
+ */
+xmlNodePtr
+xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node);
+
+    if (cur->childs != NULL) return(cur->childs);
+    if (cur->next != NULL) return(cur->next);
+    
+    do {
+        cur = cur->parent;
+	if (cur == NULL) return(NULL);
+	if (cur == ctxt->context->node) return(NULL);
+	if (cur->next != NULL) {
+	    cur = cur->next;
+	    return(cur);
+	}
+    } while (cur != NULL);
+    return(cur);
+}
+
+/**
+ * xmlXPathNextParent:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "parent" direction
+ * The parent axis contains the parent of the context node, if there is one.
+ */
+xmlNodePtr
+xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    /*
+     * !!!!!!!!!!!!!
+     * the parent of an attribute or namespace node is the element
+     * to which the attribute or namespace node is attached
+     */
+    if (cur == NULL)
+        return(ctxt->context->node->parent);
+    return(NULL);
+}
+
+/**
+ * xmlXPathNextAncestor:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "ancestor" direction
+ * the ancestor axis contains the ancestors of the context node; the ancestors
+ * of the context node consist of the parent of context node and the parent's
+ * parent and so on; the nodes are ordered in reverse document order; thus the
+ * parent is the first node on the axis, and the parent's parent is the second
+ * node on the axis
+ */
+xmlNodePtr
+xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    /*
+     * !!!!!!!!!!!!!
+     * the parent of an attribute or namespace node is the element
+     * to which the attribute or namespace node is attached
+     */
+    if (cur == NULL)
+        return(ctxt->context->node->parent);
+    if (cur == ctxt->context->doc->root) return(NULL);
+    return(cur->parent);
+}
+
+/**
+ * xmlXPathNextAncestorOrSelf:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "ancestor-or-self" direction
+ * he ancestor-or-self axis contains the context node and ancestors of the context
+ * node in reverse document order; thus the context node is the first node on the
+ * axis, and the context node's parent the second; parent here is defined the same
+ * as with the parent axis.
+ */
+xmlNodePtr
+xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    /*
+     * !!!!!!!!!!!!!
+     * the parent of an attribute or namespace node is the element
+     * to which the attribute or namespace node is attached
+     */
+    if (cur == NULL)
+        return(ctxt->context->node);
+    if (cur == ctxt->context->doc->root) return(NULL);
+    return(cur->parent);
+}
+
+/**
+ * xmlXPathNextFollowingSibling:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "following-sibling" direction
+ * The following-sibling axis contains the following siblings of the context
+ * node in document order.
+ */
+xmlNodePtr
+xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->next);
+    return(cur->next);
+}
+
+/**
+ * xmlXPathNextPrecedingSibling:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "preceding-sibling" direction
+ * The preceding-sibling axis contains the preceding siblings of the context
+ * node in reverse document order; the first preceding sibling is first on the
+ * axis; the sibling preceding that node is the second on the axis and so on.
+ */
+xmlNodePtr
+xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->prev);
+    return(cur->prev);
+}
+
+/**
+ * xmlXPathNextFollowing:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "following" direction
+ * The following axis contains all nodes in the same document as the context
+ * node that are after the context node in document order, excluding any
+ * descendants and excluding attribute nodes and namespace nodes; the nodes
+ * are ordered in document order
+ */
+xmlNodePtr
+xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->next);; /* !!!!!!!!! */
+    if (cur->childs != NULL) return(cur->childs);
+    if (cur->next != NULL) return(cur->next);
+    
+    do {
+        cur = cur->parent;
+	if (cur == NULL) return(NULL);
+	if (cur == ctxt->context->doc->root) return(NULL);
+	if (cur->next != NULL) {
+	    cur = cur->next;
+	    return(cur);
+	}
+    } while (cur != NULL);
+    return(cur);
+}
+
+/**
+ * xmlXPathNextPreceding:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node in the traversal
+ *
+ * Traversal function for the "preceding" direction
+ * the preceding axis contains all nodes in the same document as the context
+ * node that are before the context node in document order, excluding any
+ * ancestors and excluding attribute nodes and namespace nodes; the nodes are
+ * ordered in reverse document order
+ */
+xmlNodePtr
+xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->prev); /* !!!!!!!!! */
+    if (cur->last != NULL) return(cur->last);
+    if (cur->prev != NULL) return(cur->prev);
+    
+    do {
+        cur = cur->parent;
+	if (cur == NULL) return(NULL);
+	if (cur == ctxt->context->doc->root) return(NULL);
+	if (cur->prev != NULL) {
+	    cur = cur->prev;
+	    return(cur);
+	}
+    } while (cur != NULL);
+    return(cur);
+}
+
+/**
+ * xmlXPathNextNamespace:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current attribute in the traversal
+ *
+ * Traversal function for the "namespace" direction
+ * the namespace axis contains the namespace nodes of the context node;
+ * the order of nodes on this axis is implementation-defined; the axis will
+ * be empty unless the context node is an element
+ */
+xmlAttrPtr
+xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlAttrPtr cur) {
+    TODO /* namespace traversal */
+    return(NULL);
+}
+
+/**
+ * xmlXPathNextAttribute:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current attribute in the traversal
+ *
+ * Traversal function for the "attribute" direction
+ */
+xmlAttrPtr
+xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlAttrPtr cur) {
+    if (cur == NULL)
+        return(ctxt->context->node->properties);
+    return(cur->next);
+}
+
+/************************************************************************
+ *									*
+ *		NodeTest Functions					*
+ *									*
+ ************************************************************************/
+
+#define NODE_TEST_NONE	0
+#define NODE_TEST_TYPE	1
+#define NODE_TEST_PI	2
+#define NODE_TEST_ALL	3
+#define NODE_TEST_NS	4
+#define NODE_TEST_NAME	5
+
+#define NODE_TYPE_COMMENT		50
+#define NODE_TYPE_TEXT			51
+#define NODE_TYPE_PI			52
+#define NODE_TYPE_NODE			53
+
+#define IS_FUNCTION			200
+
+/**
+ * xmlXPathNodeCollectAndTest:
+ * @ctxt:  the XPath Parser context
+ * @cur:  the current node to test
+ *
+ * This is the function implementing a step: based on the current list
+ * of nodes, it builds up a new list, looking at all nodes under that
+ * axis and selecting them.
+ *
+ * Returns the new NodeSet resulting from the search.
+ */
+xmlNodeSetPtr
+xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, int axis,
+                 int test, int type, const CHAR *prefix, const CHAR *name) {
+#ifdef DEBUG_STEP
+    int n = 0, t = 0;
+#endif
+    int i;
+    xmlNodeSetPtr ret;
+    xmlXPathTraversalFunction next = NULL;
+    xmlNodePtr cur = NULL;
+
+    if (ctxt->context->nodelist == NULL) {
+	if (ctxt->context->node == NULL) {
+	    fprintf(xmlXPathDebug,
+	     "xmlXPathNodeCollectAndTest %s:%d : nodelist and node are NULL\n",
+	            __FILE__, __LINE__);
+	    return(NULL);
+	}
+        STRANGE
+        return(NULL);
+    }
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, "new step : ");
+#endif
+    switch (axis) {
+        case AXIS_ANCESTOR:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'ancestors' ");
+#endif
+	    next = xmlXPathNextAncestor; break;
+        case AXIS_ANCESTOR_OR_SELF:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'ancestors-or-self' ");
+#endif
+	    next = xmlXPathNextAncestorOrSelf; break;
+        case AXIS_ATTRIBUTE:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'attributes' ");
+#endif
+	    TODO /* attribute axis */
+	    break;
+        case AXIS_CHILD:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'child' ");
+#endif
+	    next = xmlXPathNextChild; break;
+        case AXIS_DESCENDANT:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'descendant' ");
+#endif
+	    next = xmlXPathNextDescendant; break;
+        case AXIS_DESCENDANT_OR_SELF:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'descendant-or-self' ");
+#endif
+	    next = xmlXPathNextDescendantOrSelf; break;
+        case AXIS_FOLLOWING:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'following' ");
+#endif
+	    next = xmlXPathNextFollowing; break;
+        case AXIS_FOLLOWING_SIBLING:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'following-siblings' ");
+#endif
+	    next = xmlXPathNextFollowingSibling; break;
+        case AXIS_NAMESPACE:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'namespace' ");
+#endif
+	    TODO /* namespace axis */
+	    break;
+        case AXIS_PARENT:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'parent' ");
+#endif
+	    next = xmlXPathNextParent; break;
+        case AXIS_PRECEDING:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'preceding' ");
+#endif
+	    next = xmlXPathNextPreceding; break;
+        case AXIS_PRECEDING_SIBLING:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'preceding-sibling' ");
+#endif
+	    next = xmlXPathNextPrecedingSibling; break;
+        case AXIS_SELF:
+#ifdef DEBUG_STEP
+	    fprintf(xmlXPathDebug, "axis 'self' ");
+#endif
+	    next = xmlXPathNextSelf; break;
+    }
+    if (next == NULL) return(NULL);
+    ret = xmlXPathNodeSetCreate(NULL);
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, " context contains %d nodes\n",
+            ctxt->context->nodelist->nodeNr);
+    switch (test) {
+	case NODE_TEST_NONE:
+	    fprintf(xmlXPathDebug, "           seaching for none !!!\n");
+	    break;
+	case NODE_TEST_TYPE:
+	    fprintf(xmlXPathDebug, "           seaching for type %d\n", type);
+	    break;
+	case NODE_TEST_PI:
+	    fprintf(xmlXPathDebug, "           seaching for PI !!!\n");
+	    TODO /* PI search */
+	    break;
+	case NODE_TEST_ALL:
+	    fprintf(xmlXPathDebug, "           seaching for *\n");
+	    break;
+	case NODE_TEST_NS:
+	    fprintf(xmlXPathDebug, "           seaching for namespace %s\n",
+	            prefix);
+	    break;
+	case NODE_TEST_NAME:
+	    fprintf(xmlXPathDebug, "           seaching for name %s\n", name);
+	    if (prefix != NULL)
+		fprintf(xmlXPathDebug, "           with namespace %s\n",
+		        prefix);
+	    break;
+    }
+    fprintf(xmlXPathDebug, "Testing : ");
+#endif
+    for (i = 0;i < ctxt->context->nodelist->nodeNr; i++) {
+        ctxt->context->node = ctxt->context->nodelist->nodeTab[i];
+
+	cur = NULL;
+	do {
+	    cur = next(ctxt, cur);
+	    if (cur == NULL) break;
+#ifdef DEBUG_STEP
+            t++;
+            fprintf(xmlXPathDebug, " %s", cur->name);
+#endif
+	    switch (test) {
+                case NODE_TEST_NONE:
+		    STRANGE
+		    return(NULL);
+                case NODE_TEST_TYPE:
+		    if (cur->type == type) {
+#ifdef DEBUG_STEP
+                        n++;
+#endif
+		        xmlXPathNodeSetAdd(ret, cur);
+		    }
+		    break;
+                case NODE_TEST_PI:
+		    TODO /* PI search */
+		    break;
+                case NODE_TEST_ALL:
+		    if (cur->type == XML_ELEMENT_NODE) {
+#ifdef DEBUG_STEP
+                        n++;
+#endif
+		        xmlXPathNodeSetAdd(ret, cur);
+		    }
+		    break;
+                case NODE_TEST_NS:
+		    TODO /* NS search */
+		    break;
+                case NODE_TEST_NAME:
+		    if (!xmlStrcmp(name, cur->name) && 
+			(((prefix == NULL) ||
+			  ((cur->ns != NULL) && 
+			   (!xmlStrcmp(prefix, cur->ns->href)))))) {
+#ifdef DEBUG_STEP
+                        n++;
+#endif
+			xmlXPathNodeSetAdd(ret, cur);
+		    }
+	            break;
+		    
+	    }
+	} while (cur != NULL);
+    }
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug,
+            "\nExamined %d nodes, found %d nodes at that step\n", t, n);
+#endif
+    return(ret);
+}
+
+
+/************************************************************************
+ *									*
+ *		Implicit tree core function library			*
+ *									*
+ ************************************************************************/
+
+/**
+ * xmlXPathRoot:
+ * @ctxt:  the XPath Parser context
+ *
+ * Initialize the context to the root of the document
+ */
+void
+xmlXPathRoot(xmlXPathParserContextPtr ctxt) {
+    if (ctxt->context->nodelist != NULL)
+        xmlXPathFreeNodeSet(ctxt->context->nodelist);
+    ctxt->context->node = ctxt->context->doc->root;
+    ctxt->context->nodelist = xmlXPathNodeSetCreate(ctxt->context->doc->root);
+}
+
+/**
+ * xmlXPathSearchPI:
+ * @ctxt:  the XPath Parser context
+ *
+ * Search a processing instruction by name. The name is
+ * in the object on the stack.
+ */
+void
+xmlXPathSearchPI(xmlXPathParserContextPtr ctxt, int nargs) {
+    TODO /* Search PI */
+    CHECK_ARITY(0);
+    CHECK_TYPE(XPATH_NUMBER)
+}
+
+/************************************************************************
+ *									*
+ *		The explicit core function library			*
+ *http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html#corelib	*
+ *									*
+ ************************************************************************/
+
+
+/**
+ * xmlXPathLastFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the last() XPath function
+ * The last function returns the number of nodes in the context node list.
+ */
+void
+xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(0);
+    if ((ctxt->context->nodelist == NULL) ||
+        (ctxt->context->node == NULL) ||
+        (ctxt->context->nodelist->nodeNr == 0)) {
+	valuePush(ctxt, xmlXPathNewFloat((float) 0));
+    } else {
+	valuePush(ctxt, 
+	          xmlXPathNewFloat((float) ctxt->context->nodelist->nodeNr));
+    }
+}
+
+/**
+ * xmlXPathPositionFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the position() XPath function
+ * The position function returns the position of the context node in the
+ * context node list. The first position is 1, and so the last positionr
+ * will be equal to last().
+ */
+void
+xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    int i;
+
+    CHECK_ARITY(0);
+    if ((ctxt->context->nodelist == NULL) ||
+        (ctxt->context->node == NULL) ||
+        (ctxt->context->nodelist->nodeNr == 0)) {
+	valuePush(ctxt, xmlXPathNewFloat((float) 0));
+    }
+    for (i = 0; i < ctxt->context->nodelist->nodeNr;i++) {
+        if (ctxt->context->node == ctxt->context->nodelist->nodeTab[i]) {
+	    valuePush(ctxt, xmlXPathNewFloat((float) i + 1));
+	    return;
+	}
+    }
+    valuePush(ctxt, xmlXPathNewFloat((float) 0));
+}
+
+/**
+ * xmlXPathCountFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the count() XPath function
+ */
+void
+xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NODESET);
+    cur = valuePop(ctxt);
+
+    valuePush(ctxt, xmlXPathNewFloat((float) cur->nodesetval->nodeNr));
+    xmlXPathFreeObject(cur);
+}
+
+/**
+ * xmlXPathIdFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the id() XPath function
+ * The id function selects elements by their unique ID
+ * (see [5.2.1 Unique IDs]). When the argument to id is of type node-set,
+ * then the result is the union of the result of applying id to the
+ * string value of each of the nodes in the argument node-set. When the
+ * argument to id is of any other type, the argument is converted to a
+ * string as if by a call to the string function; the string is split
+ * into a whitespace-separated list of tokens (whitespace is any sequence
+ * of characters matching the production S); the result is a node-set
+ * containing the elements in the same document as the context node that
+ * have a unique ID equal to any of the tokens in the list.
+ */
+void
+xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(1);
+    TODO /* Write ID/IDREF support in libxml first */
+}
+
+/**
+ * xmlXPathLocalPartFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the local-part() XPath function
+ * The local-part function returns a string containing the local part
+ * of the name of the node in the argument node-set that is first in
+ * document order. If the node-set is empty or the first node has no
+ * name, an empty string is returned. If the argument is omitted it
+ * defaults to the context node.
+ */
+void
+xmlXPathLocalPartFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NODESET);
+    cur = valuePop(ctxt);
+
+    if (cur->nodesetval->nodeNr == 0) {
+	valuePush(ctxt, xmlXPathNewString(""));
+    } else {
+	int i = 0; /* Should be first in document order !!!!! */
+	valuePush(ctxt, xmlXPathNewString(cur->nodesetval->nodeTab[i]->name));
+    }
+    xmlXPathFreeObject(cur);
+}
+
+/**
+ * xmlXPathNamespaceFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the namespace() XPath function
+ * The namespace function returns a string containing the namespace URI
+ * of the expanded name of the node in the argument node-set that is
+ * first in document order. If the node-set is empty, the first node has
+ * no name, or the expanded name has no namespace URI, an empty string
+ * is returned. If the argument is omitted it defaults to the context node.
+ */
+void
+xmlXPathNamespaceFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NODESET);
+    cur = valuePop(ctxt);
+
+    if (cur->nodesetval->nodeNr == 0) {
+	valuePush(ctxt, xmlXPathNewString(""));
+    } else {
+	int i = 0; /* Should be first in document order !!!!! */
+
+	if (cur->nodesetval->nodeTab[i]->ns == NULL)
+	    valuePush(ctxt, xmlXPathNewString(""));
+	else
+	    valuePush(ctxt, xmlXPathNewString(
+		      cur->nodesetval->nodeTab[i]->ns->href));
+    }
+    xmlXPathFreeObject(cur);
+}
+
+/**
+ * xmlXPathNameFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the name() XPath function
+ * The name function returns a string containing a QName representing
+ * the name of the node in the argument node-set that is first in documenti
+ * order. The QName must represent the name with respect to the namespace
+ * declarations in effect on the node whose name is being represented.
+ * Typically, this will be the form in which the name occurred in the XML
+ * source. This need not be the case if there are namespace declarations
+ * in effect on the node that associate multiple prefixes with the same
+ * namespace. However, an implementation may include information about
+ * the original prefix in its representation of nodes; in this case, an
+ * implementation can ensure that the returned string is always the same
+ * as the QName used in the XML source. If the argument it omitted it
+ * defaults to the context node.
+ * Libxml keep the original prefix so the "real qualified name" used is
+ * returned.
+ */
+void
+xmlXPathNameFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NODESET);
+    cur = valuePop(ctxt);
+
+    if (cur->nodesetval->nodeNr == 0) {
+	valuePush(ctxt, xmlXPathNewString(""));
+    } else {
+	int i = 0; /* Should be first in document order !!!!! */
+
+	if (cur->nodesetval->nodeTab[i]->ns == NULL)
+	    valuePush(ctxt, xmlXPathNewString(
+	                cur->nodesetval->nodeTab[i]->name));
+	    
+	else {
+	    CHAR name[2000];
+	    sprintf(name, "%s:%s", cur->nodesetval->nodeTab[i]->ns->prefix,
+	            cur->nodesetval->nodeTab[i]->name);
+	    valuePush(ctxt, xmlXPathNewString(name));
+        }
+    }
+    xmlXPathFreeObject(cur);
+}
+
+/**
+ * xmlXPathStringFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the string() XPath function
+ * he string function converts an object to a string as follows:
+ *    - A node-set is converted to a string by returning the value of
+ *      the node in the node-set that is first in document order.
+ *      If the node-set is empty, an empty string is returned.
+ *    - A number is converted to a string as follows
+ *      + NaN is converted to the string NaN 
+ *      + positive zero is converted to the string 0 
+ *      + negative zero is converted to the string 0 
+ *      + positive infinity is converted to the string Infinity 
+ *      + negative infinity is converted to the string -Infinity 
+ *      + if the number is an integer, the number is represented in
+ *        decimal form as a Number with no decimal point and no leading
+ *        zeros, preceded by a minus sign (-) if the number is negative
+ *      + otherwise, the number is represented in decimal form as a
+ *        Number including a decimal point with at least one digit
+ *        before the decimal point and at least one digit after the
+ *        decimal point, preceded by a minus sign (-) if the number
+ *        is negative; there must be no leading zeros before the decimal
+ *        point apart possibly from the one required digit immediatelyi
+ *        before the decimal point; beyond the one required digit
+ *        after the decimal point there must be as many, but only as
+ *        many, more digits as are needed to uniquely distinguish the
+ *        number from all other IEEE 754 numeric values.
+ *    - The boolean false value is converted to the string false.
+ *      The boolean true value is converted to the string true.
+ */
+void
+xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    CHECK_ARITY(1);
+    cur = valuePop(ctxt);
+    if (cur == NULL) ERROR(XPATH_INVALID_OPERAND);
+    switch (cur->type) {
+        case XPATH_NODESET:
+	    if (cur->nodesetval->nodeNr == 0) {
+		valuePush(ctxt, xmlXPathNewString(""));
+	    } else {
+		CHAR *res;
+	        int i = 0; /* Should be first in document order !!!!! */
+		res = xmlNodeGetContent(cur->nodesetval->nodeTab[i]);
+		valuePush(ctxt, xmlXPathNewString(res));
+		free(res);
+	    }
+	    xmlXPathFreeObject(cur);
+	    return;
+	case XPATH_STRING:
+	    valuePush(ctxt, cur);
+	    return;
+        case XPATH_BOOLEAN:
+	    if (cur->boolval) valuePush(ctxt, xmlXPathNewString("true"));
+	    else valuePush(ctxt, xmlXPathNewString("false"));
+	    xmlXPathFreeObject(cur);
+	    return;
+	case XPATH_NUMBER: {
+	    CHAR buf[100];
+
+	    /* NAN, infinity, etc .... !!!!!! */
+	    sprintf(buf, "%0g", cur->floatval);
+	    valuePush(ctxt, xmlXPathNewString(buf));
+	    return;
+	}
+    }
+    STRANGE
+}
+
+/**
+ * xmlXPathStringLengthFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the string-length() XPath function
+ * The string-length returns the number of characters in the string
+ * (see [3.6 Strings]). If the argument is omitted, it defaults to
+ * the context node converted to a string, in other words the value
+ * of the context node.
+ */
+void
+xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+
+    if (nargs == 0) {
+	if (ctxt->context->node == NULL) {
+	    valuePush(ctxt, xmlXPathNewFloat(0));
+	} else {
+	    CHAR *content;
+
+	    content = xmlNodeGetContent(ctxt->context->node);
+	    valuePush(ctxt, xmlXPathNewFloat(xmlStrlen(content)));
+	    free(content);
+	}
+	return;
+    }
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_STRING);
+    cur = valuePop(ctxt);
+    valuePush(ctxt, xmlXPathNewFloat(xmlStrlen(cur->stringval)));
+    xmlXPathFreeObject(cur);
+}
+
+/**
+ * xmlXPathConcatFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the concat() XPath function
+ * The concat function returns the concatenation of its arguments.
+ */
+void
+xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur, new;
+    CHAR *tmp;
+
+    if (nargs < 2) {
+	CHECK_ARITY(2);
+    }
+
+    cur = valuePop(ctxt);
+    if ((cur == NULL) || (cur->type != XPATH_STRING)) {
+        xmlXPathFreeObject(cur);
+	return;
+    }
+    nargs--;
+
+    while (nargs > 0) {
+	new = valuePop(ctxt);
+	if ((new == NULL) || (new->type != XPATH_STRING)) {
+	    xmlXPathFreeObject(new);
+	    xmlXPathFreeObject(cur);
+	    ERROR(XPATH_INVALID_TYPE);
+	}
+	tmp = xmlStrcat(new->stringval, cur->stringval);
+	new->stringval = cur->stringval;
+	cur->stringval = tmp;
+
+	xmlXPathFreeObject(new);
+	nargs--;
+    }
+    valuePush(ctxt, cur);
+}
+
+/**
+ * xmlXPathContainsFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the contains() XPath function
+ * The contains function returns true if the first argument string
+ * contains the second argument string, and otherwise returns false.
+ */
+void
+xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr hay, needle;
+
+    CHECK_ARITY(2);
+    CHECK_TYPE(XPATH_STRING);
+    needle = valuePop(ctxt);
+    hay = valuePop(ctxt);
+    if ((hay == NULL) || (hay->type != XPATH_STRING)) {
+        xmlXPathFreeObject(hay);
+        xmlXPathFreeObject(needle);
+	ERROR(XPATH_INVALID_TYPE);
+    }
+    if (xmlStrstr(hay->stringval, needle->stringval))
+        valuePush(ctxt, xmlXPathNewBoolean(1));
+    else
+        valuePush(ctxt, xmlXPathNewBoolean(0));
+    xmlXPathFreeObject(hay);
+    xmlXPathFreeObject(needle);
+}
+
+/**
+ * xmlXPathStartsWithFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the starts-with() XPath function
+ * The starts-with function returns true if the first argument string
+ * starts with the second argument string, and otherwise returns false.
+ */
+void
+xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr hay, needle;
+    int n;
+
+    CHECK_ARITY(2);
+    CHECK_TYPE(XPATH_STRING);
+    needle = valuePop(ctxt);
+    hay = valuePop(ctxt);
+    if ((hay == NULL) || (hay->type != XPATH_STRING)) {
+        xmlXPathFreeObject(hay);
+        xmlXPathFreeObject(needle);
+	ERROR(XPATH_INVALID_TYPE);
+    }
+    n = xmlStrlen(needle->stringval);
+    if (xmlStrncmp(hay->stringval, needle->stringval, n))
+        valuePush(ctxt, xmlXPathNewBoolean(0));
+    else
+        valuePush(ctxt, xmlXPathNewBoolean(1));
+    xmlXPathFreeObject(hay);
+    xmlXPathFreeObject(needle);
+}
+
+/**
+ * xmlXPathSubstringFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the substring() XPath function
+ * The substring function returns the substring of the first argument
+ * starting at the position specified in the second argument with
+ * length specified in the third argument. For example,
+ * substring("12345",2,3) returns "234". If the third argument is not
+ * specified, it returns the substring starting at the position specified
+ * in the second argument and continuing to the end of the string. For
+ * example, substring("12345",2) returns "2345".  More precisely, each
+ * character in the string (see [3.6 Strings]) is considered to have a
+ * numeric position: the position of the first character is 1, the position
+ * of the second character is 2 and so on. The returned substring contains
+ * those characters for which the position of the character is greater than
+ * or equal to the second argument and, if the third argument is specified,
+ * less than the sum of the second and third arguments; the comparisons
+ * and addition used for the above follow the standard IEEE 754 rules. Thus:
+ *  - substring("12345", 1.5, 2.6) returns "234" 
+ *  - substring("12345", 0, 3) returns "12" 
+ *  - substring("12345", 0 div 0, 3) returns "" 
+ *  - substring("12345", 1, 0 div 0) returns "" 
+ *  - substring("12345", -42, 1 div 0) returns "12345" 
+ *  - substring("12345", -1 div 0, 1 div 0) returns "" 
+ */
+void
+xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr str, start, len;
+    float le, in;
+    int i, l;
+    CHAR *ret;
+
+    /* 
+     * Conformance needs to be checked !!!!!
+     */
+    if (nargs < 2) {
+	CHECK_ARITY(2);
+    }
+    if (nargs > 3) {
+	CHECK_ARITY(3);
+    }
+    if (nargs == 3) {
+	CHECK_TYPE(XPATH_NUMBER);
+	len = valuePop(ctxt);
+	le = len->floatval;
+        xmlXPathFreeObject(len);
+    } else {
+	le = 2000000000;
+    }
+    CHECK_TYPE(XPATH_NUMBER);
+    start = valuePop(ctxt);
+    in = start->floatval;
+    xmlXPathFreeObject(start);
+    CHECK_TYPE(XPATH_STRING);
+    str = valuePop(ctxt);
+    le += in;
+
+    /* integer index of the first char */
+    i = in;
+    if (((float)i) != in) i++;
+    
+    /* integer index of the last char */
+    l = le;
+    if (((float)l) != le) l++;
+
+    /* back to a zero based len */
+    i--;
+    l--;
+
+    /* check against the string len */
+    if (l > 1024) {
+        l = xmlStrlen(str->stringval);
+    }
+    if (i < 0) {
+        i = 0;
+    }
+
+    /* number of chars to copy */
+    l -= i;
+
+    ret = xmlStrsub(str->stringval, i, l);
+    if (ret == NULL)
+	valuePush(ctxt, xmlXPathNewString(""));
+    else
+	valuePush(ctxt, xmlXPathNewString(ret));
+    xmlXPathFreeObject(str);
+}
+
+/**
+ * xmlXPathSubstringBeforeFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the substring-before() XPath function
+ * The substring-before function returns the substring of the first
+ * argument string that precedes the first occurrence of the second
+ * argument string in the first argument string, or the empty string
+ * if the first argument string does not contain the second argument
+ * string. For example, substring-before("1999/04/01","/") returns 1999.
+ */
+void
+xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(2);
+    TODO /* substring before */
+}
+
+/**
+ * xmlXPathSubstringAfterFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the substring-after() XPath function
+ * The substring-after function returns the substring of the first
+ * argument string that follows the first occurrence of the second
+ * argument string in the first argument string, or the empty stringi
+ * if the first argument string does not contain the second argument
+ * string. For example, substring-after("1999/04/01","/") returns 04/01,
+ * and substring-after("1999/04/01","19") returns 99/04/01.
+ */
+void
+xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(2);
+    TODO /* substring after */
+}
+
+/**
+ * xmlXPathNormalizeFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the normalize() XPath function
+ * The normalize function returns the argument string with white
+ * space normalized by stripping leading and trailing whitespace
+ * and replacing sequences of whitespace characters by a single
+ * space. Whitespace characters are the same allowed by the S production
+ * in XML. If the argument is omitted, it defaults to the context
+ * node converted to a string, in other words the value of the context node.
+ */
+void
+xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(1);
+    TODO /* normalize isn't as boring as translate, but pretty much */
+}
+
+/**
+ * xmlXPathTranslateFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the translate() XPath function
+ * The translate function returns the first argument string with
+ * occurrences of characters in the second argument string replaced
+ * by the character at the corresponding position in the third argument
+ * string. For example, translate("bar","abc","ABC") returns the string
+ * BAr. If there is a character in the second argument string with no
+ * character at a corresponding position in the third argument string
+ * (because the second argument string is longer than the third argument
+ * string), then occurrences of that character in the first argument
+ * string are removed. For example, translate("--aaa--","abc-","ABC")
+ * returns "AAA". If a character occurs more than once in second
+ * argument string, then the first occurrence determines the replacement
+ * character. If the third argument string is longer than the second
+ * argument string, then excess characters are ignored.
+ */
+void
+xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(3);
+    TODO /* translate is boring, waiting for UTF-8 representation too */
+}
+
+/**
+ * xmlXPathBooleanFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the boolean() XPath function
+ * he boolean function converts its argument to a boolean as follows:
+ *    - a number is true if and only if it is neither positive or
+ *      negative zero nor NaN
+ *    - a node-set is true if and only if it is non-empty
+ *    - a string is true if and only if its length is non-zero
+ */
+void
+xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+    int res = 0;
+
+    CHECK_ARITY(1);
+    cur = valuePop(ctxt);
+    if (cur == NULL) ERROR(XPATH_INVALID_OPERAND);
+    switch (cur->type) {
+        case XPATH_NODESET:
+	    if ((cur->nodesetval == NULL) ||
+	        (cur->nodesetval->nodeNr == 0)) res = 0;
+	    else 
+	        res = 1;
+	    break;
+	case XPATH_STRING:
+	    if ((cur->stringval == NULL) ||
+	        (cur->stringval[0] == 0)) res = 0;
+	    else 
+	        res = 1;
+	    break;
+        case XPATH_BOOLEAN:
+	    valuePush(ctxt, cur);
+	    return;
+	case XPATH_NUMBER:
+	    if (cur->floatval) res = 1;
+	    break;
+	default:
+	    STRANGE
+    }
+    xmlXPathFreeObject(cur);
+    valuePush(ctxt, xmlXPathNewBoolean(res));
+}
+
+/**
+ * xmlXPathNotFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the not() XPath function
+ * The not function returns true if its argument is false,
+ * and false otherwise.
+ */
+void
+xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_BOOLEAN);
+    ctxt->value->boolval = ! ctxt->value->boolval;
+}
+
+/**
+ * xmlXPathTrueFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the true() XPath function
+ */
+void
+xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(0);
+    valuePush(ctxt, xmlXPathNewBoolean(1));
+}
+
+/**
+ * xmlXPathFalseFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the false() XPath function
+ */
+void
+xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(0);
+    valuePush(ctxt, xmlXPathNewBoolean(0));
+}
+
+/**
+ * xmlXPathLangFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the lang() XPath function
+ * The lang function returns true or false depending on whether the
+ * language of the context node as specified by xml:lang attributes
+ * is the same as or is a sublanguage of the language specified by
+ * the argument string. The language of the context node is determined
+ * by the value of the xml:lang attribute on the context node, or, if
+ * the context node has no xml:lang attribute, by the value of the
+ * xml:lang attribute on the nearest ancestor of the context node that
+ * has an xml:lang attribute. If there is no such attribute, then lang
+ * returns false. If there is such an attribute, then lang returns
+ * true if the attribute value is equal to the argument ignoring case,
+ * or if there is some suffix starting with - such that the attribute
+ * value is equal to the argument ignoring that suffix of the attribute
+ * value and ignoring case.
+ */
+void
+xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(0);
+    TODO /* Write down xml:lang support in libxml first */
+}
+
+/**
+ * xmlXPathNumberFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the number() XPath function
+ */
+void
+xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    xmlXPathObjectPtr cur;
+    float res;
+
+    CHECK_ARITY(1);
+    cur = valuePop(ctxt);
+    switch (cur->type) {
+        case XPATH_NODESET:
+	    valuePush(ctxt, cur);
+	    xmlXPathStringFunction(ctxt, 1);
+	    cur = valuePop(ctxt);
+	case XPATH_STRING:
+	    res = xmlXPathStringEvalNumber(cur->stringval);
+	    valuePush(ctxt, xmlXPathNewFloat(res));
+	    xmlXPathFreeObject(cur);
+	    return;
+        case XPATH_BOOLEAN:
+	    if (cur->boolval) valuePush(ctxt, xmlXPathNewFloat(1.0));
+	    else valuePush(ctxt, xmlXPathNewFloat(0.0));
+	    xmlXPathFreeObject(cur);
+	    return;
+	case XPATH_NUMBER:
+	    valuePush(ctxt, cur);
+	    return;
+    }
+    STRANGE
+}
+
+/**
+ * xmlXPathSumFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the sum() XPath function
+ * The sum function returns the sum of the values of the nodes in
+ * the argument node-set.
+ */
+void
+xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(1);
+    TODO /* BUG Sum : don't understand the definition */
+}
+
+/**
+ * xmlXPathFloorFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the floor() XPath function
+ * The floor function returns the largest (closest to positive infinity)
+ * number that is not greater than the argument and that is an integer.
+ */
+void
+xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NUMBER);
+    /* floor(0.999999999999) => 1.0 !!!!!!!!!!! */
+    ctxt->value->floatval = (float)((int) ctxt->value->floatval);
+}
+
+/**
+ * xmlXPathCeilingFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the ceiling() XPath function
+ * The ceiling function returns the smallest (closest to negative infinity)
+ * number that is not less than the argument and that is an integer.
+ */
+void
+xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    float f;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NUMBER);
+    f = (float)((int) ctxt->value->floatval);
+    if (f != ctxt->value->floatval)
+	ctxt->value->floatval = f + 1;
+}
+
+/**
+ * xmlXPathRoundFunction:
+ * @ctxt:  the XPath Parser context
+ *
+ * Implement the round() XPath function
+ * The round function returns the number that is closest to the
+ * argument and that is an integer. If there are two such numbers,
+ * then the one that is even is returned.
+ */
+void
+xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+    float f;
+
+    CHECK_ARITY(1);
+    CHECK_TYPE(XPATH_NUMBER);
+    /* round(0.50000001) => 0  !!!!! */
+    f = (float)((int) ctxt->value->floatval);
+    if (ctxt->value->floatval < f + 0.5)
+        ctxt->value->floatval = f;
+    else if (ctxt->value->floatval == f + 0.5)
+        ctxt->value->floatval = f; /* !!!! Not following the spec here */
+    else 
+        ctxt->value->floatval = f + 1;
+}
+
+/************************************************************************
+ *									*
+ *			The Parser					*
+ *									*
+ ************************************************************************/
+
+/*
+ * a couple of forward declarations since we use a recursive call based
+ * implementation.
+ */
+void xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt);
+void xmlXPathEvalPredicate(xmlXPathParserContextPtr ctxt);
+void xmlXPathEvalLocationPath(xmlXPathParserContextPtr ctxt);
+void xmlXPathEvalRelativeLocationPath(xmlXPathParserContextPtr ctxt);
+
+/**
+ * xmlXPathParseNCName:
+ * @ctxt:  the XPath Parser context
+ *
+ * parse an XML namespace non qualified name.
+ *
+ * [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
+ *
+ * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
+ *                       CombiningChar | Extender
+ *
+ * Returns the namespace name or NULL
+ */
+
+CHAR *
+xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
+    const CHAR *q;
+    CHAR *ret = NULL;
+
+    if (!IS_LETTER(CUR) && (CUR != '_')) return(NULL);
+    q = NEXT;
+
+    while ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) ||
+           (CUR == '.') || (CUR == '-') ||
+	   (CUR == '_') ||
+	   (IS_COMBINING(CUR)) ||
+	   (IS_EXTENDER(CUR)))
+	NEXT;
+    
+    ret = xmlStrndup(q, CUR_PTR - q);
+
+    return(ret);
+}
+
+/**
+ * xmlXPathParseQName:
+ * @ctxt:  the XPath Parser context
+ * @prefix:  a CHAR ** 
+ *
+ * parse an XML qualified name
+ *
+ * [NS 5] QName ::= (Prefix ':')? LocalPart
+ *
+ * [NS 6] Prefix ::= NCName
+ *
+ * [NS 7] LocalPart ::= NCName
+ *
+ * Returns the function returns the local part, and prefix is updated
+ *   to get the Prefix if any.
+ */
+
+CHAR *
+xmlXPathParseQName(xmlXPathParserContextPtr ctxt, CHAR **prefix) {
+    CHAR *ret = NULL;
+
+    *prefix = NULL;
+    ret = xmlXPathParseNCName(ctxt);
+    if (CUR == ':') {
+        *prefix = ret;
+	NEXT;
+	ret = xmlXPathParseNCName(ctxt);
+    }
+    return(ret);
+}
+
+/**
+ * xmlXPathStringEvalNumber:
+ * @str:  A string to scan
+ *
+ *  [30]   Number ::=   Digits ('.' Digits)?
+ *                    | '.' Digits 
+ *  [31]   Digits ::=   [0-9]+
+ *
+ * Parse and evaluate a Number in the string
+ *
+ * BUG: "1.' is not valid ... James promised correction
+ *       as Digits ('.' Digits?)?
+ *
+ * Returns the float value.
+ */
+float
+xmlXPathStringEvalNumber(const CHAR *str) {
+    const CHAR *cur = str;
+    float ret = 0.0;
+    float mult = 1;
+    int ok = 0;
+
+    while (*cur == ' ') cur++;
+    if ((*cur != '.') && ((*cur < '0') || (*cur > '9'))) {
+        return(NAN);
+    }
+    while ((*cur >= '0') && (*cur <= '9')) {
+        ret = ret * 10 + (*cur - '0');
+	ok = 1;
+	cur++;
+    }
+    if (*cur == '.') {
+        cur++;
+	if (((*cur < '0') || (*cur > '9')) && (!ok)) {
+	    return(NAN);
+	}
+	while ((*cur >= '0') && (*cur <= '9')) {
+	    mult /= 10;
+	    ret = ret  + (*cur - '0') * mult;
+	    cur++;
+	}
+    }
+    while (*cur == ' ') cur++;
+    if (*cur != 0) return(NAN);
+    return(ret);
+}
+
+/**
+ * xmlXPathEvalNumber:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [30]   Number ::=   Digits ('.' Digits)?
+ *                    | '.' Digits 
+ *  [31]   Digits ::=   [0-9]+
+ *
+ * Parse and evaluate a Number, then push it on the stack
+ *
+ * BUG: "1.' is not valid ... James promised correction
+ *       as Digits ('.' Digits?)?
+ */
+void
+xmlXPathEvalNumber(xmlXPathParserContextPtr ctxt) {
+    float ret = 0.0;
+    float mult = 1;
+    int ok = 0;
+
+    CHECK_ERROR;
+    if ((CUR != '.') && ((CUR < '0') || (CUR > '9'))) {
+        ERROR(XPATH_NUMBER_ERROR);
+    }
+    while ((CUR >= '0') && (CUR <= '9')) {
+        ret = ret * 10 + (CUR - '0');
+	ok = 1;
+	NEXT;
+    }
+    if (CUR == '.') {
+        NEXT;
+	if (((CUR < '0') || (CUR > '9')) && (!ok)) {
+	     ERROR(XPATH_NUMBER_ERROR);
+	}
+	while ((CUR >= '0') && (CUR <= '9')) {
+	    mult /= 10;
+	    ret = ret  + (CUR - '0') * mult;
+	    NEXT;
+	}
+    }
+    valuePush(ctxt, xmlXPathNewFloat(ret));
+}
+
+/**
+ * xmlXPathEvalLiteral:
+ * @ctxt:  the XPath Parser context
+ *
+ * Parse a Literal and push it on the stack.
+ *
+ *  [29]   Literal ::=   '"' [^"]* '"'
+ *                    | "'" [^']* "'"
+ *
+ * TODO: memory allocation could be improved.
+ */
+void
+xmlXPathEvalLiteral(xmlXPathParserContextPtr ctxt) {
+    const CHAR *q;
+    CHAR *ret = NULL;
+
+    if (CUR == '"') {
+        NEXT;
+	q = CUR_PTR;
+	while ((IS_CHAR(CUR)) && (CUR != '"'))
+	    NEXT;
+	if (!IS_CHAR(CUR)) {
+	    ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
+	} else {
+	    ret = xmlStrndup(q, CUR_PTR - q);
+	    NEXT;
+        }
+    } else if (CUR == '\'') {
+        NEXT;
+	q = CUR_PTR;
+	while ((IS_CHAR(CUR)) && (CUR != '\''))
+	    NEXT;
+	if (!IS_CHAR(CUR)) {
+	    ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
+	} else {
+	    ret = xmlStrndup(q, CUR_PTR - q);
+	    NEXT;
+        }
+    } else {
+	ERROR(XPATH_START_LITERAL_ERROR);
+    }
+    if (ret == NULL) return;
+    valuePush(ctxt, xmlXPathNewString(ret));
+    free(ret);
+}
+
+/**
+ * xmlXPathEvalVariableReference:
+ * @ctxt:  the XPath Parser context
+ *
+ * Parse a VariableReference, evaluate it and push it on the stack.
+ *
+ * The variable bindings consist of a mapping from variable names
+ * to variable values. The value of a variable is an object, which
+ * of any of the types that are possible for the value of an expression,
+ * and may also be of additional types not specified here.
+ *
+ * Early evaluation is possible since:
+ * The variable bindings [...] used to evaluate a subexpression are
+ * always the same as those used to evaluate the containing expression. 
+ *
+ *  [36]   VariableReference ::=   '$' QName 
+ */
+void
+xmlXPathEvalVariableReference(xmlXPathParserContextPtr ctxt) {
+    CHAR *name;
+    CHAR *prefix;
+    xmlXPathObjectPtr value;
+
+    if (CUR != '$') {
+	ERROR(XPATH_VARIABLE_REF_ERROR);
+    }
+    name = xmlXPathParseQName(ctxt, &prefix);
+    if (name == NULL) {
+	ERROR(XPATH_VARIABLE_REF_ERROR);
+    }
+    value = xmlXPathVariablelookup(ctxt, prefix, name);
+    if (value == NULL) {
+	ERROR(XPATH_UNDEF_VARIABLE_ERROR);
+    }
+    valuePush(ctxt, value);
+    if (prefix != NULL) free(prefix);
+    free(name);
+}
+
+ 
+/**
+ * xmlXPathFunctionLookup:
+ * @ctxt:  the XPath Parser context
+ * @name:  a name string
+ *
+ * Search for a function of the given name
+ *
+ *  [35]   FunctionName ::=   QName - NodeType 
+ *
+ * TODO: for the moment the list is hardcoded from the spec !!!!
+ *
+ * Returns the xmlXPathFunction if found, or NULL otherwise
+ */
+xmlXPathFunction
+xmlXPathIsFunction(xmlXPathParserContextPtr ctxt, CHAR *name) {
+    switch (name[0]) {
+        case 'b':
+	    if (!xmlStrcmp(name, "boolean"))
+	        return(xmlXPathBooleanFunction);
+	    break;
+        case 'c':
+	    if (!xmlStrcmp(name, "ceiling"))
+	        return(xmlXPathCeilingFunction);
+	    if (!xmlStrcmp(name, "count"))
+	        return(xmlXPathCountFunction);
+	    if (!xmlStrcmp(name, "concat"))
+	        return(xmlXPathConcatFunction);
+	    if (!xmlStrcmp(name, "contains"))
+	        return(xmlXPathContainsFunction);
+	    break;
+        case 'i':
+	    if (!xmlStrcmp(name, "id"))
+	        return(xmlXPathIdFunction);
+	    break;
+        case 'f':
+	    if (!xmlStrcmp(name, "false"))
+	        return(xmlXPathFalseFunction);
+	    if (!xmlStrcmp(name, "floor"))
+	        return(xmlXPathFloorFunction);
+	    break;
+        case 'l':
+	    if (!xmlStrcmp(name, "last"))
+	        return(xmlXPathLastFunction);
+	    if (!xmlStrcmp(name, "lang"))
+	        return(xmlXPathLangFunction);
+	    if (!xmlStrcmp(name, "local-part"))
+	        return(xmlXPathLocalPartFunction);
+	    break;
+        case 'n':
+	    if (!xmlStrcmp(name, "not"))
+	        return(xmlXPathNotFunction);
+	    if (!xmlStrcmp(name, "name"))
+	        return(xmlXPathNameFunction);
+	    if (!xmlStrcmp(name, "namespace"))
+	        return(xmlXPathNamespaceFunction);
+	    if (!xmlStrcmp(name, "normalize"))
+	        return(xmlXPathNormalizeFunction);
+	    if (!xmlStrcmp(name, "number"))
+	        return(xmlXPathNumberFunction);
+	    break;
+        case 'p':
+	    if (!xmlStrcmp(name, "position"))
+	        return(xmlXPathPositionFunction);
+	    break;
+        case 'r':
+	    if (!xmlStrcmp(name, "round"))
+	        return(xmlXPathRoundFunction);
+	    break;
+        case 's':
+	    if (!xmlStrcmp(name, "string"))
+	        return(xmlXPathStringFunction);
+	    if (!xmlStrcmp(name, "string-length"))
+	        return(xmlXPathStringLengthFunction);
+	    if (!xmlStrcmp(name, "starts-with"))
+	        return(xmlXPathStartsWithFunction);
+	    if (!xmlStrcmp(name, "substring"))
+	        return(xmlXPathSubstringFunction);
+	    if (!xmlStrcmp(name, "substring-before"))
+	        return(xmlXPathSubstringBeforeFunction);
+	    if (!xmlStrcmp(name, "substring-after"))
+	        return(xmlXPathSubstringAfterFunction);
+	    if (!xmlStrcmp(name, "sum"))
+	        return(xmlXPathSumFunction);
+	    break;
+        case 't':
+	    if (!xmlStrcmp(name, "true"))
+	        return(xmlXPathTrueFunction);
+	    if (!xmlStrcmp(name, "translate"))
+	        return(xmlXPathTranslateFunction);
+	    break;
+    }
+    return(NULL);
+}
+
+/**
+ * xmlXPathEvalLocationPathName:
+ * @ctxt:  the XPath Parser context
+ * @name:  a name string
+ *
+ * Various names in the beginning of a LocationPath expression
+ * indicate whether that's an Axis, a node type, 
+ *
+ *  [6]   AxisName ::=   'ancestor'
+ *               | 'ancestor-or-self'
+ *               | 'attribute'
+ *               | 'child'
+ *               | 'descendant'
+ *               | 'descendant-or-self'
+ *               | 'following'
+ *               | 'following-sibling'
+ *               | 'namespace'
+ *               | 'parent'
+ *               | 'preceding'
+ *               | 'preceding-sibling'
+ *               | 'self'
+ *  [38]   NodeType ::=   'comment'
+ *                    | 'text'
+ *                    | 'processing-instruction'
+ *                    | 'node'
+ */
+int
+xmlXPathGetNameType(xmlXPathParserContextPtr ctxt, CHAR *name) {
+    switch (name[0]) {
+        case 'a':
+	    if (!xmlStrcmp(name, "ancestor")) return(AXIS_ANCESTOR);
+	    if (!xmlStrcmp(name, "ancestor-or-self")) return(AXIS_ANCESTOR_OR_SELF);
+            if (!xmlStrcmp(name, "attribute")) return(AXIS_ATTRIBUTE);
+	    break;
+        case 'c':
+            if (!xmlStrcmp(name, "child")) return(AXIS_CHILD);
+            if (!xmlStrcmp(name, "comment")) return(NODE_TYPE_COMMENT);
+	    break;
+        case 'd':
+            if (!xmlStrcmp(name, "descendant")) return(AXIS_DESCENDANT);
+            if (!xmlStrcmp(name, "descendant-or-self")) return(AXIS_DESCENDANT_OR_SELF);
+	    break;
+        case 'f':
+            if (!xmlStrcmp(name, "following")) return(AXIS_FOLLOWING);
+            if (!xmlStrcmp(name, "following-sibling")) return(AXIS_FOLLOWING_SIBLING);
+	    break;
+        case 'n':
+            if (!xmlStrcmp(name, "namespace")) return(AXIS_NAMESPACE);
+            if (!xmlStrcmp(name, "node")) return(NODE_TYPE_NODE);
+	    break;
+        case 'p':
+            if (!xmlStrcmp(name, "parent")) return(AXIS_PARENT);
+            if (!xmlStrcmp(name, "preceding")) return(AXIS_PRECEDING);
+            if (!xmlStrcmp(name, "preceding-sibling")) return(AXIS_PRECEDING_SIBLING);
+            if (!xmlStrcmp(name, "processing-instruction")) return(NODE_TYPE_PI);
+	    break;
+        case 's':
+            if (!xmlStrcmp(name, "self")) return(AXIS_SELF);
+	    break;
+        case 't':
+            if (!xmlStrcmp(name, "text")) return(NODE_TYPE_TEXT);
+	    break;
+    }
+    if (xmlXPathIsFunction(ctxt, name)) return(IS_FUNCTION);
+    return(0);
+}
+ 
+/**
+ * xmlXPathEvalFunctionCall:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [16]   FunctionCall ::=   FunctionName '(' ( Argument ( ',' Argument)*)? ')'
+ *  [17]   Argument ::=   Expr 
+ *
+ * Parse and evaluate a function call, the evaluation of all arguments are
+ * pushed on the stack
+ */
+void
+xmlXPathEvalFunctionCall(xmlXPathParserContextPtr ctxt) {
+    CHAR *name;
+    CHAR *prefix;
+    xmlXPathFunction func;
+    int nbargs = 0;
+
+    name = xmlXPathParseQName(ctxt, &prefix);
+    if (name == NULL) {
+	ERROR(XPATH_EXPR_ERROR);
+    }
+    func = xmlXPathIsFunction(ctxt, name);
+    if (func == NULL) {
+	ERROR(XPATH_UNKNOWN_FUNC_ERROR);
+    }
+#ifdef DEBUG_EXPR
+    fprintf(xmlXPathDebug, "Calling function %s\n", name);
+#endif
+
+    if (CUR != '(') {
+	ERROR(XPATH_EXPR_ERROR);
+    }
+    NEXT;
+    valuePush(ctxt, xmlXPathNewMarker());
+
+    while (CUR != ')') {
+        xmlXPathEvalExpr(ctxt);
+	nbargs++;
+	if (CUR == ')') break;
+	if (CUR != ',') {
+	    ERROR(XPATH_EXPR_ERROR);
+	}
+	NEXT;
+    }
+    NEXT;
+    func(ctxt, nbargs);
+}
+
+/**
+ * xmlXPathEvalPrimaryExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [15]   PrimaryExpr ::=   VariableReference 
+ *                | '(' Expr ')'
+ *                | Literal 
+ *                | Number 
+ *                | FunctionCall 
+ *
+ * Parse and evaluate a primary expression, then push the result on the stack
+ */
+void
+xmlXPathEvalPrimaryExpr(xmlXPathParserContextPtr ctxt) {
+    if (CUR == '$') xmlXPathEvalVariableReference(ctxt);
+    else if (CUR == '(') {
+        NEXT;
+        xmlXPathEvalExpr(ctxt);
+	if (CUR != ')') {
+	    ERROR(XPATH_EXPR_ERROR);
+	}
+	NEXT;
+    } else if (IS_DIGIT(CUR)) {
+        xmlXPathEvalNumber(ctxt);
+    } else if ((CUR == '\'') || (CUR == '"')) {
+        xmlXPathEvalLiteral(ctxt);
+    } else {
+        xmlXPathEvalFunctionCall(ctxt);
+    }
+}
+
+/**
+ * xmlXPathEvalFilterExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [20]   FilterExpr ::=   PrimaryExpr 
+ *               | FilterExpr Predicate 
+ *
+ * Parse and evaluate a filter expression, then push the result on the stack
+ * Square brackets are used to filter expressions in the same way that
+ * they are used in location paths. It is an error if the expression to
+ * be filtered does not evaluate to a node-set. The context node list
+ * used for evaluating the expression in square brackets is the node-set
+ * to be filtered listed in document order.
+ */
+
+void
+xmlXPathEvalFilterExpr(xmlXPathParserContextPtr ctxt) {
+    /****
+    xmlNodeSetPtr oldset = NULL;
+    xmlXPathObjectPtr arg;
+     ****/
+
+    xmlXPathEvalPrimaryExpr(ctxt);
+    CHECK_ERROR;
+    
+    if (CUR != '[') return;
+
+    CHECK_TYPE(XPATH_NODESET);
+
+    /******
+    TODO:  transition from PathExpr to Expr using paths ...
+    arg = valuePop(ctxt);
+    oldset = ctxt->context->nodeset;
+    ctxt->context->nodeset = arg->nodesetval;
+     ******/
+
+    while (CUR == '[') {
+	xmlXPathEvalPredicate(ctxt);
+    }
+
+    
+}
+
+/**
+ * xmlXPathEvalPathExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [19]   PathExpr ::=   LocationPath 
+ *               | FilterExpr 
+ *               | FilterExpr '/' RelativeLocationPath 
+ *               | FilterExpr '//' RelativeLocationPath 
+ *
+ * Parse and evaluate a path expression, then push the result on the stack
+ * The / operator and // operators combine an arbitrary expression
+ * and a relative location path. It is an error if the expression
+ * does not evaluate to a node-set.
+ * The / operator does composition in the same way as when / is
+ * used in a location path. As in location paths, // is short for
+ * /descendant-or-self::node()/.
+ */
+
+void
+xmlXPathEvalPathExpr(xmlXPathParserContextPtr ctxt) {
+    xmlNodeSetPtr newset = NULL;
+
+    /*
+     * TODO: FilterExpr => PrimaryExpr => FunctionName is possible too
+     *       so we may have to parse a name here, and depending on whether
+     *       it's a function name or not parse a FilterExpr or a LocationPath
+     *   !!!!!!!!!!!! See NOTE1
+     */
+
+    if ((CUR == '$') || (CUR == '(') || (IS_DIGIT(CUR)) ||
+        (CUR == '\'') || (CUR == '"')) {
+	xmlXPathEvalFilterExpr(ctxt);
+	CHECK_ERROR;
+	if ((CUR == '/') && (NXT(1) == '/')) {
+	    SKIP(2);
+	    if (ctxt->context->nodelist == NULL) {
+		STRANGE
+		xmlXPathRoot(ctxt);
+	    }
+	    newset = xmlXPathNodeCollectAndTest(ctxt, AXIS_DESCENDANT_OR_SELF,
+			     NODE_TEST_TYPE, XML_ELEMENT_NODE, NULL, NULL);
+	    if (ctxt->context->nodelist != NULL)
+		xmlXPathFreeNodeSet(ctxt->context->nodelist);
+	    ctxt->context->nodelist = newset;
+	    ctxt->context->node = NULL;
+	    xmlXPathEvalRelativeLocationPath(ctxt);
+	} else if (CUR == '/') {
+	    xmlXPathEvalRelativeLocationPath(ctxt);
+	}
+    } else {
+        xmlXPathEvalLocationPath(ctxt);
+    }
+}
+
+/**
+ * xmlXPathEvalUnionExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [18]   UnionExpr ::=   PathExpr 
+ *               | UnionExpr '|' PathExpr 
+ *
+ * Parse and evaluate an union expression, then push the result on the stack
+ */
+
+void
+xmlXPathEvalUnionExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalPathExpr(ctxt);
+    CHECK_ERROR;
+    if (CUR == '|') {
+	xmlNodeSetPtr old = ctxt->context->nodelist;
+
+	xmlXPathEvalPathExpr(ctxt);
+
+	if (ctxt->context->nodelist == NULL)
+	    ctxt->context->nodelist = old;
+	else {
+	    ctxt->context->nodelist = 
+	        xmlXPathNodeSetMerge(ctxt->context->nodelist, old);
+	    xmlXPathFreeNodeSet(old);
+	}
+    }
+}
+
+/**
+ * xmlXPathEvalUnaryExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [27]   UnaryExpr ::=   UnionExpr 
+ *                   | '-' UnaryExpr 
+ *
+ * Parse and evaluate an unary expression, then push the result on the stack
+ */
+
+void
+xmlXPathEvalUnaryExpr(xmlXPathParserContextPtr ctxt) {
+    int minus = 0;
+
+    if (CUR == '-') {
+        minus = 1;
+	NEXT;
+    }
+    /* xmlXPathEvalUnionExpr(ctxt); NOTE1 !!! */
+    xmlXPathEvalPrimaryExpr(ctxt);
+    CHECK_ERROR;
+    if (minus) {
+        xmlXPathValueFlipSign(ctxt);
+    }
+}
+
+/**
+ * xmlXPathEvalMultiplicativeExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [26]   MultiplicativeExpr ::=   UnaryExpr 
+ *                   | MultiplicativeExpr MultiplyOperator UnaryExpr 
+ *                   | MultiplicativeExpr 'div' UnaryExpr 
+ *                   | MultiplicativeExpr 'mod' UnaryExpr 
+ *  [34]   MultiplyOperator ::=   '*'
+ *
+ * Parse and evaluate an Additive expression, then push the result on the stack
+ */
+
+void
+xmlXPathEvalMultiplicativeExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalUnaryExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == '*') || 
+           ((CUR == 'd') && (NXT(1) == 'i') && (NXT(2) == 'v')) ||
+           ((CUR == 'm') && (NXT(1) == 'o') && (NXT(2) == 'd'))) {
+	int op = -1;
+
+        if (CUR == '*') {
+	    op = 0;
+	    NEXT;
+	} else if (CUR == 'd') {
+	    op = 1;
+	    SKIP(3);
+	} else if (CUR == 'm') {
+	    op = 2;
+	    SKIP(3);
+	}
+        xmlXPathEvalUnaryExpr(ctxt);
+	CHECK_ERROR;
+	switch (op) {
+	    case 0:
+	        xmlXPathMultValues(ctxt);
+		break;
+	    case 1:
+	        xmlXPathDivValues(ctxt);
+		break;
+	    case 2:
+	        xmlXPathModValues(ctxt);
+		break;
+	}
+    }
+}
+
+/**
+ * xmlXPathEvalAdditiveExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [25]   AdditiveExpr ::=   MultiplicativeExpr 
+ *                   | AdditiveExpr '+' MultiplicativeExpr 
+ *                   | AdditiveExpr '-' MultiplicativeExpr 
+ *
+ * Parse and evaluate an Additive expression, then push the result on the stack
+ */
+
+void
+xmlXPathEvalAdditiveExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalMultiplicativeExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == '+') || (CUR == '-')) {
+	int plus;
+
+        if (CUR == '+') plus = 1;
+	else plus = 0;
+	NEXT;
+        xmlXPathEvalMultiplicativeExpr(ctxt);
+	CHECK_ERROR;
+	if (plus) xmlXPathAddValues(ctxt);
+	else xmlXPathSubValues(ctxt);
+    }
+}
+
+/**
+ * xmlXPathEvalRelationalExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [24]   RelationalExpr ::=   AdditiveExpr 
+ *                 | RelationalExpr '<' AdditiveExpr 
+ *                 | RelationalExpr '>' AdditiveExpr 
+ *                 | RelationalExpr '<=' AdditiveExpr 
+ *                 | RelationalExpr '>=' AdditiveExpr 
+ *
+ *  A <= B > C is allowed ? Answer from James, yes with
+ *  (AdditiveExpr <= AdditiveExpr) > AdditiveExpr
+ *  which is basically what got implemented.
+ *
+ * Parse and evaluate a Relational expression, then push the result
+ * on the stack
+ */
+
+void
+xmlXPathEvalRelationalExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalAdditiveExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == '<') ||
+           (CUR == '>') ||
+           ((CUR == '<') && (NXT(1) == '=')) ||
+           ((CUR == '>') && (NXT(1) == '='))) {
+	xmlXPathObjectPtr arg1, arg2, res;
+	int inf, strict, equal;
+
+        if (CUR == '<') inf = 1;
+	else inf = 0;
+	if (NXT(1) == '=') strict = 0;
+	else strict = 1;
+	NEXT;
+	if (!strict) NEXT;
+        xmlXPathEvalAdditiveExpr(ctxt);
+	CHECK_ERROR;
+	arg2 = valuePop(ctxt);
+	arg1 = valuePop(ctxt);
+	equal = xmlXPathCompareValues(inf, strict, arg1, arg2);
+	res = xmlXPathNewBoolean(equal);
+	valuePush(ctxt, res);
+	xmlXPathFreeObject(arg1);
+	xmlXPathFreeObject(arg2);
+    }
+}
+
+/**
+ * xmlXPathEvalEqualityExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [23]   EqualityExpr ::=   RelationalExpr 
+ *                 | EqualityExpr '=' RelationalExpr 
+ *                 | EqualityExpr '!=' RelationalExpr 
+ *
+ *  A != B != C is allowed ? Answer from James, yes with
+ *  (RelationalExpr = RelationalExpr) = RelationalExpr
+ *  (RelationalExpr != RelationalExpr) != RelationalExpr
+ *  which is basically what got implemented.
+ *
+ * Parse and evaluate an Equality expression, then push the result on the stack
+ *
+ */
+void
+xmlXPathEvalEqualityExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalRelationalExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == '=') || ((CUR == '!') && (NXT(1) == '='))) {
+	xmlXPathObjectPtr arg1, arg2, res;
+	int eq, equal;
+
+        if (CUR == '=') eq = 1;
+	else eq = 0;
+	NEXT;
+	if (!eq) NEXT;
+        xmlXPathEvalRelationalExpr(ctxt);
+	CHECK_ERROR;
+	arg2 = valuePop(ctxt);
+	arg1 = valuePop(ctxt);
+	equal = xmlXPathEqualValues(arg1, arg2);
+	if (eq) res = xmlXPathNewBoolean(equal);
+	else res = xmlXPathNewBoolean(!equal);
+	valuePush(ctxt, res);
+	xmlXPathFreeObject(arg1);
+	xmlXPathFreeObject(arg2);
+    }
+}
+
+/**
+ * xmlXPathEvalAndExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [22]   AndExpr ::=   EqualityExpr 
+ *                 | AndExpr 'and' EqualityExpr 
+ *
+ * Parse and evaluate an AND expression, then push the result on the stack
+ *
+ */
+void
+xmlXPathEvalAndExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalEqualityExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == 'a') && (NXT(1) == 'n') && (NXT(2) == 'n')) {
+	xmlXPathObjectPtr arg1, arg2;
+
+        SKIP(3);
+        xmlXPathEvalEqualityExpr(ctxt);
+	CHECK_ERROR;
+	arg2 = valuePop(ctxt);
+	arg1 = valuePop(ctxt);
+	arg1->boolval &= arg2->boolval;
+	valuePush(ctxt, arg1);
+	xmlXPathFreeObject(arg2);
+    }
+}
+
+/**
+ * xmlXPathEvalExpr:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [14]   Expr ::=   OrExpr 
+ *  [21]   OrExpr ::=   AndExpr 
+ *                 | OrExpr 'or' AndExpr 
+ *
+ * Parse and evaluate an expression, then push the result on the stack
+ *
+ */
+void
+xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) {
+    xmlXPathEvalAndExpr(ctxt);
+    CHECK_ERROR;
+    while ((CUR == 'o') && (NXT(1) == 'r')) {
+	xmlXPathObjectPtr arg1, arg2;
+
+        SKIP(2);
+        xmlXPathEvalAndExpr(ctxt);
+	CHECK_ERROR;
+	arg2 = valuePop(ctxt);
+	arg1 = valuePop(ctxt);
+	arg1->boolval |= arg2->boolval;
+	valuePush(ctxt, arg1);
+	xmlXPathFreeObject(arg2);
+    }
+}
+
+/**
+ * xmlXPathEvaluatePredicateResult:
+ * @ctxt:  the XPath Parser context
+ * @res:  the Predicate Expression evaluation result
+ * @index:  index of the current node in the current list
+ *
+ * Evaluate a predicate result for the current node.
+ * A PredicateExpr is evaluated by evaluating the Expr and converting
+ * the result to a boolean. If the result is a number, the result will
+ * be converted to true if the number is equal to the position of the
+ * context node in the context node list (as returned by the position
+ * function) and will be converted to false otherwise; if the result
+ * is not a number, then the result will be converted as if by a call
+ * to the boolean function. 
+ */
+int
+xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, 
+                                xmlXPathObjectPtr res, int index) {
+    if (res == NULL) return(0);
+    switch (res->type) {
+        case XPATH_BOOLEAN:
+	    return(res->boolval);
+        case XPATH_NUMBER:
+	    return(res->floatval == index);
+        case XPATH_NODESET:
+	    return(res->nodesetval->nodeNr != 0);
+        case XPATH_STRING:
+	    return((res->stringval != NULL) &&
+	           (xmlStrlen(res->stringval) != 0));
+        default:
+	    STRANGE
+    }
+    return(0);
+}
+
+/**
+ * xmlXPathEvalPredicate:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [8]   Predicate ::=   '[' PredicateExpr ']'
+ *  [9]   PredicateExpr ::=   Expr 
+ *
+ * Parse and evaluate a predicate for all the elements of the
+ * current node list. Then refine the list by removing all
+ * nodes where the predicate is false.
+ */
+void
+xmlXPathEvalPredicate(xmlXPathParserContextPtr ctxt) {
+    const CHAR *cur;
+    xmlXPathObjectPtr res;
+    xmlNodeSetPtr newset = NULL;
+    int i;
+
+    if (CUR != '[') {
+	ERROR(XPATH_INVALID_PREDICATE_ERROR);
+    }
+    NEXT;
+    if ((ctxt->context->nodelist == NULL) ||
+        (ctxt->context->nodelist->nodeNr == 0)) {
+        ctxt->context->node = NULL;
+	xmlXPathEvalExpr(ctxt);
+	CHECK_ERROR;
+	res = valuePop(ctxt);
+	if (res != NULL)
+	    xmlXPathFreeObject(res);
+    } else {
+        cur = ctxt->cur;
+	newset = xmlXPathNodeSetCreate(NULL);
+        for (i = 0; i < ctxt->context->nodelist->nodeNr; i++) {
+	    ctxt->cur = cur;
+	    ctxt->context->node = ctxt->context->nodelist->nodeTab[i];
+	    xmlXPathEvalExpr(ctxt);
+	    CHECK_ERROR;
+	    res = valuePop(ctxt);
+	    if (xmlXPathEvaluatePredicateResult(ctxt, res, i + 1))
+	        xmlXPathNodeSetAdd(newset,
+		                   ctxt->context->nodelist->nodeTab[i]);
+	    if (res != NULL)
+	    xmlXPathFreeObject(res);
+	}
+	if (ctxt->context->nodelist != NULL)
+	    xmlXPathFreeNodeSet(ctxt->context->nodelist);
+	ctxt->context->nodelist = newset;
+	ctxt->context->node = NULL;
+    }
+    if (CUR != ']') {
+	ERROR(XPATH_INVALID_PREDICATE_ERROR);
+    }
+    NEXT;
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, "After predicate : ");
+    xmlXPathDebugNodeSet(xmlXPathDebug, ctxt->context->nodelist);
+#endif
+}
+
+/**
+ * xmlXPathEvalBasis:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [5]   Basis ::=   AxisName '::' NodeTest 
+ *            | AbbreviatedBasis 
+ *  [13]   AbbreviatedBasis ::=   NodeTest 
+ *                           | '@' NodeTest 
+ *  [7]   NodeTest ::=   WildcardName 
+ *              | NodeType '(' ')'
+ *              | 'processing-instruction' '(' Literal ')'
+ *  [37]   WildcardName ::=   '*'
+ *                    | NCName ':' '*'
+ *                    | QName 
+ *
+ * Evaluate one step in a Location Path
+ */
+void
+xmlXPathEvalBasis(xmlXPathParserContextPtr ctxt) {
+    CHAR *name = NULL;
+    CHAR *prefix = NULL;
+    int type = 0;
+    int axis = AXIS_CHILD; /* the default on abbreviated syntax */
+    int nodetest = NODE_TEST_NONE;
+    int nodetype = 0;
+    xmlNodeSetPtr newset = NULL;
+
+    if (CUR == '@') {
+        TODO /* attributes */
+    } else if (CUR == '*') {
+        NEXT;
+        nodetest = NODE_TEST_ALL;
+    } else {
+        name = xmlXPathParseNCName(ctxt);
+	if (name == NULL) {
+	    ERROR(XPATH_EXPR_ERROR);
+	}
+	type = xmlXPathGetNameType(ctxt, name);
+	switch (type) {
+	    /*
+	     * Simple case: no axis seach all given node types.
+	     */
+            case NODE_TYPE_COMMENT:
+	        if ((CUR != '(') || (NXT(1) != ')')) break;
+		SKIP(2);
+		nodetest = NODE_TEST_TYPE;
+		nodetype = XML_COMMENT_NODE;
+		goto search_nodes;
+            case NODE_TYPE_TEXT:
+	        if ((CUR != '(') || (NXT(1) != ')')) break;
+		SKIP(2);
+		nodetest = NODE_TEST_TYPE;
+		nodetype = XML_TEXT_NODE;
+		goto search_nodes;
+            case NODE_TYPE_NODE:
+	        if ((CUR != '(') || (NXT(1) != ')')) {
+		    nodetest = NODE_TEST_NAME;
+		    break;
+		}
+		SKIP(2);
+		nodetest = NODE_TEST_TYPE;
+		nodetype = XML_ELEMENT_NODE;
+		goto search_nodes;
+            case NODE_TYPE_PI:
+	        if (CUR != '(') break;
+		if (NXT(1) != ')') {
+		    /*
+		     * Specific case: search a PI by name.
+		     */
+                    SKIP(2);
+		    nodetest = NODE_TEST_PI;
+		    xmlXPathEvalLiteral(ctxt);
+		    CHECK_ERROR;
+		    if (CUR != ')')
+			ERROR(XPATH_UNCLOSED_ERROR);
+		    xmlXPathSearchPI(ctxt, 0);
+		    return;
+		}
+		SKIP(2);
+		nodetest = NODE_TEST_TYPE;
+		nodetype = XML_PI_NODE;
+		goto search_nodes;
+	
+	    /*
+	     * Handling of the compund form: got the axis.
+	     */
+            case AXIS_ANCESTOR:
+            case AXIS_ANCESTOR_OR_SELF:
+            case AXIS_ATTRIBUTE:
+            case AXIS_CHILD:
+            case AXIS_DESCENDANT:
+            case AXIS_DESCENDANT_OR_SELF:
+            case AXIS_FOLLOWING:
+            case AXIS_FOLLOWING_SIBLING:
+            case AXIS_NAMESPACE:
+            case AXIS_PARENT:
+            case AXIS_PRECEDING:
+            case AXIS_PRECEDING_SIBLING:
+            case AXIS_SELF:
+	        if ((CUR != ':') || (NXT(1) != ':')) {
+		    nodetest = NODE_TEST_NAME;
+		    break;
+		}
+		SKIP(2);
+		axis = type;
+		break;
+	
+	    /*
+	     * Default: abbreviated syntax the axis is AXIS_CHILD
+	     */
+	    default:
+	        nodetest = NODE_TEST_NAME;
+	}
+	if (nodetest == NODE_TEST_NONE) {
+	    if (CUR == '*') {
+		NEXT;
+		nodetest = NODE_TEST_ALL;
+	    } else {
+		name = xmlXPathParseQName(ctxt, &prefix);
+		nodetest = NODE_TEST_NAME;
+	    }
+	} else if ((CUR == ':') && (nodetest == NODE_TEST_NAME)) {
+	    NEXT;
+	    prefix = name;
+	    if (CUR == '*') {
+	        NEXT;
+		nodetest = NODE_TEST_ALL;
+	    } else 
+		name = xmlXPathParseNCName(ctxt);
+	} else if (name == NULL)
+	    ERROR(XPATH_EXPR_ERROR);
+    }
+
+search_nodes:
+        
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, "Basis : computing new set\n");
+#endif
+    newset = xmlXPathNodeCollectAndTest(ctxt, axis, nodetest, nodetype,
+                                        prefix, name);
+    if (ctxt->context->nodelist != NULL)
+	xmlXPathFreeNodeSet(ctxt->context->nodelist);
+    ctxt->context->nodelist = newset;
+    ctxt->context->node = NULL;
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, "Basis : ");
+    xmlXPathDebugNodeSet(stdout, ctxt->context->nodelist);
+#endif
+}
+
+/**
+ * xmlXPathEvalStep:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [4]   Step ::=   Basis Predicate*
+ *                     | AbbreviatedStep 
+ *  [12]   AbbreviatedStep ::=   '.'
+ *                           | '..'
+ *
+ * Evaluate one step in a Location Path
+ * A location step of . is short for self::node(). This is
+ * particularly useful in conjunction with //. For example, the
+ * location path .//para is short for
+ * self::node()/descendant-or-self::node()/child::para
+ * and so will select all para descendant elements of the context
+ * node.
+ * Similarly, a location step of .. is short for parent::node().
+ * For example, ../title is short for parent::node()/child::title
+ * and so will select the title children of the parent of the context
+ * node.
+ */
+void
+xmlXPathEvalStep(xmlXPathParserContextPtr ctxt) {
+    xmlNodeSetPtr newset = NULL;
+
+    if ((CUR == '.') && (NXT(1) == '.')) {
+	SKIP(2);
+	if (ctxt->context->nodelist == NULL) {
+	    STRANGE
+	    xmlXPathRoot(ctxt);
+	}
+	newset = xmlXPathNodeCollectAndTest(ctxt, AXIS_PARENT,
+			 NODE_TEST_TYPE, XML_ELEMENT_NODE, NULL, NULL);
+	if (ctxt->context->nodelist != NULL)
+	    xmlXPathFreeNodeSet(ctxt->context->nodelist);
+	ctxt->context->nodelist = newset;
+	ctxt->context->node = NULL;
+    } else if (CUR == '.') {
+	NEXT;
+    } else {
+	xmlXPathEvalBasis(ctxt);
+	while (CUR == '[') {
+	    xmlXPathEvalPredicate(ctxt);
+	}
+    }
+#ifdef DEBUG_STEP
+    fprintf(xmlXPathDebug, "Step : ");
+    xmlXPathDebugNodeSet(xmlXPathDebug, ctxt->context->nodelist);
+#endif
+}
+
+/**
+ * xmlXPathEvalRelativeLocationPath:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [3]   RelativeLocationPath ::=   Step 
+ *                     | RelativeLocationPath '/' Step 
+ *                     | AbbreviatedRelativeLocationPath 
+ *  [11]  AbbreviatedRelativeLocationPath ::=   RelativeLocationPath '//' Step 
+ *
+ */
+void
+xmlXPathEvalRelativeLocationPath(xmlXPathParserContextPtr ctxt) {
+    xmlNodeSetPtr newset = NULL;
+
+    xmlXPathEvalStep(ctxt);
+    while (CUR == '/') {
+	if ((CUR == '/') && (NXT(1) == '/')) {
+	    SKIP(2);
+	    if (ctxt->context->nodelist == NULL) {
+		STRANGE
+		xmlXPathRoot(ctxt);
+	    }
+	    newset = xmlXPathNodeCollectAndTest(ctxt, AXIS_DESCENDANT_OR_SELF,
+			     NODE_TEST_TYPE, XML_ELEMENT_NODE, NULL, NULL);
+	    if (ctxt->context->nodelist != NULL)
+		xmlXPathFreeNodeSet(ctxt->context->nodelist);
+	    ctxt->context->nodelist = newset;
+	    ctxt->context->node = NULL;
+	    xmlXPathEvalStep(ctxt);
+	} else if (CUR == '/') {
+	    NEXT;
+	    xmlXPathEvalStep(ctxt);
+	}
+    }
+}
+
+/**
+ * xmlXPathEvalLocationPath:
+ * @ctxt:  the XPath Parser context
+ *
+ *  [1]   LocationPath ::=   RelativeLocationPath 
+ *                     | AbsoluteLocationPath 
+ *  [2]   AbsoluteLocationPath ::=   '/' RelativeLocationPath?
+ *                     | AbbreviatedAbsoluteLocationPath 
+ *  [10]   AbbreviatedAbsoluteLocationPath ::=   
+ *                           '//' RelativeLocationPath 
+ *
+ * // is short for /descendant-or-self::node()/. For example,
+ * //para is short for /descendant-or-self::node()/child::para and
+ * so will select any para element in the document (even a para element
+ * that is a document element will be selected by //para since the
+ * document element node is a child of the root node); div//para is
+ * short for div/descendant-or-self::node()/child::para and so will
+ * select all para descendants of div children.
+ */
+void
+xmlXPathEvalLocationPath(xmlXPathParserContextPtr ctxt) {
+    xmlNodeSetPtr newset = NULL;
+
+    while (CUR == '/') {
+	if ((CUR == '/') && (NXT(1) == '/')) {
+	    SKIP(2);
+	    if (ctxt->context->nodelist == NULL)
+		xmlXPathRoot(ctxt);
+	    newset = xmlXPathNodeCollectAndTest(ctxt, AXIS_DESCENDANT_OR_SELF,
+			     NODE_TEST_TYPE, XML_ELEMENT_NODE, NULL, NULL);
+	    if (ctxt->context->nodelist != NULL)
+		xmlXPathFreeNodeSet(ctxt->context->nodelist);
+	    ctxt->context->nodelist = newset;
+	    ctxt->context->node = NULL;
+	    xmlXPathEvalRelativeLocationPath(ctxt);
+	} else if (CUR == '/') {
+	    NEXT;
+	    xmlXPathRoot(ctxt);
+	    xmlXPathEvalRelativeLocationPath(ctxt);
+	} else {
+	    xmlXPathEvalRelativeLocationPath(ctxt);
+	}
+    }
+}
+
+/*
+ * TODO * extra spaces *
+ * more tokenization rules ... Not used currently, especially allowing
+ * spaces before and after ExprToken !!!!!!!!!!!!!
+ *
+ *  [32]   Operator ::=   OperatorName 
+ *                    | MultiplyOperator 
+ *                    | '/' | '//' | '|' | '+' | '-' | '=' | '!='
+ *                    | '<'| '<=' | '>' | '>='
+ *  [33]   OperatorName ::=   'and' | 'or' | 'mod' | 'div'
+ *  [39]   ExprWhitespace ::=   S 
+ *
+ *  BUG: ExprToken is never referenced.
+ *
+ *  [28]   ExprToken ::=   '(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::'
+ *                    | WildcardName 
+ *                    | NodeType 
+ *                    | Operator 
+ *                    | FunctionName 
+ *                    | AxisName 
+ *                    | Literal 
+ *                    | Number 
+ *                    | VariableReference 
+ */
+
+/**
+ * xmlXPathEval:
+ * @str:  the XPath expression
+ * @ctxt:  the XPath context
+ *
+ * Evaluate the XPath Location Path in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL.
+ *         the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathEval(const CHAR *str, xmlXPathContextPtr ctxt) {
+    xmlXPathParserContextPtr pctxt;
+    xmlXPathObjectPtr res;
+
+    CHECK_CONTEXT
+
+    if (xmlXPathDebug == NULL)
+        xmlXPathDebug = stderr;
+    pctxt = xmlXPathNewParserContext(str, ctxt);
+    xmlXPathEvalLocationPath(pctxt);
+
+    do {
+        res = valuePop(pctxt);
+#ifdef DEBUG
+#endif
+    } while (res != NULL);
+    res = xmlXPathNewNodeSetList(pctxt->context->nodelist);
+    xmlXPathFreeParserContext(pctxt);
+    return(res);
+}
+
+/**
+ * xmlXPathEvalExpression:
+ * @str:  the XPath expression
+ * @ctxt:  the XPath context
+ *
+ * Evaluate the XPath expression in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL.
+ *         the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathEvalExpression(const CHAR *str, xmlXPathContextPtr ctxt) {
+    xmlXPathParserContextPtr pctxt;
+    xmlXPathObjectPtr res, tmp;
+
+    CHECK_CONTEXT
+
+    if (xmlXPathDebug == NULL)
+        xmlXPathDebug = stderr;
+    pctxt = xmlXPathNewParserContext(str, ctxt);
+    xmlXPathEvalExpr(pctxt);
+
+    res = valuePop(pctxt);
+    do {
+        tmp = valuePop(pctxt);
+#ifdef DEBUG
+#endif
+    } while (tmp != NULL);
+    xmlXPathFreeParserContext(pctxt);
+    return(res);
+}
+
diff --git a/xpath.h b/xpath.h
new file mode 100644
index 0000000..fb06e23
--- /dev/null
+++ b/xpath.h
@@ -0,0 +1,108 @@
+/*
+ * xpath.c: interface for XML Path Language implementation
+ *
+ * Reference: W3C Working Draft 5 July 1999
+ *            http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html
+ *
+ * See COPYRIGHT for the status of this software
+ *
+ * Author: Daniel.Veillard@w3.org
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include "tree.h"
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates) 
+ */
+typedef struct xmlNodeSet {
+    int nodeNr;			/* # of node in the set */
+    int nodeMax;		/* allocated space */
+    xmlNodePtr *nodeTab;	/* array of nodes in no particular order */
+} xmlNodeSet, *xmlNodeSetPtr;
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ *   - node-set
+ *   - boolean
+ *   - number
+ *   - string
+ */
+
+#define XPATH_UNDEFINED	0
+#define XPATH_NODESET	1
+#define XPATH_BOOLEAN	2
+#define XPATH_NUMBER	3
+#define XPATH_STRING	4
+#define XPATH_MARKER	5  /* used for func call checks */
+
+typedef struct xmlXPathObject {
+    int type;
+    xmlNodeSetPtr nodesetval;
+    int boolval;
+    float floatval;
+    CHAR *stringval;
+} xmlXPathObject, *xmlXPathObjectPtr;
+
+/* 
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ *    - a node (the context node) 
+ *    - a node list (the context node list) 
+ *    - a set of variable bindings 
+ *    - a function library 
+ *    - the set of namespace declarations in scope for the expression 
+ */
+
+typedef struct xmlXPathContext {
+    xmlDocPtr doc;			/* The current document */
+    xmlNodePtr node;			/* The current node */
+    xmlNodeSetPtr nodelist;		/* The current node list */
+    void *variables; /* TODO !!!! */
+    void *functions; /* TODO !!!! */
+    void *namespaces; /* TODO !!!! */
+} xmlXPathContext, *xmlXPathContextPtr;
+
+/*
+ * An XPath parser context, it contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+ */
+typedef struct xmlXPathParserContext {
+    const CHAR *cur;			/* the current char being parsed */
+    const CHAR *base;			/* the full expression */
+
+    int error;				/* error code */
+
+    xmlXPathContextPtr  context;	/* the evaluation context */
+    xmlXPathObjectPtr     value;	/* the current value */
+    int                 valueNr;	/* number of values stacked */
+    int                valueMax;	/* max number of values stacked */
+    xmlXPathObjectPtr *valueTab;	/* stack of values */
+} xmlXPathParserContext, *xmlXPathParserContextPtr;
+
+/*
+ * An XPath function
+ * The arguments (if any) are popped out of the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/************************************************************************
+ *									*
+ *			Public API					*
+ *									*
+ ************************************************************************/
+
+xmlXPathContextPtr xmlXPathNewContext(xmlDocPtr doc, void *variables,
+                                      void *functions, void *namespaces);
+void xmlXPathFreeContext(xmlXPathContextPtr ctxt);
+xmlXPathObjectPtr xmlXPathEval(const CHAR *str, xmlXPathContextPtr ctxt);
+void xmlXPathFreeObject(xmlXPathObjectPtr obj);
+xmlXPathObjectPtr xmlXPathEvalExpression(const CHAR *str,
+                                         xmlXPathContextPtr ctxt);
+
+#endif /* ! __XML_XPATH_H__ */