Fixed CHAR, errno, alpha RPM compile, updated doc, Daniel
diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h
index ebcd996..ca9ee14 100644
--- a/include/libxml/HTMLparser.h
+++ b/include/libxml/HTMLparser.h
@@ -48,16 +48,16 @@
 /*
  * There is only few public functions.
  */
-htmlElemDescPtr htmlTagLookup(const CHAR *tag);
-htmlEntityDescPtr htmlEntityLookup(const CHAR *name);
+htmlElemDescPtr htmlTagLookup(const xmlChar *tag);
+htmlEntityDescPtr htmlEntityLookup(const xmlChar *name);
 
-htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str);
+htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str);
 int htmlParseCharRef(htmlParserCtxtPtr ctxt);
 void htmlParseElement(htmlParserCtxtPtr ctxt);
 
-htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding,
+htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding,
                            htmlSAXHandlerPtr sax, void *userData);
-htmlDocPtr htmlParseDoc(CHAR *cur, const char *encoding);
+htmlDocPtr htmlParseDoc(xmlChar *cur, const char *encoding);
 htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding,
                             htmlSAXHandlerPtr sax, void *userData);
 htmlDocPtr htmlParseFile(const char *filename, const char *encoding);
diff --git a/include/libxml/debugXML.h b/include/libxml/debugXML.h
index 556d1fe..f73527c 100644
--- a/include/libxml/debugXML.h
+++ b/include/libxml/debugXML.h
@@ -9,7 +9,7 @@
 #define __DEBUG_XML__
 #include "tree.h"
 
-extern void xmlDebugDumpString(FILE *output, const CHAR *str);
+extern void xmlDebugDumpString(FILE *output, const xmlChar *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);
diff --git a/include/libxml/entities.h b/include/libxml/entities.h
index 5e35703..1f6c64a 100644
--- a/include/libxml/entities.h
+++ b/include/libxml/entities.h
@@ -30,11 +30,11 @@
 typedef struct xmlEntity {
     int type;			/* The entity type */
     int len;			/* The lenght of the name */
-    const CHAR    *name;	/* Name of the entity */
-    const CHAR    *ExternalID;	/* External identifier for PUBLIC Entity */
-    const CHAR    *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */
-    CHAR *content;		/* The entity content or ndata if unparsed */
-    CHAR *orig;			/* The entity cont without ref substitution */
+    const xmlChar    *name;	/* Name of the entity */
+    const xmlChar    *ExternalID;	/* External identifier for PUBLIC Entity */
+    const xmlChar    *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */
+    xmlChar *content;		/* The entity content or ndata if unparsed */
+    xmlChar *orig;			/* The entity cont without ref substitution */
 } xmlEntity;
 typedef xmlEntity *xmlEntityPtr;
 
@@ -60,28 +60,28 @@
 #include "parser.h"
 
 void			xmlAddDocEntity		(xmlDocPtr doc,
-						 const CHAR *name,
+						 const xmlChar *name,
 						 int type,
-						 const CHAR *ExternalID,
-						 const CHAR *SystemID,
-						 const CHAR *content);
+						 const xmlChar *ExternalID,
+						 const xmlChar *SystemID,
+						 const xmlChar *content);
 void			xmlAddDtdEntity		(xmlDocPtr doc,
-						 const CHAR *name,
+						 const xmlChar *name,
 						 int type,
-						 const CHAR *ExternalID,
-						 const CHAR *SystemID,
-						 const CHAR *content);
-xmlEntityPtr		xmlGetPredefinedEntity	(const CHAR *name);
+						 const xmlChar *ExternalID,
+						 const xmlChar *SystemID,
+						 const xmlChar *content);
+xmlEntityPtr		xmlGetPredefinedEntity	(const xmlChar *name);
 xmlEntityPtr		xmlGetDocEntity		(xmlDocPtr doc,
-						 const CHAR *name);
+						 const xmlChar *name);
 xmlEntityPtr		xmlGetDtdEntity		(xmlDocPtr doc,
-						 const CHAR *name);
+						 const xmlChar *name);
 xmlEntityPtr		xmlGetParameterEntity	(xmlDocPtr doc,
-						 const CHAR *name);
-const CHAR *		xmlEncodeEntities	(xmlDocPtr doc,
-						 const CHAR *input);
-CHAR *			xmlEncodeEntitiesReentrant(xmlDocPtr doc,
-						 const CHAR *input);
+						 const xmlChar *name);
+const xmlChar *		xmlEncodeEntities	(xmlDocPtr doc,
+						 const xmlChar *input);
+xmlChar *			xmlEncodeEntitiesReentrant(xmlDocPtr doc,
+						 const xmlChar *input);
 xmlEntitiesTablePtr	xmlCreateEntitiesTable	(void);
 xmlEntitiesTablePtr	xmlCopyEntitiesTable	(xmlEntitiesTablePtr table);
 void			xmlFreeEntitiesTable	(xmlEntitiesTablePtr table);
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 06db141..f5f96e9 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -31,18 +31,18 @@
  * progressive reading and I18N conversions to the internal UTF-8 format.
  */
 
-typedef void (* xmlParserInputDeallocate)(CHAR *);
+typedef void (* xmlParserInputDeallocate)(xmlChar *);
 typedef struct xmlParserInput {
     /* Input buffer */
     xmlParserInputBufferPtr buf;      /* UTF-8 encoded buffer */
 
     const char *filename;             /* The file analyzed, if any */
     const char *directory;            /* the directory/base of teh file */
-    const CHAR *base;                 /* Base of the array to parse */
-    const CHAR *cur;                  /* Current char being parsed */
+    const xmlChar *base;                 /* Base of the array to parse */
+    const xmlChar *cur;                  /* Current char being parsed */
     int line;                         /* Current line */
     int col;                          /* Current column */
-    int consumed;                     /* How many CHARs were already consumed */
+    int consumed;                     /* How many xmlChars were already consumed */
     xmlParserInputDeallocate free;    /* function to deallocate the base */
 } xmlParserInput;
 typedef xmlParserInput *xmlParserInputPtr;
