1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

Fixed CHAR, errno, alpha RPM compile, updated doc, Daniel

This commit is contained in:
Daniel Veillard
1999-09-23 22:19:22 +00:00
parent e624482d08
commit dd6b36766f
45 changed files with 2596 additions and 2537 deletions

View File

@ -1,3 +1,12 @@
Fri Sep 24 00:15:58 CEST 1999
* libxml.spec.in: fixed the alpha compile problem
* parser.[ch]: changed errno to errNo in the parser context :-(
* *.[ch]: changed CHAR to xmlChar to avoid problem on WIN32
* doc/xml.html: changed CHAR to xmlChar
* doc/html/*: recompiled the documentation
* configure.in: 1.7.1
Wed Sep 22 11:40:31 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org> Wed Sep 22 11:40:31 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* parser.h: modified the parser context struct to regain 1.4.0 * parser.h: modified the parser context struct to regain 1.4.0

View File

@ -94,17 +94,17 @@ PUSH_AND_POP(xmlNodePtr, node)
* *
* Dirty macros, i.e. one need to make assumption on the context to use them * 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_PTR return the current pointer to the xmlChar to be parsed.
* CUR returns the current CHAR value, i.e. a 8 bit value if compiled * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled
* in ISO-Latin or UTF-8, and the current 16 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 * in UNICODE mode. This should be used internally by the parser
* only to compare to ASCII values otherwise it would break when * only to compare to ASCII values otherwise it would break when
* running with UTF-8 encoding. * running with UTF-8 encoding.
* NXT(n) returns the n'th next CHAR. Same as CUR is should be used only * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
* to compare on ASCII based substring. * to compare on ASCII based substring.
* UPP(n) returns the n'th next CHAR converted to uppercase. Same as CUR * UPP(n) returns the n'th next xmlChar converted to uppercase. Same as CUR
* it should be used only to compare on ASCII based substring. * it 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 * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
* strings within the parser. * strings within the parser.
* *
* Clean macros, not dependent of an ASCII context, expect UTF-8 encoding * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
@ -385,7 +385,7 @@ htmlInitAutoClose(void) {
* Returns the related htmlElemDescPtr or NULL if not found. * Returns the related htmlElemDescPtr or NULL if not found.
*/ */
htmlElemDescPtr htmlElemDescPtr
htmlTagLookup(const CHAR *tag) { htmlTagLookup(const xmlChar *tag) {
int i = 0; int i = 0;
for (i = 0; i < (sizeof(html40ElementTable) / for (i = 0; i < (sizeof(html40ElementTable) /
@ -407,7 +407,7 @@ htmlTagLookup(const CHAR *tag) {
* Returns 0 if no, 1 if yes. * Returns 0 if no, 1 if yes.
*/ */
int int
htmlCheckAutoClose(const CHAR *new, const CHAR *old) { htmlCheckAutoClose(const xmlChar *new, const xmlChar *old) {
int i, index; int i, index;
char **close; char **close;
@ -442,7 +442,7 @@ htmlCheckAutoClose(const CHAR *new, const CHAR *old) {
* appropriates closes if possible/needed. * appropriates closes if possible/needed.
*/ */
void void
htmlAutoClose(htmlParserCtxtPtr ctxt, const CHAR *new) { htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar *new) {
while ((ctxt->node != NULL) && while ((ctxt->node != NULL) &&
(htmlCheckAutoClose(new, ctxt->node->name))) { (htmlCheckAutoClose(new, ctxt->node->name))) {
@ -462,7 +462,7 @@ htmlAutoClose(htmlParserCtxtPtr ctxt, const CHAR *new) {
* The HTmL DtD allows an ending tag to implicitely close other tags. * The HTmL DtD allows an ending tag to implicitely close other tags.
*/ */
void void
htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const CHAR *new) { htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *new) {
htmlElemDescPtr info; htmlElemDescPtr info;
while ((ctxt->node != NULL) && while ((ctxt->node != NULL) &&
@ -774,7 +774,7 @@ htmlEntityDesc html40EntitiesTable[] = {
*/ */
#define growBuffer(buffer) { \ #define growBuffer(buffer) { \
buffer##_size *= 2; \ buffer##_size *= 2; \
buffer = (CHAR *) xmlRealloc(buffer, buffer##_size * sizeof(CHAR)); \ buffer = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
if (buffer == NULL) { \ if (buffer == NULL) { \
perror("realloc failed"); \ perror("realloc failed"); \
exit(1); \ exit(1); \
@ -792,7 +792,7 @@ htmlEntityDesc html40EntitiesTable[] = {
* Returns the associated htmlEntityDescPtr if found, NULL otherwise. * Returns the associated htmlEntityDescPtr if found, NULL otherwise.
*/ */
htmlEntityDescPtr htmlEntityDescPtr
htmlEntityLookup(const CHAR *name) { htmlEntityLookup(const xmlChar *name) {
int i; int i;
for (i = 0;i < (sizeof(html40EntitiesTable)/ for (i = 0;i < (sizeof(html40EntitiesTable)/
@ -812,9 +812,9 @@ htmlEntityLookup(const CHAR *name) {
* htmlDecodeEntities: * htmlDecodeEntities:
* @ctxt: the parser context * @ctxt: the parser context
* @len: the len to decode (in bytes !), -1 for no size limit * @len: the len to decode (in bytes !), -1 for no size limit
* @end: an end marker CHAR, 0 if none * @end: an end marker xmlChar, 0 if none
* @end2: an end marker CHAR, 0 if none * @end2: an end marker xmlChar, 0 if none
* @end3: an end marker CHAR, 0 if none * @end3: an end marker xmlChar, 0 if none
* *
* Subtitute the HTML entities by their value * Subtitute the HTML entities by their value
* *
@ -825,15 +825,15 @@ htmlEntityLookup(const CHAR *name) {
* Returns A newly allocated string with the substitution done. The caller * Returns A newly allocated string with the substitution done. The caller
* must deallocate it ! * must deallocate it !
*/ */
CHAR * xmlChar *
htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len,
CHAR end, CHAR end2, CHAR end3) { xmlChar end, xmlChar end2, xmlChar end3) {
CHAR *buffer = NULL; xmlChar *buffer = NULL;
int buffer_size = 0; int buffer_size = 0;
CHAR *out = NULL; xmlChar *out = NULL;
CHAR *name = NULL; xmlChar *name = NULL;
CHAR *cur = NULL; xmlChar *cur = NULL;
htmlEntityDescPtr ent; htmlEntityDescPtr ent;
int nbchars = 0; int nbchars = 0;
unsigned int max = (unsigned int) len; unsigned int max = (unsigned int) len;
@ -842,7 +842,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len,
* allocate a translation buffer. * allocate a translation buffer.
*/ */
buffer_size = 1000; buffer_size = 1000;
buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
if (buffer == NULL) { if (buffer == NULL) {
perror("htmlDecodeEntities: malloc failed"); perror("htmlDecodeEntities: malloc failed");
return(NULL); return(NULL);
@ -880,7 +880,7 @@ htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len,
*out++ = ';'; *out++ = ';';
} else { } else {
/* invalid for UTF-8 variable encoding !!!!! */ /* invalid for UTF-8 variable encoding !!!!! */
*out++ = (CHAR)ent->value; *out++ = (xmlChar)ent->value;
if (out - buffer > buffer_size - 100) { if (out - buffer > buffer_size - 100) {
int index = out - buffer; int index = out - buffer;
@ -1053,7 +1053,7 @@ htmlSwitchEncoding(htmlParserCtxtPtr ctxt, xmlCharEncoding enc)
/** /**
* areBlanks: * areBlanks:
* @ctxt: an HTML parser context * @ctxt: an HTML parser context
* @str: a CHAR * * @str: a xmlChar *
* @len: the size of @str * @len: the size of @str
* *
* Is this a sequence of blank chars that one can ignore ? * Is this a sequence of blank chars that one can ignore ?
@ -1061,7 +1061,7 @@ htmlSwitchEncoding(htmlParserCtxtPtr ctxt, xmlCharEncoding enc)
* Returns 1 if ignorable 0 otherwise. * Returns 1 if ignorable 0 otherwise.
*/ */
static int areBlanks(htmlParserCtxtPtr ctxt, const CHAR *str, int len) { static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
int i; int i;
xmlNodePtr lastChild; xmlNodePtr lastChild;
@ -1116,7 +1116,7 @@ htmlHandleEntity(htmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
* Returns a new document * Returns a new document
*/ */
htmlDocPtr htmlDocPtr
htmlNewDoc(const CHAR *URI, const CHAR *ExternalID) { htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) {
xmlDocPtr cur; xmlDocPtr cur;
/* /*
@ -1173,11 +1173,11 @@ htmlNewDoc(const CHAR *URI, const CHAR *ExternalID) {
* Returns the Tag Name parsed or NULL * Returns the Tag Name parsed or NULL
*/ */
CHAR * xmlChar *
htmlParseHTMLName(htmlParserCtxtPtr ctxt) { htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
CHAR *ret = NULL; xmlChar *ret = NULL;
int i = 0; int i = 0;
CHAR loc[100]; xmlChar loc[100];
if (!IS_LETTER(CUR) && (CUR != '_') && if (!IS_LETTER(CUR) && (CUR != '_') &&
(CUR != ':')) return(NULL); (CUR != ':')) return(NULL);
@ -1204,9 +1204,9 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
* Returns the Name parsed or NULL * Returns the Name parsed or NULL
*/ */
CHAR * xmlChar *
htmlParseName(htmlParserCtxtPtr ctxt) { htmlParseName(htmlParserCtxtPtr ctxt) {
CHAR buf[HTML_MAX_NAMELEN]; xmlChar buf[HTML_MAX_NAMELEN];
int len = 0; int len = 0;
GROW; GROW;
@ -1245,9 +1245,9 @@ htmlParseName(htmlParserCtxtPtr ctxt) {
* Returns the Nmtoken parsed or NULL * Returns the Nmtoken parsed or NULL
*/ */
CHAR * xmlChar *
htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt) { htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt) {
CHAR buf[HTML_MAX_NAMELEN]; xmlChar buf[HTML_MAX_NAMELEN];
int len = 0; int len = 0;
GROW; GROW;
@ -1278,9 +1278,9 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt) {
* Returns the Nmtoken parsed or NULL * Returns the Nmtoken parsed or NULL
*/ */
CHAR * xmlChar *
htmlParseNmtoken(htmlParserCtxtPtr ctxt) { htmlParseNmtoken(htmlParserCtxtPtr ctxt) {
CHAR buf[HTML_MAX_NAMELEN]; xmlChar buf[HTML_MAX_NAMELEN];
int len = 0; int len = 0;
GROW; GROW;
@ -1319,8 +1319,8 @@ htmlParseNmtoken(htmlParserCtxtPtr ctxt) {
* if non-NULL *str will have to be freed by the caller. * if non-NULL *str will have to be freed by the caller.
*/ */
htmlEntityDescPtr htmlEntityDescPtr
htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str) { htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str) {
CHAR *name; xmlChar *name;
htmlEntityDescPtr ent = NULL; htmlEntityDescPtr ent = NULL;
*str = NULL; *str = NULL;
@ -1369,9 +1369,9 @@ htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str) {
* Returns the AttValue parsed or NULL. * Returns the AttValue parsed or NULL.
*/ */
CHAR * xmlChar *
htmlParseAttValue(htmlParserCtxtPtr ctxt) { htmlParseAttValue(htmlParserCtxtPtr ctxt) {
CHAR *ret = NULL; xmlChar *ret = NULL;
if (CUR == '"') { if (CUR == '"') {
NEXT; NEXT;
@ -1429,10 +1429,10 @@ htmlParseAttValue(htmlParserCtxtPtr ctxt) {
* Returns the SystemLiteral parsed or NULL * Returns the SystemLiteral parsed or NULL
*/ */
CHAR * xmlChar *
htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
const CHAR *q; const xmlChar *q;
CHAR *ret = NULL; xmlChar *ret = NULL;
if (CUR == '"') { if (CUR == '"') {
NEXT; NEXT;
@ -1480,10 +1480,10 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
* Returns the PubidLiteral parsed or NULL. * Returns the PubidLiteral parsed or NULL.
*/ */
CHAR * xmlChar *
htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
const CHAR *q; const xmlChar *q;
CHAR *ret = NULL; xmlChar *ret = NULL;
/* /*
* Name ::= (Letter | '_') (NameChar)* * Name ::= (Letter | '_') (NameChar)*
*/ */
@ -1534,7 +1534,7 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
void void
htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) { htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) {
const CHAR *q; const xmlChar *q;
q = CUR_PTR; q = CUR_PTR;
while ((IS_CHAR(CUR)) && (CUR != '<') && while ((IS_CHAR(CUR)) && (CUR != '<') &&
@ -1570,7 +1570,7 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) {
/** /**
* htmlParseExternalID: * htmlParseExternalID:
* @ctxt: an HTML parser context * @ctxt: an HTML parser context
* @publicID: a CHAR** receiving PubidLiteral * @publicID: a xmlChar** receiving PubidLiteral
* @strict: indicate whether we should restrict parsing to only * @strict: indicate whether we should restrict parsing to only
* production [75], see NOTE below * production [75], see NOTE below
* *
@ -1589,9 +1589,9 @@ htmlParseCharData(htmlParserCtxtPtr ctxt, int cdata) {
* it is possible to return NULL and have publicID set. * it is possible to return NULL and have publicID set.
*/ */
CHAR * xmlChar *
htmlParseExternalID(htmlParserCtxtPtr ctxt, CHAR **publicID, int strict) { htmlParseExternalID(htmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
CHAR *URI = NULL; xmlChar *URI = NULL;
if ((UPPER == 'S') && (UPP(1) == 'Y') && if ((UPPER == 'S') && (UPP(1) == 'Y') &&
(UPP(2) == 'S') && (UPP(3) == 'T') && (UPP(2) == 'S') && (UPP(3) == 'T') &&
@ -1648,9 +1648,9 @@ htmlParseExternalID(htmlParserCtxtPtr ctxt, CHAR **publicID, int strict) {
*/ */
void void
htmlParseComment(htmlParserCtxtPtr ctxt, int create) { htmlParseComment(htmlParserCtxtPtr ctxt, int create) {
const CHAR *q, *start; const xmlChar *q, *start;
const CHAR *r; const xmlChar *r;
CHAR *val; xmlChar *val;
/* /*
* Check that there is a comment right here. * Check that there is a comment right here.
@ -1755,7 +1755,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
return(val); return(val);
} else { } else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid CHAR value %d\n", ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid xmlChar value %d\n",
val); val);
ctxt->wellFormed = 0; ctxt->wellFormed = 0;
} }
@ -1775,9 +1775,9 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
void void
htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) { htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
CHAR *name; xmlChar *name;
CHAR *ExternalID = NULL; xmlChar *ExternalID = NULL;
CHAR *URI = NULL; xmlChar *URI = NULL;
/* /*
* We know that '<!DOCTYPE' has been detected. * We know that '<!DOCTYPE' has been detected.
@ -1835,7 +1835,7 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
/** /**
* htmlParseAttribute: * htmlParseAttribute:
* @ctxt: an HTML parser context * @ctxt: an HTML parser context
* @value: a CHAR ** used to store the value of the attribute * @value: a xmlChar ** used to store the value of the attribute
* *
* parse an attribute * parse an attribute
* *
@ -1853,9 +1853,9 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
* Returns the attribute name, and the value in *value. * Returns the attribute name, and the value in *value.
*/ */
CHAR * xmlChar *
htmlParseAttribute(htmlParserCtxtPtr ctxt, CHAR **value) { htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
CHAR *name, *val; xmlChar *name, *val;
*value = NULL; *value = NULL;
name = htmlParseName(ctxt); name = htmlParseName(ctxt);
@ -1906,12 +1906,12 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, CHAR **value) {
* Returns the element name parsed * Returns the element name parsed
*/ */
CHAR * xmlChar *
htmlParseStartTag(htmlParserCtxtPtr ctxt) { htmlParseStartTag(htmlParserCtxtPtr ctxt) {
CHAR *name; xmlChar *name;
CHAR *attname; xmlChar *attname;
CHAR *attvalue; xmlChar *attvalue;
const CHAR **atts = NULL; const xmlChar **atts = NULL;
int nbatts = 0; int nbatts = 0;
int maxatts = 0; int maxatts = 0;
int i; int i;
@ -1942,7 +1942,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
while ((IS_CHAR(CUR)) && while ((IS_CHAR(CUR)) &&
(CUR != '>') && (CUR != '>') &&
((CUR != '/') || (NXT(1) != '>'))) { ((CUR != '/') || (NXT(1) != '>'))) {
const CHAR *q = CUR_PTR; const xmlChar *q = CUR_PTR;
attname = htmlParseAttribute(ctxt, &attvalue); attname = htmlParseAttribute(ctxt, &attvalue);
if ((attname != NULL) && (attvalue != NULL)) { if ((attname != NULL) && (attvalue != NULL)) {
@ -1966,18 +1966,18 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
*/ */
if (atts == NULL) { if (atts == NULL) {
maxatts = 10; maxatts = 10;
atts = (const CHAR **) xmlMalloc(maxatts * sizeof(CHAR *)); atts = (const xmlChar **) xmlMalloc(maxatts * sizeof(xmlChar *));
if (atts == NULL) { if (atts == NULL) {
fprintf(stderr, "malloc of %ld byte failed\n", fprintf(stderr, "malloc of %ld byte failed\n",
maxatts * (long)sizeof(CHAR *)); maxatts * (long)sizeof(xmlChar *));
return(NULL); return(NULL);
} }
} else if (nbatts + 2 < maxatts) { } else if (nbatts + 2 < maxatts) {
maxatts *= 2; maxatts *= 2;
atts = (const CHAR **) xmlRealloc(atts, maxatts * sizeof(CHAR *)); atts = (const xmlChar **) xmlRealloc(atts, maxatts * sizeof(xmlChar *));
if (atts == NULL) { if (atts == NULL) {
fprintf(stderr, "realloc of %ld byte failed\n", fprintf(stderr, "realloc of %ld byte failed\n",
maxatts * (long)sizeof(CHAR *)); maxatts * (long)sizeof(xmlChar *));
return(NULL); return(NULL);
} }
} }
@ -2004,7 +2004,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
ctxt->sax->startElement(ctxt->userData, name, atts); ctxt->sax->startElement(ctxt->userData, name, atts);
if (atts != NULL) { if (atts != NULL) {
for (i = 0;i < nbatts;i++) xmlFree((CHAR *) atts[i]); for (i = 0;i < nbatts;i++) xmlFree((xmlChar *) atts[i]);
xmlFree(atts); xmlFree(atts);
} }
return(name); return(name);
@ -2025,8 +2025,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
*/ */
void void
htmlParseEndTag(htmlParserCtxtPtr ctxt, const CHAR *tagname) { htmlParseEndTag(htmlParserCtxtPtr ctxt, const xmlChar *tagname) {
CHAR *name; xmlChar *name;
int i; int i;
if ((CUR != '<') || (NXT(1) != '/')) { if ((CUR != '<') || (NXT(1) != '/')) {
@ -2114,8 +2114,8 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt, const CHAR *tagname) {
void void
htmlParseReference(htmlParserCtxtPtr ctxt) { htmlParseReference(htmlParserCtxtPtr ctxt) {
htmlEntityDescPtr ent; htmlEntityDescPtr ent;
CHAR out[2]; xmlChar out[2];
CHAR *name; xmlChar *name;
int val; int val;
if (CUR != '&') return; if (CUR != '&') return;
@ -2156,12 +2156,12 @@ htmlParseReference(htmlParserCtxtPtr ctxt) {
*/ */
void void
htmlParseContent(htmlParserCtxtPtr ctxt, const CHAR *name) { htmlParseContent(htmlParserCtxtPtr ctxt, const xmlChar *name) {
htmlNodePtr currentNode; htmlNodePtr currentNode;
currentNode = ctxt->node; currentNode = ctxt->node;
while ((CUR != '<') || (NXT(1) != '/')) { while ((CUR != '<') || (NXT(1) != '/')) {
const CHAR *test = CUR_PTR; const xmlChar *test = CUR_PTR;
/* /*
* Has this node been popped out during parsing of * Has this node been popped out during parsing of
@ -2228,8 +2228,8 @@ htmlParseContent(htmlParserCtxtPtr ctxt, const CHAR *name) {
void void
htmlParseElement(htmlParserCtxtPtr ctxt) { htmlParseElement(htmlParserCtxtPtr ctxt) {
const CHAR *openTag = CUR_PTR; const xmlChar *openTag = CUR_PTR;
CHAR *name; xmlChar *name;
htmlNodePtr currentNode; htmlNodePtr currentNode;
htmlElemDescPtr info; htmlElemDescPtr info;
htmlParserNodeInfo node_info; htmlParserNodeInfo node_info;
@ -2512,7 +2512,7 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt)
/** /**
* htmlCreateDocParserCtxt : * htmlCreateDocParserCtxt :
* @cur: a pointer to an array of CHAR * @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the HTML document encoding, or NULL * @encoding: a free form C string describing the HTML document encoding, or NULL
* *
* Create a parser context for an HTML document. * Create a parser context for an HTML document.
@ -2520,7 +2520,7 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt)
* Returns the new parser context or NULL * Returns the new parser context or NULL
*/ */
htmlParserCtxtPtr htmlParserCtxtPtr
htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) { htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding) {
htmlParserCtxtPtr ctxt; htmlParserCtxtPtr ctxt;
htmlParserInputPtr input; htmlParserInputPtr input;
/* htmlCharEncoding enc; */ /* htmlCharEncoding enc; */
@ -2566,7 +2566,7 @@ htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) {
/** /**
* htmlSAXParseDoc : * htmlSAXParseDoc :
* @cur: a pointer to an array of CHAR * @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the HTML document encoding, or NULL * @encoding: a free form C string describing the HTML document encoding, or NULL
* @sax: the SAX handler block * @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks. * @userData: if using SAX, this pointer will be provided on callbacks.
@ -2579,7 +2579,7 @@ htmlCreateDocParserCtxt(CHAR *cur, const char *encoding) {
*/ */
htmlDocPtr htmlDocPtr
htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) { htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) {
htmlDocPtr ret; htmlDocPtr ret;
htmlParserCtxtPtr ctxt; htmlParserCtxtPtr ctxt;
@ -2606,7 +2606,7 @@ htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *us
/** /**
* htmlParseDoc : * htmlParseDoc :
* @cur: a pointer to an array of CHAR * @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the HTML document encoding, or NULL * @encoding: a free form C string describing the HTML document encoding, or NULL
* *
* parse an HTML in-memory document and build a tree. * parse an HTML in-memory document and build a tree.
@ -2615,7 +2615,7 @@ htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlSAXHandlerPtr sax, void *us
*/ */
htmlDocPtr htmlDocPtr
htmlParseDoc(CHAR *cur, const char *encoding) { htmlParseDoc(xmlChar *cur, const char *encoding) {
return(htmlSAXParseDoc(cur, encoding, NULL, NULL)); return(htmlSAXParseDoc(cur, encoding, NULL, NULL));
} }

View File

@ -48,16 +48,16 @@ typedef struct htmlEntityDesc {
/* /*
* There is only few public functions. * There is only few public functions.
*/ */
htmlElemDescPtr htmlTagLookup(const CHAR *tag); htmlElemDescPtr htmlTagLookup(const xmlChar *tag);
htmlEntityDescPtr htmlEntityLookup(const CHAR *name); htmlEntityDescPtr htmlEntityLookup(const xmlChar *name);
htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str); htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str);
int htmlParseCharRef(htmlParserCtxtPtr ctxt); int htmlParseCharRef(htmlParserCtxtPtr ctxt);
void htmlParseElement(htmlParserCtxtPtr ctxt); void htmlParseElement(htmlParserCtxtPtr ctxt);
htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding,
htmlSAXHandlerPtr sax, void *userData); 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, htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding,
htmlSAXHandlerPtr sax, void *userData); htmlSAXHandlerPtr sax, void *userData);
htmlDocPtr htmlParseFile(const char *filename, const char *encoding); htmlDocPtr htmlParseFile(const char *filename, const char *encoding);

View File

@ -67,7 +67,7 @@ htmlDtdDump(xmlBufferPtr buf, xmlDocPtr doc) {
*/ */
static void static void
htmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { htmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
CHAR *value; xmlChar *value;
if (cur == NULL) { if (cur == NULL) {
fprintf(stderr, "htmlAttrDump : property == NULL\n"); fprintf(stderr, "htmlAttrDump : property == NULL\n");
@ -149,7 +149,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
*/ */
if (cur->type == HTML_TEXT_NODE) { if (cur->type == HTML_TEXT_NODE) {
if (cur->content != NULL) { if (cur->content != NULL) {
CHAR *buffer; xmlChar *buffer;
/* uses the HTML encoding routine !!!!!!!!!! */ /* uses the HTML encoding routine !!!!!!!!!! */
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
@ -211,7 +211,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
} }
xmlBufferWriteChar(buf, ">"); xmlBufferWriteChar(buf, ">");
if (cur->content != NULL) { if (cur->content != NULL) {
CHAR *buffer; xmlChar *buffer;
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
if (buffer != NULL) { if (buffer != NULL) {
@ -261,11 +261,11 @@ htmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) {
* @mem: OUT: the memory pointer * @mem: OUT: the memory pointer
* @size: OUT: the memory lenght * @size: OUT: the memory lenght
* *
* Dump an HTML document in memory and return the CHAR * and it's size. * Dump an HTML document in memory and return the xmlChar * and it's size.
* It's up to the caller to free the memory. * It's up to the caller to free the memory.
*/ */
void void
htmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int *size) { htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
xmlBufferPtr buf; xmlBufferPtr buf;
if (cur == NULL) { if (cur == NULL) {
@ -342,6 +342,6 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
fclose(output); fclose(output);
xmlBufferFree(buf); xmlBufferFree(buf);
return(ret * sizeof(CHAR)); return(ret * sizeof(xmlChar));
} }

88
SAX.c
View File

@ -27,9 +27,9 @@
* *
* Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" * Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
* *
* Returns a CHAR * * Returns a xmlChar *
*/ */
const CHAR * const xmlChar *
getPublicId(void *ctx) getPublicId(void *ctx)
{ {
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
@ -43,9 +43,9 @@ getPublicId(void *ctx)
* Return the system ID, basically URL or filename e.g. * Return the system ID, basically URL or filename e.g.
* http://www.sgmlsource.com/dtds/memo.dtd * http://www.sgmlsource.com/dtds/memo.dtd
* *
* Returns a CHAR * * Returns a xmlChar *
*/ */
const CHAR * const xmlChar *
getSystemId(void *ctx) getSystemId(void *ctx)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -142,8 +142,8 @@ hasExternalSubset(void *ctx)
* Does this document has an internal subset * Does this document has an internal subset
*/ */
void void
internalSubset(void *ctx, const CHAR *name, internalSubset(void *ctx, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID) const xmlChar *ExternalID, const xmlChar *SystemID)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -229,7 +229,7 @@ internalSubset(void *ctx, const CHAR *name,
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/ */
xmlParserInputPtr xmlParserInputPtr
resolveEntity(void *ctx, const CHAR *publicId, const CHAR *systemId) resolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -253,7 +253,7 @@ resolveEntity(void *ctx, const CHAR *publicId, const CHAR *systemId)
* Returns the xmlEntityPtr if found. * Returns the xmlEntityPtr if found.
*/ */
xmlEntityPtr xmlEntityPtr
getEntity(void *ctx, const CHAR *name) getEntity(void *ctx, const xmlChar *name)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlEntityPtr ret; xmlEntityPtr ret;
@ -276,7 +276,7 @@ getEntity(void *ctx, const CHAR *name)
* Returns the xmlEntityPtr if found. * Returns the xmlEntityPtr if found.
*/ */
xmlEntityPtr xmlEntityPtr
getParameterEntity(void *ctx, const CHAR *name) getParameterEntity(void *ctx, const xmlChar *name)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlEntityPtr ret; xmlEntityPtr ret;
@ -302,8 +302,8 @@ getParameterEntity(void *ctx, const CHAR *name)
* An entity definition has been parsed * An entity definition has been parsed
*/ */
void void
entityDecl(void *ctx, const CHAR *name, int type, entityDecl(void *ctx, const xmlChar *name, int type,
const CHAR *publicId, const CHAR *systemId, CHAR *content) const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -326,8 +326,8 @@ entityDecl(void *ctx, const CHAR *name, int type,
* An attribute definition has been parsed * An attribute definition has been parsed
*/ */
void void
attributeDecl(void *ctx, const CHAR *elem, const CHAR *name, attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *name,
int type, int def, const CHAR *defaultValue, int type, int def, const xmlChar *defaultValue,
xmlEnumerationPtr tree) xmlEnumerationPtr tree)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -358,7 +358,7 @@ attributeDecl(void *ctx, const CHAR *elem, const CHAR *name,
* An element definition has been parsed * An element definition has been parsed
*/ */
void void
elementDecl(void *ctx, const CHAR *name, int type, elementDecl(void *ctx, const xmlChar *name, int type,
xmlElementContentPtr content) xmlElementContentPtr content)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -387,8 +387,8 @@ elementDecl(void *ctx, const CHAR *name, int type,
* What to do when a notation declaration has been parsed. * What to do when a notation declaration has been parsed.
*/ */
void void
notationDecl(void *ctx, const CHAR *name, notationDecl(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId) const xmlChar *publicId, const xmlChar *systemId)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNotationPtr nota; xmlNotationPtr nota;
@ -417,9 +417,9 @@ notationDecl(void *ctx, const CHAR *name,
* What to do when an unparsed entity declaration is parsed * What to do when an unparsed entity declaration is parsed
*/ */
void void
unparsedEntityDecl(void *ctx, const CHAR *name, unparsedEntityDecl(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId, const xmlChar *publicId, const xmlChar *systemId,
const CHAR *notationName) const xmlChar *notationName)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -507,12 +507,12 @@ endDocument(void *ctx)
* the element. * the element.
*/ */
void void
attribute(void *ctx, const CHAR *fullname, const CHAR *value) attribute(void *ctx, const xmlChar *fullname, const xmlChar *value)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlAttrPtr ret; xmlAttrPtr ret;
CHAR *name; xmlChar *name;
CHAR *ns; xmlChar *ns;
xmlNsPtr namespace; xmlNsPtr namespace;
/**************** /****************
@ -588,16 +588,16 @@ attribute(void *ctx, const CHAR *fullname, const CHAR *value)
* called when an opening tag has been processed. * called when an opening tag has been processed.
*/ */
void void
startElement(void *ctx, const CHAR *fullname, const CHAR **atts) startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret; xmlNodePtr ret;
xmlNodePtr parent = ctxt->node; xmlNodePtr parent = ctxt->node;
xmlNsPtr ns; xmlNsPtr ns;
CHAR *name; xmlChar *name;
CHAR *prefix; xmlChar *prefix;
const CHAR *att; const xmlChar *att;
const CHAR *value; const xmlChar *value;
int i; int i;
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -728,7 +728,7 @@ startElement(void *ctx, const CHAR *fullname, const CHAR **atts)
* called when the end of an element has been detected. * called when the end of an element has been detected.
*/ */
void void
endElement(void *ctx, const CHAR *name) endElement(void *ctx, const xmlChar *name)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlParserNodeInfo node_info; xmlParserNodeInfo node_info;
@ -772,7 +772,7 @@ endElement(void *ctx, const CHAR *name)
* called when an entity reference is detected. * called when an entity reference is detected.
*/ */
void void
reference(void *ctx, const CHAR *name) reference(void *ctx, const xmlChar *name)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret; xmlNodePtr ret;
@ -790,14 +790,14 @@ reference(void *ctx, const CHAR *name)
/** /**
* characters: * characters:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @ch: a CHAR string * @ch: a xmlChar string
* @len: the number of CHAR * @len: the number of xmlChar
* *
* receiving some chars from the parser. * receiving some chars from the parser.
* Question: how much at a time ??? * Question: how much at a time ???
*/ */
void void
characters(void *ctx, const CHAR *ch, int len) characters(void *ctx, const xmlChar *ch, int len)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr lastChild; xmlNodePtr lastChild;
@ -830,14 +830,14 @@ characters(void *ctx, const CHAR *ch, int len)
/** /**
* ignorableWhitespace: * ignorableWhitespace:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @ch: a CHAR string * @ch: a xmlChar string
* @len: the number of CHAR * @len: the number of xmlChar
* *
* receiving some ignorable whitespaces from the parser. * receiving some ignorable whitespaces from the parser.
* Question: how much at a time ??? * Question: how much at a time ???
*/ */
void void
ignorableWhitespace(void *ctx, const CHAR *ch, int len) ignorableWhitespace(void *ctx, const xmlChar *ch, int len)
{ {
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -850,13 +850,13 @@ ignorableWhitespace(void *ctx, const CHAR *ch, int len)
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @target: the target name * @target: the target name
* @data: the PI data's * @data: the PI data's
* @len: the number of CHAR * @len: the number of xmlChar
* *
* A processing instruction has been parsed. * A processing instruction has been parsed.
*/ */
void void
processingInstruction(void *ctx, const CHAR *target, processingInstruction(void *ctx, const xmlChar *target,
const CHAR *data) const xmlChar *data)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret; xmlNodePtr ret;
@ -903,7 +903,7 @@ processingInstruction(void *ctx, const CHAR *target,
* An old global namespace has been parsed. * An old global namespace has been parsed.
*/ */
void void
globalNamespace(void *ctx, const CHAR *href, const CHAR *prefix) globalNamespace(void *ctx, const xmlChar *href, const xmlChar *prefix)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -920,7 +920,7 @@ globalNamespace(void *ctx, const CHAR *href, const CHAR *prefix)
* Set the current element namespace. * Set the current element namespace.
*/ */
void void
setNamespace(void *ctx, const CHAR *name) setNamespace(void *ctx, const xmlChar *name)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNsPtr ns; xmlNsPtr ns;
@ -968,7 +968,7 @@ getNamespace(void *ctx)
* one read upon parsing. * one read upon parsing.
*/ */
int int
checkNamespace(void *ctx, CHAR *namespace) checkNamespace(void *ctx, xmlChar *namespace)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr cur = ctxt->node; xmlNodePtr cur = ctxt->node;
@ -1016,7 +1016,7 @@ checkNamespace(void *ctx, CHAR *namespace)
* A namespace has been parsed. * A namespace has been parsed.
*/ */
void void
namespaceDecl(void *ctx, const CHAR *href, const CHAR *prefix) namespaceDecl(void *ctx, const xmlChar *href, const xmlChar *prefix)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
#ifdef DEBUG_SAX #ifdef DEBUG_SAX
@ -1036,7 +1036,7 @@ namespaceDecl(void *ctx, const CHAR *href, const CHAR *prefix)
* A comment has been parsed. * A comment has been parsed.
*/ */
void void
comment(void *ctx, const CHAR *value) comment(void *ctx, const xmlChar *value)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret; xmlNodePtr ret;
@ -1081,7 +1081,7 @@ comment(void *ctx, const CHAR *value)
* called when a pcdata block has been parsed * called when a pcdata block has been parsed
*/ */
void void
cdataBlock(void *ctx, const CHAR *value, int len) cdataBlock(void *ctx, const xmlChar *value, int len)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret; xmlNodePtr ret;

View File

@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h)
LIBXML_MAJOR_VERSION=1 LIBXML_MAJOR_VERSION=1
LIBXML_MINOR_VERSION=7 LIBXML_MINOR_VERSION=7
LIBXML_MICRO_VERSION=0 LIBXML_MICRO_VERSION=1
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION 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 LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION

View File

@ -15,7 +15,7 @@
#define IS_BLANK(c) \ #define IS_BLANK(c) \
(((c) == '\n') || ((c) == '\r') || ((c) == '\t') || ((c) == ' ')) (((c) == '\n') || ((c) == '\r') || ((c) == '\t') || ((c) == ' '))
void xmlDebugDumpString(FILE *output, const CHAR *str) { void xmlDebugDumpString(FILE *output, const xmlChar *str) {
int i; int i;
for (i = 0;i < 40;i++) for (i = 0;i < 40;i++)
if (str[i] == 0) return; if (str[i] == 0) return;

View File

@ -9,7 +9,7 @@
#define __DEBUG_XML__ #define __DEBUG_XML__
#include "tree.h" #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 xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth);
extern void xmlDebugDumpAttrList(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 xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth);

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN4116" NAME="AEN4122"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN4116"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN4119" NAME="AEN4125"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -182,21 +182,21 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
int type, int type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ExternalID, > *ExternalID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID, > *SystemID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *content); > *content);
void <A void <A
HREF="gnome-xml-entities.html#XMLADDDTDENTITY" HREF="gnome-xml-entities.html#XMLADDDTDENTITY"
@ -206,21 +206,21 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
int type, int type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ExternalID, > *ExternalID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID, > *SystemID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *content); > *content);
<A <A
HREF="gnome-xml-entities.html#XMLENTITYPTR" HREF="gnome-xml-entities.html#XMLENTITYPTR"
@ -229,8 +229,8 @@ HREF="gnome-xml-entities.html#XMLENTITYPTR"
HREF="gnome-xml-entities.html#XMLGETPREDEFINEDENTITY" HREF="gnome-xml-entities.html#XMLGETPREDEFINEDENTITY"
>xmlGetPredefinedEntity</A >xmlGetPredefinedEntity</A
> (const <A > (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-entities.html#XMLENTITYPTR" HREF="gnome-xml-entities.html#XMLENTITYPTR"
@ -243,8 +243,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-entities.html#XMLENTITYPTR" HREF="gnome-xml-entities.html#XMLENTITYPTR"
@ -257,8 +257,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-entities.html#XMLENTITYPTR" HREF="gnome-xml-entities.html#XMLENTITYPTR"
@ -271,27 +271,27 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
>* <A >* <A
HREF="gnome-xml-entities.html#XMLENCODEENTITIES" HREF="gnome-xml-entities.html#XMLENCODEENTITIES"
>xmlEncodeEntities</A >xmlEncodeEntities</A
> (<A > (<A
HREF="gnome-xml-tree.html#XMLDOCPTR" HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *input); > *input);
<A <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
>* <A >* <A
HREF="gnome-xml-entities.html#XMLENCODEENTITIESREENTRANT" HREF="gnome-xml-entities.html#XMLENCODEENTITIESREENTRANT"
>xmlEncodeEntitiesReentrant</A >xmlEncodeEntitiesReentrant</A
> (<A > (<A
@ -299,8 +299,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *input); > *input);
<A <A
HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR" HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR"
@ -344,7 +344,7 @@ HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN4176" NAME="AEN4182"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -354,14 +354,14 @@ NAME="AEN4176"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN4179" NAME="AEN4185"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4181" NAME="AEN4187"
></A ></A
><H3 ><H3
><A ><A
@ -387,7 +387,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4186" NAME="AEN4192"
></A ></A
><H3 ><H3
><A ><A
@ -413,7 +413,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4191" NAME="AEN4197"
></A ></A
><H3 ><H3
><A ><A
@ -439,7 +439,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4196" NAME="AEN4202"
></A ></A
><H3 ><H3
><A ><A
@ -465,7 +465,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4201" NAME="AEN4207"
></A ></A
><H3 ><H3
><A ><A
@ -491,7 +491,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4206" NAME="AEN4212"
></A ></A
><H3 ><H3
><A ><A
@ -517,7 +517,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4211" NAME="AEN4217"
></A ></A
><H3 ><H3
><A ><A
@ -530,7 +530,7 @@ NAME="XMLENTITYPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4215" NAME="AEN4221"
></A ></A
><H3 ><H3
><A ><A
@ -556,7 +556,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4220" NAME="AEN4226"
></A ></A
><H3 ><H3
><A ><A
@ -569,7 +569,7 @@ NAME="XMLENTITIESTABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4224" NAME="AEN4230"
></A ></A
><H3 ><H3
><A ><A
@ -590,21 +590,21 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
int type, int type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ExternalID, > *ExternalID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID, > *SystemID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *content);</PRE > *content);</PRE
></TD ></TD
></TR ></TR
@ -734,7 +734,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4264" NAME="AEN4270"
></A ></A
><H3 ><H3
><A ><A
@ -755,21 +755,21 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
int type, int type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ExternalID, > *ExternalID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID, > *SystemID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *content);</PRE > *content);</PRE
></TD ></TD
></TR ></TR
@ -899,7 +899,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4304" NAME="AEN4310"
></A ></A
><H3 ><H3
><A ><A
@ -919,8 +919,8 @@ CLASS="PROGRAMLISTING"
HREF="gnome-xml-entities.html#XMLENTITYPTR" HREF="gnome-xml-entities.html#XMLENTITYPTR"
>xmlEntityPtr</A >xmlEntityPtr</A
> xmlGetPredefinedEntity (const <A > xmlGetPredefinedEntity (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -980,7 +980,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4325" NAME="AEN4331"
></A ></A
><H3 ><H3
><A ><A
@ -1004,8 +1004,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -1084,7 +1084,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4351" NAME="AEN4357"
></A ></A
><H3 ><H3
><A ><A
@ -1108,8 +1108,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -1187,7 +1187,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4377" NAME="AEN4383"
></A ></A
><H3 ><H3
><A ><A
@ -1211,8 +1211,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -1290,7 +1290,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4403" NAME="AEN4409"
></A ></A
><H3 ><H3
><A ><A
@ -1307,15 +1307,15 @@ CELLPADDING="6"
><PRE ><PRE
CLASS="PROGRAMLISTING" CLASS="PROGRAMLISTING"
>const <A >const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
>* xmlEncodeEntities (<A >* xmlEncodeEntities (<A
HREF="gnome-xml-tree.html#XMLDOCPTR" HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *input);</PRE > *input);</PRE
></TD ></TD
></TR ></TR
@ -1399,7 +1399,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4431" NAME="AEN4437"
></A ></A
><H3 ><H3
><A ><A
@ -1416,15 +1416,15 @@ CELLPADDING="6"
><PRE ><PRE
CLASS="PROGRAMLISTING" CLASS="PROGRAMLISTING"
><A ><A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
>* xmlEncodeEntitiesReentrant (<A >* xmlEncodeEntitiesReentrant (<A
HREF="gnome-xml-tree.html#XMLDOCPTR" HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *input);</PRE > *input);</PRE
></TD ></TD
></TR ></TR
@ -1507,7 +1507,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4458" NAME="AEN4464"
></A ></A
><H3 ><H3
><A ><A
@ -1568,7 +1568,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4474" NAME="AEN4480"
></A ></A
><H3 ><H3
><A ><A
@ -1649,7 +1649,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4495" NAME="AEN4501"
></A ></A
><H3 ><H3
><A ><A
@ -1712,7 +1712,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4511" NAME="AEN4517"
></A ></A
><H3 ><H3
><A ><A

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN6149" NAME="AEN6155"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN6149"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN6152" NAME="AEN6158"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -181,8 +181,8 @@ HREF="HTMLELEMDESCPTR"
HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP" HREF="gnome-xml-htmlparser.html#HTMLTAGLOOKUP"
>htmlTagLookup</A >htmlTagLookup</A
> (const <A > (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *tag); > *tag);
<GTKDOCLINK <GTKDOCLINK
HREF="HTMLENTITYDESCPTR" HREF="HTMLENTITYDESCPTR"
@ -191,8 +191,8 @@ HREF="HTMLENTITYDESCPTR"
HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP" HREF="gnome-xml-htmlparser.html#HTMLENTITYLOOKUP"
>htmlEntityLookup</A >htmlEntityLookup</A
> (const <A > (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<GTKDOCLINK <GTKDOCLINK
HREF="HTMLENTITYDESCPTR" HREF="HTMLENTITYDESCPTR"
@ -205,8 +205,8 @@ HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
>htmlParserCtxtPtr</A >htmlParserCtxtPtr</A
> ctxt, > ctxt,
<A <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> **str); > **str);
int <A int <A
HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF" HREF="gnome-xml-htmlparser.html#HTMLPARSECHARREF"
@ -229,8 +229,8 @@ HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC" HREF="gnome-xml-htmlparser.html#HTMLSAXPARSEDOC"
>htmlSAXParseDoc</A >htmlSAXParseDoc</A
> (<A > (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *cur, > *cur,
const char *encoding, const char *encoding,
<A <A
@ -245,8 +245,8 @@ HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC" HREF="gnome-xml-htmlparser.html#HTMLPARSEDOC"
>htmlParseDoc</A >htmlParseDoc</A
> (<A > (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *cur, > *cur,
const char *encoding); const char *encoding);
<A <A
@ -277,7 +277,7 @@ HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6190" NAME="AEN6196"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -287,14 +287,14 @@ NAME="AEN6190"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6193" NAME="AEN6199"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6195" NAME="AEN6201"
></A ></A
><H3 ><H3
><A ><A
@ -307,7 +307,7 @@ NAME="HTMLPARSERCTXT"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6199" NAME="AEN6205"
></A ></A
><H3 ><H3
><A ><A
@ -320,7 +320,7 @@ NAME="HTMLPARSERCTXTPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6203" NAME="AEN6209"
></A ></A
><H3 ><H3
><A ><A
@ -333,7 +333,7 @@ NAME="HTMLPARSERNODEINFO"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6207" NAME="AEN6213"
></A ></A
><H3 ><H3
><A ><A
@ -346,7 +346,7 @@ NAME="HTMLSAXHANDLER"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6211" NAME="AEN6217"
></A ></A
><H3 ><H3
><A ><A
@ -359,7 +359,7 @@ NAME="HTMLSAXHANDLERPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6215" NAME="AEN6221"
></A ></A
><H3 ><H3
><A ><A
@ -372,7 +372,7 @@ NAME="HTMLPARSERINPUT"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6219" NAME="AEN6225"
></A ></A
><H3 ><H3
><A ><A
@ -385,7 +385,7 @@ NAME="HTMLPARSERINPUTPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6223" NAME="AEN6229"
></A ></A
><H3 ><H3
><A ><A
@ -398,7 +398,7 @@ NAME="HTMLDOCPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6227" NAME="AEN6233"
></A ></A
><H3 ><H3
><A ><A
@ -411,7 +411,7 @@ NAME="HTMLNODEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6231" NAME="AEN6237"
></A ></A
><H3 ><H3
><A ><A
@ -431,8 +431,8 @@ CLASS="PROGRAMLISTING"
HREF="HTMLELEMDESCPTR" HREF="HTMLELEMDESCPTR"
>htmlElemDescPtr</GTKDOCLINK >htmlElemDescPtr</GTKDOCLINK
> htmlTagLookup (const <A > htmlTagLookup (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *tag);</PRE > *tag);</PRE
></TD ></TD
></TR ></TR
@ -492,7 +492,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6252" NAME="AEN6258"
></A ></A
><H3 ><H3
><A ><A
@ -512,8 +512,8 @@ CLASS="PROGRAMLISTING"
HREF="HTMLENTITYDESCPTR" HREF="HTMLENTITYDESCPTR"
>htmlEntityDescPtr</GTKDOCLINK >htmlEntityDescPtr</GTKDOCLINK
> htmlEntityLookup (const <A > htmlEntityLookup (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -575,7 +575,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6274" NAME="AEN6280"
></A ></A
><H3 ><H3
><A ><A
@ -599,8 +599,8 @@ HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR"
>htmlParserCtxtPtr</A >htmlParserCtxtPtr</A
> ctxt, > ctxt,
<A <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> **str);</PRE > **str);</PRE
></TD ></TD
></TR ></TR
@ -679,7 +679,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6301" NAME="AEN6307"
></A ></A
><H3 ><H3
><A ><A
@ -763,7 +763,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6323" NAME="AEN6329"
></A ></A
><H3 ><H3
><A ><A
@ -830,7 +830,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6341" NAME="AEN6347"
></A ></A
><H3 ><H3
><A ><A
@ -850,8 +850,8 @@ CLASS="PROGRAMLISTING"
HREF="gnome-xml-htmlparser.html#HTMLDOCPTR" HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A >htmlDocPtr</A
> htmlSAXParseDoc (<A > htmlSAXParseDoc (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *cur, > *cur,
const char *encoding, const char *encoding,
<A <A
@ -970,7 +970,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6375" NAME="AEN6381"
></A ></A
><H3 ><H3
><A ><A
@ -990,8 +990,8 @@ CLASS="PROGRAMLISTING"
HREF="gnome-xml-htmlparser.html#HTMLDOCPTR" HREF="gnome-xml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A >htmlDocPtr</A
> htmlParseDoc (<A > htmlParseDoc (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *cur, > *cur,
const char *encoding);</PRE const char *encoding);</PRE
></TD ></TD
@ -1069,7 +1069,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6400" NAME="AEN6406"
></A ></A
><H3 ><H3
><A ><A
@ -1207,7 +1207,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6433" NAME="AEN6439"
></A ></A
><H3 ><H3
><A ><A

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN6462" NAME="AEN6468"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN6462"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN6465" NAME="AEN6471"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -158,8 +158,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> cur, > cur,
<A <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> **mem, > **mem,
int *size); int *size);
void <A void <A
@ -188,7 +188,7 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6479" NAME="AEN6485"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -198,14 +198,14 @@ NAME="AEN6479"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6482" NAME="AEN6488"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6484" NAME="AEN6490"
></A ></A
><H3 ><H3
><A ><A
@ -231,7 +231,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6489" NAME="AEN6495"
></A ></A
><H3 ><H3
><A ><A
@ -257,7 +257,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6494" NAME="AEN6500"
></A ></A
><H3 ><H3
><A ><A
@ -283,7 +283,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6499" NAME="AEN6505"
></A ></A
><H3 ><H3
><A ><A
@ -304,15 +304,15 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> cur, > cur,
<A <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> **mem, > **mem,
int *size);</PRE int *size);</PRE
></TD ></TD
></TR ></TR
></TABLE ></TABLE
><P ><P
>Dump an HTML document in memory and return the CHAR * and it's size. >Dump an HTML document in memory and return the xmlChar * and it's size.
It's up to the caller to free the memory.</P It's up to the caller to free the memory.</P
><P ><P
></P ></P
@ -386,7 +386,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6524" NAME="AEN6530"
></A ></A
><H3 ><H3
><A ><A
@ -470,7 +470,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6545" NAME="AEN6551"
></A ></A
><H3 ><H3
><A ><A

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN4537" NAME="AEN4543"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN4537"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN4540" NAME="AEN4546"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -217,16 +217,16 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *PublicID, > *PublicID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID); > *SystemID);
<A <A
HREF="gnome-xml-valid.html#XMLNOTATIONTABLEPTR" HREF="gnome-xml-valid.html#XMLNOTATIONTABLEPTR"
@ -263,8 +263,8 @@ HREF="gnome-xml-tree.html#XMLELEMENTCONTENTPTR"
HREF="gnome-xml-valid.html#XMLNEWELEMENTCONTENT" HREF="gnome-xml-valid.html#XMLNEWELEMENTCONTENT"
>xmlNewElementContent</A >xmlNewElementContent</A
> (<A > (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE" HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE"
@ -302,8 +302,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE" HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE"
@ -348,8 +348,8 @@ HREF="gnome-xml-tree.html#XMLENUMERATIONPTR"
HREF="gnome-xml-valid.html#XMLCREATEENUMERATION" HREF="gnome-xml-valid.html#XMLCREATEENUMERATION"
>xmlCreateEnumeration</A >xmlCreateEnumeration</A
> (<A > (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
void <A void <A
HREF="gnome-xml-valid.html#XMLFREEENUMERATION" HREF="gnome-xml-valid.html#XMLFREEENUMERATION"
@ -383,12 +383,12 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *elem, > *elem,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE" HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE"
@ -399,8 +399,8 @@ HREF="gnome-xml-tree.html#XMLATTRIBUTEDEFAULT"
>xmlAttributeDefault</A >xmlAttributeDefault</A
> def, > def,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *defaultValue, > *defaultValue,
<A <A
HREF="gnome-xml-tree.html#XMLENUMERATIONPTR" HREF="gnome-xml-tree.html#XMLENUMERATIONPTR"
@ -449,8 +449,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value, > *value,
<A <A
HREF="gnome-xml-tree.html#XMLATTRPTR" HREF="gnome-xml-tree.html#XMLATTRPTR"
@ -484,8 +484,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ID); > *ID);
int <A int <A
HREF="gnome-xml-valid.html#XMLISID" HREF="gnome-xml-valid.html#XMLISID"
@ -517,8 +517,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value, > *value,
<A <A
HREF="gnome-xml-tree.html#XMLATTRPTR" HREF="gnome-xml-tree.html#XMLATTRPTR"
@ -605,8 +605,8 @@ HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE"
>xmlAttributeType</A >xmlAttributeType</A
> type, > type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value); > *value);
int <A int <A
HREF="gnome-xml-valid.html#XMLVALIDATENOTATIONDECL" HREF="gnome-xml-valid.html#XMLVALIDATENOTATIONDECL"
@ -699,8 +699,8 @@ HREF="gnome-xml-tree.html#XMLATTRPTR"
>xmlAttrPtr</A >xmlAttrPtr</A
> attr, > attr,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value); > *value);
int <A int <A
HREF="gnome-xml-valid.html#XMLVALIDATEDOCUMENTFINAL" HREF="gnome-xml-valid.html#XMLVALIDATEDOCUMENTFINAL"
@ -725,8 +725,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *notationName); > *notationName);
int <A int <A
HREF="gnome-xml-valid.html#XMLISMIXEDELEMENT" HREF="gnome-xml-valid.html#XMLISMIXEDELEMENT"
@ -736,8 +736,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-tree.html#XMLATTRIBUTEPTR" HREF="gnome-xml-tree.html#XMLATTRIBUTEPTR"
@ -750,12 +750,12 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *elem, > *elem,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-tree.html#XMLNOTATIONPTR" HREF="gnome-xml-tree.html#XMLNOTATIONPTR"
@ -768,8 +768,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name); > *name);
<A <A
HREF="gnome-xml-tree.html#XMLELEMENTPTR" HREF="gnome-xml-tree.html#XMLELEMENTPTR"
@ -782,8 +782,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -792,7 +792,7 @@ HREF="gnome-xml-tree.html#CHAR"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN4718" NAME="AEN4724"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -802,14 +802,14 @@ NAME="AEN4718"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN4721" NAME="AEN4727"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4723" NAME="AEN4729"
></A ></A
><H3 ><H3
><A ><A
@ -903,7 +903,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4745" NAME="AEN4751"
></A ></A
><H3 ><H3
><A ><A
@ -997,7 +997,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4767" NAME="AEN4773"
></A ></A
><H3 ><H3
><A ><A
@ -1094,7 +1094,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4790" NAME="AEN4796"
></A ></A
><H3 ><H3
><A ><A
@ -1191,7 +1191,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4813" NAME="AEN4819"
></A ></A
><H3 ><H3
><A ><A
@ -1217,7 +1217,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4818" NAME="AEN4824"
></A ></A
><H3 ><H3
><A ><A
@ -1230,7 +1230,7 @@ NAME="XMLNOTATIONTABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4822" NAME="AEN4828"
></A ></A
><H3 ><H3
><A ><A
@ -1256,7 +1256,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4827" NAME="AEN4833"
></A ></A
><H3 ><H3
><A ><A
@ -1269,7 +1269,7 @@ NAME="XMLELEMENTTABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4831" NAME="AEN4837"
></A ></A
><H3 ><H3
><A ><A
@ -1295,7 +1295,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4836" NAME="AEN4842"
></A ></A
><H3 ><H3
><A ><A
@ -1308,7 +1308,7 @@ NAME="XMLATTRIBUTETABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4840" NAME="AEN4846"
></A ></A
><H3 ><H3
><A ><A
@ -1334,7 +1334,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4845" NAME="AEN4851"
></A ></A
><H3 ><H3
><A ><A
@ -1347,7 +1347,7 @@ NAME="XMLIDTABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4849" NAME="AEN4855"
></A ></A
><H3 ><H3
><A ><A
@ -1373,7 +1373,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4854" NAME="AEN4860"
></A ></A
><H3 ><H3
><A ><A
@ -1386,7 +1386,7 @@ NAME="XMLREFTABLEPTR"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4858" NAME="AEN4864"
></A ></A
><H3 ><H3
><A ><A
@ -1414,16 +1414,16 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *PublicID, > *PublicID,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *SystemID);</PRE > *SystemID);</PRE
></TD ></TD
></TR ></TR
@ -1551,7 +1551,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4899" NAME="AEN4905"
></A ></A
><H3 ><H3
><A ><A
@ -1632,7 +1632,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4920" NAME="AEN4926"
></A ></A
><H3 ><H3
><A ><A
@ -1695,7 +1695,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4936" NAME="AEN4942"
></A ></A
><H3 ><H3
><A ><A
@ -1779,7 +1779,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4957" NAME="AEN4963"
></A ></A
><H3 ><H3
><A ><A
@ -1799,8 +1799,8 @@ CLASS="PROGRAMLISTING"
HREF="gnome-xml-tree.html#XMLELEMENTCONTENTPTR" HREF="gnome-xml-tree.html#XMLELEMENTCONTENTPTR"
>xmlElementContentPtr</A >xmlElementContentPtr</A
> xmlNewElementContent (<A > xmlNewElementContent (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE" HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE"
@ -1881,7 +1881,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN4983" NAME="AEN4989"
></A ></A
><H3 ><H3
><A ><A
@ -1962,7 +1962,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5004" NAME="AEN5010"
></A ></A
><H3 ><H3
><A ><A
@ -2025,7 +2025,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5020" NAME="AEN5026"
></A ></A
><H3 ><H3
><A ><A
@ -2053,8 +2053,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE" HREF="gnome-xml-tree.html#XMLELEMENTCONTENTTYPE"
@ -2190,7 +2190,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5061" NAME="AEN5067"
></A ></A
><H3 ><H3
><A ><A
@ -2271,7 +2271,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5082" NAME="AEN5088"
></A ></A
><H3 ><H3
><A ><A
@ -2334,7 +2334,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5098" NAME="AEN5104"
></A ></A
><H3 ><H3
><A ><A
@ -2418,7 +2418,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5119" NAME="AEN5125"
></A ></A
><H3 ><H3
><A ><A
@ -2438,8 +2438,8 @@ CLASS="PROGRAMLISTING"
HREF="gnome-xml-tree.html#XMLENUMERATIONPTR" HREF="gnome-xml-tree.html#XMLENUMERATIONPTR"
>xmlEnumerationPtr</A >xmlEnumerationPtr</A
> xmlCreateEnumeration (<A > xmlCreateEnumeration (<A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -2499,7 +2499,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5140" NAME="AEN5146"
></A ></A
><H3 ><H3
><A ><A
@ -2562,7 +2562,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5156" NAME="AEN5162"
></A ></A
><H3 ><H3
><A ><A
@ -2643,7 +2643,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5177" NAME="AEN5183"
></A ></A
><H3 ><H3
><A ><A
@ -2671,12 +2671,12 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *elem, > *elem,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name, > *name,
<A <A
HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE" HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE"
@ -2687,8 +2687,8 @@ HREF="gnome-xml-tree.html#XMLATTRIBUTEDEFAULT"
>xmlAttributeDefault</A >xmlAttributeDefault</A
> def, > def,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *defaultValue, > *defaultValue,
<A <A
HREF="gnome-xml-tree.html#XMLENUMERATIONPTR" HREF="gnome-xml-tree.html#XMLENUMERATIONPTR"
@ -2871,7 +2871,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5233" NAME="AEN5239"
></A ></A
><H3 ><H3
><A ><A
@ -2952,7 +2952,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5254" NAME="AEN5260"
></A ></A
><H3 ><H3
><A ><A
@ -3015,7 +3015,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5270" NAME="AEN5276"
></A ></A
><H3 ><H3
><A ><A
@ -3099,7 +3099,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5291" NAME="AEN5297"
></A ></A
><H3 ><H3
><A ><A
@ -3127,8 +3127,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value, > *value,
<A <A
HREF="gnome-xml-tree.html#XMLATTRPTR" HREF="gnome-xml-tree.html#XMLATTRPTR"
@ -3243,7 +3243,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5327" NAME="AEN5333"
></A ></A
><H3 ><H3
><A ><A
@ -3322,7 +3322,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5347" NAME="AEN5353"
></A ></A
><H3 ><H3
><A ><A
@ -3385,7 +3385,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5363" NAME="AEN5369"
></A ></A
><H3 ><H3
><A ><A
@ -3409,8 +3409,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *ID);</PRE > *ID);</PRE
></TD ></TD
></TR ></TR
@ -3487,7 +3487,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5389" NAME="AEN5395"
></A ></A
><H3 ><H3
><A ><A
@ -3609,7 +3609,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5419" NAME="AEN5425"
></A ></A
><H3 ><H3
><A ><A
@ -3637,8 +3637,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value, > *value,
<A <A
HREF="gnome-xml-tree.html#XMLATTRPTR" HREF="gnome-xml-tree.html#XMLATTRPTR"
@ -3753,7 +3753,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5455" NAME="AEN5461"
></A ></A
><H3 ><H3
><A ><A
@ -3832,7 +3832,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5475" NAME="AEN5481"
></A ></A
><H3 ><H3
><A ><A
@ -3895,7 +3895,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5491" NAME="AEN5497"
></A ></A
><H3 ><H3
><A ><A
@ -4017,7 +4017,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5521" NAME="AEN5527"
></A ></A
><H3 ><H3
><A ><A
@ -4120,7 +4120,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5546" NAME="AEN5552"
></A ></A
><H3 ><H3
><A ><A
@ -4245,7 +4245,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5576" NAME="AEN5582"
></A ></A
><H3 ><H3
><A ><A
@ -4372,7 +4372,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5607" NAME="AEN5613"
></A ></A
><H3 ><H3
><A ><A
@ -4393,8 +4393,8 @@ HREF="gnome-xml-tree.html#XMLATTRIBUTETYPE"
>xmlAttributeType</A >xmlAttributeType</A
> type, > type,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value);</PRE > *value);</PRE
></TD ></TD
></TR ></TR
@ -4486,7 +4486,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5636" NAME="AEN5642"
></A ></A
><H3 ><H3
><A ><A
@ -4610,7 +4610,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5666" NAME="AEN5672"
></A ></A
><H3 ><H3
><A ><A
@ -4732,7 +4732,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5697" NAME="AEN5703"
></A ></A
><H3 ><H3
><A ><A
@ -4835,7 +4835,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5723" NAME="AEN5729"
></A ></A
><H3 ><H3
><A ><A
@ -4955,7 +4955,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5753" NAME="AEN5759"
></A ></A
><H3 ><H3
><A ><A
@ -5085,7 +5085,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5785" NAME="AEN5791"
></A ></A
><H3 ><H3
><A ><A
@ -5118,8 +5118,8 @@ HREF="gnome-xml-tree.html#XMLATTRPTR"
>xmlAttrPtr</A >xmlAttrPtr</A
> attr, > attr,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *value);</PRE > *value);</PRE
></TD ></TD
></TR ></TR
@ -5259,7 +5259,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5826" NAME="AEN5832"
></A ></A
><H3 ><H3
><A ><A
@ -5361,7 +5361,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5852" NAME="AEN5858"
></A ></A
><H3 ><H3
><A ><A
@ -5386,8 +5386,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *notationName);</PRE > *notationName);</PRE
></TD ></TD
></TR ></TR
@ -5482,7 +5482,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5882" NAME="AEN5888"
></A ></A
><H3 ><H3
><A ><A
@ -5503,8 +5503,8 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
>xmlDocPtr</A >xmlDocPtr</A
> doc, > doc,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -5582,7 +5582,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5907" NAME="AEN5913"
></A ></A
><H3 ><H3
><A ><A
@ -5606,12 +5606,12 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *elem, > *elem,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -5706,7 +5706,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5938" NAME="AEN5944"
></A ></A
><H3 ><H3
><A ><A
@ -5730,8 +5730,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR
@ -5808,7 +5808,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN5964" NAME="AEN5970"
></A ></A
><H3 ><H3
><A ><A
@ -5832,8 +5832,8 @@ HREF="gnome-xml-tree.html#XMLDTDPTR"
>xmlDtdPtr</A >xmlDtdPtr</A
> dtd, > dtd,
const <A const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *name);</PRE > *name);</PRE
></TD ></TD
></TR ></TR

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN5995" NAME="AEN6001"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN5995"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN5998" NAME="AEN6004"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -187,7 +187,7 @@ HREF="gnome-xml-parser.html#XMLPARSERINPUTPTR"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6010" NAME="AEN6016"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -197,14 +197,14 @@ NAME="AEN6010"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6013" NAME="AEN6019"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6015" NAME="AEN6021"
></A ></A
><H3 ><H3
><A ><A
@ -341,7 +341,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6020" NAME="AEN6026"
></A ></A
><H3 ><H3
><A ><A
@ -438,7 +438,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6043" NAME="AEN6049"
></A ></A
><H3 ><H3
><A ><A
@ -535,7 +535,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6066" NAME="AEN6072"
></A ></A
><H3 ><H3
><A ><A
@ -632,7 +632,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6089" NAME="AEN6095"
></A ></A
><H3 ><H3
><A ><A
@ -729,7 +729,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6112" NAME="AEN6118"
></A ></A
><H3 ><H3
><A ><A
@ -792,7 +792,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6128" NAME="AEN6134"
></A ></A
><H3 ><H3
><A ><A

View File

@ -115,7 +115,7 @@ SIZE="3"
><DIV ><DIV
CLASS="REFNAMEDIV" CLASS="REFNAMEDIV"
><A ><A
NAME="AEN6574" NAME="AEN6580"
></A ></A
><H2 ><H2
>Name</H2 >Name</H2
@ -123,7 +123,7 @@ NAME="AEN6574"
><DIV ><DIV
CLASS="REFSYNOPSISDIV" CLASS="REFSYNOPSISDIV"
><A ><A
NAME="AEN6577" NAME="AEN6583"
></A ></A
><H2 ><H2
>Synopsis</H2 >Synopsis</H2
@ -224,8 +224,8 @@ HREF="XMLXPATHOBJECTPTR"
HREF="gnome-xml-xpath.html#XMLXPATHEVAL" HREF="gnome-xml-xpath.html#XMLXPATHEVAL"
>xmlXPathEval</A >xmlXPathEval</A
> (const <A > (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *str, > *str,
<GTKDOCLINK <GTKDOCLINK
HREF="XMLXPATHCONTEXTPTR" HREF="XMLXPATHCONTEXTPTR"
@ -245,8 +245,8 @@ HREF="XMLXPATHOBJECTPTR"
HREF="gnome-xml-xpath.html#XMLXPATHEVALEXPRESSION" HREF="gnome-xml-xpath.html#XMLXPATHEVALEXPRESSION"
>xmlXPathEvalExpression</A >xmlXPathEvalExpression</A
> (const <A > (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *str, > *str,
<GTKDOCLINK <GTKDOCLINK
HREF="XMLXPATHCONTEXTPTR" HREF="XMLXPATHCONTEXTPTR"
@ -259,7 +259,7 @@ HREF="XMLXPATHCONTEXTPTR"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6611" NAME="AEN6617"
></A ></A
><H2 ><H2
>Description</H2 >Description</H2
@ -269,14 +269,14 @@ NAME="AEN6611"
><DIV ><DIV
CLASS="REFSECT1" CLASS="REFSECT1"
><A ><A
NAME="AEN6614" NAME="AEN6620"
></A ></A
><H2 ><H2
>Details</H2 >Details</H2
><DIV ><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6616" NAME="AEN6622"
></A ></A
><H3 ><H3
><A ><A
@ -302,7 +302,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6621" NAME="AEN6627"
></A ></A
><H3 ><H3
><A ><A
@ -328,7 +328,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6626" NAME="AEN6632"
></A ></A
><H3 ><H3
><A ><A
@ -354,7 +354,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6631" NAME="AEN6637"
></A ></A
><H3 ><H3
><A ><A
@ -380,7 +380,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6636" NAME="AEN6642"
></A ></A
><H3 ><H3
><A ><A
@ -406,7 +406,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6641" NAME="AEN6647"
></A ></A
><H3 ><H3
><A ><A
@ -432,7 +432,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6646" NAME="AEN6652"
></A ></A
><H3 ><H3
><A ><A
@ -526,7 +526,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6669" NAME="AEN6675"
></A ></A
><H3 ><H3
><A ><A
@ -605,7 +605,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6688" NAME="AEN6694"
></A ></A
><H3 ><H3
><A ><A
@ -705,7 +705,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6713" NAME="AEN6719"
></A ></A
><H3 ><H3
><A ><A
@ -784,7 +784,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6732" NAME="AEN6738"
></A ></A
><H3 ><H3
><A ><A
@ -865,7 +865,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6753" NAME="AEN6759"
></A ></A
><H3 ><H3
><A ><A
@ -928,7 +928,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6769" NAME="AEN6775"
></A ></A
><H3 ><H3
><A ><A
@ -948,8 +948,8 @@ CLASS="PROGRAMLISTING"
HREF="XMLXPATHOBJECTPTR" HREF="XMLXPATHOBJECTPTR"
>xmlXPathObjectPtr</GTKDOCLINK >xmlXPathObjectPtr</GTKDOCLINK
> xmlXPathEval (const <A > xmlXPathEval (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *str, > *str,
<GTKDOCLINK <GTKDOCLINK
HREF="XMLXPATHCONTEXTPTR" HREF="XMLXPATHCONTEXTPTR"
@ -1030,7 +1030,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6795" NAME="AEN6801"
></A ></A
><H3 ><H3
><A ><A
@ -1093,7 +1093,7 @@ VALIGN="TOP"
><HR><DIV ><HR><DIV
CLASS="REFSECT2" CLASS="REFSECT2"
><A ><A
NAME="AEN6811" NAME="AEN6817"
></A ></A
><H3 ><H3
><A ><A
@ -1113,8 +1113,8 @@ CLASS="PROGRAMLISTING"
HREF="XMLXPATHOBJECTPTR" HREF="XMLXPATHOBJECTPTR"
>xmlXPathObjectPtr</GTKDOCLINK >xmlXPathObjectPtr</GTKDOCLINK
> xmlXPathEvalExpression (const <A > xmlXPathEvalExpression (const <A
HREF="gnome-xml-tree.html#CHAR" HREF="gnome-xml-tree.html#XMLCHAR"
>CHAR</A >xmlChar</A
> *str, > *str,
<GTKDOCLINK <GTKDOCLINK
HREF="XMLXPATHCONTEXTPTR" HREF="XMLXPATHCONTEXTPTR"

View File

@ -84,6 +84,7 @@
<ANCHOR id ="XMLLOADEXTERNALENTITY" href="gnome-xml/gnome-xml-parser.html#XMLLOADEXTERNALENTITY"> <ANCHOR id ="XMLLOADEXTERNALENTITY" href="gnome-xml/gnome-xml-parser.html#XMLLOADEXTERNALENTITY">
<ANCHOR id ="GNOME-XML-TREE" href="gnome-xml/gnome-xml-tree.html"> <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 ="XMLELEMENTTYPE" href="gnome-xml/gnome-xml-tree.html#XMLELEMENTTYPE">
<ANCHOR id ="XMLCHAR" href="gnome-xml/gnome-xml-tree.html#XMLCHAR">
<ANCHOR id ="CHAR" href="gnome-xml/gnome-xml-tree.html#CHAR"> <ANCHOR id ="CHAR" href="gnome-xml/gnome-xml-tree.html#CHAR">
<ANCHOR id ="BAD-CAST" href="gnome-xml/gnome-xml-tree.html#BAD-CAST"> <ANCHOR id ="BAD-CAST" href="gnome-xml/gnome-xml-tree.html#BAD-CAST">
<ANCHOR id ="XMLNOTATIONPTR" href="gnome-xml/gnome-xml-tree.html#XMLNOTATIONPTR"> <ANCHOR id ="XMLNOTATIONPTR" href="gnome-xml/gnome-xml-tree.html#XMLNOTATIONPTR">

View File

@ -279,14 +279,14 @@ beginning of the second attribute of the root element "EXAMPLE".</p>
<p>functions are provided to read and write the document content:</p> <p>functions are provided to read and write the document content:</p>
<dl> <dl>
<dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const CHAR *name, const <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
CHAR *value);</code></dt> xmlChar *value);</code></dt>
<dd><p>This set (or change) an attribute carried by an ELEMENT node the <dd><p>This set (or change) an attribute carried by an ELEMENT node the
value can be NULL</p> value can be NULL</p>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt><code>const CHAR *xmlGetProp(xmlNodePtr node, const CHAR <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar
*name);</code></dt> *name);</code></dt>
<dd><p>This function returns a pointer to the property content, note that <dd><p>This function returns a pointer to the property content, note that
no extra copy is made</p> no extra copy is made</p>
@ -296,7 +296,7 @@ beginning of the second attribute of the root element "EXAMPLE".</p>
<p>Two functions must be used to read an write the text associated to <p>Two functions must be used to read an write the text associated to
elements:</p> elements:</p>
<dl> <dl>
<dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const CHAR <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
*value);</code></dt> *value);</code></dt>
<dd><p>This function takes an "external" string and convert it to one text <dd><p>This function takes an "external" string and convert it to one text
node or possibly to a list of entity and text nodes. All non-predefined node or possibly to a list of entity and text nodes. All non-predefined
@ -306,7 +306,7 @@ elements:</p>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt><code>CHAR *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int
inLine);</code></dt> inLine);</code></dt>
<dd><p>this is the dual function, which generate a new string containing <dd><p>this is the dual function, which generate a new string containing
the content of the text and entity nodes. Note the extra argument the content of the text and entity nodes. Note the extra argument
@ -321,7 +321,7 @@ elements:</p>
<p>Basically 3 options are possible:</p> <p>Basically 3 options are possible:</p>
<dl> <dl>
<dt><code>void xmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int
*size);</code></dt> *size);</code></dt>
<dd><p>returns a buffer where the document has been saved</p> <dd><p>returns a buffer where the document has been saved</p>
</dd> </dd>
@ -747,6 +747,6 @@ base under gnome-xml/example</p>
<p><a href="mailto:Daniel.Veillard@w3.org">Daniel Veillard</a></p> <p><a href="mailto:Daniel.Veillard@w3.org">Daniel Veillard</a></p>
<p>$Id: xml.html,v 1.7 1999/09/04 18:27:23 veillard Exp $</p> <p>$Id: xml.html,v 1.8 1999/09/08 21:35:25 veillard Exp $</p>
</body> </body>
</html> </html>

View File

@ -59,8 +59,8 @@ void xmlFreeEntity(xmlEntityPtr entity) {
* xmlAddEntity : register a new entity for an entities table. * xmlAddEntity : register a new entity for an entities table.
*/ */
static void static void
xmlAddEntity(xmlEntitiesTablePtr table, const CHAR *name, int type, xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type,
const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) {
int i; int i;
xmlEntityPtr cur; xmlEntityPtr cur;
int len; int len;
@ -126,10 +126,10 @@ xmlAddEntity(xmlEntitiesTablePtr table, const CHAR *name, int type,
*/ */
void xmlInitializePredefinedEntities(void) { void xmlInitializePredefinedEntities(void) {
int i; int i;
CHAR name[50]; xmlChar name[50];
CHAR value[50]; xmlChar value[50];
const char *in; const char *in;
CHAR *out; xmlChar *out;
if (xmlPredefinedEntities != NULL) return; if (xmlPredefinedEntities != NULL) return;
@ -138,11 +138,11 @@ void xmlInitializePredefinedEntities(void) {
sizeof(xmlPredefinedEntityValues[0]);i++) { sizeof(xmlPredefinedEntityValues[0]);i++) {
in = xmlPredefinedEntityValues[i].name; in = xmlPredefinedEntityValues[i].name;
out = &name[0]; out = &name[0];
for (;(*out++ = (CHAR) *in);)in++; for (;(*out++ = (xmlChar) *in);)in++;
in = xmlPredefinedEntityValues[i].value; in = xmlPredefinedEntityValues[i].value;
out = &value[0]; out = &value[0];
for (;(*out++ = (CHAR) *in);)in++; for (;(*out++ = (xmlChar) *in);)in++;
xmlAddEntity(xmlPredefinedEntities, (const CHAR *) &name[0], xmlAddEntity(xmlPredefinedEntities, (const xmlChar *) &name[0],
XML_INTERNAL_PREDEFINED_ENTITY, NULL, NULL, XML_INTERNAL_PREDEFINED_ENTITY, NULL, NULL,
&value[0]); &value[0]);
} }
@ -157,7 +157,7 @@ void xmlInitializePredefinedEntities(void) {
* Returns NULL if not, othervise the entity * Returns NULL if not, othervise the entity
*/ */
xmlEntityPtr xmlEntityPtr
xmlGetPredefinedEntity(const CHAR *name) { xmlGetPredefinedEntity(const xmlChar *name) {
int i; int i;
xmlEntityPtr cur; xmlEntityPtr cur;
@ -182,8 +182,8 @@ xmlGetPredefinedEntity(const CHAR *name) {
* Register a new entity for this document DTD. * Register a new entity for this document DTD.
*/ */
void void
xmlAddDtdEntity(xmlDocPtr doc, const CHAR *name, int type, xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type,
const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) {
xmlEntitiesTablePtr table; xmlEntitiesTablePtr table;
if (doc->extSubset == NULL) { if (doc->extSubset == NULL) {
@ -211,8 +211,8 @@ xmlAddDtdEntity(xmlDocPtr doc, const CHAR *name, int type,
* Register a new entity for this document. * Register a new entity for this document.
*/ */
void void
xmlAddDocEntity(xmlDocPtr doc, const CHAR *name, int type, xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type,
const CHAR *ExternalID, const CHAR *SystemID, const CHAR *content) { const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) {
xmlEntitiesTablePtr table; xmlEntitiesTablePtr table;
if (doc == NULL) { if (doc == NULL) {
@ -244,7 +244,7 @@ xmlAddDocEntity(xmlDocPtr doc, const CHAR *name, int type,
* Returns A pointer to the entity structure or NULL if not found. * Returns A pointer to the entity structure or NULL if not found.
*/ */
xmlEntityPtr xmlEntityPtr
xmlGetParameterEntity(xmlDocPtr doc, const CHAR *name) { xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) {
int i; int i;
xmlEntityPtr cur; xmlEntityPtr cur;
xmlEntitiesTablePtr table; xmlEntitiesTablePtr table;
@ -290,7 +290,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const CHAR *name) {
* Returns A pointer to the entity structure or NULL if not found. * Returns A pointer to the entity structure or NULL if not found.
*/ */
xmlEntityPtr xmlEntityPtr
xmlGetDtdEntity(xmlDocPtr doc, const CHAR *name) { xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) {
int i; int i;
xmlEntityPtr cur; xmlEntityPtr cur;
xmlEntitiesTablePtr table; xmlEntitiesTablePtr table;
@ -319,7 +319,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const CHAR *name) {
* Returns A pointer to the entity structure or NULL if not found. * Returns A pointer to the entity structure or NULL if not found.
*/ */
xmlEntityPtr xmlEntityPtr
xmlGetDocEntity(xmlDocPtr doc, const CHAR *name) { xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
int i; int i;
xmlEntityPtr cur; xmlEntityPtr cur;
xmlEntitiesTablePtr table; xmlEntitiesTablePtr table;
@ -368,11 +368,11 @@ xmlGetDocEntity(xmlDocPtr doc, const CHAR *name) {
* A buffer used for converting entities to their equivalent and back. * A buffer used for converting entities to their equivalent and back.
*/ */
static int buffer_size = 0; static int buffer_size = 0;
static CHAR *buffer = NULL; static xmlChar *buffer = NULL;
void growBuffer(void) { void growBuffer(void) {
buffer_size *= 2; buffer_size *= 2;
buffer = (CHAR *) xmlRealloc(buffer, buffer_size * sizeof(CHAR)); buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar));
if (buffer == NULL) { if (buffer == NULL) {
perror("realloc failed"); perror("realloc failed");
exit(1); exit(1);
@ -396,10 +396,10 @@ void growBuffer(void) {
* *
* Returns A newly allocated string with the substitution done. * Returns A newly allocated string with the substitution done.
*/ */
const CHAR * const xmlChar *
xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) { xmlEncodeEntities(xmlDocPtr doc, const xmlChar *input) {
const CHAR *cur = input; const xmlChar *cur = input;
CHAR *out = buffer; xmlChar *out = buffer;
static int warning = 1; static int warning = 1;
if (warning) { if (warning) {
@ -411,7 +411,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) {
if (input == NULL) return(NULL); if (input == NULL) return(NULL);
if (buffer == NULL) { if (buffer == NULL) {
buffer_size = 1000; buffer_size = 1000;
buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
if (buffer == NULL) { if (buffer == NULL) {
perror("malloc failed"); perror("malloc failed");
exit(1); exit(1);
@ -466,7 +466,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) {
*/ */
*out++ = *cur; *out++ = *cur;
#ifndef USE_UTF_8 #ifndef USE_UTF_8
} else if ((sizeof(CHAR) == 1) && (*cur >= 0x80)) { } else if ((sizeof(xmlChar) == 1) && (*cur >= 0x80)) {
char buf[10], *ptr; char buf[10], *ptr;
#ifdef HAVE_SNPRINTF #ifdef HAVE_SNPRINTF
snprintf(buf, 9, "&#%d;", *cur); snprintf(buf, 9, "&#%d;", *cur);
@ -507,7 +507,7 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) {
*/ */
#define growBufferReentrant() { \ #define growBufferReentrant() { \
buffer_size *= 2; \ buffer_size *= 2; \
buffer = (CHAR *) xmlRealloc(buffer, buffer_size * sizeof(CHAR)); \ buffer = (xmlChar *) xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
if (buffer == NULL) { \ if (buffer == NULL) { \
perror("realloc failed"); \ perror("realloc failed"); \
exit(1); \ exit(1); \
@ -530,11 +530,11 @@ xmlEncodeEntities(xmlDocPtr doc, const CHAR *input) {
* *
* Returns A newly allocated string with the substitution done. * Returns A newly allocated string with the substitution done.
*/ */
CHAR * xmlChar *
xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) { xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
const CHAR *cur = input; const xmlChar *cur = input;
CHAR *buffer = NULL; xmlChar *buffer = NULL;
CHAR *out = NULL; xmlChar *out = NULL;
int buffer_size = 0; int buffer_size = 0;
if (input == NULL) return(NULL); if (input == NULL) return(NULL);
@ -543,7 +543,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) {
* allocate an translation buffer. * allocate an translation buffer.
*/ */
buffer_size = 1000; buffer_size = 1000;
buffer = (CHAR *) xmlMalloc(buffer_size * sizeof(CHAR)); buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
if (buffer == NULL) { if (buffer == NULL) {
perror("malloc failed"); perror("malloc failed");
exit(1); exit(1);
@ -598,7 +598,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const CHAR *input) {
*/ */
*out++ = *cur; *out++ = *cur;
#ifndef USE_UTF_8 #ifndef USE_UTF_8
} else if ((sizeof(CHAR) == 1) && (*cur >= 0x80)) { } else if ((sizeof(xmlChar) == 1) && (*cur >= 0x80)) {
char buf[10], *ptr; char buf[10], *ptr;
#ifdef HAVE_SNPRINTF #ifdef HAVE_SNPRINTF
snprintf(buf, 9, "&#%d;", *cur); snprintf(buf, 9, "&#%d;", *cur);

View File

@ -30,11 +30,11 @@ extern "C" {
typedef struct xmlEntity { typedef struct xmlEntity {
int type; /* The entity type */ int type; /* The entity type */
int len; /* The lenght of the name */ int len; /* The lenght of the name */
const CHAR *name; /* Name of the entity */ const xmlChar *name; /* Name of the entity */
const CHAR *ExternalID; /* External identifier for PUBLIC Entity */ const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */
const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
CHAR *content; /* The entity content or ndata if unparsed */ xmlChar *content; /* The entity content or ndata if unparsed */
CHAR *orig; /* The entity cont without ref substitution */ xmlChar *orig; /* The entity cont without ref substitution */
} xmlEntity; } xmlEntity;
typedef xmlEntity *xmlEntityPtr; typedef xmlEntity *xmlEntityPtr;
@ -60,28 +60,28 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
#include "parser.h" #include "parser.h"
void xmlAddDocEntity (xmlDocPtr doc, void xmlAddDocEntity (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
int type, int type,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID, const xmlChar *SystemID,
const CHAR *content); const xmlChar *content);
void xmlAddDtdEntity (xmlDocPtr doc, void xmlAddDtdEntity (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
int type, int type,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID, const xmlChar *SystemID,
const CHAR *content); const xmlChar *content);
xmlEntityPtr xmlGetPredefinedEntity (const CHAR *name); xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name);
xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
const CHAR * xmlEncodeEntities (xmlDocPtr doc, const xmlChar * xmlEncodeEntities (xmlDocPtr doc,
const CHAR *input); const xmlChar *input);
CHAR * xmlEncodeEntitiesReentrant(xmlDocPtr doc, xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const CHAR *input); const xmlChar *input);
xmlEntitiesTablePtr xmlCreateEntitiesTable (void); xmlEntitiesTablePtr xmlCreateEntitiesTable (void);
xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table);

View File

@ -37,7 +37,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
void void
xmlParserPrintFileContext(xmlParserInputPtr input) { xmlParserPrintFileContext(xmlParserInputPtr input) {
const CHAR *cur, *base; const xmlChar *cur, *base;
int n; int n;
cur = input->cur; cur = input->cur;

View File

@ -48,16 +48,16 @@ typedef struct htmlEntityDesc {
/* /*
* There is only few public functions. * There is only few public functions.
*/ */
htmlElemDescPtr htmlTagLookup(const CHAR *tag); htmlElemDescPtr htmlTagLookup(const xmlChar *tag);
htmlEntityDescPtr htmlEntityLookup(const CHAR *name); htmlEntityDescPtr htmlEntityLookup(const xmlChar *name);
htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str); htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, xmlChar **str);
int htmlParseCharRef(htmlParserCtxtPtr ctxt); int htmlParseCharRef(htmlParserCtxtPtr ctxt);
void htmlParseElement(htmlParserCtxtPtr ctxt); void htmlParseElement(htmlParserCtxtPtr ctxt);
htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding, htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding,
htmlSAXHandlerPtr sax, void *userData); 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, htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding,
htmlSAXHandlerPtr sax, void *userData); htmlSAXHandlerPtr sax, void *userData);
htmlDocPtr htmlParseFile(const char *filename, const char *encoding); htmlDocPtr htmlParseFile(const char *filename, const char *encoding);

View File

@ -9,7 +9,7 @@
#define __DEBUG_XML__ #define __DEBUG_XML__
#include "tree.h" #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 xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth);
extern void xmlDebugDumpAttrList(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 xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth);

View File

@ -30,11 +30,11 @@ extern "C" {
typedef struct xmlEntity { typedef struct xmlEntity {
int type; /* The entity type */ int type; /* The entity type */
int len; /* The lenght of the name */ int len; /* The lenght of the name */
const CHAR *name; /* Name of the entity */ const xmlChar *name; /* Name of the entity */
const CHAR *ExternalID; /* External identifier for PUBLIC Entity */ const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */
const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
CHAR *content; /* The entity content or ndata if unparsed */ xmlChar *content; /* The entity content or ndata if unparsed */
CHAR *orig; /* The entity cont without ref substitution */ xmlChar *orig; /* The entity cont without ref substitution */
} xmlEntity; } xmlEntity;
typedef xmlEntity *xmlEntityPtr; typedef xmlEntity *xmlEntityPtr;
@ -60,28 +60,28 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
#include "parser.h" #include "parser.h"
void xmlAddDocEntity (xmlDocPtr doc, void xmlAddDocEntity (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
int type, int type,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID, const xmlChar *SystemID,
const CHAR *content); const xmlChar *content);
void xmlAddDtdEntity (xmlDocPtr doc, void xmlAddDtdEntity (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
int type, int type,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID, const xmlChar *SystemID,
const CHAR *content); const xmlChar *content);
xmlEntityPtr xmlGetPredefinedEntity (const CHAR *name); xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name);
xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
const CHAR * xmlEncodeEntities (xmlDocPtr doc, const xmlChar * xmlEncodeEntities (xmlDocPtr doc,
const CHAR *input); const xmlChar *input);
CHAR * xmlEncodeEntitiesReentrant(xmlDocPtr doc, xmlChar * xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const CHAR *input); const xmlChar *input);
xmlEntitiesTablePtr xmlCreateEntitiesTable (void); xmlEntitiesTablePtr xmlCreateEntitiesTable (void);
xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table);

View File

@ -31,18 +31,18 @@ extern "C" {
* progressive reading and I18N conversions to the internal UTF-8 format. * progressive reading and I18N conversions to the internal UTF-8 format.
*/ */
typedef void (* xmlParserInputDeallocate)(CHAR *); typedef void (* xmlParserInputDeallocate)(xmlChar *);
typedef struct xmlParserInput { typedef struct xmlParserInput {
/* Input buffer */ /* Input buffer */
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
const char *filename; /* The file analyzed, if any */ const char *filename; /* The file analyzed, if any */
const char *directory; /* the directory/base of teh file */ const char *directory; /* the directory/base of teh file */
const CHAR *base; /* Base of the array to parse */ const xmlChar *base; /* Base of the array to parse */
const CHAR *cur; /* Current char being parsed */ const xmlChar *cur; /* Current char being parsed */
int line; /* Current line */ int line; /* Current line */
int col; /* Current column */ 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 */ xmlParserInputDeallocate free; /* function to deallocate the base */
} xmlParserInput; } xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr; typedef xmlParserInput *xmlParserInputPtr;
@ -107,8 +107,8 @@ typedef struct _xmlParserCtxt {
xmlDocPtr myDoc; /* the document being built */ xmlDocPtr myDoc; /* the document being built */
int wellFormed; /* is the document well formed */ int wellFormed; /* is the document well formed */
int replaceEntities; /* shall we replace entities ? */ int replaceEntities; /* shall we replace entities ? */
const CHAR *version; /* the XML version string */ const xmlChar *version; /* the XML version string */
const CHAR *encoding; /* encoding, if any */ const xmlChar *encoding; /* encoding, if any */
int standalone; /* standalone document */ int standalone; /* standalone document */
int html; /* are we parsing an HTML document */ int html; /* are we parsing an HTML document */
@ -127,7 +127,7 @@ typedef struct _xmlParserCtxt {
int record_info; /* Whether node info should be kept */ int record_info; /* Whether node info should be kept */
xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
int errno; /* error code */ int errNo; /* error code */
int hasExternalSubset; /* reference and external subset */ int hasExternalSubset; /* reference and external subset */
int hasPErefs; /* the internal subset has PE refs */ int hasPErefs; /* the internal subset has PE refs */
@ -149,8 +149,8 @@ typedef xmlParserCtxt *xmlParserCtxtPtr;
* a SAX Locator. * a SAX Locator.
*/ */
typedef struct xmlSAXLocator { typedef struct xmlSAXLocator {
const CHAR *(*getPublicId)(void *ctx); const xmlChar *(*getPublicId)(void *ctx);
const CHAR *(*getSystemId)(void *ctx); const xmlChar *(*getSystemId)(void *ctx);
int (*getLineNumber)(void *ctx); int (*getLineNumber)(void *ctx);
int (*getColumnNumber)(void *ctx); int (*getColumnNumber)(void *ctx);
} _xmlSAXLocator; } _xmlSAXLocator;
@ -165,44 +165,44 @@ typedef xmlSAXLocator *xmlSAXLocatorPtr;
#include "entities.h" #include "entities.h"
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
const CHAR *publicId, const CHAR *systemId); const xmlChar *publicId, const xmlChar *systemId);
typedef void (*internalSubsetSAXFunc) (void *ctx, const CHAR *name, typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID); const xmlChar *ExternalID, const xmlChar *SystemID);
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
const CHAR *name); const xmlChar *name);
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
const CHAR *name); const xmlChar *name);
typedef void (*entityDeclSAXFunc) (void *ctx, typedef void (*entityDeclSAXFunc) (void *ctx,
const CHAR *name, int type, const CHAR *publicId, const xmlChar *name, int type, const xmlChar *publicId,
const CHAR *systemId, CHAR *content); const xmlChar *systemId, xmlChar *content);
typedef void (*notationDeclSAXFunc)(void *ctx, const CHAR *name, typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId); const xmlChar *publicId, const xmlChar *systemId);
typedef void (*attributeDeclSAXFunc)(void *ctx, const CHAR *elem, typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem,
const CHAR *name, int type, int def, const xmlChar *name, int type, int def,
const CHAR *defaultValue, xmlEnumerationPtr tree); const xmlChar *defaultValue, xmlEnumerationPtr tree);
typedef void (*elementDeclSAXFunc)(void *ctx, const CHAR *name, typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name,
int type, xmlElementContentPtr content); int type, xmlElementContentPtr content);
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
const CHAR *name, const CHAR *publicId, const xmlChar *name, const xmlChar *publicId,
const CHAR *systemId, const CHAR *notationName); const xmlChar *systemId, const xmlChar *notationName);
typedef void (*setDocumentLocatorSAXFunc) (void *ctx, typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
xmlSAXLocatorPtr loc); xmlSAXLocatorPtr loc);
typedef void (*startDocumentSAXFunc) (void *ctx); typedef void (*startDocumentSAXFunc) (void *ctx);
typedef void (*endDocumentSAXFunc) (void *ctx); typedef void (*endDocumentSAXFunc) (void *ctx);
typedef void (*startElementSAXFunc) (void *ctx, const CHAR *name, typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name,
const CHAR **atts); const xmlChar **atts);
typedef void (*endElementSAXFunc) (void *ctx, const CHAR *name); typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name);
typedef void (*attributeSAXFunc) (void *ctx, const CHAR *name, typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name,
const CHAR *value); const xmlChar *value);
typedef void (*referenceSAXFunc) (void *ctx, const CHAR *name); typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name);
typedef void (*charactersSAXFunc) (void *ctx, const CHAR *ch, typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch,
int len); int len);
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const CHAR *ch, int len); const xmlChar *ch, int len);
typedef void (*processingInstructionSAXFunc) (void *ctx, typedef void (*processingInstructionSAXFunc) (void *ctx,
const CHAR *target, const CHAR *data); const xmlChar *target, const xmlChar *data);
typedef void (*commentSAXFunc) (void *ctx, const CHAR *value); typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value);
typedef void (*cdataBlockSAXFunc) (void *ctx, const CHAR *value, int len); typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar *value, int len);
typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...); typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...);
typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...); typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...);
typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...); typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...);
@ -270,34 +270,34 @@ int xmlParserInputGrow (xmlParserInputPtr in,
int len); int len);
/** /**
* CHAR handling * xmlChar handling
*/ */
CHAR * xmlStrdup (const CHAR *cur); xmlChar * xmlStrdup (const xmlChar *cur);
CHAR * xmlStrndup (const CHAR *cur, xmlChar * xmlStrndup (const xmlChar *cur,
int len); int len);
CHAR * xmlStrsub (const CHAR *str, xmlChar * xmlStrsub (const xmlChar *str,
int start, int start,
int len); int len);
const CHAR * xmlStrchr (const CHAR *str, const xmlChar * xmlStrchr (const xmlChar *str,
CHAR val); xmlChar val);
const CHAR * xmlStrstr (const CHAR *str, const xmlChar * xmlStrstr (const xmlChar *str,
CHAR *val); xmlChar *val);
int xmlStrcmp (const CHAR *str1, int xmlStrcmp (const xmlChar *str1,
const CHAR *str2); const xmlChar *str2);
int xmlStrncmp (const CHAR *str1, int xmlStrncmp (const xmlChar *str1,
const CHAR *str2, const xmlChar *str2,
int len); int len);
int xmlStrlen (const CHAR *str); int xmlStrlen (const xmlChar *str);
CHAR * xmlStrcat (CHAR *cur, xmlChar * xmlStrcat (xmlChar *cur,
const CHAR *add); const xmlChar *add);
CHAR * xmlStrncat (CHAR *cur, xmlChar * xmlStrncat (xmlChar *cur,
const CHAR *add, const xmlChar *add,
int len); int len);
/** /**
* Basic parsing Interfaces * Basic parsing Interfaces
*/ */
xmlDocPtr xmlParseDoc (CHAR *cur); xmlDocPtr xmlParseDoc (xmlChar *cur);
xmlDocPtr xmlParseMemory (char *buffer, xmlDocPtr xmlParseMemory (char *buffer,
int size); int size);
xmlDocPtr xmlParseFile (const char *filename); xmlDocPtr xmlParseFile (const char *filename);
@ -306,7 +306,7 @@ int xmlSubstituteEntitiesDefault(int val);
/** /**
* Recovery mode * Recovery mode
*/ */
xmlDocPtr xmlRecoverDoc (CHAR *cur); xmlDocPtr xmlRecoverDoc (xmlChar *cur);
xmlDocPtr xmlRecoverMemory (char *buffer, xmlDocPtr xmlRecoverMemory (char *buffer,
int size); int size);
xmlDocPtr xmlRecoverFile (const char *filename); xmlDocPtr xmlRecoverFile (const char *filename);
@ -316,7 +316,7 @@ xmlDocPtr xmlRecoverFile (const char *filename);
*/ */
int xmlParseDocument (xmlParserCtxtPtr ctxt); int xmlParseDocument (xmlParserCtxtPtr ctxt);
xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
CHAR *cur, xmlChar *cur,
int recovery); int recovery);
xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
char *buffer, char *buffer,
@ -325,15 +325,15 @@ xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename, const char *filename,
int recovery); int recovery);
xmlDtdPtr xmlParseDTD (const CHAR *ExternalID, xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); void xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
void xmlClearParserCtxt (xmlParserCtxtPtr ctxt); void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const CHAR* buffer, const xmlChar* buffer,
const char* filename); const char* filename);
void xmlDefaultSAXHandlerInit(void); void xmlDefaultSAXHandlerInit(void);
void htmlDefaultSAXHandlerInit(void); void htmlDefaultSAXHandlerInit(void);

View File

@ -511,7 +511,7 @@ typedef unsigned char CHARVAL;
/** /**
* Parser context * Parser context
*/ */
xmlParserCtxtPtr xmlCreateDocParserCtxt (CHAR *cur); xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);
xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename);
xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer,
int size); int size);
@ -533,7 +533,7 @@ xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity); xmlEntityPtr entity);
void xmlPushInput (xmlParserCtxtPtr ctxt, void xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input); xmlParserInputPtr input);
CHAR xmlPopInput (xmlParserCtxtPtr ctxt); xmlChar xmlPopInput (xmlParserCtxtPtr ctxt);
void xmlFreeInputStream (xmlParserInputPtr input); void xmlFreeInputStream (xmlParserInputPtr input);
xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename); const char *filename);
@ -541,38 +541,38 @@ xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
/** /**
* Namespaces. * Namespaces.
*/ */
CHAR * xmlSplitQName (const CHAR *name, xmlChar * xmlSplitQName (const xmlChar *name,
CHAR **prefix); xmlChar **prefix);
CHAR * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
CHAR * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
CHAR **prefix); xmlChar **prefix);
CHAR * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
CHAR * xmlParseQuotedString (xmlParserCtxtPtr ctxt); xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt);
void xmlParseNamespace (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt);
/** /**
* Generic production rules * Generic production rules
*/ */
CHAR * xmlScanName (xmlParserCtxtPtr ctxt); xmlChar * xmlScanName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseName (xmlParserCtxtPtr ctxt); xmlChar * xmlParseName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseNmtoken (xmlParserCtxtPtr ctxt); xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEntityValue (xmlParserCtxtPtr ctxt, xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt,
CHAR **orig); xmlChar **orig);
CHAR * xmlParseAttValue (xmlParserCtxtPtr ctxt); xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt);
CHAR * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
CHAR * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
void xmlParseCharData (xmlParserCtxtPtr ctxt, void xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata); int cdata);
CHAR * xmlParseExternalID (xmlParserCtxtPtr ctxt, xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt,
CHAR **publicID, xmlChar **publicID,
int strict); int strict);
void xmlParseComment (xmlParserCtxtPtr ctxt); void xmlParseComment (xmlParserCtxtPtr ctxt);
CHAR * xmlParsePITarget (xmlParserCtxtPtr ctxt); xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt);
void xmlParsePI (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt);
void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
CHAR **value); xmlChar **value);
xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt);
xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
@ -585,7 +585,7 @@ xmlElementContentPtr xmlParseElementMixedContentDecl
xmlElementContentPtr xmlParseElementChildrenContentDecl xmlElementContentPtr xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt); (xmlParserCtxtPtr ctxt);
int xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, int xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
CHAR *name, xmlChar *name,
xmlElementContentPtr *result); xmlElementContentPtr *result);
int xmlParseElementDecl (xmlParserCtxtPtr ctxt); int xmlParseElementDecl (xmlParserCtxtPtr ctxt);
void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
@ -594,24 +594,24 @@ xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt);
void xmlParseReference (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt);
void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt);
void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
CHAR * xmlParseAttribute (xmlParserCtxtPtr ctxt, xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt,
CHAR **value); xmlChar **value);
CHAR * xmlParseStartTag (xmlParserCtxtPtr ctxt); xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt);
void xmlParseEndTag (xmlParserCtxtPtr ctxt, void xmlParseEndTag (xmlParserCtxtPtr ctxt,
CHAR *tagname); xmlChar *tagname);
void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseCDSect (xmlParserCtxtPtr ctxt);
void xmlParseContent (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt);
void xmlParseElement (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt);
CHAR * xmlParseVersionNum (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt);
CHAR * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEncName (xmlParserCtxtPtr ctxt); xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
int xmlParseSDDecl (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt);
void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
void xmlParseMisc (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt);
void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
/* /*
* Entities substitution * Entities substitution
*/ */
@ -620,12 +620,12 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
#define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_PEREF 2
#define XML_SUBSTITUTE_BOTH 3 #define XML_SUBSTITUTE_BOTH 3
CHAR * xmlDecodeEntities (xmlParserCtxtPtr ctxt, xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len, int len,
int what, int what,
CHAR end, xmlChar end,
CHAR end2, xmlChar end2,
CHAR end3); xmlChar end3);
/* /*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP

View File

@ -44,25 +44,32 @@ typedef enum {
* Currently we use 8bit chars internal representation for memory efficiency, * Currently we use 8bit chars internal representation for memory efficiency,
* but the parser is not tied to that, just define UNICODE to switch to * 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 * 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. * input.
*/ */
#ifdef UNICODE #ifdef UNICODE
typedef unsigned short CHAR; typedef unsigned short xmlChar;
#else #else
typedef unsigned char CHAR; typedef unsigned char xmlChar;
#endif #endif
#define BAD_CAST (CHAR *) #ifndef WIN32
#ifndef CHAR
#define CHAR xmlChar
#endif
#endif
#define BAD_CAST (xmlChar *)
/* /*
* a DTD Notation definition * a DTD Notation definition
*/ */
typedef struct xmlNotation { typedef struct xmlNotation {
const CHAR *name; /* Notation name */ const xmlChar *name; /* Notation name */
const CHAR *PublicID; /* Public identifier, if any */ const xmlChar *PublicID; /* Public identifier, if any */
const CHAR *SystemID; /* System identifier, if any */ const xmlChar *SystemID; /* System identifier, if any */
} xmlNotation; } xmlNotation;
typedef xmlNotation *xmlNotationPtr; typedef xmlNotation *xmlNotationPtr;
@ -92,17 +99,17 @@ typedef enum {
typedef struct xmlEnumeration { typedef struct xmlEnumeration {
struct xmlEnumeration *next; /* next one */ struct xmlEnumeration *next; /* next one */
const CHAR *name; /* Enumeration name */ const xmlChar *name; /* Enumeration name */
} xmlEnumeration; } xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr; typedef xmlEnumeration *xmlEnumerationPtr;
typedef struct xmlAttribute { typedef struct xmlAttribute {
const CHAR *elem; /* Element holding the attribute */ const xmlChar *elem; /* Element holding the attribute */
const CHAR *name; /* Attribute name */ const xmlChar *name; /* Attribute name */
struct xmlAttribute *next; /* list of attributes of an element */ struct xmlAttribute *next; /* list of attributes of an element */
xmlAttributeType type; /* The type */ xmlAttributeType type; /* The type */
xmlAttributeDefault def; /* the default */ 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 */ xmlEnumerationPtr tree; /* or the enumeration tree if any */
} xmlAttribute; } xmlAttribute;
typedef xmlAttribute *xmlAttributePtr; typedef xmlAttribute *xmlAttributePtr;
@ -127,7 +134,7 @@ typedef enum {
typedef struct xmlElementContent { typedef struct xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
const CHAR *name; /* Element name */ const xmlChar *name; /* Element name */
struct xmlElementContent *c1; /* first child */ struct xmlElementContent *c1; /* first child */
struct xmlElementContent *c2; /* second child */ struct xmlElementContent *c2; /* second child */
} xmlElementContent; } xmlElementContent;
@ -141,7 +148,7 @@ typedef enum {
} xmlElementTypeVal; } xmlElementTypeVal;
typedef struct xmlElement { typedef struct xmlElement {
const CHAR *name; /* Element name */ const xmlChar *name; /* Element name */
xmlElementTypeVal type; /* The type */ xmlElementTypeVal type; /* The type */
xmlElementContentPtr content; /* the allowed element content */ xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */ xmlAttributePtr attributes; /* List of the declared attributes */
@ -162,8 +169,8 @@ typedef enum {
typedef struct xmlNs { typedef struct xmlNs {
struct xmlNs *next; /* next Ns link for this node */ struct xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */ xmlNsType type; /* global or local */
const CHAR *href; /* URL for the namespace */ const xmlChar *href; /* URL for the namespace */
const CHAR *prefix; /* prefix for the namespace */ const xmlChar *prefix; /* prefix for the namespace */
} xmlNs; } xmlNs;
typedef xmlNs *xmlNsPtr; typedef xmlNs *xmlNsPtr;
@ -171,9 +178,9 @@ typedef xmlNs *xmlNsPtr;
* An XML DtD, as defined by <!DOCTYPE. * An XML DtD, as defined by <!DOCTYPE.
*/ */
typedef struct xmlDtd { typedef struct xmlDtd {
const CHAR *name; /* Name of the DTD */ const xmlChar *name; /* Name of the DTD */
const CHAR *ExternalID; /* External identifier for PUBLIC DTD */ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *notations; /* Hash table for notations if any */ void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */ void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */ void *attributes; /* Hash table for attributes if any */
@ -193,7 +200,7 @@ typedef struct xmlAttr {
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */
struct xmlNode *node; /* attr->node link */ struct xmlNode *node; /* attr->node link */
struct xmlAttr *next; /* attribute list 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 */ struct xmlNode *val; /* the value of the property */
xmlNs *ns; /* pointer to the associated namespace */ xmlNs *ns; /* pointer to the associated namespace */
} xmlAttr; } xmlAttr;
@ -205,7 +212,7 @@ typedef xmlAttr *xmlAttrPtr;
typedef struct xmlID { typedef struct xmlID {
struct xmlID *next; /* next ID */ struct xmlID *next; /* next ID */
const CHAR *value; /* The ID name */ const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribut holding it */ xmlAttrPtr attr; /* The attribut holding it */
} xmlID; } xmlID;
typedef xmlID *xmlIDPtr; typedef xmlID *xmlIDPtr;
@ -216,7 +223,7 @@ typedef xmlID *xmlIDPtr;
typedef struct xmlRef { typedef struct xmlRef {
struct xmlRef *next; /* next Ref */ struct xmlRef *next; /* next Ref */
const CHAR *value; /* The Ref name */ const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribut holding it */ xmlAttrPtr attr; /* The attribut holding it */
} xmlRef; } xmlRef;
typedef xmlRef *xmlRefPtr; typedef xmlRef *xmlRefPtr;
@ -237,10 +244,10 @@ typedef struct xmlNode {
struct xmlNode *childs; /* parent->childs link */ struct xmlNode *childs; /* parent->childs link */
struct xmlNode *last; /* last child link */ struct xmlNode *last; /* last child link */
struct xmlAttr *properties; /* properties list */ 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 *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */ xmlNs *nsDef; /* namespace definitions on this node */
CHAR *content; /* the content */ xmlChar *content; /* the content */
} _xmlNode; } _xmlNode;
typedef _xmlNode xmlNode; typedef _xmlNode xmlNode;
typedef _xmlNode *xmlNodePtr; typedef _xmlNode *xmlNodePtr;
@ -255,8 +262,8 @@ typedef struct xmlDoc {
#endif #endif
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */ char *name; /* name/filename/URI of the document */
const CHAR *version; /* the XML version string */ const xmlChar *version; /* the XML version string */
const CHAR *encoding; /* encoding, if any */ const xmlChar *encoding; /* encoding, if any */
int compression;/* level of zlib compression */ int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs) */ int standalone; /* standalone document (no external refs) */
struct xmlDtd *intSubset; /* the document internal subset */ struct xmlDtd *intSubset; /* the document internal subset */
@ -274,7 +281,7 @@ typedef xmlDoc *xmlDocPtr;
*/ */
typedef struct xmlBuffer { typedef struct xmlBuffer {
CHAR *content; /* The buffer content UTF8 */ xmlChar *content; /* The buffer content UTF8 */
unsigned int use; /* The buffer size used */ unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */ unsigned int size; /* The buffer size */
} _xmlBuffer; } _xmlBuffer;
@ -297,10 +304,10 @@ void xmlBufferFree (xmlBufferPtr buf);
int xmlBufferDump (FILE *file, int xmlBufferDump (FILE *file,
xmlBufferPtr buf); xmlBufferPtr buf);
void xmlBufferAdd (xmlBufferPtr buf, void xmlBufferAdd (xmlBufferPtr buf,
const CHAR *str, const xmlChar *str,
int len); int len);
void xmlBufferCat (xmlBufferPtr buf, void xmlBufferCat (xmlBufferPtr buf,
const CHAR *str); const xmlChar *str);
void xmlBufferCCat (xmlBufferPtr buf, void xmlBufferCCat (xmlBufferPtr buf,
const char *str); const char *str);
int xmlBufferShrink (xmlBufferPtr buf, int xmlBufferShrink (xmlBufferPtr buf,
@ -311,33 +318,33 @@ void xmlBufferEmpty (xmlBufferPtr buf);
* Creating/freeing new structures * Creating/freeing new structures
*/ */
xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc, xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlDtdPtr xmlNewDtd (xmlDocPtr doc, xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
void xmlFreeDtd (xmlDtdPtr cur); void xmlFreeDtd (xmlDtdPtr cur);
xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc, xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc,
const CHAR *href, const xmlChar *href,
const CHAR *prefix); const xmlChar *prefix);
xmlNsPtr xmlNewNs (xmlNodePtr node, xmlNsPtr xmlNewNs (xmlNodePtr node,
const CHAR *href, const xmlChar *href,
const CHAR *prefix); const xmlChar *prefix);
void xmlFreeNs (xmlNsPtr cur); void xmlFreeNs (xmlNsPtr cur);
xmlDocPtr xmlNewDoc (const CHAR *version); xmlDocPtr xmlNewDoc (const xmlChar *version);
void xmlFreeDoc (xmlDocPtr cur); void xmlFreeDoc (xmlDocPtr cur);
xmlAttrPtr xmlNewDocProp (xmlDocPtr doc, xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
xmlAttrPtr xmlNewProp (xmlNodePtr node, xmlAttrPtr xmlNewProp (xmlNodePtr node,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
xmlAttrPtr xmlNewNsProp (xmlNodePtr node, xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
void xmlFreePropList (xmlAttrPtr cur); void xmlFreePropList (xmlAttrPtr cur);
void xmlFreeProp (xmlAttrPtr cur); void xmlFreeProp (xmlAttrPtr cur);
xmlAttrPtr xmlCopyProp (xmlNodePtr target, xmlAttrPtr xmlCopyProp (xmlNodePtr target,
@ -353,32 +360,32 @@ xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
*/ */
xmlNodePtr xmlNewDocNode (xmlDocPtr doc, xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewNode (xmlNsPtr ns, xmlNodePtr xmlNewNode (xmlNsPtr ns,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlNewChild (xmlNodePtr parent, xmlNodePtr xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewDocText (xmlDocPtr doc, xmlNodePtr xmlNewDocText (xmlDocPtr doc,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewText (const CHAR *content); xmlNodePtr xmlNewText (const xmlChar *content);
xmlNodePtr xmlNewPI (const CHAR *name, xmlNodePtr xmlNewPI (const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc, xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc,
const CHAR *content, const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewTextLen (const CHAR *content, xmlNodePtr xmlNewTextLen (const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewDocComment (xmlDocPtr doc, xmlNodePtr xmlNewDocComment (xmlDocPtr doc,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewComment (const CHAR *content); xmlNodePtr xmlNewComment (const xmlChar *content);
xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
const CHAR *content, const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewReference (xmlDocPtr doc, xmlNodePtr xmlNewReference (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlCopyNode (xmlNodePtr node, xmlNodePtr xmlCopyNode (xmlNodePtr node,
int recursive); int recursive);
xmlNodePtr xmlCopyNodeList (xmlNodePtr node); xmlNodePtr xmlCopyNodeList (xmlNodePtr node);
@ -400,7 +407,7 @@ void xmlUnlinkNode (xmlNodePtr cur);
xmlNodePtr xmlTextMerge (xmlNodePtr first, xmlNodePtr xmlTextMerge (xmlNodePtr first,
xmlNodePtr second); xmlNodePtr second);
void xmlTextConcat (xmlNodePtr node, void xmlTextConcat (xmlNodePtr node,
const CHAR *content, const xmlChar *content,
int len); int len);
void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeNodeList (xmlNodePtr cur);
void xmlFreeNode (xmlNodePtr cur); void xmlFreeNode (xmlNodePtr cur);
@ -410,10 +417,10 @@ void xmlFreeNode (xmlNodePtr cur);
*/ */
xmlNsPtr xmlSearchNs (xmlDocPtr doc, xmlNsPtr xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node, xmlNodePtr node,
const CHAR *nameSpace); const xmlChar *nameSpace);
xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc, xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node, xmlNodePtr node,
const CHAR *href); const xmlChar *href);
xmlNsPtr * xmlGetNsList (xmlDocPtr doc, xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node); xmlNodePtr node);
void xmlSetNs (xmlNodePtr node, void xmlSetNs (xmlNodePtr node,
@ -425,32 +432,32 @@ xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur);
* Changing the content. * Changing the content.
*/ */
xmlAttrPtr xmlSetProp (xmlNodePtr node, xmlAttrPtr xmlSetProp (xmlNodePtr node,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
CHAR * xmlGetProp (xmlNodePtr node, xmlChar * xmlGetProp (xmlNodePtr node,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc, xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const CHAR *value); const xmlChar *value);
xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc, xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
int len); int len);
CHAR * xmlNodeListGetString (xmlDocPtr doc, xmlChar * xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list, xmlNodePtr list,
int inLine); int inLine);
void xmlNodeSetContent (xmlNodePtr cur, void xmlNodeSetContent (xmlNodePtr cur,
const CHAR *content); const xmlChar *content);
void xmlNodeSetContentLen (xmlNodePtr cur, void xmlNodeSetContentLen (xmlNodePtr cur,
const CHAR *content, const xmlChar *content,
int len); int len);
void xmlNodeAddContent (xmlNodePtr cur, void xmlNodeAddContent (xmlNodePtr cur,
const CHAR *content); const xmlChar *content);
void xmlNodeAddContentLen (xmlNodePtr cur, void xmlNodeAddContentLen (xmlNodePtr cur,
const CHAR *content, const xmlChar *content,
int len); int len);
CHAR * xmlNodeGetContent (xmlNodePtr cur); xmlChar * xmlNodeGetContent (xmlNodePtr cur);
const CHAR * xmlNodeGetLang (xmlNodePtr cur); const xmlChar * xmlNodeGetLang (xmlNodePtr cur);
void xmlNodeSetLang (xmlNodePtr cur, void xmlNodeSetLang (xmlNodePtr cur,
const CHAR *lang); const xmlChar *lang);
/* /*
* Removing content. * Removing content.
@ -462,17 +469,17 @@ int xmlRemoveNode (xmlNodePtr node); /* TODO */
* Internal, don't use * Internal, don't use
*/ */
void xmlBufferWriteCHAR (xmlBufferPtr buf, void xmlBufferWriteCHAR (xmlBufferPtr buf,
const CHAR *string); const xmlChar *string);
void xmlBufferWriteChar (xmlBufferPtr buf, void xmlBufferWriteChar (xmlBufferPtr buf,
const char *string); const char *string);
void xmlBufferWriteQuotedString(xmlBufferPtr buf, void xmlBufferWriteQuotedString(xmlBufferPtr buf,
const CHAR *string); const xmlChar *string);
/* /*
* Saving * Saving
*/ */
void xmlDocDumpMemory (xmlDocPtr cur, void xmlDocDumpMemory (xmlDocPtr cur,
CHAR**mem, xmlChar**mem,
int *size); int *size);
void xmlDocDump (FILE *f, void xmlDocDump (FILE *f,
xmlDocPtr cur); xmlDocPtr cur);

View File

@ -105,16 +105,16 @@ typedef xmlRefTable *xmlRefTablePtr;
/* Notation */ /* Notation */
xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *name, const xmlChar *name,
const CHAR *PublicID, const xmlChar *PublicID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table);
void xmlFreeNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table);
void xmlDumpNotationTable(xmlBufferPtr buf, void xmlDumpNotationTable(xmlBufferPtr buf,
xmlNotationTablePtr table); xmlNotationTablePtr table);
/* Element Content */ /* Element Content */
xmlElementContentPtr xmlNewElementContent (CHAR *name, xmlElementContentPtr xmlNewElementContent (xmlChar *name,
xmlElementContentType type); xmlElementContentType type);
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
void xmlFreeElementContent(xmlElementContentPtr cur); void xmlFreeElementContent(xmlElementContentPtr cur);
@ -122,7 +122,7 @@ void xmlFreeElementContent(xmlElementContentPtr cur);
/* Element */ /* Element */
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *name, const xmlChar *name,
xmlElementContentType type, xmlElementContentType type,
xmlElementContentPtr content); xmlElementContentPtr content);
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
@ -131,18 +131,18 @@ void xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table); xmlElementTablePtr table);
/* Enumeration */ /* Enumeration */
xmlEnumerationPtr xmlCreateEnumeration (CHAR *name); xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name);
void xmlFreeEnumeration (xmlEnumerationPtr cur); void xmlFreeEnumeration (xmlEnumerationPtr cur);
xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur); xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur);
/* Attribute */ /* Attribute */
xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *elem, const xmlChar *elem,
const CHAR *name, const xmlChar *name,
xmlAttributeType type, xmlAttributeType type,
xmlAttributeDefault def, xmlAttributeDefault def,
const CHAR *defaultValue, const xmlChar *defaultValue,
xmlEnumerationPtr tree); xmlEnumerationPtr tree);
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
void xmlFreeAttributeTable (xmlAttributeTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table);
@ -152,12 +152,12 @@ void xmlDumpAttributeTable (xmlBufferPtr buf,
/* IDs */ /* IDs */
xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table); xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table);
void xmlFreeIDTable (xmlIDTablePtr table); void xmlFreeIDTable (xmlIDTablePtr table);
xmlAttrPtr xmlGetID (xmlDocPtr doc, xmlAttrPtr xmlGetID (xmlDocPtr doc,
const CHAR *ID); const xmlChar *ID);
int xmlIsID (xmlDocPtr doc, int xmlIsID (xmlDocPtr doc,
xmlNodePtr elem, xmlNodePtr elem,
xmlAttrPtr attr); xmlAttrPtr attr);
@ -165,7 +165,7 @@ int xmlIsID (xmlDocPtr doc,
/* IDREFs */ /* IDREFs */
xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table); xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table);
void xmlFreeRefTable (xmlRefTablePtr table); void xmlFreeRefTable (xmlRefTablePtr table);
@ -186,7 +186,7 @@ int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlAttributePtr attr); xmlAttributePtr attr);
int xmlValidateAttributeValue(xmlAttributeType type, int xmlValidateAttributeValue(xmlAttributeType type,
const CHAR *value); const xmlChar *value);
int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNotationPtr nota); xmlNotationPtr nota);
@ -205,21 +205,21 @@ int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr elem, xmlNodePtr elem,
xmlAttrPtr attr, xmlAttrPtr attr,
const CHAR *value); const xmlChar *value);
int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc); xmlDocPtr doc);
int xmlValidateNotationUse (xmlValidCtxtPtr ctxt, int xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *notationName); const xmlChar *notationName);
int xmlIsMixedElement (xmlDocPtr doc, int xmlIsMixedElement (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd, xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const CHAR *elem, const xmlChar *elem,
const CHAR *name); const xmlChar *name);
xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd, xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const CHAR *name); const xmlChar *name);
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
const CHAR *name); const xmlChar *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -46,7 +46,7 @@ typedef struct xmlXPathObject {
xmlNodeSetPtr nodesetval; xmlNodeSetPtr nodesetval;
int boolval; int boolval;
double floatval; double floatval;
CHAR *stringval; xmlChar *stringval;
void *user; void *user;
} xmlXPathObject, *xmlXPathObjectPtr; } xmlXPathObject, *xmlXPathObjectPtr;
@ -61,7 +61,7 @@ typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
*/ */
typedef struct xmlXPathType { typedef struct xmlXPathType {
const CHAR *name; /* the type name */ const xmlChar *name; /* the type name */
xmlXPathConvertFunc func; /* the conversion function */ xmlXPathConvertFunc func; /* the conversion function */
} xmlXPathType, *xmlXPathTypePtr; } xmlXPathType, *xmlXPathTypePtr;
@ -70,7 +70,7 @@ typedef struct xmlXPathType {
*/ */
typedef struct xmlXPathVariable { typedef struct xmlXPathVariable {
const CHAR *name; /* the variable name */ const xmlChar *name; /* the variable name */
xmlXPathObjectPtr value; /* the value */ xmlXPathObjectPtr value; /* the value */
} xmlXPathVariable, *xmlXPathVariablePtr; } xmlXPathVariable, *xmlXPathVariablePtr;
@ -85,7 +85,7 @@ typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs);
*/ */
typedef struct xmlXPathFunct { typedef struct xmlXPathFunct {
const CHAR *name; /* the function name */ const xmlChar *name; /* the function name */
xmlXPathEvalFunc func; /* the evaluation function */ xmlXPathEvalFunc func; /* the evaluation function */
} xmlXPathFunc, *xmlXPathFuncPtr; } xmlXPathFunc, *xmlXPathFuncPtr;
@ -103,7 +103,7 @@ typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
*/ */
typedef struct xmlXPathAxis { typedef struct xmlXPathAxis {
const CHAR *name; /* the axis name */ const xmlChar *name; /* the axis name */
xmlXPathAxisFunc func; /* the search function */ xmlXPathAxisFunc func; /* the search function */
} xmlXPathAxis, *xmlXPathAxisPtr; } xmlXPathAxis, *xmlXPathAxisPtr;
@ -149,8 +149,8 @@ typedef struct xmlXPathContext {
* an xmlXPathContext, and the stack of objects. * an xmlXPathContext, and the stack of objects.
*/ */
typedef struct xmlXPathParserContext { typedef struct xmlXPathParserContext {
const CHAR *cur; /* the current char being parsed */ const xmlChar *cur; /* the current char being parsed */
const CHAR *base; /* the full expression */ const xmlChar *base; /* the full expression */
int error; /* error code */ int error; /* error code */
@ -179,16 +179,16 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
* Registering extensions to the expression language * Registering extensions to the expression language
*/ */
/* TODO */ int xmlXPathRegisterType (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterType (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathConvertFunc f); xmlXPathConvertFunc f);
/* TODO */ int xmlXPathRegisterAxis (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterAxis (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathAxisFunc f); xmlXPathAxisFunc f);
/* TODO */ int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathFunction f); xmlXPathFunction f);
/* TODO */ int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathObject value); xmlXPathObject value);
/** /**
@ -196,10 +196,10 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
*/ */
xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc);
void xmlXPathFreeContext (xmlXPathContextPtr ctxt); void xmlXPathFreeContext (xmlXPathContextPtr ctxt);
xmlXPathObjectPtr xmlXPathEval (const CHAR *str, xmlXPathObjectPtr xmlXPathEval (const xmlChar *str,
xmlXPathContextPtr ctxt); xmlXPathContextPtr ctxt);
void xmlXPathFreeObject (xmlXPathObjectPtr obj); void xmlXPathFreeObject (xmlXPathObjectPtr obj);
xmlXPathObjectPtr xmlXPathEvalExpression (const CHAR *str, xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt); xmlXPathContextPtr ctxt);
#endif /* ! __XML_XPATH_H__ */ #endif /* ! __XML_XPATH_H__ */

View File

@ -32,6 +32,13 @@ Libraries, include files, etc you can use to develop libxml applications.
%changelog %changelog
* Thu Sep 23 1999 Daniel Veillard <Daniel.Veillard@w3.org>
- corrected the spec file alpha stuff
- switched to version 1.7.1
- Added validation, XPath, nanohttp, removed memory leaks
- Renamed CHAR to xmlChar
* Wed Jun 2 1999 Daniel Veillard <Daniel.Veillard@w3.org> * Wed Jun 2 1999 Daniel Veillard <Daniel.Veillard@w3.org>
- Switched to version 1.1: SAX extensions, better entities support, lots of - Switched to version 1.1: SAX extensions, better entities support, lots of
@ -52,15 +59,13 @@ Libraries, include files, etc you can use to develop libxml applications.
# Needed for snapshot releases. # Needed for snapshot releases.
if [ ! -f configure ]; then if [ ! -f configure ]; then
%ifarch alpha %ifarch alpha
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefi CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc"
x --sysconfdir="/etc"
%else %else
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc" CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc"
%endif %endif
else else
%ifarch alpha %ifarch alpha
CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc"
--sysconfdir="/etc"
%else %else
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc"
%endif %endif

858
parser.c

File diff suppressed because it is too large Load Diff

120
parser.h
View File

@ -31,18 +31,18 @@ extern "C" {
* progressive reading and I18N conversions to the internal UTF-8 format. * progressive reading and I18N conversions to the internal UTF-8 format.
*/ */
typedef void (* xmlParserInputDeallocate)(CHAR *); typedef void (* xmlParserInputDeallocate)(xmlChar *);
typedef struct xmlParserInput { typedef struct xmlParserInput {
/* Input buffer */ /* Input buffer */
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
const char *filename; /* The file analyzed, if any */ const char *filename; /* The file analyzed, if any */
const char *directory; /* the directory/base of teh file */ const char *directory; /* the directory/base of teh file */
const CHAR *base; /* Base of the array to parse */ const xmlChar *base; /* Base of the array to parse */
const CHAR *cur; /* Current char being parsed */ const xmlChar *cur; /* Current char being parsed */
int line; /* Current line */ int line; /* Current line */
int col; /* Current column */ 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 */ xmlParserInputDeallocate free; /* function to deallocate the base */
} xmlParserInput; } xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr; typedef xmlParserInput *xmlParserInputPtr;
@ -107,8 +107,8 @@ typedef struct _xmlParserCtxt {
xmlDocPtr myDoc; /* the document being built */ xmlDocPtr myDoc; /* the document being built */
int wellFormed; /* is the document well formed */ int wellFormed; /* is the document well formed */
int replaceEntities; /* shall we replace entities ? */ int replaceEntities; /* shall we replace entities ? */
const CHAR *version; /* the XML version string */ const xmlChar *version; /* the XML version string */
const CHAR *encoding; /* encoding, if any */ const xmlChar *encoding; /* encoding, if any */
int standalone; /* standalone document */ int standalone; /* standalone document */
int html; /* are we parsing an HTML document */ int html; /* are we parsing an HTML document */
@ -127,7 +127,7 @@ typedef struct _xmlParserCtxt {
int record_info; /* Whether node info should be kept */ int record_info; /* Whether node info should be kept */
xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
int errno; /* error code */ int errNo; /* error code */
int hasExternalSubset; /* reference and external subset */ int hasExternalSubset; /* reference and external subset */
int hasPErefs; /* the internal subset has PE refs */ int hasPErefs; /* the internal subset has PE refs */
@ -149,8 +149,8 @@ typedef xmlParserCtxt *xmlParserCtxtPtr;
* a SAX Locator. * a SAX Locator.
*/ */
typedef struct xmlSAXLocator { typedef struct xmlSAXLocator {
const CHAR *(*getPublicId)(void *ctx); const xmlChar *(*getPublicId)(void *ctx);
const CHAR *(*getSystemId)(void *ctx); const xmlChar *(*getSystemId)(void *ctx);
int (*getLineNumber)(void *ctx); int (*getLineNumber)(void *ctx);
int (*getColumnNumber)(void *ctx); int (*getColumnNumber)(void *ctx);
} _xmlSAXLocator; } _xmlSAXLocator;
@ -165,44 +165,44 @@ typedef xmlSAXLocator *xmlSAXLocatorPtr;
#include "entities.h" #include "entities.h"
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
const CHAR *publicId, const CHAR *systemId); const xmlChar *publicId, const xmlChar *systemId);
typedef void (*internalSubsetSAXFunc) (void *ctx, const CHAR *name, typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID); const xmlChar *ExternalID, const xmlChar *SystemID);
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
const CHAR *name); const xmlChar *name);
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
const CHAR *name); const xmlChar *name);
typedef void (*entityDeclSAXFunc) (void *ctx, typedef void (*entityDeclSAXFunc) (void *ctx,
const CHAR *name, int type, const CHAR *publicId, const xmlChar *name, int type, const xmlChar *publicId,
const CHAR *systemId, CHAR *content); const xmlChar *systemId, xmlChar *content);
typedef void (*notationDeclSAXFunc)(void *ctx, const CHAR *name, typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId); const xmlChar *publicId, const xmlChar *systemId);
typedef void (*attributeDeclSAXFunc)(void *ctx, const CHAR *elem, typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem,
const CHAR *name, int type, int def, const xmlChar *name, int type, int def,
const CHAR *defaultValue, xmlEnumerationPtr tree); const xmlChar *defaultValue, xmlEnumerationPtr tree);
typedef void (*elementDeclSAXFunc)(void *ctx, const CHAR *name, typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name,
int type, xmlElementContentPtr content); int type, xmlElementContentPtr content);
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
const CHAR *name, const CHAR *publicId, const xmlChar *name, const xmlChar *publicId,
const CHAR *systemId, const CHAR *notationName); const xmlChar *systemId, const xmlChar *notationName);
typedef void (*setDocumentLocatorSAXFunc) (void *ctx, typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
xmlSAXLocatorPtr loc); xmlSAXLocatorPtr loc);
typedef void (*startDocumentSAXFunc) (void *ctx); typedef void (*startDocumentSAXFunc) (void *ctx);
typedef void (*endDocumentSAXFunc) (void *ctx); typedef void (*endDocumentSAXFunc) (void *ctx);
typedef void (*startElementSAXFunc) (void *ctx, const CHAR *name, typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name,
const CHAR **atts); const xmlChar **atts);
typedef void (*endElementSAXFunc) (void *ctx, const CHAR *name); typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name);
typedef void (*attributeSAXFunc) (void *ctx, const CHAR *name, typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name,
const CHAR *value); const xmlChar *value);
typedef void (*referenceSAXFunc) (void *ctx, const CHAR *name); typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name);
typedef void (*charactersSAXFunc) (void *ctx, const CHAR *ch, typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch,
int len); int len);
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const CHAR *ch, int len); const xmlChar *ch, int len);
typedef void (*processingInstructionSAXFunc) (void *ctx, typedef void (*processingInstructionSAXFunc) (void *ctx,
const CHAR *target, const CHAR *data); const xmlChar *target, const xmlChar *data);
typedef void (*commentSAXFunc) (void *ctx, const CHAR *value); typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value);
typedef void (*cdataBlockSAXFunc) (void *ctx, const CHAR *value, int len); typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar *value, int len);
typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...); typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...);
typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...); typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...);
typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...); typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...);
@ -270,34 +270,34 @@ int xmlParserInputGrow (xmlParserInputPtr in,
int len); int len);
/** /**
* CHAR handling * xmlChar handling
*/ */
CHAR * xmlStrdup (const CHAR *cur); xmlChar * xmlStrdup (const xmlChar *cur);
CHAR * xmlStrndup (const CHAR *cur, xmlChar * xmlStrndup (const xmlChar *cur,
int len); int len);
CHAR * xmlStrsub (const CHAR *str, xmlChar * xmlStrsub (const xmlChar *str,
int start, int start,
int len); int len);
const CHAR * xmlStrchr (const CHAR *str, const xmlChar * xmlStrchr (const xmlChar *str,
CHAR val); xmlChar val);
const CHAR * xmlStrstr (const CHAR *str, const xmlChar * xmlStrstr (const xmlChar *str,
CHAR *val); xmlChar *val);
int xmlStrcmp (const CHAR *str1, int xmlStrcmp (const xmlChar *str1,
const CHAR *str2); const xmlChar *str2);
int xmlStrncmp (const CHAR *str1, int xmlStrncmp (const xmlChar *str1,
const CHAR *str2, const xmlChar *str2,
int len); int len);
int xmlStrlen (const CHAR *str); int xmlStrlen (const xmlChar *str);
CHAR * xmlStrcat (CHAR *cur, xmlChar * xmlStrcat (xmlChar *cur,
const CHAR *add); const xmlChar *add);
CHAR * xmlStrncat (CHAR *cur, xmlChar * xmlStrncat (xmlChar *cur,
const CHAR *add, const xmlChar *add,
int len); int len);
/** /**
* Basic parsing Interfaces * Basic parsing Interfaces
*/ */
xmlDocPtr xmlParseDoc (CHAR *cur); xmlDocPtr xmlParseDoc (xmlChar *cur);
xmlDocPtr xmlParseMemory (char *buffer, xmlDocPtr xmlParseMemory (char *buffer,
int size); int size);
xmlDocPtr xmlParseFile (const char *filename); xmlDocPtr xmlParseFile (const char *filename);
@ -306,7 +306,7 @@ int xmlSubstituteEntitiesDefault(int val);
/** /**
* Recovery mode * Recovery mode
*/ */
xmlDocPtr xmlRecoverDoc (CHAR *cur); xmlDocPtr xmlRecoverDoc (xmlChar *cur);
xmlDocPtr xmlRecoverMemory (char *buffer, xmlDocPtr xmlRecoverMemory (char *buffer,
int size); int size);
xmlDocPtr xmlRecoverFile (const char *filename); xmlDocPtr xmlRecoverFile (const char *filename);
@ -316,7 +316,7 @@ xmlDocPtr xmlRecoverFile (const char *filename);
*/ */
int xmlParseDocument (xmlParserCtxtPtr ctxt); int xmlParseDocument (xmlParserCtxtPtr ctxt);
xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
CHAR *cur, xmlChar *cur,
int recovery); int recovery);
xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
char *buffer, char *buffer,
@ -325,15 +325,15 @@ xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax, xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename, const char *filename,
int recovery); int recovery);
xmlDtdPtr xmlParseDTD (const CHAR *ExternalID, xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); void xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
void xmlClearParserCtxt (xmlParserCtxtPtr ctxt); void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const CHAR* buffer, const xmlChar* buffer,
const char* filename); const char* filename);
void xmlDefaultSAXHandlerInit(void); void xmlDefaultSAXHandlerInit(void);
void htmlDefaultSAXHandlerInit(void); void htmlDefaultSAXHandlerInit(void);

View File

@ -511,7 +511,7 @@ typedef unsigned char CHARVAL;
/** /**
* Parser context * Parser context
*/ */
xmlParserCtxtPtr xmlCreateDocParserCtxt (CHAR *cur); xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);
xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename);
xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer,
int size); int size);
@ -533,7 +533,7 @@ xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity); xmlEntityPtr entity);
void xmlPushInput (xmlParserCtxtPtr ctxt, void xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input); xmlParserInputPtr input);
CHAR xmlPopInput (xmlParserCtxtPtr ctxt); xmlChar xmlPopInput (xmlParserCtxtPtr ctxt);
void xmlFreeInputStream (xmlParserInputPtr input); void xmlFreeInputStream (xmlParserInputPtr input);
xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename); const char *filename);
@ -541,38 +541,38 @@ xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
/** /**
* Namespaces. * Namespaces.
*/ */
CHAR * xmlSplitQName (const CHAR *name, xmlChar * xmlSplitQName (const xmlChar *name,
CHAR **prefix); xmlChar **prefix);
CHAR * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
CHAR * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
CHAR **prefix); xmlChar **prefix);
CHAR * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
CHAR * xmlParseQuotedString (xmlParserCtxtPtr ctxt); xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt);
void xmlParseNamespace (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt);
/** /**
* Generic production rules * Generic production rules
*/ */
CHAR * xmlScanName (xmlParserCtxtPtr ctxt); xmlChar * xmlScanName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseName (xmlParserCtxtPtr ctxt); xmlChar * xmlParseName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseNmtoken (xmlParserCtxtPtr ctxt); xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEntityValue (xmlParserCtxtPtr ctxt, xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt,
CHAR **orig); xmlChar **orig);
CHAR * xmlParseAttValue (xmlParserCtxtPtr ctxt); xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt);
CHAR * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
CHAR * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
void xmlParseCharData (xmlParserCtxtPtr ctxt, void xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata); int cdata);
CHAR * xmlParseExternalID (xmlParserCtxtPtr ctxt, xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt,
CHAR **publicID, xmlChar **publicID,
int strict); int strict);
void xmlParseComment (xmlParserCtxtPtr ctxt); void xmlParseComment (xmlParserCtxtPtr ctxt);
CHAR * xmlParsePITarget (xmlParserCtxtPtr ctxt); xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt);
void xmlParsePI (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt);
void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, int xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
CHAR **value); xmlChar **value);
xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseNotationType (xmlParserCtxtPtr ctxt);
xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt); xmlEnumerationPtr xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, int xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
@ -585,7 +585,7 @@ xmlElementContentPtr xmlParseElementMixedContentDecl
xmlElementContentPtr xmlParseElementChildrenContentDecl xmlElementContentPtr xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt); (xmlParserCtxtPtr ctxt);
int xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, int xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
CHAR *name, xmlChar *name,
xmlElementContentPtr *result); xmlElementContentPtr *result);
int xmlParseElementDecl (xmlParserCtxtPtr ctxt); int xmlParseElementDecl (xmlParserCtxtPtr ctxt);
void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); void xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
@ -594,24 +594,24 @@ xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt);
void xmlParseReference (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt);
void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt);
void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
CHAR * xmlParseAttribute (xmlParserCtxtPtr ctxt, xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt,
CHAR **value); xmlChar **value);
CHAR * xmlParseStartTag (xmlParserCtxtPtr ctxt); xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt);
void xmlParseEndTag (xmlParserCtxtPtr ctxt, void xmlParseEndTag (xmlParserCtxtPtr ctxt,
CHAR *tagname); xmlChar *tagname);
void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseCDSect (xmlParserCtxtPtr ctxt);
void xmlParseContent (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt);
void xmlParseElement (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt);
CHAR * xmlParseVersionNum (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt);
CHAR * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEncName (xmlParserCtxtPtr ctxt); xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt);
CHAR * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
int xmlParseSDDecl (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt);
void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
void xmlParseMisc (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt);
void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
/* /*
* Entities substitution * Entities substitution
*/ */
@ -620,12 +620,12 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
#define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_PEREF 2
#define XML_SUBSTITUTE_BOTH 3 #define XML_SUBSTITUTE_BOTH 3
CHAR * xmlDecodeEntities (xmlParserCtxtPtr ctxt, xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len, int len,
int what, int what,
CHAR end, xmlChar end,
CHAR end2, xmlChar end2,
CHAR end3); xmlChar end3);
/* /*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP

View File

@ -41,7 +41,7 @@ static int copy = 0;
/* /*
* Note: this is perfectly clean HTML, i.e. not a useful test. * Note: this is perfectly clean HTML, i.e. not a useful test.
static CHAR buffer[] = static xmlChar buffer[] =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n\ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n\
\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n\ \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n\
<html>\n\ <html>\n\
@ -96,7 +96,7 @@ void parseAndPrintFile(char *filename) {
xmlFreeDoc(doc); xmlFreeDoc(doc);
} }
void parseAndPrintBuffer(CHAR *buf) { void parseAndPrintBuffer(xmlChar *buf) {
htmlDocPtr doc, tmp; htmlDocPtr doc, tmp;
/* /*

View File

@ -77,7 +77,7 @@ extern xmlSAXHandlerPtr debugSAXHandler;
/* /*
* Note: there is a couple of errors introduced on purpose. * Note: there is a couple of errors introduced on purpose.
*/ */
static CHAR buffer[] = static xmlChar buffer[] =
"<?xml version=\"1.0\"?>\n\ "<?xml version=\"1.0\"?>\n\
<?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\ <?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\
<?xml:namespace ns = \"http://www.w3.com/standards/z39.50/\" prefix = \"Z\"?>\n\ <?xml:namespace ns = \"http://www.w3.com/standards/z39.50/\" prefix = \"Z\"?>\n\
@ -155,8 +155,8 @@ hasExternalSubsetDebug(void *ctx)
* Does this document has an internal subset * Does this document has an internal subset
*/ */
void void
internalSubsetDebug(void *ctx, const CHAR *name, internalSubsetDebug(void *ctx, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID) const xmlChar *ExternalID, const xmlChar *SystemID)
{ {
xmlDtdPtr externalSubset; xmlDtdPtr externalSubset;
@ -186,7 +186,7 @@ internalSubsetDebug(void *ctx, const CHAR *name,
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/ */
xmlParserInputPtr xmlParserInputPtr
resolveEntityDebug(void *ctx, const CHAR *publicId, const CHAR *systemId) resolveEntityDebug(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@ -216,7 +216,7 @@ resolveEntityDebug(void *ctx, const CHAR *publicId, const CHAR *systemId)
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/ */
xmlEntityPtr xmlEntityPtr
getEntityDebug(void *ctx, const CHAR *name) getEntityDebug(void *ctx, const xmlChar *name)
{ {
fprintf(stdout, "SAX.getEntity(%s)\n", name); fprintf(stdout, "SAX.getEntity(%s)\n", name);
return(NULL); return(NULL);
@ -232,7 +232,7 @@ getEntityDebug(void *ctx, const CHAR *name)
* Returns the xmlParserInputPtr * Returns the xmlParserInputPtr
*/ */
xmlEntityPtr xmlEntityPtr
getParameterEntityDebug(void *ctx, const CHAR *name) getParameterEntityDebug(void *ctx, const xmlChar *name)
{ {
fprintf(stdout, "SAX.getParameterEntity(%s)\n", name); fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);
return(NULL); return(NULL);
@ -251,8 +251,8 @@ getParameterEntityDebug(void *ctx, const CHAR *name)
* An entity definition has been parsed * An entity definition has been parsed
*/ */
void void
entityDeclDebug(void *ctx, const CHAR *name, int type, entityDeclDebug(void *ctx, const xmlChar *name, int type,
const CHAR *publicId, const CHAR *systemId, CHAR *content) const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
{ {
fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
name, type, publicId, systemId, content); name, type, publicId, systemId, content);
@ -267,8 +267,8 @@ entityDeclDebug(void *ctx, const CHAR *name, int type,
* An attribute definition has been parsed * An attribute definition has been parsed
*/ */
void void
attributeDeclDebug(void *ctx, const CHAR *elem, const CHAR *name, attributeDeclDebug(void *ctx, const xmlChar *elem, const xmlChar *name,
int type, int def, const CHAR *defaultValue, int type, int def, const xmlChar *defaultValue,
xmlEnumerationPtr tree) xmlEnumerationPtr tree)
{ {
fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
@ -285,7 +285,7 @@ attributeDeclDebug(void *ctx, const CHAR *elem, const CHAR *name,
* An element definition has been parsed * An element definition has been parsed
*/ */
void void
elementDeclDebug(void *ctx, const CHAR *name, int type, elementDeclDebug(void *ctx, const xmlChar *name, int type,
xmlElementContentPtr content) xmlElementContentPtr content)
{ {
fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n", fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",
@ -302,8 +302,8 @@ elementDeclDebug(void *ctx, const CHAR *name, int type,
* What to do when a notation declaration has been parsed. * What to do when a notation declaration has been parsed.
*/ */
void void
notationDeclDebug(void *ctx, const CHAR *name, notationDeclDebug(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId) const xmlChar *publicId, const xmlChar *systemId)
{ {
fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n", fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",
(char *) name, (char *) publicId, (char *) systemId); (char *) name, (char *) publicId, (char *) systemId);
@ -320,9 +320,9 @@ notationDeclDebug(void *ctx, const CHAR *name,
* What to do when an unparsed entity declaration is parsed * What to do when an unparsed entity declaration is parsed
*/ */
void void
unparsedEntityDeclDebug(void *ctx, const CHAR *name, unparsedEntityDeclDebug(void *ctx, const xmlChar *name,
const CHAR *publicId, const CHAR *systemId, const xmlChar *publicId, const xmlChar *systemId,
const CHAR *notationName) const xmlChar *notationName)
{ {
fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n", fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
(char *) name, (char *) publicId, (char *) systemId, (char *) name, (char *) publicId, (char *) systemId,
@ -375,7 +375,7 @@ endDocumentDebug(void *ctx)
* called when an opening tag has been processed. * called when an opening tag has been processed.
*/ */
void void
startElementDebug(void *ctx, const CHAR *name, const CHAR **atts) startElementDebug(void *ctx, const xmlChar *name, const xmlChar **atts)
{ {
int i; int i;
@ -397,7 +397,7 @@ startElementDebug(void *ctx, const CHAR *name, const CHAR **atts)
* called when the end of an element has been detected. * called when the end of an element has been detected.
*/ */
void void
endElementDebug(void *ctx, const CHAR *name) endElementDebug(void *ctx, const xmlChar *name)
{ {
fprintf(stdout, "SAX.endElement(%s)\n", (char *) name); fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);
} }
@ -405,14 +405,14 @@ endElementDebug(void *ctx, const CHAR *name)
/** /**
* charactersDebug: * charactersDebug:
* @ctxt: An XML parser context * @ctxt: An XML parser context
* @ch: a CHAR string * @ch: a xmlChar string
* @len: the number of CHAR * @len: the number of xmlChar
* *
* receiving some chars from the parser. * receiving some chars from the parser.
* Question: how much at a time ??? * Question: how much at a time ???
*/ */
void void
charactersDebug(void *ctx, const CHAR *ch, int len) charactersDebug(void *ctx, const xmlChar *ch, int len)
{ {
int i; int i;
@ -430,7 +430,7 @@ charactersDebug(void *ctx, const CHAR *ch, int len)
* called when an entity reference is detected. * called when an entity reference is detected.
*/ */
void void
referenceDebug(void *ctx, const CHAR *name) referenceDebug(void *ctx, const xmlChar *name)
{ {
fprintf(stdout, "SAX.reference(%s)\n", name); fprintf(stdout, "SAX.reference(%s)\n", name);
} }
@ -438,15 +438,15 @@ referenceDebug(void *ctx, const CHAR *name)
/** /**
* ignorableWhitespaceDebug: * ignorableWhitespaceDebug:
* @ctxt: An XML parser context * @ctxt: An XML parser context
* @ch: a CHAR string * @ch: a xmlChar string
* @start: the first char in the string * @start: the first char in the string
* @len: the number of CHAR * @len: the number of xmlChar
* *
* receiving some ignorable whitespaces from the parser. * receiving some ignorable whitespaces from the parser.
* Question: how much at a time ??? * Question: how much at a time ???
*/ */
void void
ignorableWhitespaceDebug(void *ctx, const CHAR *ch, int len) ignorableWhitespaceDebug(void *ctx, const xmlChar *ch, int len)
{ {
fprintf(stdout, "SAX.ignorableWhitespace(%.30s, %d)\n", fprintf(stdout, "SAX.ignorableWhitespace(%.30s, %d)\n",
(char *) ch, len); (char *) ch, len);
@ -457,13 +457,13 @@ ignorableWhitespaceDebug(void *ctx, const CHAR *ch, int len)
* @ctxt: An XML parser context * @ctxt: An XML parser context
* @target: the target name * @target: the target name
* @data: the PI data's * @data: the PI data's
* @len: the number of CHAR * @len: the number of xmlChar
* *
* A processing instruction has been parsed. * A processing instruction has been parsed.
*/ */
void void
processingInstructionDebug(void *ctx, const CHAR *target, processingInstructionDebug(void *ctx, const xmlChar *target,
const CHAR *data) const xmlChar *data)
{ {
fprintf(stdout, "SAX.processingInstruction(%s, %s)\n", fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",
(char *) target, (char *) data); (char *) target, (char *) data);
@ -477,7 +477,7 @@ processingInstructionDebug(void *ctx, const CHAR *target,
* A comment has been parsed. * A comment has been parsed.
*/ */
void void
commentDebug(void *ctx, const CHAR *value) commentDebug(void *ctx, const xmlChar *value)
{ {
fprintf(stdout, "SAX.comment(%s)\n", value); fprintf(stdout, "SAX.comment(%s)\n", value);
} }
@ -600,7 +600,7 @@ void parseAndPrintFile(char *filename) {
} }
} }
void parseAndPrintBuffer(CHAR *buf) { void parseAndPrintBuffer(xmlChar *buf) {
xmlDocPtr doc; xmlDocPtr doc;
/* /*

View File

@ -45,7 +45,7 @@ static xmlDocPtr document = NULL;
/* /*
* Default document * Default document
*/ */
static CHAR buffer[] = static xmlChar buffer[] =
"<?xml version=\"1.0\"?>\n\ "<?xml version=\"1.0\"?>\n\
<EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\ <EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
<head>\n\ <head>\n\

View File

@ -49,7 +49,7 @@ extern int xmlDoValidityCheckingDefaultValue;
/* /*
* Note: there is a couple of errors introduced on purpose. * Note: there is a couple of errors introduced on purpose.
static CHAR buffer[] = static xmlChar buffer[] =
"<?xml version=\"1.0\"?>\n\ "<?xml version=\"1.0\"?>\n\
<?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\ <?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\
<?xml:namespace ns = \"http://www.w3.com/standards/z39.50/\" prefix = \"Z\"?>\n\ <?xml:namespace ns = \"http://www.w3.com/standards/z39.50/\" prefix = \"Z\"?>\n\
@ -156,7 +156,7 @@ void parseAndPrintFile(char *filename) {
xmlFreeDoc(doc); xmlFreeDoc(doc);
} }
void parseAndPrintBuffer(CHAR *buf) { void parseAndPrintBuffer(xmlChar *buf) {
xmlDocPtr doc, tmp; xmlDocPtr doc, tmp;
/* /*

164
tree.c
View File

@ -31,7 +31,7 @@
#include "entities.h" #include "entities.h"
#include "valid.h" #include "valid.h"
static CHAR xmlStringText[] = { 't', 'e', 'x', 't', 0 }; static xmlChar xmlStringText[] = { 't', 'e', 'x', 't', 0 };
int oldXMLWDcompatibility = 0; int oldXMLWDcompatibility = 0;
int xmlIndentTreeOutput = 1; int xmlIndentTreeOutput = 1;
@ -89,7 +89,7 @@ xmlUpgradeOldNs(xmlDocPtr doc) {
* Returns returns a new namespace pointer * Returns returns a new namespace pointer
*/ */
xmlNsPtr xmlNsPtr
xmlNewNs(xmlNodePtr node, const CHAR *href, const CHAR *prefix) { xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) {
xmlNsPtr cur; xmlNsPtr cur;
if (href == NULL) { if (href == NULL) {
@ -144,7 +144,7 @@ xmlNewNs(xmlNodePtr node, const CHAR *href, const CHAR *prefix) {
* Returns returns a new namespace pointer * Returns returns a new namespace pointer
*/ */
xmlNsPtr xmlNsPtr
xmlNewGlobalNs(xmlDocPtr doc, const CHAR *href, const CHAR *prefix) { xmlNewGlobalNs(xmlDocPtr doc, const xmlChar *href, const xmlChar *prefix) {
xmlNsPtr cur; xmlNsPtr cur;
/* /*
@ -249,8 +249,8 @@ xmlFreeNsList(xmlNsPtr cur) {
* Returns a pointer to the new DTD structure * Returns a pointer to the new DTD structure
*/ */
xmlDtdPtr xmlDtdPtr
xmlNewDtd(xmlDocPtr doc, const CHAR *name, xmlNewDtd(xmlDocPtr doc, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID) { const xmlChar *ExternalID, const xmlChar *SystemID) {
xmlDtdPtr cur; xmlDtdPtr cur;
if ((doc != NULL) && (doc->extSubset != NULL)) { if ((doc != NULL) && (doc->extSubset != NULL)) {
@ -301,8 +301,8 @@ xmlNewDtd(xmlDocPtr doc, const CHAR *name,
* Returns a pointer to the new DTD structure * Returns a pointer to the new DTD structure
*/ */
xmlDtdPtr xmlDtdPtr
xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name, xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
const CHAR *ExternalID, const CHAR *SystemID) { const xmlChar *ExternalID, const xmlChar *SystemID) {
xmlDtdPtr cur; xmlDtdPtr cur;
if ((doc != NULL) && (doc->intSubset != NULL)) { if ((doc != NULL) && (doc->intSubset != NULL)) {
@ -372,12 +372,12 @@ xmlFreeDtd(xmlDtdPtr cur) {
/** /**
* xmlNewDoc: * xmlNewDoc:
* @version: CHAR string giving the version of XML "1.0" * @version: xmlChar string giving the version of XML "1.0"
* *
* Returns a new document * Returns a new document
*/ */
xmlDocPtr xmlDocPtr
xmlNewDoc(const CHAR *version) { xmlNewDoc(const xmlChar *version) {
xmlDocPtr cur; xmlDocPtr cur;
if (version == NULL) { if (version == NULL) {
@ -452,12 +452,12 @@ xmlFreeDoc(xmlDocPtr cur) {
* Returns a pointer to the first child * Returns a pointer to the first child
*/ */
xmlNodePtr xmlNodePtr
xmlStringLenGetNodeList(xmlDocPtr doc, const CHAR *value, int len) { xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
xmlNodePtr ret = NULL, last = NULL; xmlNodePtr ret = NULL, last = NULL;
xmlNodePtr node; xmlNodePtr node;
CHAR *val; xmlChar *val;
const CHAR *cur = value; const xmlChar *cur = value;
const CHAR *q; const xmlChar *q;
xmlEntityPtr ent; xmlEntityPtr ent;
if (value == NULL) return(NULL); if (value == NULL) return(NULL);
@ -563,12 +563,12 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const CHAR *value, int len) {
* Returns a pointer to the first child * Returns a pointer to the first child
*/ */
xmlNodePtr xmlNodePtr
xmlStringGetNodeList(xmlDocPtr doc, const CHAR *value) { xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
xmlNodePtr ret = NULL, last = NULL; xmlNodePtr ret = NULL, last = NULL;
xmlNodePtr node; xmlNodePtr node;
CHAR *val; xmlChar *val;
const CHAR *cur = value; const xmlChar *cur = value;
const CHAR *q; const xmlChar *q;
xmlEntityPtr ent; xmlEntityPtr ent;
if (value == NULL) return(NULL); if (value == NULL) return(NULL);
@ -674,10 +674,10 @@ xmlStringGetNodeList(xmlDocPtr doc, const CHAR *value) {
* made of TEXTs and ENTITY_REFs * made of TEXTs and ENTITY_REFs
* Returns a pointer to the string copy, the calller must free it. * Returns a pointer to the string copy, the calller must free it.
*/ */
CHAR * xmlChar *
xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) { xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {
xmlNodePtr node = list; xmlNodePtr node = list;
CHAR *ret = NULL; xmlChar *ret = NULL;
xmlEntityPtr ent; xmlEntityPtr ent;
if (list == NULL) return(NULL); if (list == NULL) return(NULL);
@ -687,7 +687,7 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {
if (inLine) if (inLine)
ret = xmlStrcat(ret, node->content); ret = xmlStrcat(ret, node->content);
else { else {
CHAR *buffer; xmlChar *buffer;
buffer = xmlEncodeEntitiesReentrant(doc, node->content); buffer = xmlEncodeEntitiesReentrant(doc, node->content);
if (buffer != NULL) { if (buffer != NULL) {
@ -703,7 +703,7 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {
else else
ret = xmlStrcat(ret, node->content); ret = xmlStrcat(ret, node->content);
} else { } else {
CHAR buf[2]; xmlChar buf[2];
buf[0] = '&'; buf[1] = 0; buf[0] = '&'; buf[1] = 0;
ret = xmlStrncat(ret, buf, 1); ret = xmlStrncat(ret, buf, 1);
ret = xmlStrcat(ret, node->name); ret = xmlStrcat(ret, node->name);
@ -732,7 +732,7 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) {
* Returns a pointer to the attribute * Returns a pointer to the attribute
*/ */
xmlAttrPtr xmlAttrPtr
xmlNewProp(xmlNodePtr node, const CHAR *name, const CHAR *value) { xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
xmlAttrPtr cur; xmlAttrPtr cur;
if (name == NULL) { if (name == NULL) {
@ -790,8 +790,8 @@ xmlNewProp(xmlNodePtr node, const CHAR *name, const CHAR *value) {
* Returns a pointer to the attribute * Returns a pointer to the attribute
*/ */
xmlAttrPtr xmlAttrPtr
xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const CHAR *name, xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
const CHAR *value) { const xmlChar *value) {
xmlAttrPtr cur; xmlAttrPtr cur;
if (name == NULL) { if (name == NULL) {
@ -848,7 +848,7 @@ xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const CHAR *name,
* Returns a pointer to the attribute * Returns a pointer to the attribute
*/ */
xmlAttrPtr xmlAttrPtr
xmlNewDocProp(xmlDocPtr doc, const CHAR *name, const CHAR *value) { xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) {
xmlAttrPtr cur; xmlAttrPtr cur;
if (name == NULL) { if (name == NULL) {
@ -928,7 +928,7 @@ xmlFreeProp(xmlAttrPtr cur) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewPI(const CHAR *name, const CHAR *content) { xmlNewPI(const xmlChar *name, const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
if (name == NULL) { if (name == NULL) {
@ -978,7 +978,7 @@ xmlNewPI(const CHAR *name, const CHAR *content) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewNode(xmlNsPtr ns, const CHAR *name) { xmlNewNode(xmlNsPtr ns, const xmlChar *name) {
xmlNodePtr cur; xmlNodePtr cur;
if (name == NULL) { if (name == NULL) {
@ -1027,7 +1027,7 @@ xmlNewNode(xmlNsPtr ns, const CHAR *name) {
*/ */
xmlNodePtr xmlNodePtr
xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns,
const CHAR *name, const CHAR *content) { const xmlChar *name, const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
cur = xmlNewNode(ns, name); cur = xmlNewNode(ns, name);
@ -1050,7 +1050,7 @@ xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns,
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewText(const CHAR *content) { xmlNewText(const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
/* /*
@ -1090,7 +1090,7 @@ xmlNewText(const CHAR *content) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewReference(xmlDocPtr doc, const CHAR *name) { xmlNewReference(xmlDocPtr doc, const xmlChar *name) {
xmlNodePtr cur; xmlNodePtr cur;
xmlEntityPtr ent; xmlEntityPtr ent;
@ -1141,7 +1141,7 @@ xmlNewReference(xmlDocPtr doc, const CHAR *name) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewDocText(xmlDocPtr doc, const CHAR *content) { xmlNewDocText(xmlDocPtr doc, const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
cur = xmlNewText(content); cur = xmlNewText(content);
@ -1158,7 +1158,7 @@ xmlNewDocText(xmlDocPtr doc, const CHAR *content) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewTextLen(const CHAR *content, int len) { xmlNewTextLen(const xmlChar *content, int len) {
xmlNodePtr cur; xmlNodePtr cur;
/* /*
@ -1200,7 +1200,7 @@ xmlNewTextLen(const CHAR *content, int len) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewDocTextLen(xmlDocPtr doc, const CHAR *content, int len) { xmlNewDocTextLen(xmlDocPtr doc, const xmlChar *content, int len) {
xmlNodePtr cur; xmlNodePtr cur;
cur = xmlNewTextLen(content, len); cur = xmlNewTextLen(content, len);
@ -1216,7 +1216,7 @@ xmlNewDocTextLen(xmlDocPtr doc, const CHAR *content, int len) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewComment(const CHAR *content) { xmlNewComment(const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
/* /*
@ -1257,7 +1257,7 @@ xmlNewComment(const CHAR *content) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewCDataBlock(xmlDocPtr doc, const CHAR *content, int len) { xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) {
xmlNodePtr cur; xmlNodePtr cur;
/* /*
@ -1296,7 +1296,7 @@ xmlNewCDataBlock(xmlDocPtr doc, const CHAR *content, int len) {
* Returns a pointer to the new node object. * Returns a pointer to the new node object.
*/ */
xmlNodePtr xmlNodePtr
xmlNewDocComment(xmlDocPtr doc, const CHAR *content) { xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) {
xmlNodePtr cur; xmlNodePtr cur;
cur = xmlNewComment(content); cur = xmlNewComment(content);
@ -1319,7 +1319,7 @@ xmlNewDocComment(xmlDocPtr doc, const CHAR *content) {
*/ */
xmlNodePtr xmlNodePtr
xmlNewChild(xmlNodePtr parent, xmlNsPtr ns, xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,
const CHAR *name, const CHAR *content) { const xmlChar *name, const xmlChar *content) {
xmlNodePtr cur, prev; xmlNodePtr cur, prev;
if (parent == NULL) { if (parent == NULL) {
@ -1929,7 +1929,7 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) {
* Returns a pointer to the lang value, or NULL if not found * Returns a pointer to the lang value, or NULL if not found
*/ */
void void
xmlNodeSetLang(xmlNodePtr cur, const CHAR *lang) { xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) {
/* TODO xmlNodeSetLang check against the production [33] LanguageID */ /* TODO xmlNodeSetLang check against the production [33] LanguageID */
xmlSetProp(cur, BAD_CAST "xml:lang", lang); xmlSetProp(cur, BAD_CAST "xml:lang", lang);
} }
@ -1943,9 +1943,9 @@ xmlNodeSetLang(xmlNodePtr cur, const CHAR *lang) {
* *
* Returns a pointer to the lang value, or NULL if not found * Returns a pointer to the lang value, or NULL if not found
*/ */
const CHAR * const xmlChar *
xmlNodeGetLang(xmlNodePtr cur) { xmlNodeGetLang(xmlNodePtr cur) {
const CHAR *lang; const xmlChar *lang;
while (cur != NULL) { while (cur != NULL) {
lang = xmlGetProp(cur, BAD_CAST "xml:lang"); lang = xmlGetProp(cur, BAD_CAST "xml:lang");
@ -1964,10 +1964,10 @@ xmlNodeGetLang(xmlNodePtr cur) {
* directly by this node if it's a TEXT node or the aggregate string * directly by this node if it's a TEXT node or the aggregate string
* of the values carried by this node child's (TEXT and ENTITY_REF). * of the values carried by this node child's (TEXT and ENTITY_REF).
* Entity references are substitued. * Entity references are substitued.
* Returns a new CHAR * or NULL if no content is available. * Returns a new xmlChar * or NULL if no content is available.
* It's up to the caller to free the memory. * It's up to the caller to free the memory.
*/ */
CHAR * xmlChar *
xmlNodeGetContent(xmlNodePtr cur) { xmlNodeGetContent(xmlNodePtr cur) {
if (cur == NULL) return(NULL); if (cur == NULL) return(NULL);
switch (cur->type) { switch (cur->type) {
@ -2011,7 +2011,7 @@ xmlNodeGetContent(xmlNodePtr cur) {
* Replace the content of a node. * Replace the content of a node.
*/ */
void void
xmlNodeSetContent(xmlNodePtr cur, const CHAR *content) { xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) {
if (cur == NULL) { if (cur == NULL) {
fprintf(stderr, "xmlNodeSetContent : node == NULL\n"); fprintf(stderr, "xmlNodeSetContent : node == NULL\n");
return; return;
@ -2060,7 +2060,7 @@ xmlNodeSetContent(xmlNodePtr cur, const CHAR *content) {
* Replace the content of a node. * Replace the content of a node.
*/ */
void void
xmlNodeSetContentLen(xmlNodePtr cur, const CHAR *content, int len) { xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
if (cur == NULL) { if (cur == NULL) {
fprintf(stderr, "xmlNodeSetContentLen : node == NULL\n"); fprintf(stderr, "xmlNodeSetContentLen : node == NULL\n");
return; return;
@ -2116,7 +2116,7 @@ xmlNodeSetContentLen(xmlNodePtr cur, const CHAR *content, int len) {
* Append the extra substring to the node content. * Append the extra substring to the node content.
*/ */
void void
xmlNodeAddContentLen(xmlNodePtr cur, const CHAR *content, int len) { xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
if (cur == NULL) { if (cur == NULL) {
fprintf(stderr, "xmlNodeAddContentLen : node == NULL\n"); fprintf(stderr, "xmlNodeAddContentLen : node == NULL\n");
return; return;
@ -2175,7 +2175,7 @@ xmlNodeAddContentLen(xmlNodePtr cur, const CHAR *content, int len) {
* Append the extra substring to the node content. * Append the extra substring to the node content.
*/ */
void void
xmlNodeAddContent(xmlNodePtr cur, const CHAR *content) { xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) {
int len; int len;
if (cur == NULL) { if (cur == NULL) {
@ -2274,7 +2274,7 @@ xmlGetNsList(xmlDocPtr doc, xmlNodePtr node) {
* Returns the namespace pointer or NULL. * Returns the namespace pointer or NULL.
*/ */
xmlNsPtr xmlNsPtr
xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const CHAR *nameSpace) { xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) {
xmlNsPtr cur; xmlNsPtr cur;
while (node != NULL) { while (node != NULL) {
@ -2312,7 +2312,7 @@ xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const CHAR *nameSpace) {
* Returns the namespace pointer or NULL. * Returns the namespace pointer or NULL.
*/ */
xmlNsPtr xmlNsPtr
xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const CHAR *href) { xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar *href) {
xmlNsPtr cur; xmlNsPtr cur;
while (node != NULL) { while (node != NULL) {
@ -2346,15 +2346,15 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const CHAR *href) {
* This does the entity substitution. * This does the entity substitution.
* Returns the attribute value or NULL if not found. * Returns the attribute value or NULL if not found.
*/ */
CHAR *xmlGetProp(xmlNodePtr node, const CHAR *name) { xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar *name) {
xmlAttrPtr prop = node->properties; xmlAttrPtr prop = node->properties;
while (prop != NULL) { while (prop != NULL) {
if (!xmlStrcmp(prop->name, name)) { if (!xmlStrcmp(prop->name, name)) {
CHAR *ret; xmlChar *ret;
ret = xmlNodeListGetString(node->doc, prop->val, 1); ret = xmlNodeListGetString(node->doc, prop->val, 1);
if (ret == NULL) return(xmlStrdup((CHAR *)"")); if (ret == NULL) return(xmlStrdup((xmlChar *)""));
return(ret); return(ret);
} }
prop = prop->next; prop = prop->next;
@ -2372,7 +2372,7 @@ CHAR *xmlGetProp(xmlNodePtr node, const CHAR *name) {
* Returns the attribute pointer. * Returns the attribute pointer.
*/ */
xmlAttrPtr xmlAttrPtr
xmlSetProp(xmlNodePtr node, const CHAR *name, const CHAR *value) { xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
xmlAttrPtr prop = node->properties; xmlAttrPtr prop = node->properties;
while (prop != NULL) { while (prop != NULL) {
@ -2415,7 +2415,7 @@ xmlNodeIsText(xmlNodePtr node) {
*/ */
void void
xmlTextConcat(xmlNodePtr node, const CHAR *content, int len) { xmlTextConcat(xmlNodePtr node, const xmlChar *content, int len) {
if (node == NULL) return; if (node == NULL) return;
if (node->type != XML_TEXT_NODE) { if (node->type != XML_TEXT_NODE) {
@ -2450,7 +2450,7 @@ xmlBufferCreate(void) {
} }
ret->use = 0; ret->use = 0;
ret->size = BASE_BUFFER_SIZE; ret->size = BASE_BUFFER_SIZE;
ret->content = (CHAR *) xmlMalloc(ret->size * sizeof(CHAR)); ret->content = (xmlChar *) xmlMalloc(ret->size * sizeof(xmlChar));
if (ret->content == NULL) { if (ret->content == NULL) {
fprintf(stderr, "xmlBufferCreate : out of memory!\n"); fprintf(stderr, "xmlBufferCreate : out of memory!\n");
xmlFree(ret); xmlFree(ret);
@ -2497,11 +2497,11 @@ xmlBufferEmpty(xmlBufferPtr buf) {
/** /**
* xmlBufferShrink: * xmlBufferShrink:
* @buf: the buffer to dump * @buf: the buffer to dump
* @len: the number of CHAR to remove * @len: the number of xmlChar to remove
* *
* Remove the beginning of an XML buffer. * Remove the beginning of an XML buffer.
* *
* Returns the number of CHAR removed, or -1 in case of failure. * Returns the number of xmlChar removed, or -1 in case of failure.
*/ */
int int
xmlBufferShrink(xmlBufferPtr buf, int len) { xmlBufferShrink(xmlBufferPtr buf, int len) {
@ -2509,7 +2509,7 @@ xmlBufferShrink(xmlBufferPtr buf, int len) {
if (len > buf->use) return(-1); if (len > buf->use) return(-1);
buf->use -= len; buf->use -= len;
memmove(buf->content, &buf->content[len], buf->use * sizeof(CHAR)); memmove(buf->content, &buf->content[len], buf->use * sizeof(xmlChar));
buf->content[buf->use] = 0; buf->content[buf->use] = 0;
return(len); return(len);
@ -2521,7 +2521,7 @@ xmlBufferShrink(xmlBufferPtr buf, int len) {
* @buf: the buffer to dump * @buf: the buffer to dump
* *
* Dumps an XML buffer to a FILE *. * Dumps an XML buffer to a FILE *.
* Returns the number of CHAR written * Returns the number of xmlChar written
*/ */
int int
xmlBufferDump(FILE *file, xmlBufferPtr buf) { xmlBufferDump(FILE *file, xmlBufferPtr buf) {
@ -2536,20 +2536,20 @@ xmlBufferDump(FILE *file, xmlBufferPtr buf) {
return(0); return(0);
} }
if (file == NULL) file = stdout; if (file == NULL) file = stdout;
ret = fwrite(buf->content, sizeof(CHAR), buf->use, file); ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file);
return(ret); return(ret);
} }
/** /**
* xmlBufferAdd: * xmlBufferAdd:
* @buf: the buffer to dump * @buf: the buffer to dump
* @str: the CHAR string * @str: the xmlChar string
* @len: the number of CHAR to add * @len: the number of xmlChar to add
* *
* Add a string range to an XML buffer. * Add a string range to an XML buffer.
*/ */
void void
xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len) { xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) {
int l; int l;
if (str == NULL) { if (str == NULL) {
@ -2561,12 +2561,12 @@ xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len) {
if (len <= 0) return; if (len <= 0) return;
if (buf->use + len + 10 >= buf->size) { if (buf->use + len + 10 >= buf->size) {
CHAR *rebuf; xmlChar *rebuf;
buf->size *= 2; buf->size *= 2;
if (buf->use + len + 10 > buf->size) if (buf->use + len + 10 > buf->size)
buf->size = buf->use + len + 10; buf->size = buf->use + len + 10;
rebuf = (CHAR *) xmlRealloc(buf->content, buf->size * sizeof(CHAR)); rebuf = (xmlChar *) xmlRealloc(buf->content, buf->size * sizeof(xmlChar));
if (rebuf == NULL) { if (rebuf == NULL) {
fprintf(stderr, "xmlBufferAdd : out of memory!\n"); fprintf(stderr, "xmlBufferAdd : out of memory!\n");
return; return;
@ -2581,13 +2581,13 @@ xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len) {
/** /**
* xmlBufferCat: * xmlBufferCat:
* @buf: the buffer to dump * @buf: the buffer to dump
* @str: the CHAR string * @str: the xmlChar string
* *
* Append a zero terminated string to an XML buffer. * Append a zero terminated string to an XML buffer.
*/ */
void void
xmlBufferCat(xmlBufferPtr buf, const CHAR *str) { xmlBufferCat(xmlBufferPtr buf, const xmlChar *str) {
const CHAR *cur; const xmlChar *cur;
if (str == NULL) { if (str == NULL) {
fprintf(stderr, "xmlBufferAdd: str == NULL\n"); fprintf(stderr, "xmlBufferAdd: str == NULL\n");
@ -2595,10 +2595,10 @@ xmlBufferCat(xmlBufferPtr buf, const CHAR *str) {
} }
for (cur = str;*cur != 0;cur++) { for (cur = str;*cur != 0;cur++) {
if (buf->use + 10 >= buf->size) { if (buf->use + 10 >= buf->size) {
CHAR *rebuf; xmlChar *rebuf;
buf->size *= 2; buf->size *= 2;
rebuf = (CHAR *) xmlRealloc(buf->content, buf->size * sizeof(CHAR)); rebuf = (xmlChar *) xmlRealloc(buf->content, buf->size * sizeof(xmlChar));
if (rebuf == NULL) { if (rebuf == NULL) {
fprintf(stderr, "xmlBufferAdd : out of memory!\n"); fprintf(stderr, "xmlBufferAdd : out of memory!\n");
return; return;
@ -2626,10 +2626,10 @@ xmlBufferCCat(xmlBufferPtr buf, const char *str) {
} }
for (cur = str;*cur != 0;cur++) { for (cur = str;*cur != 0;cur++) {
if (buf->use + 10 >= buf->size) { if (buf->use + 10 >= buf->size) {
CHAR *rebuf; xmlChar *rebuf;
buf->size *= 2; buf->size *= 2;
rebuf = (CHAR *) xmlRealloc(buf->content, buf->size * sizeof(CHAR)); rebuf = (xmlChar *) xmlRealloc(buf->content, buf->size * sizeof(xmlChar));
if (rebuf == NULL) { if (rebuf == NULL) {
fprintf(stderr, "xmlBufferAdd : out of memory!\n"); fprintf(stderr, "xmlBufferAdd : out of memory!\n");
return; return;
@ -2646,10 +2646,10 @@ xmlBufferCCat(xmlBufferPtr buf, const char *str) {
* @string: the string to add * @string: the string to add
* *
* routine which manage and grows an output buffer. This one add * routine which manage and grows an output buffer. This one add
* CHARs at the end of the buffer. * xmlChars at the end of the buffer.
*/ */
void void
xmlBufferWriteCHAR(xmlBufferPtr buf, const CHAR *string) { xmlBufferWriteCHAR(xmlBufferPtr buf, const xmlChar *string) {
xmlBufferCat(buf, string); xmlBufferCat(buf, string);
} }
@ -2673,11 +2673,11 @@ xmlBufferWriteChar(xmlBufferPtr buf, const char *string) {
* @string: the string to add * @string: the string to add
* *
* routine which manage and grows an output buffer. This one writes * routine which manage and grows an output buffer. This one writes
* a quoted or double quoted CHAR string, checking first if it holds * a quoted or double quoted xmlChar string, checking first if it holds
* quote or double-quotes internally * quote or double-quotes internally
*/ */
void void
xmlBufferWriteQuotedString(xmlBufferPtr buf, const CHAR *string) { xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
if (xmlStrchr(string, '"')) { if (xmlStrchr(string, '"')) {
if (xmlStrchr(string, '\'')) { if (xmlStrchr(string, '\'')) {
fprintf(stderr, fprintf(stderr,
@ -2833,7 +2833,7 @@ xmlDtdDump(xmlBufferPtr buf, xmlDocPtr doc) {
*/ */
static void static void
xmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { xmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
CHAR *value; xmlChar *value;
if (cur == NULL) { if (cur == NULL) {
fprintf(stderr, "xmlAttrDump : property == NULL\n"); fprintf(stderr, "xmlAttrDump : property == NULL\n");
@ -2930,7 +2930,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level) {
} }
if (cur->type == XML_TEXT_NODE) { if (cur->type == XML_TEXT_NODE) {
if (cur->content != NULL) { if (cur->content != NULL) {
CHAR *buffer; xmlChar *buffer;
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
if (buffer != NULL) { if (buffer != NULL) {
@ -2995,7 +2995,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level) {
} }
xmlBufferWriteChar(buf, ">"); xmlBufferWriteChar(buf, ">");
if (cur->content != NULL) { if (cur->content != NULL) {
CHAR *buffer; xmlChar *buffer;
buffer = xmlEncodeEntitiesReentrant(doc, cur->content); buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
if (buffer != NULL) { if (buffer != NULL) {
@ -3067,11 +3067,11 @@ xmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) {
* @mem: OUT: the memory pointer * @mem: OUT: the memory pointer
* @size: OUT: the memory lenght * @size: OUT: the memory lenght
* *
* Dump an XML document in memory and return the CHAR * and it's size. * Dump an XML document in memory and return the xmlChar * and it's size.
* It's up to the caller to free the memory. * It's up to the caller to free the memory.
*/ */
void void
xmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int *size) { xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
xmlBufferPtr buf; xmlBufferPtr buf;
if (cur == NULL) { if (cur == NULL) {
@ -3211,7 +3211,7 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
} }
if (zoutput != NULL) { if (zoutput != NULL) {
ret = gzwrite(zoutput, buf->content, sizeof(CHAR) * buf->use); ret = gzwrite(zoutput, buf->content, sizeof(xmlChar) * buf->use);
gzclose(zoutput); gzclose(zoutput);
} else { } else {
#endif #endif
@ -3221,6 +3221,6 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
} }
#endif #endif
xmlBufferFree(buf); xmlBufferFree(buf);
return(ret * sizeof(CHAR)); return(ret * sizeof(xmlChar));
} }

167
tree.h
View File

@ -44,25 +44,32 @@ typedef enum {
* Currently we use 8bit chars internal representation for memory efficiency, * Currently we use 8bit chars internal representation for memory efficiency,
* but the parser is not tied to that, just define UNICODE to switch to * 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 * 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. * input.
*/ */
#ifdef UNICODE #ifdef UNICODE
typedef unsigned short CHAR; typedef unsigned short xmlChar;
#else #else
typedef unsigned char CHAR; typedef unsigned char xmlChar;
#endif #endif
#define BAD_CAST (CHAR *) #ifndef WIN32
#ifndef CHAR
#define CHAR xmlChar
#endif
#endif
#define BAD_CAST (xmlChar *)
/* /*
* a DTD Notation definition * a DTD Notation definition
*/ */
typedef struct xmlNotation { typedef struct xmlNotation {
const CHAR *name; /* Notation name */ const xmlChar *name; /* Notation name */
const CHAR *PublicID; /* Public identifier, if any */ const xmlChar *PublicID; /* Public identifier, if any */
const CHAR *SystemID; /* System identifier, if any */ const xmlChar *SystemID; /* System identifier, if any */
} xmlNotation; } xmlNotation;
typedef xmlNotation *xmlNotationPtr; typedef xmlNotation *xmlNotationPtr;
@ -92,17 +99,17 @@ typedef enum {
typedef struct xmlEnumeration { typedef struct xmlEnumeration {
struct xmlEnumeration *next; /* next one */ struct xmlEnumeration *next; /* next one */
const CHAR *name; /* Enumeration name */ const xmlChar *name; /* Enumeration name */
} xmlEnumeration; } xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr; typedef xmlEnumeration *xmlEnumerationPtr;
typedef struct xmlAttribute { typedef struct xmlAttribute {
const CHAR *elem; /* Element holding the attribute */ const xmlChar *elem; /* Element holding the attribute */
const CHAR *name; /* Attribute name */ const xmlChar *name; /* Attribute name */
struct xmlAttribute *next; /* list of attributes of an element */ struct xmlAttribute *next; /* list of attributes of an element */
xmlAttributeType type; /* The type */ xmlAttributeType type; /* The type */
xmlAttributeDefault def; /* the default */ 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 */ xmlEnumerationPtr tree; /* or the enumeration tree if any */
} xmlAttribute; } xmlAttribute;
typedef xmlAttribute *xmlAttributePtr; typedef xmlAttribute *xmlAttributePtr;
@ -127,7 +134,7 @@ typedef enum {
typedef struct xmlElementContent { typedef struct xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
const CHAR *name; /* Element name */ const xmlChar *name; /* Element name */
struct xmlElementContent *c1; /* first child */ struct xmlElementContent *c1; /* first child */
struct xmlElementContent *c2; /* second child */ struct xmlElementContent *c2; /* second child */
} xmlElementContent; } xmlElementContent;
@ -141,7 +148,7 @@ typedef enum {
} xmlElementTypeVal; } xmlElementTypeVal;
typedef struct xmlElement { typedef struct xmlElement {
const CHAR *name; /* Element name */ const xmlChar *name; /* Element name */
xmlElementTypeVal type; /* The type */ xmlElementTypeVal type; /* The type */
xmlElementContentPtr content; /* the allowed element content */ xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */ xmlAttributePtr attributes; /* List of the declared attributes */
@ -162,8 +169,8 @@ typedef enum {
typedef struct xmlNs { typedef struct xmlNs {
struct xmlNs *next; /* next Ns link for this node */ struct xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */ xmlNsType type; /* global or local */
const CHAR *href; /* URL for the namespace */ const xmlChar *href; /* URL for the namespace */
const CHAR *prefix; /* prefix for the namespace */ const xmlChar *prefix; /* prefix for the namespace */
} xmlNs; } xmlNs;
typedef xmlNs *xmlNsPtr; typedef xmlNs *xmlNsPtr;
@ -171,9 +178,9 @@ typedef xmlNs *xmlNsPtr;
* An XML DtD, as defined by <!DOCTYPE. * An XML DtD, as defined by <!DOCTYPE.
*/ */
typedef struct xmlDtd { typedef struct xmlDtd {
const CHAR *name; /* Name of the DTD */ const xmlChar *name; /* Name of the DTD */
const CHAR *ExternalID; /* External identifier for PUBLIC DTD */ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
const CHAR *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *notations; /* Hash table for notations if any */ void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */ void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */ void *attributes; /* Hash table for attributes if any */
@ -193,7 +200,7 @@ typedef struct xmlAttr {
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */
struct xmlNode *node; /* attr->node link */ struct xmlNode *node; /* attr->node link */
struct xmlAttr *next; /* attribute list 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 */ struct xmlNode *val; /* the value of the property */
xmlNs *ns; /* pointer to the associated namespace */ xmlNs *ns; /* pointer to the associated namespace */
} xmlAttr; } xmlAttr;
@ -205,7 +212,7 @@ typedef xmlAttr *xmlAttrPtr;
typedef struct xmlID { typedef struct xmlID {
struct xmlID *next; /* next ID */ struct xmlID *next; /* next ID */
const CHAR *value; /* The ID name */ const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribut holding it */ xmlAttrPtr attr; /* The attribut holding it */
} xmlID; } xmlID;
typedef xmlID *xmlIDPtr; typedef xmlID *xmlIDPtr;
@ -216,7 +223,7 @@ typedef xmlID *xmlIDPtr;
typedef struct xmlRef { typedef struct xmlRef {
struct xmlRef *next; /* next Ref */ struct xmlRef *next; /* next Ref */
const CHAR *value; /* The Ref name */ const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribut holding it */ xmlAttrPtr attr; /* The attribut holding it */
} xmlRef; } xmlRef;
typedef xmlRef *xmlRefPtr; typedef xmlRef *xmlRefPtr;
@ -237,10 +244,10 @@ typedef struct xmlNode {
struct xmlNode *childs; /* parent->childs link */ struct xmlNode *childs; /* parent->childs link */
struct xmlNode *last; /* last child link */ struct xmlNode *last; /* last child link */
struct xmlAttr *properties; /* properties list */ 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 *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */ xmlNs *nsDef; /* namespace definitions on this node */
CHAR *content; /* the content */ xmlChar *content; /* the content */
} _xmlNode; } _xmlNode;
typedef _xmlNode xmlNode; typedef _xmlNode xmlNode;
typedef _xmlNode *xmlNodePtr; typedef _xmlNode *xmlNodePtr;
@ -255,8 +262,8 @@ typedef struct xmlDoc {
#endif #endif
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */ char *name; /* name/filename/URI of the document */
const CHAR *version; /* the XML version string */ const xmlChar *version; /* the XML version string */
const CHAR *encoding; /* encoding, if any */ const xmlChar *encoding; /* encoding, if any */
int compression;/* level of zlib compression */ int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs) */ int standalone; /* standalone document (no external refs) */
struct xmlDtd *intSubset; /* the document internal subset */ struct xmlDtd *intSubset; /* the document internal subset */
@ -274,7 +281,7 @@ typedef xmlDoc *xmlDocPtr;
*/ */
typedef struct xmlBuffer { typedef struct xmlBuffer {
CHAR *content; /* The buffer content UTF8 */ xmlChar *content; /* The buffer content UTF8 */
unsigned int use; /* The buffer size used */ unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */ unsigned int size; /* The buffer size */
} _xmlBuffer; } _xmlBuffer;
@ -297,10 +304,10 @@ void xmlBufferFree (xmlBufferPtr buf);
int xmlBufferDump (FILE *file, int xmlBufferDump (FILE *file,
xmlBufferPtr buf); xmlBufferPtr buf);
void xmlBufferAdd (xmlBufferPtr buf, void xmlBufferAdd (xmlBufferPtr buf,
const CHAR *str, const xmlChar *str,
int len); int len);
void xmlBufferCat (xmlBufferPtr buf, void xmlBufferCat (xmlBufferPtr buf,
const CHAR *str); const xmlChar *str);
void xmlBufferCCat (xmlBufferPtr buf, void xmlBufferCCat (xmlBufferPtr buf,
const char *str); const char *str);
int xmlBufferShrink (xmlBufferPtr buf, int xmlBufferShrink (xmlBufferPtr buf,
@ -311,33 +318,33 @@ void xmlBufferEmpty (xmlBufferPtr buf);
* Creating/freeing new structures * Creating/freeing new structures
*/ */
xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc, xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlDtdPtr xmlNewDtd (xmlDocPtr doc, xmlDtdPtr xmlNewDtd (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *ExternalID, const xmlChar *ExternalID,
const CHAR *SystemID); const xmlChar *SystemID);
void xmlFreeDtd (xmlDtdPtr cur); void xmlFreeDtd (xmlDtdPtr cur);
xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc, xmlNsPtr xmlNewGlobalNs (xmlDocPtr doc,
const CHAR *href, const xmlChar *href,
const CHAR *prefix); const xmlChar *prefix);
xmlNsPtr xmlNewNs (xmlNodePtr node, xmlNsPtr xmlNewNs (xmlNodePtr node,
const CHAR *href, const xmlChar *href,
const CHAR *prefix); const xmlChar *prefix);
void xmlFreeNs (xmlNsPtr cur); void xmlFreeNs (xmlNsPtr cur);
xmlDocPtr xmlNewDoc (const CHAR *version); xmlDocPtr xmlNewDoc (const xmlChar *version);
void xmlFreeDoc (xmlDocPtr cur); void xmlFreeDoc (xmlDocPtr cur);
xmlAttrPtr xmlNewDocProp (xmlDocPtr doc, xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
xmlAttrPtr xmlNewProp (xmlNodePtr node, xmlAttrPtr xmlNewProp (xmlNodePtr node,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
xmlAttrPtr xmlNewNsProp (xmlNodePtr node, xmlAttrPtr xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
void xmlFreePropList (xmlAttrPtr cur); void xmlFreePropList (xmlAttrPtr cur);
void xmlFreeProp (xmlAttrPtr cur); void xmlFreeProp (xmlAttrPtr cur);
xmlAttrPtr xmlCopyProp (xmlNodePtr target, xmlAttrPtr xmlCopyProp (xmlNodePtr target,
@ -353,32 +360,32 @@ xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
*/ */
xmlNodePtr xmlNewDocNode (xmlDocPtr doc, xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewNode (xmlNsPtr ns, xmlNodePtr xmlNewNode (xmlNsPtr ns,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlNewChild (xmlNodePtr parent, xmlNodePtr xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns, xmlNsPtr ns,
const CHAR *name, const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewDocText (xmlDocPtr doc, xmlNodePtr xmlNewDocText (xmlDocPtr doc,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewText (const CHAR *content); xmlNodePtr xmlNewText (const xmlChar *content);
xmlNodePtr xmlNewPI (const CHAR *name, xmlNodePtr xmlNewPI (const xmlChar *name,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc, xmlNodePtr xmlNewDocTextLen (xmlDocPtr doc,
const CHAR *content, const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewTextLen (const CHAR *content, xmlNodePtr xmlNewTextLen (const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewDocComment (xmlDocPtr doc, xmlNodePtr xmlNewDocComment (xmlDocPtr doc,
const CHAR *content); const xmlChar *content);
xmlNodePtr xmlNewComment (const CHAR *content); xmlNodePtr xmlNewComment (const xmlChar *content);
xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc,
const CHAR *content, const xmlChar *content,
int len); int len);
xmlNodePtr xmlNewReference (xmlDocPtr doc, xmlNodePtr xmlNewReference (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlCopyNode (xmlNodePtr node, xmlNodePtr xmlCopyNode (xmlNodePtr node,
int recursive); int recursive);
xmlNodePtr xmlCopyNodeList (xmlNodePtr node); xmlNodePtr xmlCopyNodeList (xmlNodePtr node);
@ -400,7 +407,7 @@ void xmlUnlinkNode (xmlNodePtr cur);
xmlNodePtr xmlTextMerge (xmlNodePtr first, xmlNodePtr xmlTextMerge (xmlNodePtr first,
xmlNodePtr second); xmlNodePtr second);
void xmlTextConcat (xmlNodePtr node, void xmlTextConcat (xmlNodePtr node,
const CHAR *content, const xmlChar *content,
int len); int len);
void xmlFreeNodeList (xmlNodePtr cur); void xmlFreeNodeList (xmlNodePtr cur);
void xmlFreeNode (xmlNodePtr cur); void xmlFreeNode (xmlNodePtr cur);
@ -410,10 +417,10 @@ void xmlFreeNode (xmlNodePtr cur);
*/ */
xmlNsPtr xmlSearchNs (xmlDocPtr doc, xmlNsPtr xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node, xmlNodePtr node,
const CHAR *nameSpace); const xmlChar *nameSpace);
xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc, xmlNsPtr xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node, xmlNodePtr node,
const CHAR *href); const xmlChar *href);
xmlNsPtr * xmlGetNsList (xmlDocPtr doc, xmlNsPtr * xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node); xmlNodePtr node);
void xmlSetNs (xmlNodePtr node, void xmlSetNs (xmlNodePtr node,
@ -425,32 +432,32 @@ xmlNsPtr xmlCopyNamespaceList (xmlNsPtr cur);
* Changing the content. * Changing the content.
*/ */
xmlAttrPtr xmlSetProp (xmlNodePtr node, xmlAttrPtr xmlSetProp (xmlNodePtr node,
const CHAR *name, const xmlChar *name,
const CHAR *value); const xmlChar *value);
CHAR * xmlGetProp (xmlNodePtr node, xmlChar * xmlGetProp (xmlNodePtr node,
const CHAR *name); const xmlChar *name);
xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc, xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const CHAR *value); const xmlChar *value);
xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc, xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
int len); int len);
CHAR * xmlNodeListGetString (xmlDocPtr doc, xmlChar * xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list, xmlNodePtr list,
int inLine); int inLine);
void xmlNodeSetContent (xmlNodePtr cur, void xmlNodeSetContent (xmlNodePtr cur,
const CHAR *content); const xmlChar *content);
void xmlNodeSetContentLen (xmlNodePtr cur, void xmlNodeSetContentLen (xmlNodePtr cur,
const CHAR *content, const xmlChar *content,
int len); int len);
void xmlNodeAddContent (xmlNodePtr cur, void xmlNodeAddContent (xmlNodePtr cur,
const CHAR *content); const xmlChar *content);
void xmlNodeAddContentLen (xmlNodePtr cur, void xmlNodeAddContentLen (xmlNodePtr cur,
const CHAR *content, const xmlChar *content,
int len); int len);
CHAR * xmlNodeGetContent (xmlNodePtr cur); xmlChar * xmlNodeGetContent (xmlNodePtr cur);
const CHAR * xmlNodeGetLang (xmlNodePtr cur); const xmlChar * xmlNodeGetLang (xmlNodePtr cur);
void xmlNodeSetLang (xmlNodePtr cur, void xmlNodeSetLang (xmlNodePtr cur,
const CHAR *lang); const xmlChar *lang);
/* /*
* Removing content. * Removing content.
@ -462,17 +469,17 @@ int xmlRemoveNode (xmlNodePtr node); /* TODO */
* Internal, don't use * Internal, don't use
*/ */
void xmlBufferWriteCHAR (xmlBufferPtr buf, void xmlBufferWriteCHAR (xmlBufferPtr buf,
const CHAR *string); const xmlChar *string);
void xmlBufferWriteChar (xmlBufferPtr buf, void xmlBufferWriteChar (xmlBufferPtr buf,
const char *string); const char *string);
void xmlBufferWriteQuotedString(xmlBufferPtr buf, void xmlBufferWriteQuotedString(xmlBufferPtr buf,
const CHAR *string); const xmlChar *string);
/* /*
* Saving * Saving
*/ */
void xmlDocDumpMemory (xmlDocPtr cur, void xmlDocDumpMemory (xmlDocPtr cur,
CHAR**mem, xmlChar**mem,
int *size); int *size);
void xmlDocDump (FILE *f, void xmlDocDump (FILE *f,
xmlDocPtr cur); xmlDocPtr cur);

92
valid.c
View File

@ -36,8 +36,8 @@
if (doc == NULL) return(0); \ if (doc == NULL) return(0); \
else if (doc->intSubset == NULL) return(0) else if (doc->intSubset == NULL) return(0)
xmlElementPtr xmlGetDtdElementDesc(xmlDtdPtr dtd, const CHAR *name); xmlElementPtr xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name);
xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const CHAR *elem); xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem);
/**************************************************************** /****************************************************************
* * * *
@ -55,7 +55,7 @@ xmlAttributePtr xmlScanAttributeDecl(xmlDtdPtr dtd, const CHAR *elem);
* Returns NULL if not, othervise the new element content structure * Returns NULL if not, othervise the new element content structure
*/ */
xmlElementContentPtr xmlElementContentPtr
xmlNewElementContent(CHAR *name, xmlElementContentType type) { xmlNewElementContent(xmlChar *name, xmlElementContentType type) {
xmlElementContentPtr ret; xmlElementContentPtr ret;
switch(type) { switch(type) {
@ -103,7 +103,7 @@ xmlCopyElementContent(xmlElementContentPtr cur) {
xmlElementContentPtr ret; xmlElementContentPtr ret;
if (cur == NULL) return(NULL); if (cur == NULL) return(NULL);
ret = xmlNewElementContent((CHAR *) cur->name, cur->type); ret = xmlNewElementContent((xmlChar *) cur->name, cur->type);
if (ret == NULL) { if (ret == NULL) {
fprintf(stderr, "xmlCopyElementContent : out of memory\n"); fprintf(stderr, "xmlCopyElementContent : out of memory\n");
return(NULL); return(NULL);
@ -125,7 +125,7 @@ xmlFreeElementContent(xmlElementContentPtr cur) {
if (cur == NULL) return; if (cur == NULL) return;
if (cur->c1 != NULL) xmlFreeElementContent(cur->c1); if (cur->c1 != NULL) xmlFreeElementContent(cur->c1);
if (cur->c2 != NULL) xmlFreeElementContent(cur->c2); if (cur->c2 != NULL) xmlFreeElementContent(cur->c2);
if (cur->name != NULL) xmlFree((CHAR *) cur->name); if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
memset(cur, -1, sizeof(xmlElementContent)); memset(cur, -1, sizeof(xmlElementContent));
xmlFree(cur); xmlFree(cur);
} }
@ -307,7 +307,7 @@ xmlCreateElementTable(void) {
* Returns NULL if not, othervise the entity * Returns NULL if not, othervise the entity
*/ */
xmlElementPtr xmlElementPtr
xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *name, xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name,
xmlElementContentType type, xmlElementContentPtr content) { xmlElementContentType type, xmlElementContentPtr content) {
xmlElementPtr ret, cur; xmlElementPtr ret, cur;
xmlElementTablePtr table; xmlElementTablePtr table;
@ -426,7 +426,7 @@ xmlFreeElement(xmlElementPtr elem) {
if (elem == NULL) return; if (elem == NULL) return;
xmlFreeElementContent(elem->content); xmlFreeElementContent(elem->content);
if (elem->name != NULL) if (elem->name != NULL)
xmlFree((CHAR *) elem->name); xmlFree((xmlChar *) elem->name);
memset(elem, -1, sizeof(xmlElement)); memset(elem, -1, sizeof(xmlElement));
xmlFree(elem); xmlFree(elem);
} }
@ -558,7 +558,7 @@ xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
* of error. * of error.
*/ */
xmlEnumerationPtr xmlEnumerationPtr
xmlCreateEnumeration(CHAR *name) { xmlCreateEnumeration(xmlChar *name) {
xmlEnumerationPtr ret; xmlEnumerationPtr ret;
ret = (xmlEnumerationPtr) xmlMalloc(sizeof(xmlEnumeration)); ret = (xmlEnumerationPtr) xmlMalloc(sizeof(xmlEnumeration));
@ -588,7 +588,7 @@ xmlFreeEnumeration(xmlEnumerationPtr cur) {
if (cur->next != NULL) xmlFreeEnumeration(cur->next); if (cur->next != NULL) xmlFreeEnumeration(cur->next);
if (cur->name != NULL) xmlFree((CHAR *) cur->name); if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
memset(cur, -1, sizeof(xmlEnumeration)); memset(cur, -1, sizeof(xmlEnumeration));
xmlFree(cur); xmlFree(cur);
} }
@ -607,7 +607,7 @@ xmlCopyEnumeration(xmlEnumerationPtr cur) {
xmlEnumerationPtr ret; xmlEnumerationPtr ret;
if (cur == NULL) return(NULL); if (cur == NULL) return(NULL);
ret = xmlCreateEnumeration((CHAR *) cur->name); ret = xmlCreateEnumeration((xmlChar *) cur->name);
if (cur->next != NULL) ret->next = xmlCopyEnumeration(cur->next); if (cur->next != NULL) ret->next = xmlCopyEnumeration(cur->next);
else ret->next = NULL; else ret->next = NULL;
@ -679,7 +679,7 @@ xmlCreateAttributeTable(void) {
* possibly NULL. * possibly NULL.
*/ */
xmlAttributePtr xmlAttributePtr
xmlScanAttributeDecl(xmlDtdPtr dtd, const CHAR *elem) { xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
xmlAttributePtr ret = NULL; xmlAttributePtr ret = NULL;
xmlAttributeTablePtr table; xmlAttributeTablePtr table;
int i; int i;
@ -752,9 +752,9 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
* Returns NULL if not, othervise the entity * Returns NULL if not, othervise the entity
*/ */
xmlAttributePtr xmlAttributePtr
xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *elem, xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem,
const CHAR *name, xmlAttributeType type, const xmlChar *name, xmlAttributeType type,
xmlAttributeDefault def, const CHAR *defaultValue, xmlAttributeDefault def, const xmlChar *defaultValue,
xmlEnumerationPtr tree) { xmlEnumerationPtr tree) {
xmlAttributePtr ret, cur; xmlAttributePtr ret, cur;
xmlAttributeTablePtr table; xmlAttributeTablePtr table;
@ -896,11 +896,11 @@ xmlFreeAttribute(xmlAttributePtr attr) {
if (attr->tree != NULL) if (attr->tree != NULL)
xmlFreeEnumeration(attr->tree); xmlFreeEnumeration(attr->tree);
if (attr->elem != NULL) if (attr->elem != NULL)
xmlFree((CHAR *) attr->elem); xmlFree((xmlChar *) attr->elem);
if (attr->name != NULL) if (attr->name != NULL)
xmlFree((CHAR *) attr->name); xmlFree((xmlChar *) attr->name);
if (attr->defaultValue != NULL) if (attr->defaultValue != NULL)
xmlFree((CHAR *) attr->defaultValue); xmlFree((xmlChar *) attr->defaultValue);
memset(attr, -1, sizeof(xmlAttribute)); memset(attr, -1, sizeof(xmlAttribute));
xmlFree(attr); xmlFree(attr);
} }
@ -1116,8 +1116,8 @@ xmlCreateNotationTable(void) {
* Returns NULL if not, othervise the entity * Returns NULL if not, othervise the entity
*/ */
xmlNotationPtr xmlNotationPtr
xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *name, xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name,
const CHAR *PublicID, const CHAR *SystemID) { const xmlChar *PublicID, const xmlChar *SystemID) {
xmlNotationPtr ret, cur; xmlNotationPtr ret, cur;
xmlNotationTablePtr table; xmlNotationTablePtr table;
int i; int i;
@ -1210,11 +1210,11 @@ void
xmlFreeNotation(xmlNotationPtr nota) { xmlFreeNotation(xmlNotationPtr nota) {
if (nota == NULL) return; if (nota == NULL) return;
if (nota->name != NULL) if (nota->name != NULL)
xmlFree((CHAR *) nota->name); xmlFree((xmlChar *) nota->name);
if (nota->PublicID != NULL) if (nota->PublicID != NULL)
xmlFree((CHAR *) nota->PublicID); xmlFree((xmlChar *) nota->PublicID);
if (nota->SystemID != NULL) if (nota->SystemID != NULL)
xmlFree((CHAR *) nota->SystemID); xmlFree((xmlChar *) nota->SystemID);
memset(nota, -1, sizeof(xmlNotation)); memset(nota, -1, sizeof(xmlNotation));
xmlFree(nota); xmlFree(nota);
} }
@ -1375,7 +1375,7 @@ xmlCreateIDTable(void) {
* Returns NULL if not, othervise the new xmlIDPtr * Returns NULL if not, othervise the new xmlIDPtr
*/ */
xmlIDPtr xmlIDPtr
xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const CHAR *value, xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
xmlAttrPtr attr) { xmlAttrPtr attr) {
xmlIDPtr ret, cur; xmlIDPtr ret, cur;
xmlIDTablePtr table; xmlIDTablePtr table;
@ -1463,7 +1463,7 @@ void
xmlFreeID(xmlIDPtr id) { xmlFreeID(xmlIDPtr id) {
if (id == NULL) return; if (id == NULL) return;
if (id->value != NULL) if (id->value != NULL)
xmlFree((CHAR *) id->value); xmlFree((xmlChar *) id->value);
memset(id, -1, sizeof(xmlID)); memset(id, -1, sizeof(xmlID));
xmlFree(id); xmlFree(id);
} }
@ -1529,7 +1529,7 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
* Returns NULL if not found, otherwise the xmlAttrPtr defining the ID * Returns NULL if not found, otherwise the xmlAttrPtr defining the ID
*/ */
xmlAttrPtr xmlAttrPtr
xmlGetID(xmlDocPtr doc, const CHAR *ID) { xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
xmlIDPtr cur; xmlIDPtr cur;
xmlIDTablePtr table; xmlIDTablePtr table;
int i; int i;
@ -1610,7 +1610,7 @@ xmlCreateRefTable(void) {
* Returns NULL if not, othervise the new xmlRefPtr * Returns NULL if not, othervise the new xmlRefPtr
*/ */
xmlRefPtr xmlRefPtr
xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const CHAR *value, xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
xmlAttrPtr attr) { xmlAttrPtr attr) {
xmlRefPtr ret; xmlRefPtr ret;
xmlRefTablePtr table; xmlRefTablePtr table;
@ -1682,7 +1682,7 @@ void
xmlFreeRef(xmlRefPtr ref) { xmlFreeRef(xmlRefPtr ref) {
if (ref == NULL) return; if (ref == NULL) return;
if (ref->value != NULL) if (ref->value != NULL)
xmlFree((CHAR *) ref->value); xmlFree((xmlChar *) ref->value);
memset(ref, -1, sizeof(xmlRef)); memset(ref, -1, sizeof(xmlRef));
xmlFree(ref); xmlFree(ref);
} }
@ -1751,7 +1751,7 @@ xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
* Returns NULL if not found, otherwise the xmlAttrPtr defining the Ref * Returns NULL if not found, otherwise the xmlAttrPtr defining the Ref
*/ */
xmlAttrPtr xmlAttrPtr
xmlGetRef(xmlDocPtr doc, const CHAR *Ref) { xmlGetRef(xmlDocPtr doc, const xmlChar *Ref) {
xmlRefPtr cur; xmlRefPtr cur;
xmlRefTablePtr table; xmlRefTablePtr table;
int i; int i;
@ -1799,7 +1799,7 @@ xmlGetRef(xmlDocPtr doc, const CHAR *Ref) {
*/ */
xmlElementPtr xmlElementPtr
xmlGetDtdElementDesc(xmlDtdPtr dtd, const CHAR *name) { xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
xmlElementTablePtr table; xmlElementTablePtr table;
xmlElementPtr cur; xmlElementPtr cur;
int i; int i;
@ -1829,7 +1829,7 @@ xmlGetDtdElementDesc(xmlDtdPtr dtd, const CHAR *name) {
*/ */
xmlAttributePtr xmlAttributePtr
xmlGetDtdAttrDesc(xmlDtdPtr dtd, const CHAR *elem, const CHAR *name) { xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) {
xmlAttributeTablePtr table; xmlAttributeTablePtr table;
xmlAttributePtr cur; xmlAttributePtr cur;
int i; int i;
@ -1858,7 +1858,7 @@ xmlGetDtdAttrDesc(xmlDtdPtr dtd, const CHAR *elem, const CHAR *name) {
*/ */
xmlNotationPtr xmlNotationPtr
xmlGetDtdNotationDesc(xmlDtdPtr dtd, const CHAR *name) { xmlGetDtdNotationDesc(xmlDtdPtr dtd, const xmlChar *name) {
xmlNotationTablePtr table; xmlNotationTablePtr table;
xmlNotationPtr cur; xmlNotationPtr cur;
int i; int i;
@ -1889,7 +1889,7 @@ xmlGetDtdNotationDesc(xmlDtdPtr dtd, const CHAR *name) {
int int
xmlValidateNotationUse(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlValidateNotationUse(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
const CHAR *notationName) { const xmlChar *notationName) {
xmlNotationPtr notaDecl; xmlNotationPtr notaDecl;
if ((doc == NULL) || (doc->intSubset == NULL)) return(-1); if ((doc == NULL) || (doc->intSubset == NULL)) return(-1);
@ -1917,7 +1917,7 @@ xmlValidateNotationUse(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
*/ */
int int
xmlIsMixedElement(xmlDocPtr doc, const CHAR *name) { xmlIsMixedElement(xmlDocPtr doc, const xmlChar *name) {
xmlElementPtr elemDecl; xmlElementPtr elemDecl;
if ((doc == NULL) || (doc->intSubset == NULL)) return(-1); if ((doc == NULL) || (doc->intSubset == NULL)) return(-1);
@ -1951,8 +1951,8 @@ xmlIsMixedElement(xmlDocPtr doc, const CHAR *name) {
*/ */
int int
xmlValidateNameValue(const CHAR *value) { xmlValidateNameValue(const xmlChar *value) {
const CHAR *cur; const xmlChar *cur;
if (value == NULL) return(0); if (value == NULL) return(0);
cur = value; cur = value;
@ -1984,8 +1984,8 @@ xmlValidateNameValue(const CHAR *value) {
*/ */
int int
xmlValidateNamesValue(const CHAR *value) { xmlValidateNamesValue(const xmlChar *value) {
const CHAR *cur; const xmlChar *cur;
if (value == NULL) return(0); if (value == NULL) return(0);
cur = value; cur = value;
@ -2035,8 +2035,8 @@ xmlValidateNamesValue(const CHAR *value) {
*/ */
int int
xmlValidateNmtokenValue(const CHAR *value) { xmlValidateNmtokenValue(const xmlChar *value) {
const CHAR *cur; const xmlChar *cur;
if (value == NULL) return(0); if (value == NULL) return(0);
cur = value; cur = value;
@ -2073,8 +2073,8 @@ xmlValidateNmtokenValue(const CHAR *value) {
*/ */
int int
xmlValidateNmtokensValue(const CHAR *value) { xmlValidateNmtokensValue(const xmlChar *value) {
const CHAR *cur; const xmlChar *cur;
if (value == NULL) return(0); if (value == NULL) return(0);
cur = value; cur = value;
@ -2165,7 +2165,7 @@ xmlValidateNotationDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
*/ */
int int
xmlValidateAttributeValue(xmlAttributeType type, const CHAR *value) { xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value) {
switch (type) { switch (type) {
case XML_ATTRIBUTE_ENTITIES: case XML_ATTRIBUTE_ENTITIES:
case XML_ATTRIBUTE_IDREFS: case XML_ATTRIBUTE_IDREFS:
@ -2282,7 +2282,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
/* No Duplicate Types */ /* No Duplicate Types */
if (elem->type == XML_ELEMENT_TYPE_MIXED) { if (elem->type == XML_ELEMENT_TYPE_MIXED) {
xmlElementContentPtr cur, next; xmlElementContentPtr cur, next;
const CHAR *name; const xmlChar *name;
cur = elem->content; cur = elem->content;
while (cur != NULL) { while (cur != NULL) {
@ -2363,7 +2363,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
int int
xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlNodePtr elem, xmlAttrPtr attr, const CHAR *value) { xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value) {
/* xmlElementPtr elemDecl; */ /* xmlElementPtr elemDecl; */
xmlAttributePtr attrDecl; xmlAttributePtr attrDecl;
int val; int val;
@ -2711,7 +2711,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlElementContentPtr cont; xmlElementContentPtr cont;
xmlNodePtr child; xmlNodePtr child;
int ret = 1; int ret = 1;
const CHAR *name; const xmlChar *name;
CHECK_DTD; CHECK_DTD;
@ -2849,7 +2849,7 @@ int
xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) { xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
xmlNodePtr child; xmlNodePtr child;
xmlAttrPtr attr; xmlAttrPtr attr;
CHAR *value; xmlChar *value;
int ret = 1; int ret = 1;
/* TODO xmlValidateElement */ /* TODO xmlValidateElement */

40
valid.h
View File

@ -105,16 +105,16 @@ typedef xmlRefTable *xmlRefTablePtr;
/* Notation */ /* Notation */
xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *name, const xmlChar *name,
const CHAR *PublicID, const xmlChar *PublicID,
const CHAR *SystemID); const xmlChar *SystemID);
xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table);
void xmlFreeNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table);
void xmlDumpNotationTable(xmlBufferPtr buf, void xmlDumpNotationTable(xmlBufferPtr buf,
xmlNotationTablePtr table); xmlNotationTablePtr table);
/* Element Content */ /* Element Content */
xmlElementContentPtr xmlNewElementContent (CHAR *name, xmlElementContentPtr xmlNewElementContent (xmlChar *name,
xmlElementContentType type); xmlElementContentType type);
xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
void xmlFreeElementContent(xmlElementContentPtr cur); void xmlFreeElementContent(xmlElementContentPtr cur);
@ -122,7 +122,7 @@ void xmlFreeElementContent(xmlElementContentPtr cur);
/* Element */ /* Element */
xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *name, const xmlChar *name,
xmlElementContentType type, xmlElementContentType type,
xmlElementContentPtr content); xmlElementContentPtr content);
xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table);
@ -131,18 +131,18 @@ void xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table); xmlElementTablePtr table);
/* Enumeration */ /* Enumeration */
xmlEnumerationPtr xmlCreateEnumeration (CHAR *name); xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name);
void xmlFreeEnumeration (xmlEnumerationPtr cur); void xmlFreeEnumeration (xmlEnumerationPtr cur);
xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur); xmlEnumerationPtr xmlCopyEnumeration (xmlEnumerationPtr cur);
/* Attribute */ /* Attribute */
xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd, xmlDtdPtr dtd,
const CHAR *elem, const xmlChar *elem,
const CHAR *name, const xmlChar *name,
xmlAttributeType type, xmlAttributeType type,
xmlAttributeDefault def, xmlAttributeDefault def,
const CHAR *defaultValue, const xmlChar *defaultValue,
xmlEnumerationPtr tree); xmlEnumerationPtr tree);
xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table);
void xmlFreeAttributeTable (xmlAttributeTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table);
@ -152,12 +152,12 @@ void xmlDumpAttributeTable (xmlBufferPtr buf,
/* IDs */ /* IDs */
xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table); xmlIDTablePtr xmlCopyIDTable (xmlIDTablePtr table);
void xmlFreeIDTable (xmlIDTablePtr table); void xmlFreeIDTable (xmlIDTablePtr table);
xmlAttrPtr xmlGetID (xmlDocPtr doc, xmlAttrPtr xmlGetID (xmlDocPtr doc,
const CHAR *ID); const xmlChar *ID);
int xmlIsID (xmlDocPtr doc, int xmlIsID (xmlDocPtr doc,
xmlNodePtr elem, xmlNodePtr elem,
xmlAttrPtr attr); xmlAttrPtr attr);
@ -165,7 +165,7 @@ int xmlIsID (xmlDocPtr doc,
/* IDREFs */ /* IDREFs */
xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *value, const xmlChar *value,
xmlAttrPtr attr); xmlAttrPtr attr);
xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table); xmlRefTablePtr xmlCopyRefTable (xmlRefTablePtr table);
void xmlFreeRefTable (xmlRefTablePtr table); void xmlFreeRefTable (xmlRefTablePtr table);
@ -186,7 +186,7 @@ int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlAttributePtr attr); xmlAttributePtr attr);
int xmlValidateAttributeValue(xmlAttributeType type, int xmlValidateAttributeValue(xmlAttributeType type,
const CHAR *value); const xmlChar *value);
int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNotationPtr nota); xmlNotationPtr nota);
@ -205,21 +205,21 @@ int xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr elem, xmlNodePtr elem,
xmlAttrPtr attr, xmlAttrPtr attr,
const CHAR *value); const xmlChar *value);
int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, int xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc); xmlDocPtr doc);
int xmlValidateNotationUse (xmlValidCtxtPtr ctxt, int xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
const CHAR *notationName); const xmlChar *notationName);
int xmlIsMixedElement (xmlDocPtr doc, int xmlIsMixedElement (xmlDocPtr doc,
const CHAR *name); const xmlChar *name);
xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd, xmlAttributePtr xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const CHAR *elem, const xmlChar *elem,
const CHAR *name); const xmlChar *name);
xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd, xmlNotationPtr xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const CHAR *name); const xmlChar *name);
xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd,
const CHAR *name); const xmlChar *name);
#ifdef __cplusplus #ifdef __cplusplus
} }

10
xmlIO.c
View File

@ -311,23 +311,23 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
return(-1); return(-1);
} }
if (in->encoder != NULL) { if (in->encoder != NULL) {
CHAR *buf; xmlChar *buf;
buf = (CHAR *) xmlMalloc((res + 1) * 2 * sizeof(CHAR)); buf = (xmlChar *) xmlMalloc((res + 1) * 2 * sizeof(xmlChar));
if (buf == NULL) { if (buf == NULL) {
fprintf(stderr, "xmlParserInputBufferGrow : out of memory !\n"); fprintf(stderr, "xmlParserInputBufferGrow : out of memory !\n");
xmlFree(buffer); xmlFree(buffer);
return(-1); return(-1);
} }
nbchars = in->encoder->input(buf, (res + 1) * 2 * sizeof(CHAR), nbchars = in->encoder->input(buf, (res + 1) * 2 * sizeof(xmlChar),
BAD_CAST buffer, res); BAD_CAST buffer, res);
buf[nbchars] = 0; buf[nbchars] = 0;
xmlBufferAdd(in->buffer, (CHAR *) buf, nbchars); xmlBufferAdd(in->buffer, (xmlChar *) buf, nbchars);
xmlFree(buf); xmlFree(buf);
} else { } else {
nbchars = res; nbchars = res;
buffer[nbchars] = 0; buffer[nbchars] = 0;
xmlBufferAdd(in->buffer, (CHAR *) buffer, nbchars); xmlBufferAdd(in->buffer, (xmlChar *) buffer, nbchars);
} }
#ifdef DEBUG_INPUT #ifdef DEBUG_INPUT
fprintf(stderr, "I/O: read %d chars, buffer %d/%d\n", fprintf(stderr, "I/O: read %d chars, buffer %d/%d\n",

100
xpath.c
View File

@ -166,7 +166,7 @@ FILE *xmlXPathDebug = NULL;
fprintf(xmlXPathDebug, "Internal error at %s:%d\n", \ fprintf(xmlXPathDebug, "Internal error at %s:%d\n", \
__FILE__, __LINE__); __FILE__, __LINE__);
double xmlXPathStringEvalNumber(const CHAR *str); double xmlXPathStringEvalNumber(const xmlChar *str);
void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
/************************************************************************ /************************************************************************
@ -215,21 +215,21 @@ PUSH_AND_POP(xmlXPathObjectPtr, value)
* *
* Dirty macros, i.e. one need to make assumption on the context to use them * 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_PTR return the current pointer to the xmlChar to be parsed.
* CUR returns the current CHAR value, i.e. a 8 bit value if compiled * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled
* in ISO-Latin or UTF-8, and the current 16 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 * in UNICODE mode. This should be used internally by the parser
* only to compare to ASCII values otherwise it would break when * only to compare to ASCII values otherwise it would break when
* running with UTF-8 encoding. * running with UTF-8 encoding.
* NXT(n) returns the n'th next CHAR. Same as CUR is should be used only * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
* to compare on ASCII based substring. * to compare on ASCII based substring.
* SKIP(n) Skip n CHAR, and must also be used only to skip ASCII defined * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
* strings within the parser. * strings within the parser.
* CURRENT Returns the current char value, with the full decoding of * CURRENT Returns the current char value, with the full decoding of
* UTF-8 if we are using this mode. It returns an int. * UTF-8 if we are using this mode. It returns an int.
* NEXT Skip to the next character, this does the proper decoding * NEXT Skip to the next character, this does the proper decoding
* in UTF-8 mode. It also pop-up unfinished entities on the fly. * in UTF-8 mode. It also pop-up unfinished entities on the fly.
* It returns the pointer to the current CHAR. * It returns the pointer to the current xmlChar.
*/ */
#define CUR (*ctxt->cur) #define CUR (*ctxt->cur)
@ -297,8 +297,8 @@ void
xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file, xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file,
int line, int no) { int line, int no) {
int n; int n;
const CHAR *cur; const xmlChar *cur;
const CHAR *base; const xmlChar *base;
fprintf(xmlXPathDebug, "Error %s:%d: %s\n", file, line, fprintf(xmlXPathDebug, "Error %s:%d: %s\n", file, line,
xmlXPathErrorMessages[no]); xmlXPathErrorMessages[no]);
@ -595,7 +595,7 @@ xmlXPathDebugNodeSet(FILE *output, xmlNodeSetPtr obj) {
*/ */
xmlXPathObjectPtr xmlXPathObjectPtr
xmlXPathVariablelookup(xmlXPathParserContextPtr ctxt, xmlXPathVariablelookup(xmlXPathParserContextPtr ctxt,
const CHAR *prefix, const CHAR *name) { const xmlChar *prefix, const xmlChar *name) {
return(NULL); return(NULL);
} }
@ -655,14 +655,14 @@ xmlXPathNewBoolean(int val) {
/** /**
* xmlXPathNewString: * xmlXPathNewString:
* @val: the CHAR * value * @val: the xmlChar * value
* *
* Create a new xmlXPathObjectPtr of type string and of value @val * Create a new xmlXPathObjectPtr of type string and of value @val
* *
* Returns the newly created object. * Returns the newly created object.
*/ */
xmlXPathObjectPtr xmlXPathObjectPtr
xmlXPathNewString(const CHAR *val) { xmlXPathNewString(const xmlChar *val) {
xmlXPathObjectPtr ret; xmlXPathObjectPtr ret;
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
@ -872,7 +872,7 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
* Returns the xmlXPathParserContext just allocated. * Returns the xmlXPathParserContext just allocated.
*/ */
xmlXPathParserContextPtr xmlXPathParserContextPtr
xmlXPathNewParserContext(const CHAR *str, xmlXPathContextPtr ctxt) { xmlXPathNewParserContext(const xmlChar *str, xmlXPathContextPtr ctxt) {
xmlXPathParserContextPtr ret; xmlXPathParserContextPtr ret;
ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext)); ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext));
@ -955,10 +955,10 @@ void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
* Returns 0 or 1 depending on the results of the test. * Returns 0 or 1 depending on the results of the test.
*/ */
int int
xmlXPathEqualNodeSetString(xmlXPathObjectPtr arg, const CHAR *str) { xmlXPathEqualNodeSetString(xmlXPathObjectPtr arg, const xmlChar *str) {
int i; int i;
xmlNodeSetPtr ns; xmlNodeSetPtr ns;
CHAR *str2; xmlChar *str2;
if ((str == NULL) || (arg == NULL) || (arg->type != XPATH_NODESET)) if ((str == NULL) || (arg == NULL) || (arg->type != XPATH_NODESET))
return(0); return(0);
@ -1027,7 +1027,7 @@ int
xmlXPathEqualNodeSets(xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2) { xmlXPathEqualNodeSets(xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2) {
int i; int i;
xmlNodeSetPtr ns; xmlNodeSetPtr ns;
CHAR *str; xmlChar *str;
if ((arg1 == NULL) || (arg1->type != XPATH_NODESET)) if ((arg1 == NULL) || (arg1->type != XPATH_NODESET))
return(0); return(0);
@ -1820,7 +1820,7 @@ xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlAttrPtr cur) {
*/ */
xmlNodeSetPtr xmlNodeSetPtr
xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, int axis, xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, int axis,
int test, int type, const CHAR *prefix, const CHAR *name) { int test, int type, const xmlChar *prefix, const xmlChar *name) {
#ifdef DEBUG_STEP #ifdef DEBUG_STEP
int n = 0, t = 0; int n = 0, t = 0;
#endif #endif
@ -2141,9 +2141,9 @@ xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs) {
*/ */
void void
xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) {
const CHAR *tokens; const xmlChar *tokens;
const CHAR *cur; const xmlChar *cur;
CHAR *ID; xmlChar *ID;
xmlAttrPtr attr; xmlAttrPtr attr;
xmlNodePtr elem = NULL; xmlNodePtr elem = NULL;
xmlXPathObjectPtr ret, obj; xmlXPathObjectPtr ret, obj;
@ -2357,7 +2357,7 @@ xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
if (cur->nodesetval->nodeNr == 0) { if (cur->nodesetval->nodeNr == 0) {
valuePush(ctxt, xmlXPathNewCString("")); valuePush(ctxt, xmlXPathNewCString(""));
} else { } else {
CHAR *res; xmlChar *res;
int i = 0; /* Should be first in document order !!!!! */ int i = 0; /* Should be first in document order !!!!! */
res = xmlNodeGetContent(cur->nodesetval->nodeTab[i]); res = xmlNodeGetContent(cur->nodesetval->nodeTab[i]);
valuePush(ctxt, xmlXPathNewString(res)); valuePush(ctxt, xmlXPathNewString(res));
@ -2410,7 +2410,7 @@ xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs) {
if (ctxt->context->node == NULL) { if (ctxt->context->node == NULL) {
valuePush(ctxt, xmlXPathNewFloat(0)); valuePush(ctxt, xmlXPathNewFloat(0));
} else { } else {
CHAR *content; xmlChar *content;
content = xmlNodeGetContent(ctxt->context->node); content = xmlNodeGetContent(ctxt->context->node);
valuePush(ctxt, xmlXPathNewFloat(xmlStrlen(content))); valuePush(ctxt, xmlXPathNewFloat(xmlStrlen(content)));
@ -2435,7 +2435,7 @@ xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs) {
void void
xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr cur, new; xmlXPathObjectPtr cur, new;
CHAR *tmp; xmlChar *tmp;
if (nargs < 2) { if (nargs < 2) {
CHECK_ARITY(2); CHECK_ARITY(2);
@ -2556,7 +2556,7 @@ xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr str, start, len; xmlXPathObjectPtr str, start, len;
double le, in; double le, in;
int i, l; int i, l;
CHAR *ret; xmlChar *ret;
/* /*
* Conformance needs to be checked !!!!! * Conformance needs to be checked !!!!!
@ -2800,8 +2800,8 @@ xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs) {
void void
xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr val; xmlXPathObjectPtr val;
const CHAR *theLang; const xmlChar *theLang;
const CHAR *lang; const xmlChar *lang;
int ret = 0; int ret = 0;
int i; int i;
@ -2959,10 +2959,10 @@ void xmlXPathEvalRelativeLocationPath(xmlXPathParserContextPtr ctxt);
* Returns the namespace name or NULL * Returns the namespace name or NULL
*/ */
CHAR * xmlChar *
xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) { xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
const CHAR *q; const xmlChar *q;
CHAR *ret = NULL; xmlChar *ret = NULL;
if (!IS_LETTER(CUR) && (CUR != '_')) return(NULL); if (!IS_LETTER(CUR) && (CUR != '_')) return(NULL);
q = NEXT; q = NEXT;
@ -2982,7 +2982,7 @@ xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
/** /**
* xmlXPathParseQName: * xmlXPathParseQName:
* @ctxt: the XPath Parser context * @ctxt: the XPath Parser context
* @prefix: a CHAR ** * @prefix: a xmlChar **
* *
* parse an XML qualified name * parse an XML qualified name
* *
@ -2996,9 +2996,9 @@ xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
* to get the Prefix if any. * to get the Prefix if any.
*/ */
CHAR * xmlChar *
xmlXPathParseQName(xmlXPathParserContextPtr ctxt, CHAR **prefix) { xmlXPathParseQName(xmlXPathParserContextPtr ctxt, xmlChar **prefix) {
CHAR *ret = NULL; xmlChar *ret = NULL;
*prefix = NULL; *prefix = NULL;
ret = xmlXPathParseNCName(ctxt); ret = xmlXPathParseNCName(ctxt);
@ -3026,8 +3026,8 @@ xmlXPathParseQName(xmlXPathParserContextPtr ctxt, CHAR **prefix) {
* Returns the double value. * Returns the double value.
*/ */
double double
xmlXPathStringEvalNumber(const CHAR *str) { xmlXPathStringEvalNumber(const xmlChar *str) {
const CHAR *cur = str; const xmlChar *cur = str;
double ret = 0.0; double ret = 0.0;
double mult = 1; double mult = 1;
int ok = 0; int ok = 0;
@ -3112,8 +3112,8 @@ xmlXPathEvalNumber(xmlXPathParserContextPtr ctxt) {
*/ */
void void
xmlXPathEvalLiteral(xmlXPathParserContextPtr ctxt) { xmlXPathEvalLiteral(xmlXPathParserContextPtr ctxt) {
const CHAR *q; const xmlChar *q;
CHAR *ret = NULL; xmlChar *ret = NULL;
if (CUR == '"') { if (CUR == '"') {
NEXT; NEXT;
@ -3164,8 +3164,8 @@ xmlXPathEvalLiteral(xmlXPathParserContextPtr ctxt) {
*/ */
void void
xmlXPathEvalVariableReference(xmlXPathParserContextPtr ctxt) { xmlXPathEvalVariableReference(xmlXPathParserContextPtr ctxt) {
CHAR *name; xmlChar *name;
CHAR *prefix; xmlChar *prefix;
xmlXPathObjectPtr value; xmlXPathObjectPtr value;
if (CUR != '$') { if (CUR != '$') {
@ -3199,7 +3199,7 @@ xmlXPathEvalVariableReference(xmlXPathParserContextPtr ctxt) {
* Returns the xmlXPathFunction if found, or NULL otherwise * Returns the xmlXPathFunction if found, or NULL otherwise
*/ */
xmlXPathFunction xmlXPathFunction
xmlXPathIsFunction(xmlXPathParserContextPtr ctxt, const CHAR *name) { xmlXPathIsFunction(xmlXPathParserContextPtr ctxt, const xmlChar *name) {
switch (name[0]) { switch (name[0]) {
case 'b': case 'b':
if (!xmlStrcmp(name, BAD_CAST "boolean")) if (!xmlStrcmp(name, BAD_CAST "boolean"))
@ -3306,7 +3306,7 @@ xmlXPathIsFunction(xmlXPathParserContextPtr ctxt, const CHAR *name) {
* | 'node' * | 'node'
*/ */
int int
xmlXPathGetNameType(xmlXPathParserContextPtr ctxt, const CHAR *name) { xmlXPathGetNameType(xmlXPathParserContextPtr ctxt, const xmlChar *name) {
switch (name[0]) { switch (name[0]) {
case 'a': case 'a':
if (!xmlStrcmp(name, BAD_CAST "ancestor")) return(AXIS_ANCESTOR); if (!xmlStrcmp(name, BAD_CAST "ancestor")) return(AXIS_ANCESTOR);
@ -3364,8 +3364,8 @@ xmlXPathGetNameType(xmlXPathParserContextPtr ctxt, const CHAR *name) {
*/ */
void void
xmlXPathEvalFunctionCall(xmlXPathParserContextPtr ctxt) { xmlXPathEvalFunctionCall(xmlXPathParserContextPtr ctxt) {
CHAR *name; xmlChar *name;
CHAR *prefix; xmlChar *prefix;
xmlXPathFunction func; xmlXPathFunction func;
int nbargs = 0; int nbargs = 0;
@ -3487,9 +3487,9 @@ xmlXPathEvalFilterExpr(xmlXPathParserContextPtr ctxt) {
* Returns the Name parsed or NULL * Returns the Name parsed or NULL
*/ */
CHAR * xmlChar *
xmlXPathScanName(xmlXPathParserContextPtr ctxt) { xmlXPathScanName(xmlXPathParserContextPtr ctxt) {
CHAR buf[XML_MAX_NAMELEN]; xmlChar buf[XML_MAX_NAMELEN];
int len = 0; int len = 0;
if (!IS_LETTER(CUR) && (CUR != '_') && if (!IS_LETTER(CUR) && (CUR != '_') &&
@ -3562,7 +3562,7 @@ xmlXPathEvalPathExpr(xmlXPathParserContextPtr ctxt) {
xmlXPathEvalRelativeLocationPath(ctxt); xmlXPathEvalRelativeLocationPath(ctxt);
} }
} else { } else {
CHAR *name; xmlChar *name;
name = xmlXPathScanName(ctxt); name = xmlXPathScanName(ctxt);
if ((name == NULL) || (!xmlXPathIsFunction(ctxt, name))) if ((name == NULL) || (!xmlXPathIsFunction(ctxt, name)))
@ -3887,7 +3887,7 @@ xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
*/ */
void void
xmlXPathEvalPredicate(xmlXPathParserContextPtr ctxt) { xmlXPathEvalPredicate(xmlXPathParserContextPtr ctxt) {
const CHAR *cur; const xmlChar *cur;
xmlXPathObjectPtr res; xmlXPathObjectPtr res;
xmlNodeSetPtr newset = NULL; xmlNodeSetPtr newset = NULL;
int i; int i;
@ -3953,8 +3953,8 @@ xmlXPathEvalPredicate(xmlXPathParserContextPtr ctxt) {
*/ */
void void
xmlXPathEvalBasis(xmlXPathParserContextPtr ctxt) { xmlXPathEvalBasis(xmlXPathParserContextPtr ctxt) {
CHAR *name = NULL; xmlChar *name = NULL;
CHAR *prefix = NULL; xmlChar *prefix = NULL;
int type = 0; int type = 0;
int axis = AXIS_CHILD; /* the default on abbreviated syntax */ int axis = AXIS_CHILD; /* the default on abbreviated syntax */
int nodetest = NODE_TEST_NONE; int nodetest = NODE_TEST_NONE;
@ -4370,7 +4370,7 @@ xmlXPathEvalLocationPath(xmlXPathParserContextPtr ctxt) {
* the caller has to free the object. * the caller has to free the object.
*/ */
xmlXPathObjectPtr xmlXPathObjectPtr
xmlXPathEval(const CHAR *str, xmlXPathContextPtr ctxt) { xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctxt) {
xmlXPathParserContextPtr pctxt; xmlXPathParserContextPtr pctxt;
xmlXPathObjectPtr res = NULL, tmp; xmlXPathObjectPtr res = NULL, tmp;
@ -4406,7 +4406,7 @@ xmlXPathEval(const CHAR *str, xmlXPathContextPtr ctxt) {
* the caller has to free the object. * the caller has to free the object.
*/ */
xmlXPathObjectPtr xmlXPathObjectPtr
xmlXPathEvalExpression(const CHAR *str, xmlXPathContextPtr ctxt) { xmlXPathEvalExpression(const xmlChar *str, xmlXPathContextPtr ctxt) {
xmlXPathParserContextPtr pctxt; xmlXPathParserContextPtr pctxt;
xmlXPathObjectPtr res, tmp; xmlXPathObjectPtr res, tmp;

26
xpath.h
View File

@ -46,7 +46,7 @@ typedef struct xmlXPathObject {
xmlNodeSetPtr nodesetval; xmlNodeSetPtr nodesetval;
int boolval; int boolval;
double floatval; double floatval;
CHAR *stringval; xmlChar *stringval;
void *user; void *user;
} xmlXPathObject, *xmlXPathObjectPtr; } xmlXPathObject, *xmlXPathObjectPtr;
@ -61,7 +61,7 @@ typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
*/ */
typedef struct xmlXPathType { typedef struct xmlXPathType {
const CHAR *name; /* the type name */ const xmlChar *name; /* the type name */
xmlXPathConvertFunc func; /* the conversion function */ xmlXPathConvertFunc func; /* the conversion function */
} xmlXPathType, *xmlXPathTypePtr; } xmlXPathType, *xmlXPathTypePtr;
@ -70,7 +70,7 @@ typedef struct xmlXPathType {
*/ */
typedef struct xmlXPathVariable { typedef struct xmlXPathVariable {
const CHAR *name; /* the variable name */ const xmlChar *name; /* the variable name */
xmlXPathObjectPtr value; /* the value */ xmlXPathObjectPtr value; /* the value */
} xmlXPathVariable, *xmlXPathVariablePtr; } xmlXPathVariable, *xmlXPathVariablePtr;
@ -85,7 +85,7 @@ typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs);
*/ */
typedef struct xmlXPathFunct { typedef struct xmlXPathFunct {
const CHAR *name; /* the function name */ const xmlChar *name; /* the function name */
xmlXPathEvalFunc func; /* the evaluation function */ xmlXPathEvalFunc func; /* the evaluation function */
} xmlXPathFunc, *xmlXPathFuncPtr; } xmlXPathFunc, *xmlXPathFuncPtr;
@ -103,7 +103,7 @@ typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
*/ */
typedef struct xmlXPathAxis { typedef struct xmlXPathAxis {
const CHAR *name; /* the axis name */ const xmlChar *name; /* the axis name */
xmlXPathAxisFunc func; /* the search function */ xmlXPathAxisFunc func; /* the search function */
} xmlXPathAxis, *xmlXPathAxisPtr; } xmlXPathAxis, *xmlXPathAxisPtr;
@ -149,8 +149,8 @@ typedef struct xmlXPathContext {
* an xmlXPathContext, and the stack of objects. * an xmlXPathContext, and the stack of objects.
*/ */
typedef struct xmlXPathParserContext { typedef struct xmlXPathParserContext {
const CHAR *cur; /* the current char being parsed */ const xmlChar *cur; /* the current char being parsed */
const CHAR *base; /* the full expression */ const xmlChar *base; /* the full expression */
int error; /* error code */ int error; /* error code */
@ -179,16 +179,16 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
* Registering extensions to the expression language * Registering extensions to the expression language
*/ */
/* TODO */ int xmlXPathRegisterType (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterType (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathConvertFunc f); xmlXPathConvertFunc f);
/* TODO */ int xmlXPathRegisterAxis (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterAxis (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathAxisFunc f); xmlXPathAxisFunc f);
/* TODO */ int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathFunction f); xmlXPathFunction f);
/* TODO */ int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, /* TODO */ int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const CHAR *name, const xmlChar *name,
xmlXPathObject value); xmlXPathObject value);
/** /**
@ -196,10 +196,10 @@ typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
*/ */
xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc);
void xmlXPathFreeContext (xmlXPathContextPtr ctxt); void xmlXPathFreeContext (xmlXPathContextPtr ctxt);
xmlXPathObjectPtr xmlXPathEval (const CHAR *str, xmlXPathObjectPtr xmlXPathEval (const xmlChar *str,
xmlXPathContextPtr ctxt); xmlXPathContextPtr ctxt);
void xmlXPathFreeObject (xmlXPathObjectPtr obj); void xmlXPathFreeObject (xmlXPathObjectPtr obj);
xmlXPathObjectPtr xmlXPathEvalExpression (const CHAR *str, xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt); xmlXPathContextPtr ctxt);
#endif /* ! __XML_XPATH_H__ */ #endif /* ! __XML_XPATH_H__ */