@@ -107,8 +107,8 @@
     xmlDocPtr           myDoc;        /* the document being built */
     int            wellFormed;        /* is the document well formed */
     int       replaceEntities;        /* shall we replace entities ? */
-    const CHAR       *version;        /* the XML version string */
-    const CHAR      *encoding;        /* encoding, if any */
+    const xmlChar       *version;        /* the XML version string */
+    const xmlChar      *encoding;        /* encoding, if any */
     int            standalone;        /* standalone document */
     int                  html;        /* are we parsing an HTML document */
 
@@ -127,7 +127,7 @@
     int record_info;                  /* Whether node info should be kept */
     xmlParserNodeInfoSeq node_seq;    /* info about each node parsed */
 
-    int errno;                        /* error code */
+    int errNo;                        /* error code */
 
     int     hasExternalSubset;        /* reference and external subset */
     int             hasPErefs;        /* the internal subset has PE refs */
@@ -149,8 +149,8 @@
  * a SAX Locator.
  */
 typedef struct xmlSAXLocator {
-    const CHAR *(*getPublicId)(void *ctx);
-    const CHAR *(*getSystemId)(void *ctx);
+    const xmlChar *(*getPublicId)(void *ctx);
+    const xmlChar *(*getSystemId)(void *ctx);
     int (*getLineNumber)(void *ctx);
     int (*getColumnNumber)(void *ctx);
 } _xmlSAXLocator;
@@ -165,44 +165,44 @@
 #include "entities.h"
 
 typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
-			    const CHAR *publicId, const CHAR *systemId);
-typedef void (*internalSubsetSAXFunc) (void *ctx, const CHAR *name,
-                            const CHAR *ExternalID, const CHAR *SystemID);
+			    const xmlChar *publicId, const xmlChar *systemId);
+typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name,
+                            const xmlChar *ExternalID, const xmlChar *SystemID);
 typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
-                            const CHAR *name);
+                            const xmlChar *name);
 typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
-                            const CHAR *name);
+                            const xmlChar *name);
 typedef void (*entityDeclSAXFunc) (void *ctx,
-                            const CHAR *name, int type, const CHAR *publicId,
-			    const CHAR *systemId, CHAR *content);
-typedef void (*notationDeclSAXFunc)(void *ctx, const CHAR *name,
-			    const CHAR *publicId, const CHAR *systemId);
-typedef void (*attributeDeclSAXFunc)(void *ctx, const CHAR *elem,
-                            const CHAR *name, int type, int def,
-			    const CHAR *defaultValue, xmlEnumerationPtr tree);
-typedef void (*elementDeclSAXFunc)(void *ctx, const CHAR *name,
+                            const xmlChar *name, int type, const xmlChar *publicId,
+			    const xmlChar *systemId, xmlChar *content);
+typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name,
+			    const xmlChar *publicId, const xmlChar *systemId);
+typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem,
+                            const xmlChar *name, int type, int def,
+			    const xmlChar *defaultValue, xmlEnumerationPtr tree);
+typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name,
 			    int type, xmlElementContentPtr content);
 typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
-                            const CHAR *name, const CHAR *publicId,
-			    const CHAR *systemId, const CHAR *notationName);
+                            const xmlChar *name, const xmlChar *publicId,
+			    const xmlChar *systemId, const xmlChar *notationName);
 typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
                             xmlSAXLocatorPtr loc);
 typedef void (*startDocumentSAXFunc) (void *ctx);
 typedef void (*endDocumentSAXFunc) (void *ctx);
-typedef void (*startElementSAXFunc) (void *ctx, const CHAR *name,
-                            const CHAR **atts);
-typedef void (*endElementSAXFunc) (void *ctx, const CHAR *name);
-typedef void (*attributeSAXFunc) (void *ctx, const CHAR *name,
-                                  const CHAR *value);
-typedef void (*referenceSAXFunc) (void *ctx, const CHAR *name);
-typedef void (*charactersSAXFunc) (void *ctx, const CHAR *ch,
+typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name,
+                            const xmlChar **atts);
+typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name);
+typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name,
+                                  const xmlChar *value);
+typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name);
+typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch,
 		            int len);
 typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
-			    const CHAR *ch, int len);
+			    const xmlChar *ch, int len);
 typedef void (*processingInstructionSAXFunc) (void *ctx,
-                            const CHAR *target, const CHAR *data);
-typedef void (*commentSAXFunc) (void *ctx, const CHAR *value);
-typedef void (*cdataBlockSAXFunc) (void *ctx, const CHAR *value, int len);
+                            const xmlChar *target, const xmlChar *data);
+typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value);
+typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar *value, int len);
 typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...);
 typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...);
 typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...);
@@ -270,34 +270,34 @@
 					 int len);
 
 /**
- * CHAR handling
+ * xmlChar handling
  */
-CHAR *		xmlStrdup		(const CHAR *cur);
-CHAR *		xmlStrndup		(const CHAR *cur,
+xmlChar *		xmlStrdup		(const xmlChar *cur);
+xmlChar *		xmlStrndup		(const xmlChar *cur,
 					 int len);
-CHAR *		xmlStrsub		(const CHAR *str,
+xmlChar *		xmlStrsub		(const xmlChar *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,
+const xmlChar *	xmlStrchr		(const xmlChar *str,
+					 xmlChar val);
+const xmlChar *	xmlStrstr		(const xmlChar *str,
+					 xmlChar *val);
+int		xmlStrcmp		(const xmlChar *str1,
+					 const xmlChar *str2);
+int		xmlStrncmp		(const xmlChar *str1,
+					 const xmlChar *str2,
 					 int len);
-int		xmlStrlen		(const CHAR *str);
-CHAR *		xmlStrcat		(CHAR *cur,
-					 const CHAR *add);
-CHAR *		xmlStrncat		(CHAR *cur,
-					 const CHAR *add,
+int		xmlStrlen		(const xmlChar *str);
+xmlChar *		xmlStrcat		(xmlChar *cur,
+					 const xmlChar *add);
+xmlChar *		xmlStrncat		(xmlChar *cur,
+					 const xmlChar *add,
 					 int len);
 
 /**
  * Basic parsing Interfaces
  */
-xmlDocPtr	xmlParseDoc		(CHAR *cur);
+xmlDocPtr	xmlParseDoc		(xmlChar *cur);
 xmlDocPtr	xmlParseMemory		(char *buffer,
 					 int size);
 xmlDocPtr	xmlParseFile		(const char *filename);
@@ -306,7 +306,7 @@
 /**
  * Recovery mode 
  */
-xmlDocPtr	xmlRecoverDoc		(CHAR *cur);
+xmlDocPtr	xmlRecoverDoc		(xmlChar *cur);
 xmlDocPtr	xmlRecoverMemory	(char *buffer,
 					 int size);
 xmlDocPtr	xmlRecoverFile		(const char *filename);
@@ -316,7 +316,7 @@
  */
 int		xmlParseDocument	(xmlParserCtxtPtr ctxt);
 xmlDocPtr	xmlSAXParseDoc		(xmlSAXHandlerPtr sax,
-					 CHAR *cur,
+					 xmlChar *cur,
 					 int recovery);
 xmlDocPtr	xmlSAXParseMemory	(xmlSAXHandlerPtr sax,
 					 char *buffer,
@@ -325,15 +325,15 @@
 xmlDocPtr	xmlSAXParseFile		(xmlSAXHandlerPtr sax,
 					 const char *filename,
 					 int recovery);
-xmlDtdPtr	xmlParseDTD		(const CHAR *ExternalID,
-					 const CHAR *SystemID);
+xmlDtdPtr	xmlParseDTD		(const xmlChar *ExternalID,
+					 const xmlChar *SystemID);
 xmlDtdPtr	xmlSAXParseDTD		(xmlSAXHandlerPtr sax,
-					 const CHAR *ExternalID,
-					 const CHAR *SystemID);
+					 const xmlChar *ExternalID,
+					 const xmlChar *SystemID);
 void		xmlInitParserCtxt	(xmlParserCtxtPtr ctxt);
 void		xmlClearParserCtxt	(xmlParserCtxtPtr ctxt);
 void		xmlSetupParserForBuffer	(xmlParserCtxtPtr ctxt,
-					 const CHAR* buffer,
+					 const xmlChar* buffer,
 					 const char* filename);
 void		xmlDefaultSAXHandlerInit(void);
 void		htmlDefaultSAXHandlerInit(void);
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index cb28943..1ce25b0 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -511,7 +511,7 @@
 /**
  * Parser context
  */
-xmlParserCtxtPtr	xmlCreateDocParserCtxt	(CHAR *cur);
+xmlParserCtxtPtr	xmlCreateDocParserCtxt	(xmlChar *cur);
 xmlParserCtxtPtr	xmlCreateFileParserCtxt	(const char *filename);
 xmlParserCtxtPtr	xmlCreateMemoryParserCtxt(char *buffer,
 						 int size);
@@ -533,7 +533,7 @@
 						 xmlEntityPtr entity);
 void			xmlPushInput		(xmlParserCtxtPtr ctxt,
 						 xmlParserInputPtr input);
-CHAR			xmlPopInput		(xmlParserCtxtPtr ctxt);
+xmlChar			xmlPopInput		(xmlParserCtxtPtr ctxt);
 void			xmlFreeInputStream	(xmlParserInputPtr input);
 xmlParserInputPtr	xmlNewInputFromFile	(xmlParserCtxtPtr ctxt,
 						 const char *filename);
@@ -541,38 +541,38 @@
 /**
  * Namespaces.
  */
-CHAR *			xmlSplitQName		(const CHAR *name,
-						 CHAR **prefix);
-CHAR *			xmlNamespaceParseNCName	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlNamespaceParseQName	(xmlParserCtxtPtr ctxt,
-						 CHAR **prefix);
-CHAR *			xmlNamespaceParseNSDef	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseQuotedString	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlSplitQName		(const xmlChar *name,
+						 xmlChar **prefix);
+xmlChar *			xmlNamespaceParseNCName	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlNamespaceParseQName	(xmlParserCtxtPtr ctxt,
+						 xmlChar **prefix);
+xmlChar *			xmlNamespaceParseNSDef	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseQuotedString	(xmlParserCtxtPtr ctxt);
 void			xmlParseNamespace	(xmlParserCtxtPtr ctxt);
 
 /**
  * Generic production rules
  */
-CHAR *			xmlScanName		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseName		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseNmtoken		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseEntityValue	(xmlParserCtxtPtr ctxt,
-						 CHAR **orig);
-CHAR *			xmlParseAttValue	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParsePubidLiteral	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlScanName		(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseName		(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseNmtoken		(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseEntityValue	(xmlParserCtxtPtr ctxt,
+						 xmlChar **orig);
+xmlChar *			xmlParseAttValue	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseSystemLiteral	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParsePubidLiteral	(xmlParserCtxtPtr ctxt);
 void			xmlParseCharData	(xmlParserCtxtPtr ctxt,
 						 int cdata);
-CHAR *			xmlParseExternalID	(xmlParserCtxtPtr ctxt,
-						 CHAR **publicID,
+xmlChar *			xmlParseExternalID	(xmlParserCtxtPtr ctxt,
+						 xmlChar **publicID,
 						 int strict);
 void			xmlParseComment		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParsePITarget	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParsePITarget	(xmlParserCtxtPtr ctxt);
 void			xmlParsePI		(xmlParserCtxtPtr ctxt);
 void			xmlParseNotationDecl	(xmlParserCtxtPtr ctxt);
 void			xmlParseEntityDecl	(xmlParserCtxtPtr ctxt);
 int			xmlParseDefaultDecl	(xmlParserCtxtPtr ctxt,
-						 CHAR **value);
+						 xmlChar **value);
 xmlEnumerationPtr	xmlParseNotationType	(xmlParserCtxtPtr ctxt);
 xmlEnumerationPtr	xmlParseEnumerationType	(xmlParserCtxtPtr ctxt);
 int			xmlParseEnumeratedType	(xmlParserCtxtPtr ctxt,
@@ -585,7 +585,7 @@
 xmlElementContentPtr	xmlParseElementChildrenContentDecl
 						(xmlParserCtxtPtr ctxt);
 int			xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
-						 CHAR *name,
+						 xmlChar *name,
 						 xmlElementContentPtr *result);
 int			xmlParseElementDecl	(xmlParserCtxtPtr ctxt);
 void			xmlParseMarkupDecl	(xmlParserCtxtPtr ctxt);
@@ -594,24 +594,24 @@
 void			xmlParseReference	(xmlParserCtxtPtr ctxt);
 void			xmlParsePEReference	(xmlParserCtxtPtr ctxt);
 void			xmlParseDocTypeDecl	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseAttribute	(xmlParserCtxtPtr ctxt,
-						 CHAR **value);
-CHAR *			xmlParseStartTag	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseAttribute	(xmlParserCtxtPtr ctxt,
+						 xmlChar **value);
+xmlChar *			xmlParseStartTag	(xmlParserCtxtPtr ctxt);
 void			xmlParseEndTag		(xmlParserCtxtPtr ctxt,
-						 CHAR *tagname);
+						 xmlChar *tagname);
 void			xmlParseCDSect		(xmlParserCtxtPtr ctxt);
 void			xmlParseContent		(xmlParserCtxtPtr ctxt);
 void			xmlParseElement		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseVersionNum	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseVersionInfo	(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseEncName		(xmlParserCtxtPtr ctxt);
-CHAR *			xmlParseEncodingDecl	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseVersionNum	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseVersionInfo	(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseEncName		(xmlParserCtxtPtr ctxt);
+xmlChar *			xmlParseEncodingDecl	(xmlParserCtxtPtr ctxt);
 int			xmlParseSDDecl		(xmlParserCtxtPtr ctxt);
 void			xmlParseXMLDecl		(xmlParserCtxtPtr ctxt);
 void			xmlParseMisc		(xmlParserCtxtPtr ctxt);
 void			xmlParseExternalSubset	(xmlParserCtxtPtr ctxt,
-						 const CHAR *ExternalID,
-						 const CHAR *SystemID); 
+						 const xmlChar *ExternalID,
+						 const xmlChar *SystemID); 
 /*
  * Entities substitution
  */
@@ -620,12 +620,12 @@
 #define XML_SUBSTITUTE_PEREF	2
 #define XML_SUBSTITUTE_BOTH 	3
 
-CHAR *			xmlDecodeEntities	(xmlParserCtxtPtr ctxt,
+xmlChar *			xmlDecodeEntities	(xmlParserCtxtPtr ctxt,
 						 int len,
 						 int what,
-						 CHAR end,
-						 CHAR  end2,
-						 CHAR end3);
+						 xmlChar end,
+						 xmlChar  end2,
+						 xmlChar end3);
 
 /*
  * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index bf8a77e..bd29083 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -44,25 +44,32 @@
  * Currently we use 8bit chars internal representation for memory efficiency,
  * but the parser is not tied to that, just define UNICODE to switch to
  * a 16 bits internal representation. Note that with 8 bits wide
- * CHARs one can still use UTF-8 to handle correctly non ISO-Latin
+ * xmlChars one can still use UTF-8 to handle correctly non ISO-Latin
  * input.
  */
+
 #ifdef UNICODE
-typedef unsigned short CHAR;
+typedef unsigned short xmlChar;
 #else
-typedef unsigned char CHAR;
+typedef unsigned char xmlChar;
 #endif
 
-#define BAD_CAST (CHAR *)
+#ifndef WIN32
+#ifndef CHAR
+#define CHAR xmlChar
+#endif
+#endif
+
+#define BAD_CAST (xmlChar *)
 
 /*
  * a DTD Notation definition
  */
 
 typedef struct xmlNotation {
-    const CHAR               *name;	/* Notation name */
-    const CHAR               *PublicID;	/* Public identifier, if any */
-    const CHAR               *SystemID;	/* System identifier, if any */
+    const xmlChar               *name;	/* Notation name */
+    const xmlChar               *PublicID;	/* Public identifier, if any */
+    const xmlChar               *SystemID;	/* System identifier, if any */
 } xmlNotation;
 typedef xmlNotation *xmlNotationPtr;
 
@@ -92,17 +99,17 @@
 
 typedef struct xmlEnumeration {
     struct xmlEnumeration    *next;	/* next one */
-    const CHAR               *name;	/* Enumeration name */
+    const xmlChar               *name;	/* Enumeration name */
 } xmlEnumeration;
 typedef xmlEnumeration *xmlEnumerationPtr;
 
 typedef struct xmlAttribute {
-    const CHAR            *elem;	/* Element holding the attribute */
-    const CHAR            *name;	/* Attribute name */
+    const xmlChar            *elem;	/* Element holding the attribute */
+    const xmlChar            *name;	/* Attribute name */
     struct xmlAttribute   *next;        /* list of attributes of an element */
     xmlAttributeType       type;	/* The type */
     xmlAttributeDefault    def;		/* the default */
-    const CHAR            *defaultValue;/* or the default value */
+    const xmlChar            *defaultValue;/* or the default value */
     xmlEnumerationPtr      tree;        /* or the enumeration tree if any */
 } xmlAttribute;
 typedef xmlAttribute *xmlAttributePtr;
@@ -127,7 +134,7 @@
 typedef struct xmlElementContent {
     xmlElementContentType     type;	/* PCDATA, ELEMENT, SEQ or OR */
     xmlElementContentOccur    ocur;	/* ONCE, OPT, MULT or PLUS */
-    const CHAR               *name;	/* Element name */
+    const xmlChar               *name;	/* Element name */
     struct xmlElementContent *c1;	/* first child */
     struct xmlElementContent *c2;	/* second child */
 } xmlElementContent;
@@ -141,7 +148,7 @@
 } xmlElementTypeVal;
 
 typedef struct xmlElement {
-    const CHAR             *name;	/* Element name */
+    const xmlChar             *name;	/* Element name */
     xmlElementTypeVal       type;	/* The type */
     xmlElementContentPtr content;	/* the allowed element content */
     xmlAttributePtr   attributes;	/* List of the declared attributes */
@@ -162,8 +169,8 @@
 typedef struct xmlNs {
     struct xmlNs  *next;	/* next Ns link for this node  */
     xmlNsType      type;	/* global or local */
-    const CHAR    *href;	/* URL for the namespace */
-    const CHAR    *prefix;	/* prefix for the namespace */
+    const xmlChar    *href;	/* URL for the namespace */
+    const xmlChar    *prefix;	/* prefix for the namespace */
 } xmlNs;
 typedef xmlNs *xmlNsPtr;
 
@@ -171,9 +178,9 @@
  * An XML DtD, as defined by <!DOCTYPE.
  */
 typedef struct xmlDtd {
-    const CHAR    *name;	/* Name of the DTD */
-    const CHAR    *ExternalID;	/* External identifier for PUBLIC DTD */
-    const CHAR    *SystemID;	/* URI for a SYSTEM or PUBLIC DTD */
+    const xmlChar    *name;	/* Name of the DTD */
+    const xmlChar    *ExternalID;	/* External identifier for PUBLIC DTD */
+    const xmlChar    *SystemID;	/* URI for a SYSTEM or PUBLIC DTD */
     void          *notations;   /* Hash table for notations if any */
     void          *elements;    /* Hash table for elements if any */
     void          *attributes;  /* Hash table for attributes if any */
@@ -193,7 +200,7 @@
     xmlElementType  type;       /* XML_ATTRIBUTE_NODE, must be third ! */
     struct xmlNode *node;	/* attr->node link */
     struct xmlAttr *next;	/* attribute list link */
-    const CHAR     *name;       /* the name of the property */
+    const xmlChar     *name;       /* the name of the property */
     struct xmlNode *val;        /* the value of the property */
     xmlNs          *ns;         /* pointer to the associated namespace */
 } xmlAttr;
@@ -205,7 +212,7 @@
 
 typedef struct xmlID {
     struct xmlID     *next;	/* next ID */
-    const CHAR       *value;	/* The ID name */
+    const xmlChar       *value;	/* The ID name */
     xmlAttrPtr        attr;	/* The attribut holding it */
 } xmlID;
 typedef xmlID *xmlIDPtr;
@@ -216,7 +223,7 @@
 
 typedef struct xmlRef {
     struct xmlRef     *next;	/* next Ref */
-    const CHAR       *value;	/* The Ref name */
+    const xmlChar       *value;	/* The Ref name */
     xmlAttrPtr        attr;	/* The attribut holding it */
 } xmlRef;
 typedef xmlRef *xmlRefPtr;
@@ -237,10 +244,10 @@
     struct xmlNode *childs;	/* parent->childs link */
     struct xmlNode *last;	/* last child link */
     struct xmlAttr *properties;	/* properties list */
-    const CHAR     *name;       /* the name of the node, or the entity */
+    const xmlChar     *name;       /* the name of the node, or the entity */
     xmlNs          *ns;         /* pointer to the associated namespace */
     xmlNs          *nsDef;      /* namespace definitions on this node */
-    CHAR           *content;    /* the content */
+    xmlChar           *content;    /* the content */
 } _xmlNode;
 typedef _xmlNode xmlNode;
 typedef _xmlNode *xmlNodePtr;
@@ -255,8 +262,8 @@
 #endif
     xmlElementType  type;       /* XML_DOCUMENT_NODE, must be second ! */
     char           *name;	/* name/filename/URI of the document */
-    const CHAR     *version;	/* the XML version string */
-    const CHAR     *encoding;   /* encoding, if any */
+    const xmlChar     *version;	/* the XML version string */
+    const xmlChar     *encoding;   /* encoding, if any */
     int             compression;/* level of zlib compression */
     int             standalone; /* standalone document (no external refs) */
     struct xmlDtd  *intSubset;	/* the document internal subset */
@@ -274,7 +281,7 @@
  */
 
 typedef struct xmlBuffer {
-    CHAR *content;		/* The buffer content UTF8 */
+    xmlChar *content;		/* The buffer content UTF8 */
     unsigned int use;		/* The buffer size used */
     unsigned int size;		/* The buffer size */
 } _xmlBuffer;
@@ -297,10 +304,10 @@
 int		xmlBufferDump		(FILE *file,
 					 xmlBufferPtr buf);
 void		xmlBufferAdd		(xmlBufferPtr buf,
-					 const CHAR *str,
+					 const xmlChar *str,
 					 int len);
 void		xmlBufferCat		(xmlBufferPtr buf,
-					 const CHAR *str);
+					 const xmlChar *str);
 void		xmlBufferCCat		(xmlBufferPtr buf,
 					 const char *str);
 int		xmlBufferShrink		(xmlBufferPtr buf,
@@ -311,33 +318,33 @@
  * Creating/freeing new structures
  */
 xmlDtdPtr	xmlCreateIntSubset	(xmlDocPtr doc,
-					 const CHAR *name,
-					 const CHAR *ExternalID,
-					 const CHAR *SystemID);
+					 const xmlChar *name,
+					 const xmlChar *ExternalID,
+					 const xmlChar *SystemID);
 xmlDtdPtr	xmlNewDtd		(xmlDocPtr doc,
-					 const CHAR *name,
-					 const CHAR *ExternalID,
-					 const CHAR *SystemID);
+					 const xmlChar *name,
+					 const xmlChar *ExternalID,
+					 const xmlChar *SystemID);
 void		xmlFreeDtd		(xmlDtdPtr cur);
 xmlNsPtr	xmlNewGlobalNs		(xmlDocPtr doc,
-					 const CHAR *href,
-					 const CHAR *prefix);
+					 const xmlChar *href,
+					 const xmlChar *prefix);
 xmlNsPtr	xmlNewNs		(xmlNodePtr node,
-					 const CHAR *href,
-					 const CHAR *prefix);
+					 const xmlChar *href,
+					 const xmlChar *prefix);
 void		xmlFreeNs		(xmlNsPtr cur);
-xmlDocPtr xmlNewDoc			(const CHAR *version);
+xmlDocPtr xmlNewDoc			(const xmlChar *version);
 void		xmlFreeDoc		(xmlDocPtr cur);
 xmlAttrPtr	xmlNewDocProp		(xmlDocPtr doc,
-					 const CHAR *name,
-					 const CHAR *value);
+					 const xmlChar *name,
+					 const xmlChar *value);
 xmlAttrPtr	xmlNewProp		(xmlNodePtr node,
-					 const CHAR *name,
-					 const CHAR *value);
+					 const xmlChar *name,
+					 const xmlChar *value);
 xmlAttrPtr	xmlNewNsProp		(xmlNodePtr node,
 					 xmlNsPtr ns,
-					 const CHAR *name,
-					 const CHAR *value);
+					 const xmlChar *name,
+					 const xmlChar *value);
 void		xmlFreePropList		(xmlAttrPtr cur);
 void		xmlFreeProp		(xmlAttrPtr cur);
 xmlAttrPtr	xmlCopyProp		(xmlNodePtr target,
@@ -353,32 +360,32 @@
  */
 xmlNodePtr	xmlNewDocNode		(xmlDocPtr doc,
 					 xmlNsPtr ns,
-					 const CHAR *name,
-					 const CHAR *content);
+					 const xmlChar *name,
+					 const xmlChar *content);
 xmlNodePtr	xmlNewNode		(xmlNsPtr ns,
-					 const CHAR *name);
+					 const xmlChar *name);
 xmlNodePtr	xmlNewChild		(xmlNodePtr parent,
 					 xmlNsPtr ns,
-					 const CHAR *name,
-					 const CHAR *content);
+					 const xmlChar *name,
+					 const xmlChar *content);
 xmlNodePtr	xmlNewDocText		(xmlDocPtr doc,
-					 const CHAR *content);
-xmlNodePtr	xmlNewText		(const CHAR *content);
-xmlNodePtr	xmlNewPI		(const CHAR *name,
-					 const CHAR *content);
+					 const xmlChar *content);
+xmlNodePtr	xmlNewText		(const xmlChar *content);
+xmlNodePtr	xmlNewPI		(const xmlChar *name,
+					 const xmlChar *content);
 xmlNodePtr	xmlNewDocTextLen	(xmlDocPtr doc,
-					 const CHAR *content,
+					 const xmlChar *content,
 					 int len);
-xmlNodePtr	xmlNewTextLen		(const CHAR *content,
+xmlNodePtr	xmlNewTextLen		(const xmlChar *content,
 					 int len);
 xmlNodePtr	xmlNewDocComment	(xmlDocPtr doc,
-					 const CHAR *content);
-xmlNodePtr	xmlNewComment		(const CHAR *content);
+					 const xmlChar *content);
+xmlNodePtr	xmlNewComment		(const xmlChar *content);
 xmlNodePtr	xmlNewCDataBlock	(xmlDocPtr doc,
-					 const CHAR *content,
+					 const xmlChar *content,
 					 int len);
 xmlNodePtr	xmlNewReference		(xmlDocPtr doc,
-					 const CHAR *name);
+					 const xmlChar *name);
 xmlNodePtr	xmlCopyNode		(xmlNodePtr node,
 					 int recursive);
 xmlNodePtr	xmlCopyNodeList		(xmlNodePtr node);
@@ -400,7 +407,7 @@
 xmlNodePtr	xmlTextMerge		(xmlNodePtr first,
 					 xmlNodePtr second);
 void		xmlTextConcat		(xmlNodePtr node,
-					 const CHAR *content,
+					 const xmlChar *content,
 					 int len);
 void		xmlFreeNodeList		(xmlNodePtr cur);
 void		xmlFreeNode		(xmlNodePtr cur);
@@ -410,10 +417,10 @@
  */
 xmlNsPtr	xmlSearchNs		(xmlDocPtr doc,
 					 xmlNodePtr node,
-					 const CHAR *nameSpace);
+					 const xmlChar *nameSpace);
 xmlNsPtr	xmlSearchNsByHref	(xmlDocPtr doc,
 					 xmlNodePtr node,
-					 const CHAR *href);
+					 const xmlChar *href);
 xmlNsPtr *	xmlGetNsList		(xmlDocPtr doc,
 					 xmlNodePtr node);
 void		xmlSetNs		(xmlNodePtr node,
@@ -425,32 +432,32 @@
  * Changing the content.
  */
 xmlAttrPtr	xmlSetProp		(xmlNodePtr node,
-					 const CHAR *name,
-					 const CHAR *value);
-CHAR *		xmlGetProp		(xmlNodePtr node,
-					 const CHAR *name);
+					 const xmlChar *name,
+					 const xmlChar *value);
+xmlChar *		xmlGetProp		(xmlNodePtr node,
+					 const xmlChar *name);
 xmlNodePtr	xmlStringGetNodeList	(xmlDocPtr doc,
-					 const CHAR *value);
+					 const xmlChar *value);
 xmlNodePtr	xmlStringLenGetNodeList	(xmlDocPtr doc,
-					 const CHAR *value,
+					 const xmlChar *value,
 					 int len);
-CHAR *		xmlNodeListGetString	(xmlDocPtr doc,
+xmlChar *		xmlNodeListGetString	(xmlDocPtr doc,
 					 xmlNodePtr list,
 					 int inLine);
 void		xmlNodeSetContent	(xmlNodePtr cur,
-					 const CHAR *content);
+					 const xmlChar *content);
 void		xmlNodeSetContentLen	(xmlNodePtr cur,
-					 const CHAR *content,
+					 const xmlChar *content,
 					 int len);
 void		xmlNodeAddContent	(xmlNodePtr cur,
-					 const CHAR *content);
+					 const xmlChar *content);
 void		xmlNodeAddContentLen	(xmlNodePtr cur,
-					 const CHAR *content,
+					 const xmlChar *content,
 					 int len);
-CHAR *		xmlNodeGetContent	(xmlNodePtr cur);
-const CHAR *	xmlNodeGetLang		(xmlNodePtr cur);
+xmlChar *		xmlNodeGetContent	(xmlNodePtr cur);
+const xmlChar *	xmlNodeGetLang		(xmlNodePtr cur);
 void		xmlNodeSetLang		(xmlNodePtr cur,
-					 const CHAR *lang);
+					 const xmlChar *lang);
 
 /*
  * Removing content.
@@ -462,17 +469,17 @@
  * Internal, don't use
  */
 void		xmlBufferWriteCHAR	(xmlBufferPtr buf,
-					 const CHAR *string);
+					 const xmlChar *string);
 void		xmlBufferWriteChar	(xmlBufferPtr buf,
 					 const char *string);
 void		xmlBufferWriteQuotedString(xmlBufferPtr buf,
-					 const CHAR *string);
+					 const xmlChar *string);
 
 /*
  * Saving
  */
 void		xmlDocDumpMemory	(xmlDocPtr cur,
-					 CHAR**mem,
+					 xmlChar**mem,
 					 int *size);
 void		xmlDocDump		(FILE *f,
 					 xmlDocPtr cur);
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index 22a2c27..30a2a32 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -105,16 +105,16 @@
 /* Notation */
 xmlNotationPtr	    xmlAddNotationDecl	(xmlValidCtxtPtr ctxt,
 					 xmlDtdPtr dtd,
-					 const CHAR *name,
-					 const CHAR *PublicID,
-					 const CHAR *SystemID);
+					 const xmlChar *name,
+					 const xmlChar *PublicID,
+					 const xmlChar *SystemID);
 xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table);
 void		    xmlFreeNotationTable(xmlNotationTablePtr table);
 void		    xmlDumpNotationTable(xmlBufferPtr buf,
 					 xmlNotationTablePtr table);
 
 /* Element Content */
-xmlElementContentPtr xmlNewElementContent (CHAR *name,
+xmlElementContentPtr xmlNewElementContent (xmlChar *name,
 					   xmlElementContentType type);
 xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
 void		     xmlFreeElementContent(xmlElementContentPtr cur);
@@ -122,7 +122,7 @@
 /* Element */
 xmlElementPtr	   xmlAddElementDecl	(xmlValidCtxtPtr ctxt,
 					 xmlDtdPtr dtd,
-					 const CHAR *name,
+					 const xmlChar *name,
 					 xmlElementContentType type,
 					 xmlElementContentPtr content);
 xmlElementTablePtr xmlCopyElementTable	(xmlElementTablePtr table);
@@ -131,18 +131,18 @@
 					 xmlElementTablePtr table);
 
 /* Enumeration */
-xmlEnumerationPtr  xmlCreateEnumeration	(CHAR *name);
+xmlEnumerationPtr  xmlCreateEnumeration	(xmlChar *name);
 void		   xmlFreeEnumeration	(xmlEnumerationPtr cur);
 xmlEnumerationPtr  xmlCopyEnumeration	(xmlEnumerationPtr cur);
 
 /* Attribute */
 xmlAttributePtr	    xmlAddAttributeDecl	    (xmlValidCtxtPtr ctxt,
 					     xmlDtdPtr dtd,
-					     const CHAR *elem,
-					     const CHAR *name,
+					     const xmlChar *elem,
+					     const xmlChar *name,
 					     xmlAttributeType type,
 					     xmlAttributeDefault def,
-					     const CHAR *defaultValue,
+					     const xmlChar *defaultValue,
 					     xmlEnumerationPtr tree);
 xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);
 void		     xmlFreeAttributeTable  (xmlAttributeTablePtr table);
@@ -152,12 +152,12 @@
 /* IDs */
 xmlIDPtr	xmlAddID	(xmlValidCtxtPtr ctxt,
 				 xmlDocPtr doc,
-				 const CHAR *value,
+				 const xmlChar *value,
 				 xmlAttrPtr attr);
 xmlIDTablePtr	xmlCopyIDTable	(xmlIDTablePtr table);
 void		xmlFreeIDTable	(xmlIDTablePtr table);
 xmlAttrPtr	xmlGetID	(xmlDocPtr doc,
-				 const CHAR *ID);
+				 const xmlChar *ID);
 int		xmlIsID		(xmlDocPtr doc,
 				 xmlNodePtr elem,
 				 xmlAttrPtr attr);
@@ -165,7 +165,7 @@
 /* IDREFs */
 xmlRefPtr	xmlAddRef	(xmlValidCtxtPtr ctxt,
 				 xmlDocPtr doc,
-				 const CHAR *value,
+				 const xmlChar *value,
 				 xmlAttrPtr attr);
 xmlRefTablePtr	xmlCopyRefTable	(xmlRefTablePtr table);
 void		xmlFreeRefTable	(xmlRefTablePtr table);
@@ -186,7 +186,7 @@
 					 xmlDocPtr doc,
 		                         xmlAttributePtr attr);
 int		xmlValidateAttributeValue(xmlAttributeType type,
-					 const CHAR *value);
+					 const xmlChar *value);
 int		xmlValidateNotationDecl	(xmlValidCtxtPtr ctxt,
 					 xmlDocPtr doc,
 		                         xmlNotationPtr nota);
@@ -205,21 +205,21 @@
 					 xmlDocPtr doc,
 					 xmlNodePtr	elem,
 					 xmlAttrPtr attr,
-					 const CHAR *value);
+					 const xmlChar *value);
 int		xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
 					 xmlDocPtr doc);
 int		xmlValidateNotationUse	(xmlValidCtxtPtr ctxt,
 					 xmlDocPtr doc,
-					 const CHAR *notationName);
+					 const xmlChar *notationName);
 int		xmlIsMixedElement	(xmlDocPtr doc,
-					 const CHAR *name);
+					 const xmlChar *name);
 xmlAttributePtr	xmlGetDtdAttrDesc	(xmlDtdPtr dtd,
-					 const CHAR *elem,
-					 const CHAR *name);
+					 const xmlChar *elem,
+					 const xmlChar *name);
 xmlNotationPtr	xmlGetDtdNotationDesc	(xmlDtdPtr dtd,
-					 const CHAR *name);
+					 const xmlChar *name);
 xmlElementPtr	xmlGetDtdElementDesc	(xmlDtdPtr dtd,
-					 const CHAR *name);
+					 const xmlChar *name);
 
 #ifdef __cplusplus
 }
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
index d46c063..9a082ce 100644
--- a/include/libxml/xpath.h
+++ b/include/libxml/xpath.h
@@ -46,7 +46,7 @@
     xmlNodeSetPtr nodesetval;
     int boolval;
     double floatval;
-    CHAR *stringval;
+    xmlChar *stringval;
     void *user;
 } xmlXPathObject, *xmlXPathObjectPtr;
 
@@ -61,7 +61,7 @@
  */
 
 typedef struct xmlXPathType {
-    const CHAR         *name;		/* the type name */
+    const xmlChar         *name;		/* the type name */
     xmlXPathConvertFunc func;		/* the conversion function */
 } xmlXPathType, *xmlXPathTypePtr;
 
@@ -70,7 +70,7 @@
  */
 
 typedef struct xmlXPathVariable {
-    const CHAR       *name;		/* the variable name */
+    const xmlChar       *name;		/* the variable name */
     xmlXPathObjectPtr value;		/* the value */
 } xmlXPathVariable, *xmlXPathVariablePtr;
 
@@ -85,7 +85,7 @@
  */
 
 typedef struct xmlXPathFunct {
-    const CHAR      *name;		/* the function name */
+    const xmlChar      *name;		/* the function name */
     xmlXPathEvalFunc func;		/* the evaluation function */
 } xmlXPathFunc, *xmlXPathFuncPtr;
 
@@ -103,7 +103,7 @@
  */
 
 typedef struct xmlXPathAxis {
-    const CHAR      *name;		/* the axis name */
+    const xmlChar      *name;		/* the axis name */
     xmlXPathAxisFunc func;		/* the search function */
 } xmlXPathAxis, *xmlXPathAxisPtr;
 
@@ -149,8 +149,8 @@
  * an xmlXPathContext, and the stack of objects.
  */
 typedef struct xmlXPathParserContext {
-    const CHAR *cur;			/* the current char being parsed */
-    const CHAR *base;			/* the full expression */
+    const xmlChar *cur;			/* the current char being parsed */
+    const xmlChar *base;			/* the full expression */
 
     int error;				/* error code */
 
@@ -179,16 +179,16 @@
  * Registering extensions to the expression language
  */
 /* TODO */ int	   xmlXPathRegisterType		(xmlXPathContextPtr ctxt,
-						 const CHAR *name,
+						 const xmlChar *name,
                                                  xmlXPathConvertFunc f);
 /* TODO */ int	   xmlXPathRegisterAxis		(xmlXPathContextPtr ctxt,
-						 const CHAR *name,
+						 const xmlChar *name,
 						 xmlXPathAxisFunc f);
 /* TODO */ int	   xmlXPathRegisterFunc		(xmlXPathContextPtr ctxt,
-						 const CHAR *name,
+						 const xmlChar *name,
 						 xmlXPathFunction f);
 /* TODO */ int	   xmlXPathRegisterVariable	(xmlXPathContextPtr ctxt,
-						 const CHAR *name,
+						 const xmlChar *name,
 						 xmlXPathObject value);
 
 /**
@@ -196,10 +196,10 @@
  */
 xmlXPathContextPtr xmlXPathNewContext		(xmlDocPtr doc);
 void		   xmlXPathFreeContext		(xmlXPathContextPtr ctxt);
-xmlXPathObjectPtr  xmlXPathEval			(const CHAR *str,
+xmlXPathObjectPtr  xmlXPathEval			(const xmlChar *str,
 						 xmlXPathContextPtr ctxt);
 void		   xmlXPathFreeObject		(xmlXPathObjectPtr obj);
-xmlXPathObjectPtr  xmlXPathEvalExpression	(const CHAR *str,
+xmlXPathObjectPtr  xmlXPathEvalExpression	(const xmlChar *str,
 						 xmlXPathContextPtr ctxt);
 
 #endif /* ! __XML_XPATH_H__ */