updated to more recent libxml2 version (work in progress)
This commit is contained in:
@@ -192,16 +192,16 @@ htmlnamePop(htmlParserCtxtPtr ctxt)
|
|||||||
const xmlChar *ret;
|
const xmlChar *ret;
|
||||||
|
|
||||||
if (ctxt->nameNr <= 0)
|
if (ctxt->nameNr <= 0)
|
||||||
return (0);
|
return (NULL);
|
||||||
ctxt->nameNr--;
|
ctxt->nameNr--;
|
||||||
if (ctxt->nameNr < 0)
|
if (ctxt->nameNr < 0)
|
||||||
return (0);
|
return (NULL);
|
||||||
if (ctxt->nameNr > 0)
|
if (ctxt->nameNr > 0)
|
||||||
ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
|
ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
|
||||||
else
|
else
|
||||||
ctxt->name = NULL;
|
ctxt->name = NULL;
|
||||||
ret = ctxt->nameTab[ctxt->nameNr];
|
ret = ctxt->nameTab[ctxt->nameNr];
|
||||||
ctxt->nameTab[ctxt->nameNr] = 0;
|
ctxt->nameTab[ctxt->nameNr] = NULL;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ htmlnamePop(htmlParserCtxtPtr ctxt)
|
|||||||
* 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.
|
||||||
* NEXTL(l) Skip the current Unicode character of l xmlChars long.
|
* NEXTL(l) Skip the current unicode character of l xmlChars long.
|
||||||
* COPY(to) copy one char to *to, increment CUR_PTR and to accordingly
|
* COPY(to) copy one char to *to, increment CUR_PTR and to accordingly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -964,7 +964,6 @@ NULL
|
|||||||
static const char *htmlNoContentElements[] = {
|
static const char *htmlNoContentElements[] = {
|
||||||
"html",
|
"html",
|
||||||
"head",
|
"head",
|
||||||
"body",
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1745,7 +1744,7 @@ htmlEntityLookup(const xmlChar *name) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlEntityValueLookup:
|
* htmlEntityValueLookup:
|
||||||
* @value: the entity's Unicode value
|
* @value: the entity's unicode value
|
||||||
*
|
*
|
||||||
* Lookup the given entity in EntitiesTable
|
* Lookup the given entity in EntitiesTable
|
||||||
*
|
*
|
||||||
@@ -2042,6 +2041,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
int j;
|
int j;
|
||||||
xmlNodePtr lastChild;
|
xmlNodePtr lastChild;
|
||||||
|
xmlDtdPtr dtd;
|
||||||
|
|
||||||
for (j = 0;j < len;j++)
|
for (j = 0;j < len;j++)
|
||||||
if (!(IS_BLANK_CH(str[j]))) return(0);
|
if (!(IS_BLANK_CH(str[j]))) return(0);
|
||||||
@@ -2054,8 +2054,17 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
|
|||||||
return(1);
|
return(1);
|
||||||
if (xmlStrEqual(ctxt->name, BAD_CAST"head"))
|
if (xmlStrEqual(ctxt->name, BAD_CAST"head"))
|
||||||
return(1);
|
return(1);
|
||||||
if (xmlStrEqual(ctxt->name, BAD_CAST"body"))
|
|
||||||
return(1);
|
/* Only strip CDATA children of the body tag for strict HTML DTDs */
|
||||||
|
if (xmlStrEqual(ctxt->name, BAD_CAST "body") && ctxt->myDoc != NULL) {
|
||||||
|
dtd = xmlGetIntSubset(ctxt->myDoc);
|
||||||
|
if (dtd != NULL && dtd->ExternalID != NULL) {
|
||||||
|
if (!xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4.01//EN") ||
|
||||||
|
!xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4//EN"))
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ctxt->node == NULL) return(0);
|
if (ctxt->node == NULL) return(0);
|
||||||
lastChild = xmlGetLastChild(ctxt->node);
|
lastChild = xmlGetLastChild(ctxt->node);
|
||||||
while ((lastChild) && (lastChild->type == XML_COMMENT_NODE))
|
while ((lastChild) && (lastChild->type == XML_COMMENT_NODE))
|
||||||
@@ -2627,12 +2636,12 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
htmlParseScript(htmlParserCtxtPtr ctxt) {
|
htmlParseScript(htmlParserCtxtPtr ctxt) {
|
||||||
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 1];
|
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
|
||||||
int nbchar = 0;
|
int nbchar = 0;
|
||||||
xmlChar cur;
|
int cur,l;
|
||||||
|
|
||||||
SHRINK;
|
SHRINK;
|
||||||
cur = CUR;
|
cur = CUR_CHAR(l);
|
||||||
while (IS_CHAR_CH(cur)) {
|
while (IS_CHAR_CH(cur)) {
|
||||||
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
|
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
|
||||||
(NXT(3) == '-')) {
|
(NXT(3) == '-')) {
|
||||||
@@ -2648,20 +2657,39 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||||||
}
|
}
|
||||||
nbchar = 0;
|
nbchar = 0;
|
||||||
htmlParseComment(ctxt);
|
htmlParseComment(ctxt);
|
||||||
cur = CUR;
|
cur = CUR_CHAR(l);
|
||||||
continue;
|
continue;
|
||||||
} else if ((cur == '<') && (NXT(1) == '/')) {
|
} else if ((cur == '<') && (NXT(1) == '/')) {
|
||||||
/*
|
/*
|
||||||
* One should break here, the specification is clear:
|
* One should break here, the specification is clear:
|
||||||
* Authors should therefore escape "</" within the content.
|
* Authors should therefore escape "</" within the content.
|
||||||
* Escape mechanisms are specific to each scripting or
|
* Escape mechanisms are specific to each scripting or
|
||||||
* style sheet language.
|
* style sheet language.
|
||||||
*/
|
*
|
||||||
if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
|
* In recovery mode, only break if end tag match the
|
||||||
((NXT(2) >= 'a') && (NXT(2) <= 'z')))
|
* current tag, effectively ignoring all tags inside the
|
||||||
break; /* while */
|
* script/style block and treating the entire block as
|
||||||
|
* CDATA.
|
||||||
|
*/
|
||||||
|
if (ctxt->recovery) {
|
||||||
|
if (xmlStrncasecmp(ctxt->name, ctxt->input->cur+2,
|
||||||
|
xmlStrlen(ctxt->name)) == 0)
|
||||||
|
{
|
||||||
|
break; /* while */
|
||||||
|
} else {
|
||||||
|
htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
|
||||||
|
"Element %s embeds close tag\n",
|
||||||
|
ctxt->name, NULL);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
|
||||||
|
((NXT(2) >= 'a') && (NXT(2) <= 'z')))
|
||||||
|
{
|
||||||
|
break; /* while */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
buf[nbchar++] = cur;
|
COPY_BUF(l,buf,nbchar,cur);
|
||||||
if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
|
if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
|
||||||
if (ctxt->sax->cdataBlock!= NULL) {
|
if (ctxt->sax->cdataBlock!= NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -2673,9 +2701,11 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||||||
}
|
}
|
||||||
nbchar = 0;
|
nbchar = 0;
|
||||||
}
|
}
|
||||||
NEXT;
|
GROW;
|
||||||
cur = CUR;
|
NEXTL(l);
|
||||||
|
cur = CUR_CHAR(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(IS_CHAR_CH(cur))) {
|
if (!(IS_CHAR_CH(cur))) {
|
||||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||||
"Invalid char in CDATA 0x%X\n", cur);
|
"Invalid char in CDATA 0x%X\n", cur);
|
||||||
@@ -2743,6 +2773,8 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nbchar != 0) {
|
if (nbchar != 0) {
|
||||||
|
buf[nbchar] = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ok the segment is to be consumed as chars.
|
* Ok the segment is to be consumed as chars.
|
||||||
*/
|
*/
|
||||||
@@ -3349,27 +3381,31 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
|
|||||||
*
|
*
|
||||||
* [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
|
* [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
|
||||||
*
|
*
|
||||||
|
* Returns 0 in case of success and -1 in case of error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static int
|
||||||
htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
const xmlChar *attname;
|
const xmlChar *attname;
|
||||||
xmlChar *attvalue;
|
xmlChar *attvalue;
|
||||||
const xmlChar **atts = ctxt->atts;
|
const xmlChar **atts;
|
||||||
int nbatts = 0;
|
int nbatts = 0;
|
||||||
int maxatts = ctxt->maxatts;
|
int maxatts;
|
||||||
int meta = 0;
|
int meta = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
||||||
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
|
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||||
"htmlParseStartTag: context error\n", NULL, NULL);
|
"htmlParseStartTag: context error\n", NULL, NULL);
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
if (CUR != '<') return;
|
if (CUR != '<') return -1;
|
||||||
NEXT;
|
NEXT;
|
||||||
|
|
||||||
|
atts = ctxt->atts;
|
||||||
|
maxatts = ctxt->maxatts;
|
||||||
|
|
||||||
GROW;
|
GROW;
|
||||||
name = htmlParseHTMLName(ctxt);
|
name = htmlParseHTMLName(ctxt);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
@@ -3379,7 +3415,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
/* Dump the bogus tag like browsers do */
|
/* Dump the bogus tag like browsers do */
|
||||||
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
|
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
|
||||||
NEXT;
|
NEXT;
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
if (xmlStrEqual(name, BAD_CAST"meta"))
|
if (xmlStrEqual(name, BAD_CAST"meta"))
|
||||||
meta = 1;
|
meta = 1;
|
||||||
@@ -3402,14 +3438,14 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
|
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
|
||||||
"htmlParseStartTag: misplaced <html> tag\n",
|
"htmlParseStartTag: misplaced <html> tag\n",
|
||||||
name, NULL);
|
name, NULL);
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((ctxt->nameNr != 1) &&
|
if ((ctxt->nameNr != 1) &&
|
||||||
(xmlStrEqual(name, BAD_CAST"head"))) {
|
(xmlStrEqual(name, BAD_CAST"head"))) {
|
||||||
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
|
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
|
||||||
"htmlParseStartTag: misplaced <head> tag\n",
|
"htmlParseStartTag: misplaced <head> tag\n",
|
||||||
name, NULL);
|
name, NULL);
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
if (xmlStrEqual(name, BAD_CAST"body")) {
|
if (xmlStrEqual(name, BAD_CAST"body")) {
|
||||||
int indx;
|
int indx;
|
||||||
@@ -3420,7 +3456,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
name, NULL);
|
name, NULL);
|
||||||
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
|
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
|
||||||
NEXT;
|
NEXT;
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3533,6 +3569,8 @@ failed:
|
|||||||
xmlFree((xmlChar *) atts[i]);
|
xmlFree((xmlChar *) atts[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3575,6 +3613,15 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt)
|
|||||||
if ((!IS_CHAR_CH(CUR)) || (CUR != '>')) {
|
if ((!IS_CHAR_CH(CUR)) || (CUR != '>')) {
|
||||||
htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
|
htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
|
||||||
"End tag : expected '>'\n", NULL, NULL);
|
"End tag : expected '>'\n", NULL, NULL);
|
||||||
|
if (ctxt->recovery) {
|
||||||
|
/*
|
||||||
|
* We're not at the ending > !!
|
||||||
|
* Error, unless in recover mode where we search forwards
|
||||||
|
* until we find a >
|
||||||
|
*/
|
||||||
|
while (CUR != '\0' && CUR != '>') NEXT;
|
||||||
|
NEXT;
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
NEXT;
|
NEXT;
|
||||||
|
|
||||||
@@ -3709,10 +3756,8 @@ htmlParseReference(htmlParserCtxtPtr ctxt) {
|
|||||||
/**
|
/**
|
||||||
* htmlParseContent:
|
* htmlParseContent:
|
||||||
* @ctxt: an HTML parser context
|
* @ctxt: an HTML parser context
|
||||||
* @name: the node name
|
|
||||||
*
|
*
|
||||||
* Parse a content: comment, sub-element, reference or text.
|
* Parse a content: comment, sub-element, reference or text.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -3830,6 +3875,19 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
|
|||||||
if (currentNode != NULL) xmlFree(currentNode);
|
if (currentNode != NULL) xmlFree(currentNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* htmlParseContent:
|
||||||
|
* @ctxt: an HTML parser context
|
||||||
|
*
|
||||||
|
* Parse a content: comment, sub-element, reference or text.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
__htmlParseContent(void *ctxt) {
|
||||||
|
if (ctxt != NULL)
|
||||||
|
htmlParseContent((htmlParserCtxtPtr) ctxt);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlParseElement:
|
* htmlParseElement:
|
||||||
* @ctxt: an HTML parser context
|
* @ctxt: an HTML parser context
|
||||||
@@ -3847,16 +3905,15 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
|||||||
xmlChar *currentNode = NULL;
|
xmlChar *currentNode = NULL;
|
||||||
const htmlElemDesc * info;
|
const htmlElemDesc * info;
|
||||||
htmlParserNodeInfo node_info;
|
htmlParserNodeInfo node_info;
|
||||||
const xmlChar *oldname;
|
int failed;
|
||||||
int depth;
|
int depth;
|
||||||
const xmlChar *oldptr;
|
const xmlChar *oldptr;
|
||||||
|
|
||||||
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
if ((ctxt == NULL) || (ctxt->input == NULL)) {
|
||||||
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
|
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||||
"htmlParseStartTag: context error\n", NULL, NULL);
|
"htmlParseElement: context error\n", NULL, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
depth = ctxt->nameNr;
|
|
||||||
/* Capture start position */
|
/* Capture start position */
|
||||||
if (ctxt->record_info) {
|
if (ctxt->record_info) {
|
||||||
node_info.begin_pos = ctxt->input->consumed +
|
node_info.begin_pos = ctxt->input->consumed +
|
||||||
@@ -3864,11 +3921,9 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
|||||||
node_info.begin_line = ctxt->input->line;
|
node_info.begin_line = ctxt->input->line;
|
||||||
}
|
}
|
||||||
|
|
||||||
oldname = ctxt->name;
|
failed = htmlParseStartTag(ctxt);
|
||||||
htmlParseStartTag(ctxt);
|
|
||||||
name = ctxt->name;
|
name = ctxt->name;
|
||||||
if (((depth == ctxt->nameNr) && (xmlStrEqual(oldname, ctxt->name))) ||
|
if (failed || (name == NULL)) {
|
||||||
(name == NULL)) {
|
|
||||||
if (CUR == '>')
|
if (CUR == '>')
|
||||||
NEXT;
|
NEXT;
|
||||||
return;
|
return;
|
||||||
@@ -3911,7 +3966,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
|||||||
/*
|
/*
|
||||||
* Capture end position and add node
|
* Capture end position and add node
|
||||||
*/
|
*/
|
||||||
if ( currentNode != NULL && ctxt->record_info ) {
|
if (ctxt->record_info) {
|
||||||
node_info.end_pos = ctxt->input->consumed +
|
node_info.end_pos = ctxt->input->consumed +
|
||||||
(CUR_PTR - ctxt->input->base);
|
(CUR_PTR - ctxt->input->base);
|
||||||
node_info.end_line = ctxt->input->line;
|
node_info.end_line = ctxt->input->line;
|
||||||
@@ -4577,11 +4632,11 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ctxt->instate = XML_PARSER_MISC;
|
ctxt->instate = XML_PARSER_MISC;
|
||||||
}
|
|
||||||
#ifdef DEBUG_PUSH
|
#ifdef DEBUG_PUSH
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"HPP: entering MISC\n");
|
"HPP: entering MISC\n");
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case XML_PARSER_MISC:
|
case XML_PARSER_MISC:
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
@@ -4738,8 +4793,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XML_PARSER_START_TAG: {
|
case XML_PARSER_START_TAG: {
|
||||||
const xmlChar *name, *oldname;
|
const xmlChar *name;
|
||||||
int depth = ctxt->nameNr;
|
int failed;
|
||||||
const htmlElemDesc * info;
|
const htmlElemDesc * info;
|
||||||
|
|
||||||
if (avail < 2)
|
if (avail < 2)
|
||||||
@@ -4766,11 +4821,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
(htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0))
|
(htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
oldname = ctxt->name;
|
failed = htmlParseStartTag(ctxt);
|
||||||
htmlParseStartTag(ctxt);
|
|
||||||
name = ctxt->name;
|
name = ctxt->name;
|
||||||
if (((depth == ctxt->nameNr) &&
|
if (failed ||
|
||||||
(xmlStrEqual(oldname, ctxt->name))) ||
|
|
||||||
(name == NULL)) {
|
(name == NULL)) {
|
||||||
if (CUR == '>')
|
if (CUR == '>')
|
||||||
NEXT;
|
NEXT;
|
||||||
@@ -4793,7 +4846,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
SKIP(2);
|
SKIP(2);
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
|
||||||
ctxt->sax->endElement(ctxt->userData, name);
|
ctxt->sax->endElement(ctxt->userData, name);
|
||||||
oldname = htmlnamePop(ctxt);
|
htmlnamePop(ctxt);
|
||||||
ctxt->instate = XML_PARSER_CONTENT;
|
ctxt->instate = XML_PARSER_CONTENT;
|
||||||
#ifdef DEBUG_PUSH
|
#ifdef DEBUG_PUSH
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
@@ -4814,7 +4867,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
*/
|
*/
|
||||||
if (xmlStrEqual(name, ctxt->name)) {
|
if (xmlStrEqual(name, ctxt->name)) {
|
||||||
nodePop(ctxt);
|
nodePop(ctxt);
|
||||||
oldname = htmlnamePop(ctxt);
|
htmlnamePop(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctxt->instate = XML_PARSER_CONTENT;
|
ctxt->instate = XML_PARSER_CONTENT;
|
||||||
@@ -4831,7 +4884,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
if ((info != NULL) && (info->empty)) {
|
if ((info != NULL) && (info->empty)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
|
||||||
ctxt->sax->endElement(ctxt->userData, name);
|
ctxt->sax->endElement(ctxt->userData, name);
|
||||||
oldname = htmlnamePop(ctxt);
|
htmlnamePop(ctxt);
|
||||||
}
|
}
|
||||||
ctxt->instate = XML_PARSER_CONTENT;
|
ctxt->instate = XML_PARSER_CONTENT;
|
||||||
#ifdef DEBUG_PUSH
|
#ifdef DEBUG_PUSH
|
||||||
@@ -5178,10 +5231,18 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
|
|||||||
(ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
|
(ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
|
||||||
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
|
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
|
||||||
int cur = ctxt->input->cur - ctxt->input->base;
|
int cur = ctxt->input->cur - ctxt->input->base;
|
||||||
|
int res;
|
||||||
|
|
||||||
xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
|
res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
|
||||||
|
if (res < 0) {
|
||||||
|
ctxt->errNo = XML_PARSER_EOF;
|
||||||
|
ctxt->disableSAX = 1;
|
||||||
|
return (XML_PARSER_EOF);
|
||||||
|
}
|
||||||
ctxt->input->base = ctxt->input->buf->buffer->content + base;
|
ctxt->input->base = ctxt->input->buf->buffer->content + base;
|
||||||
ctxt->input->cur = ctxt->input->base + cur;
|
ctxt->input->cur = ctxt->input->base + cur;
|
||||||
|
ctxt->input->end =
|
||||||
|
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
|
||||||
#ifdef DEBUG_PUSH
|
#ifdef DEBUG_PUSH
|
||||||
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
||||||
#endif
|
#endif
|
||||||
@@ -5779,6 +5840,14 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
|
|||||||
ctxt->options |= XML_PARSE_NOBLANKS;
|
ctxt->options |= XML_PARSE_NOBLANKS;
|
||||||
} else
|
} else
|
||||||
ctxt->keepBlanks = 1;
|
ctxt->keepBlanks = 1;
|
||||||
|
if (options & HTML_PARSE_RECOVER) {
|
||||||
|
ctxt->recovery = 1;
|
||||||
|
} else
|
||||||
|
ctxt->recovery = 0;
|
||||||
|
if (options & HTML_PARSE_COMPACT) {
|
||||||
|
ctxt->options |= HTML_PARSE_COMPACT;
|
||||||
|
options -= HTML_PARSE_COMPACT;
|
||||||
|
}
|
||||||
ctxt->dictNames = 0;
|
ctxt->dictNames = 0;
|
||||||
return (options);
|
return (options);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,16 +506,17 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlDocDumpMemory:
|
* htmlDocDumpMemoryFormat:
|
||||||
* @cur: the document
|
* @cur: the document
|
||||||
* @mem: OUT: the memory pointer
|
* @mem: OUT: the memory pointer
|
||||||
* @size: OUT: the memory length
|
* @size: OUT: the memory length
|
||||||
|
* @format: should formatting spaces been added
|
||||||
*
|
*
|
||||||
* Dump an HTML document in memory and return the xmlChar * 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, xmlChar**mem, int *size) {
|
htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
||||||
xmlOutputBufferPtr buf;
|
xmlOutputBufferPtr buf;
|
||||||
xmlCharEncodingHandlerPtr handler = NULL;
|
xmlCharEncodingHandlerPtr handler = NULL;
|
||||||
const char *encoding;
|
const char *encoding;
|
||||||
@@ -552,6 +553,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
|||||||
*size = 0;
|
*size = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
handler = xmlFindCharEncodingHandler(encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +573,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
htmlDocContentDumpOutput(buf, cur, NULL);
|
htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
|
||||||
|
|
||||||
xmlOutputBufferFlush(buf);
|
xmlOutputBufferFlush(buf);
|
||||||
if (buf->conv != NULL) {
|
if (buf->conv != NULL) {
|
||||||
*size = buf->conv->use;
|
*size = buf->conv->use;
|
||||||
@@ -582,6 +586,20 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
|||||||
(void)xmlOutputBufferClose(buf);
|
(void)xmlOutputBufferClose(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* htmlDocDumpMemory:
|
||||||
|
* @cur: the document
|
||||||
|
* @mem: OUT: the memory pointer
|
||||||
|
* @size: OUT: the memory length
|
||||||
|
*
|
||||||
|
* Dump an HTML document in memory and return the xmlChar * and it's size.
|
||||||
|
* It's up to the caller to free the memory.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||||
|
htmlDocDumpMemoryFormat(cur, mem, size, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -1026,6 +1044,8 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
|
|||||||
handler = xmlFindCharEncodingHandler(encoding);
|
handler = xmlFindCharEncodingHandler(encoding);
|
||||||
if (handler == NULL)
|
if (handler == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
} else {
|
||||||
|
handler = xmlFindCharEncodingHandler(encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,15 +83,126 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||||||
ctxt->errNo = error;
|
ctxt->errNo = error;
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
|
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
|
||||||
schannel = ctxt->sax->serror;
|
schannel = ctxt->sax->serror;
|
||||||
}
|
__xmlRaiseError(schannel,
|
||||||
__xmlRaiseError(schannel,
|
ctxt->vctxt.error, ctxt->vctxt.userData,
|
||||||
ctxt->vctxt.error, ctxt->vctxt.userData,
|
ctxt, NULL, XML_FROM_DTD, error,
|
||||||
ctxt, NULL, XML_FROM_DTD, error,
|
XML_ERR_ERROR, NULL, 0, (const char *) str1,
|
||||||
XML_ERR_ERROR, NULL, 0, (const char *) str1,
|
(const char *) str2, NULL, 0, 0,
|
||||||
(const char *) str2, NULL, 0, 0,
|
msg, (const char *) str1, (const char *) str2);
|
||||||
msg, (const char *) str1, (const char *) str2);
|
|
||||||
if (ctxt != NULL)
|
|
||||||
ctxt->valid = 0;
|
ctxt->valid = 0;
|
||||||
|
} else {
|
||||||
|
__xmlRaiseError(schannel,
|
||||||
|
NULL, NULL,
|
||||||
|
ctxt, NULL, XML_FROM_DTD, error,
|
||||||
|
XML_ERR_ERROR, NULL, 0, (const char *) str1,
|
||||||
|
(const char *) str2, NULL, 0, 0,
|
||||||
|
msg, (const char *) str1, (const char *) str2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlFatalErrMsg:
|
||||||
|
* @ctxt: an XML parser context
|
||||||
|
* @error: the error number
|
||||||
|
* @msg: the error message
|
||||||
|
* @str1: an error string
|
||||||
|
* @str2: an error string
|
||||||
|
*
|
||||||
|
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||||
|
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||||
|
{
|
||||||
|
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
|
||||||
|
(ctxt->instate == XML_PARSER_EOF))
|
||||||
|
return;
|
||||||
|
if (ctxt != NULL)
|
||||||
|
ctxt->errNo = error;
|
||||||
|
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
|
||||||
|
XML_ERR_FATAL, NULL, 0,
|
||||||
|
(const char *) str1, (const char *) str2,
|
||||||
|
NULL, 0, 0, msg, str1, str2);
|
||||||
|
if (ctxt != NULL) {
|
||||||
|
ctxt->wellFormed = 0;
|
||||||
|
ctxt->valid = 0;
|
||||||
|
if (ctxt->recovery == 0)
|
||||||
|
ctxt->disableSAX = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlWarnMsg:
|
||||||
|
* @ctxt: an XML parser context
|
||||||
|
* @error: the error number
|
||||||
|
* @msg: the error message
|
||||||
|
* @str1: an error string
|
||||||
|
* @str2: an error string
|
||||||
|
*
|
||||||
|
* Handle a parser warning
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||||
|
const char *msg, const xmlChar *str1)
|
||||||
|
{
|
||||||
|
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
|
||||||
|
(ctxt->instate == XML_PARSER_EOF))
|
||||||
|
return;
|
||||||
|
if (ctxt != NULL)
|
||||||
|
ctxt->errNo = error;
|
||||||
|
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
|
||||||
|
XML_ERR_WARNING, NULL, 0,
|
||||||
|
(const char *) str1, NULL,
|
||||||
|
NULL, 0, 0, msg, str1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlNsErrMsg:
|
||||||
|
* @ctxt: an XML parser context
|
||||||
|
* @error: the error number
|
||||||
|
* @msg: the error message
|
||||||
|
* @str1: an error string
|
||||||
|
* @str2: an error string
|
||||||
|
*
|
||||||
|
* Handle a namespace error
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||||
|
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||||
|
{
|
||||||
|
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
|
||||||
|
(ctxt->instate == XML_PARSER_EOF))
|
||||||
|
return;
|
||||||
|
if (ctxt != NULL)
|
||||||
|
ctxt->errNo = error;
|
||||||
|
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
|
||||||
|
XML_ERR_ERROR, NULL, 0,
|
||||||
|
(const char *) str1, (const char *) str2,
|
||||||
|
NULL, 0, 0, msg, str1, str2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlNsWarnMsg:
|
||||||
|
* @ctxt: an XML parser context
|
||||||
|
* @error: the error number
|
||||||
|
* @msg: the error message
|
||||||
|
* @str1: an error string
|
||||||
|
*
|
||||||
|
* Handle a namespace warning
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||||
|
const char *msg, const xmlChar *str1, const xmlChar *str2)
|
||||||
|
{
|
||||||
|
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
|
||||||
|
(ctxt->instate == XML_PARSER_EOF))
|
||||||
|
return;
|
||||||
|
if (ctxt != NULL)
|
||||||
|
ctxt->errNo = error;
|
||||||
|
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
|
||||||
|
XML_ERR_WARNING, NULL, 0,
|
||||||
|
(const char *) str1, (const char *) str2,
|
||||||
|
NULL, 0, 0, msg, str1, str2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -122,7 +233,7 @@ const xmlChar *
|
|||||||
xmlSAX2GetSystemId(void *ctx)
|
xmlSAX2GetSystemId(void *ctx)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
|
if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
|
||||||
return((const xmlChar *) ctxt->input->filename);
|
return((const xmlChar *) ctxt->input->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,12 +245,12 @@ xmlSAX2GetSystemId(void *ctx)
|
|||||||
*
|
*
|
||||||
* Returns an int
|
* Returns an int
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSAX2GetLineNumber(void *ctx)
|
xmlSAX2GetLineNumber(void *ctx)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
|
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
|
||||||
return (intptr_t) (ctxt->input->line);
|
return(ctxt->input->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,12 +261,12 @@ xmlSAX2GetLineNumber(void *ctx)
|
|||||||
*
|
*
|
||||||
* Returns an int
|
* Returns an int
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSAX2GetColumnNumber(void *ctx)
|
xmlSAX2GetColumnNumber(void *ctx)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
|
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
|
||||||
return ctxt->input->col;
|
return(ctxt->input->col);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -436,12 +547,9 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
|
|||||||
ctxt->myDoc->standalone = 0;
|
ctxt->myDoc->standalone = 0;
|
||||||
ret = xmlGetDocEntity(ctxt->myDoc, name);
|
ret = xmlGetDocEntity(ctxt->myDoc, name);
|
||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_NOT_STANDALONE,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"Entity(%s) document marked standalone but requires external subset\n",
|
||||||
"Entity(%s) document marked standalone but requires external subset\n",
|
name, NULL);
|
||||||
name);
|
|
||||||
ctxt->valid = 0;
|
|
||||||
ctxt->wellFormed = 0;
|
|
||||||
}
|
}
|
||||||
ctxt->myDoc->standalone = 1;
|
ctxt->myDoc->standalone = 1;
|
||||||
}
|
}
|
||||||
@@ -466,11 +574,8 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
|
|||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
xmlAddChildList((xmlNodePtr) ret, children);
|
xmlAddChildList((xmlNodePtr) ret, children);
|
||||||
} else {
|
} else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"Failure to process entity %s\n", name, NULL);
|
||||||
"Failure to process entity %s\n", name);
|
|
||||||
ctxt->wellFormed = 0;
|
|
||||||
ctxt->valid = 0;
|
|
||||||
ctxt->validate = 0;
|
ctxt->validate = 0;
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
@@ -532,10 +637,10 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||||||
if (ctxt->inSubset == 1) {
|
if (ctxt->inSubset == 1) {
|
||||||
ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId,
|
ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId,
|
||||||
systemId, content);
|
systemId, content);
|
||||||
if ((ent == NULL) && (ctxt->pedantic) &&
|
if ((ent == NULL) && (ctxt->pedantic))
|
||||||
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
xmlWarnMsg(ctxt, XML_WAR_ENTITY_REDEFINED,
|
||||||
ctxt->sax->warning(ctxt->userData,
|
"Entity(%s) already defined in the internal subset\n",
|
||||||
"Entity(%s) already defined in the internal subset\n", name);
|
name);
|
||||||
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
|
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
|
||||||
xmlChar *URI;
|
xmlChar *URI;
|
||||||
const char *base = NULL;
|
const char *base = NULL;
|
||||||
@@ -568,9 +673,9 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
|
|||||||
ent->URI = URI;
|
ent->URI = URI;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2EntityDecl(%s) called while not in subset\n",
|
||||||
"SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", name);
|
name, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -595,7 +700,9 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||||||
xmlAttributePtr attr;
|
xmlAttributePtr attr;
|
||||||
xmlChar *name = NULL, *prefix = NULL;
|
xmlChar *name = NULL, *prefix = NULL;
|
||||||
|
|
||||||
if (ctx == NULL) return;
|
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
|
"SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
|
||||||
@@ -623,9 +730,9 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||||||
name, prefix, (xmlAttributeType) type,
|
name, prefix, (xmlAttributeType) type,
|
||||||
(xmlAttributeDefault) def, defaultValue, tree);
|
(xmlAttributeDefault) def, defaultValue, tree);
|
||||||
else {
|
else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n",
|
||||||
"SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n", name);
|
name, NULL);
|
||||||
xmlFreeEnumeration(tree);
|
xmlFreeEnumeration(tree);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -633,7 +740,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||||||
if (ctxt->vctxt.valid == 0)
|
if (ctxt->vctxt.valid == 0)
|
||||||
ctxt->valid = 0;
|
ctxt->valid = 0;
|
||||||
if ((attr != NULL) && (ctxt->validate) && (ctxt->wellFormed) &&
|
if ((attr != NULL) && (ctxt->validate) && (ctxt->wellFormed) &&
|
||||||
(ctxt->myDoc != NULL) && (ctxt->myDoc->intSubset != NULL))
|
(ctxt->myDoc->intSubset != NULL))
|
||||||
ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc,
|
ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc,
|
||||||
attr);
|
attr);
|
||||||
#endif /* LIBXML_VALID_ENABLED */
|
#endif /* LIBXML_VALID_ENABLED */
|
||||||
@@ -659,7 +766,9 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
|
|||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlElementPtr elem = NULL;
|
xmlElementPtr elem = NULL;
|
||||||
|
|
||||||
if (ctx == NULL) return;
|
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type);
|
"SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type);
|
||||||
@@ -672,10 +781,9 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
|
|||||||
elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset,
|
elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset,
|
||||||
name, (xmlElementTypeVal) type, content);
|
name, (xmlElementTypeVal) type, content);
|
||||||
else {
|
else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2ElementDecl(%s) called while not in subset\n",
|
||||||
"SAX.xmlSAX2ElementDecl(%s) called while not in subset\n",
|
name, NULL);
|
||||||
name);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
#ifdef LIBXML_VALID_ENABLED
|
||||||
@@ -704,18 +812,18 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
|
|||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlNotationPtr nota = NULL;
|
xmlNotationPtr nota = NULL;
|
||||||
|
|
||||||
if (ctx == NULL) return;
|
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
|
"SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((publicId == NULL) && (systemId == NULL)) {
|
if ((publicId == NULL) && (systemId == NULL)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n",
|
||||||
"SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n", name);
|
name, NULL);
|
||||||
ctxt->valid = 0;
|
|
||||||
ctxt->wellFormed = 0;
|
|
||||||
return;
|
return;
|
||||||
} else if (ctxt->inSubset == 1)
|
} else if (ctxt->inSubset == 1)
|
||||||
nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name,
|
nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name,
|
||||||
@@ -724,15 +832,15 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
|
|||||||
nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name,
|
nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name,
|
||||||
publicId, systemId);
|
publicId, systemId);
|
||||||
else {
|
else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2NotationDecl(%s) called while not in subset\n",
|
||||||
"SAX.xmlSAX2NotationDecl(%s) called while not in subset\n", name);
|
name, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
#ifdef LIBXML_VALID_ENABLED
|
||||||
if (nota == NULL) ctxt->valid = 0;
|
if (nota == NULL) ctxt->valid = 0;
|
||||||
if (ctxt->validate && ctxt->wellFormed &&
|
if ((ctxt->validate) && (ctxt->wellFormed) &&
|
||||||
ctxt->myDoc && ctxt->myDoc->intSubset)
|
(ctxt->myDoc->intSubset != NULL))
|
||||||
ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc,
|
ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc,
|
||||||
nota);
|
nota);
|
||||||
#endif /* LIBXML_VALID_ENABLED */
|
#endif /* LIBXML_VALID_ENABLED */
|
||||||
@@ -802,9 +910,9 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
|
|||||||
ent->URI = URI;
|
ent->URI = URI;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n",
|
||||||
"SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", name);
|
name, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -926,7 +1034,7 @@ xmlSAX2EndDocument(void *ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||||
/**
|
/**
|
||||||
* xmlSAX2AttributeInternal:
|
* xmlSAX2AttributeInternal:
|
||||||
* @ctx: the user data (XML parser context)
|
* @ctx: the user data (XML parser context)
|
||||||
@@ -956,13 +1064,13 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
name = xmlSplitQName(ctxt, fullname, &ns);
|
name = xmlSplitQName(ctxt, fullname, &ns);
|
||||||
if ((name != NULL) && (name[0] == 0)) {
|
if ((name != NULL) && (name[0] == 0)) {
|
||||||
if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
|
if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"invalid namespace declaration '%s'\n",
|
||||||
"invalid namespace declaration '%s'\n", fullname);
|
fullname, NULL);
|
||||||
} else {
|
} else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN,
|
||||||
ctxt->sax->warning(ctxt->userData,
|
"Avoid attribute ending with ':' like '%s'\n",
|
||||||
"Avoid attribute ending with ':' like '%s'\n", fullname);
|
fullname, NULL);
|
||||||
}
|
}
|
||||||
if (ns != NULL)
|
if (ns != NULL)
|
||||||
xmlFree(ns);
|
xmlFree(ns);
|
||||||
@@ -1076,22 +1184,19 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (val[0] == 0) {
|
if (val[0] == 0) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY,
|
||||||
ctxt->sax->error(ctxt->userData,
|
"Empty namespace name for prefix %s\n", name, NULL);
|
||||||
"Empty namespace name for prefix %s\n", name);
|
|
||||||
}
|
}
|
||||||
if ((ctxt->pedantic != 0) && (val[0] != 0)) {
|
if ((ctxt->pedantic != 0) && (val[0] != 0)) {
|
||||||
xmlURIPtr uri;
|
xmlURIPtr uri;
|
||||||
|
|
||||||
uri = xmlParseURI((const char *)val);
|
uri = xmlParseURI((const char *)val);
|
||||||
if (uri == NULL) {
|
if (uri == NULL) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
xmlNsWarnMsg(ctxt, XML_WAR_NS_URI,
|
||||||
ctxt->sax->warning(ctxt->userData,
|
|
||||||
"xmlns:%s: %s not a valid URI\n", name, value);
|
"xmlns:%s: %s not a valid URI\n", name, value);
|
||||||
} else {
|
} else {
|
||||||
if (uri->scheme == NULL) {
|
if (uri->scheme == NULL) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
|
xmlNsWarnMsg(ctxt, XML_WAR_NS_URI_RELATIVE,
|
||||||
ctxt->sax->warning(ctxt->userData,
|
|
||||||
"xmlns:%s: URI %s is not absolute\n", name, value);
|
"xmlns:%s: URI %s is not absolute\n", name, value);
|
||||||
}
|
}
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
@@ -1124,8 +1229,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
xmlAttrPtr prop;
|
xmlAttrPtr prop;
|
||||||
namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns);
|
namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns);
|
||||||
if (namespace == NULL) {
|
if (namespace == NULL) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
|
||||||
ctxt->sax->error(ctxt->userData,
|
|
||||||
"Namespace prefix %s of attribute %s is not defined\n",
|
"Namespace prefix %s of attribute %s is not defined\n",
|
||||||
ns, name);
|
ns, name);
|
||||||
}
|
}
|
||||||
@@ -1136,9 +1240,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
if ((xmlStrEqual(name, prop->name)) &&
|
if ((xmlStrEqual(name, prop->name)) &&
|
||||||
((namespace == prop->ns) ||
|
((namespace == prop->ns) ||
|
||||||
(xmlStrEqual(namespace->href, prop->ns->href)))) {
|
(xmlStrEqual(namespace->href, prop->ns->href)))) {
|
||||||
ctxt->errNo = XML_ERR_ATTRIBUTE_REDEFINED;
|
xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED,
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
|
||||||
ctxt->sax->error(ctxt->userData,
|
|
||||||
"Attribute %s in %s redefined\n",
|
"Attribute %s in %s redefined\n",
|
||||||
name, namespace->href);
|
name, namespace->href);
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@@ -1226,11 +1328,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
* when validating, the ID registration is done at the attribute
|
* when validating, the ID registration is done at the attribute
|
||||||
* validation level. Otherwise we have to do specific handling here.
|
* validation level. Otherwise we have to do specific handling here.
|
||||||
*/
|
*/
|
||||||
if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
|
if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
|
||||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
|
||||||
else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
|
|
||||||
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
|
||||||
else if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
|
|
||||||
/*
|
/*
|
||||||
* Add the xml:id value
|
* Add the xml:id value
|
||||||
*
|
*
|
||||||
@@ -1242,7 +1340,10 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
|
|||||||
(const char *) value, NULL);
|
(const char *) value, NULL);
|
||||||
}
|
}
|
||||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
||||||
}
|
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
|
||||||
|
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
||||||
|
else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
|
||||||
|
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@@ -1669,7 +1770,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
|
|||||||
* Returns the newly allocated string or NULL if not needed or error
|
* Returns the newly allocated string or NULL if not needed or error
|
||||||
*/
|
*/
|
||||||
static xmlNodePtr
|
static xmlNodePtr
|
||||||
xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
|
xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
|
||||||
xmlNodePtr ret;
|
xmlNodePtr ret;
|
||||||
const xmlChar *intern = NULL;
|
const xmlChar *intern = NULL;
|
||||||
|
|
||||||
@@ -1687,6 +1788,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
|
|||||||
xmlErrMemory(ctxt, "xmlSAX2Characters");
|
xmlErrMemory(ctxt, "xmlSAX2Characters");
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
memset(ret, 0, sizeof(xmlNode));
|
||||||
/*
|
/*
|
||||||
* intern the formatting blanks found between tags, or the
|
* intern the formatting blanks found between tags, or the
|
||||||
* very short strings
|
* very short strings
|
||||||
@@ -1694,7 +1796,14 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
|
|||||||
if (ctxt->dictNames) {
|
if (ctxt->dictNames) {
|
||||||
xmlChar cur = str[len];
|
xmlChar cur = str[len];
|
||||||
|
|
||||||
if ((len <= 3) && ((cur == '"') || (cur == '\'') ||
|
if ((len < (int) (2 * sizeof(void *))) &&
|
||||||
|
(ctxt->options & XML_PARSE_COMPACT)) {
|
||||||
|
/* store the string in the node overrithing properties and nsDef */
|
||||||
|
xmlChar *tmp = (xmlChar *) &(ret->properties);
|
||||||
|
memcpy(tmp, str, len);
|
||||||
|
tmp[len] = 0;
|
||||||
|
intern = tmp;
|
||||||
|
} else if ((len <= 3) && ((cur == '"') || (cur == '\'') ||
|
||||||
((cur == '<') && (str[len + 1] != '!')))) {
|
((cur == '<') && (str[len + 1] != '!')))) {
|
||||||
intern = xmlDictLookup(ctxt->dict, str, len);
|
intern = xmlDictLookup(ctxt->dict, str, len);
|
||||||
} else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') &&
|
} else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') &&
|
||||||
@@ -1708,7 +1817,6 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
skip:
|
skip:
|
||||||
memset(ret, 0, sizeof(xmlNode));
|
|
||||||
ret->type = XML_TEXT_NODE;
|
ret->type = XML_TEXT_NODE;
|
||||||
|
|
||||||
ret->name = xmlStringText;
|
ret->name = xmlStringText;
|
||||||
@@ -1950,16 +2058,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||||||
* when validating, the ID registration is done at the attribute
|
* when validating, the ID registration is done at the attribute
|
||||||
* validation level. Otherwise we have to do specific handling here.
|
* validation level. Otherwise we have to do specific handling here.
|
||||||
*/
|
*/
|
||||||
if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
|
if ((prefix == ctxt->str_xml) &&
|
||||||
/* might be worth duplicate entry points and not copy */
|
|
||||||
if (dup == NULL)
|
|
||||||
dup = xmlStrndup(value, valueend - value);
|
|
||||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
|
||||||
} else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) {
|
|
||||||
if (dup == NULL)
|
|
||||||
dup = xmlStrndup(value, valueend - value);
|
|
||||||
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
|
||||||
} else if ((prefix == ctxt->str_xml) &&
|
|
||||||
(localname[0] == 'i') && (localname[1] == 'd') &&
|
(localname[0] == 'i') && (localname[1] == 'd') &&
|
||||||
(localname[2] == 0)) {
|
(localname[2] == 0)) {
|
||||||
/*
|
/*
|
||||||
@@ -1977,6 +2076,15 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
||||||
|
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
|
||||||
|
/* might be worth duplicate entry points and not copy */
|
||||||
|
if (dup == NULL)
|
||||||
|
dup = xmlStrndup(value, valueend - value);
|
||||||
|
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
||||||
|
} else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) {
|
||||||
|
if (dup == NULL)
|
||||||
|
dup = xmlStrndup(value, valueend - value);
|
||||||
|
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dup != NULL)
|
if (dup != NULL)
|
||||||
@@ -2007,8 +2115,8 @@ xmlSAX2StartElementNs(void *ctx,
|
|||||||
const xmlChar *URI,
|
const xmlChar *URI,
|
||||||
int nb_namespaces,
|
int nb_namespaces,
|
||||||
const xmlChar **namespaces,
|
const xmlChar **namespaces,
|
||||||
intptr_t nb_attributes,
|
int nb_attributes,
|
||||||
intptr_t nb_defaulted,
|
int nb_defaulted,
|
||||||
const xmlChar **attributes)
|
const xmlChar **attributes)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
@@ -2016,7 +2124,7 @@ xmlSAX2StartElementNs(void *ctx,
|
|||||||
xmlNodePtr parent;
|
xmlNodePtr parent;
|
||||||
xmlNsPtr last = NULL, ns;
|
xmlNsPtr last = NULL, ns;
|
||||||
const xmlChar *uri, *pref;
|
const xmlChar *uri, *pref;
|
||||||
intptr_t i, j;
|
int i, j;
|
||||||
|
|
||||||
if (ctx == NULL) return;
|
if (ctx == NULL) return;
|
||||||
parent = ctxt->node;
|
parent = ctxt->node;
|
||||||
@@ -2137,9 +2245,13 @@ xmlSAX2StartElementNs(void *ctx,
|
|||||||
*/
|
*/
|
||||||
if ((URI != NULL) && (ret->ns == NULL)) {
|
if ((URI != NULL) && (ret->ns == NULL)) {
|
||||||
ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
|
ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
|
||||||
|
if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
|
||||||
|
ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
|
||||||
|
}
|
||||||
if (ret->ns == NULL) {
|
if (ret->ns == NULL) {
|
||||||
ns = xmlNewNs(ret, NULL, prefix);
|
ns = xmlNewNs(ret, NULL, prefix);
|
||||||
if (ns == NULL) {
|
if (ns == NULL) {
|
||||||
|
|
||||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2259,7 +2371,7 @@ xmlSAX2Reference(void *ctx, const xmlChar *name)
|
|||||||
* receiving some chars from the parser.
|
* receiving some chars from the parser.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
|
xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlNodePtr lastChild;
|
xmlNodePtr lastChild;
|
||||||
@@ -2317,17 +2429,20 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
|
|||||||
* We try to minimaze realloc() uses and avoid copying
|
* We try to minimaze realloc() uses and avoid copying
|
||||||
* and recomputing length over and over.
|
* and recomputing length over and over.
|
||||||
*/
|
*/
|
||||||
if ((ctxt->nodemem == ctxt->nodelen + 1) &&
|
if (lastChild->content == (xmlChar *)&(lastChild->properties)) {
|
||||||
(xmlDictOwns(ctxt->dict, lastChild->content))) {
|
lastChild->content = xmlStrdup(lastChild->content);
|
||||||
|
lastChild->properties = NULL;
|
||||||
|
} else if ((ctxt->nodemem == ctxt->nodelen + 1) &&
|
||||||
|
(xmlDictOwns(ctxt->dict, lastChild->content))) {
|
||||||
lastChild->content = xmlStrdup(lastChild->content);
|
lastChild->content = xmlStrdup(lastChild->content);
|
||||||
}
|
}
|
||||||
if (ctxt->nodelen + len >= ctxt->nodemem) {
|
if (ctxt->nodelen + len >= ctxt->nodemem) {
|
||||||
xmlChar *newbuf;
|
xmlChar *newbuf;
|
||||||
size_t size;
|
int size;
|
||||||
|
|
||||||
size = ctxt->nodemem + len;
|
size = ctxt->nodemem + len;
|
||||||
size *= 2;
|
size *= 2;
|
||||||
newbuf = (xmlChar *) xmlRealloc(lastChild->content,size);
|
newbuf = (xmlChar *) xmlRealloc(lastChild->content,size);
|
||||||
if (newbuf == NULL) {
|
if (newbuf == NULL) {
|
||||||
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
|
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
|
||||||
return;
|
return;
|
||||||
@@ -2370,7 +2485,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
|
|||||||
* UNUSED: by default the DOM building will use xmlSAX2Characters
|
* UNUSED: by default the DOM building will use xmlSAX2Characters
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlSAX2IgnorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, intptr_t len ATTRIBUTE_UNUSED)
|
xmlSAX2IgnorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
|
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
@@ -2406,6 +2521,14 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
|
|||||||
if (ret == NULL) return;
|
if (ret == NULL) return;
|
||||||
parent = ctxt->node;
|
parent = ctxt->node;
|
||||||
|
|
||||||
|
if (ctxt->linenumbers) {
|
||||||
|
if (ctxt->input != NULL) {
|
||||||
|
if (ctxt->input->line < 65535)
|
||||||
|
ret->line = (short) ctxt->input->line;
|
||||||
|
else
|
||||||
|
ret->line = 65535;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ctxt->inSubset == 1) {
|
if (ctxt->inSubset == 1) {
|
||||||
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
|
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
|
||||||
return;
|
return;
|
||||||
@@ -2458,6 +2581,14 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
|
|||||||
#endif
|
#endif
|
||||||
ret = xmlNewDocComment(ctxt->myDoc, value);
|
ret = xmlNewDocComment(ctxt->myDoc, value);
|
||||||
if (ret == NULL) return;
|
if (ret == NULL) return;
|
||||||
|
if (ctxt->linenumbers) {
|
||||||
|
if (ctxt->input != NULL) {
|
||||||
|
if (ctxt->input->line < 65535)
|
||||||
|
ret->line = (short) ctxt->input->line;
|
||||||
|
else
|
||||||
|
ret->line = 65535;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ctxt->inSubset == 1) {
|
if (ctxt->inSubset == 1) {
|
||||||
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
|
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
|
||||||
@@ -2499,7 +2630,7 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
|
|||||||
* called when a pcdata block has been parsed
|
* called when a pcdata block has been parsed
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlSAX2CDataBlock(void *ctx, const xmlChar *value, intptr_t len)
|
xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlNodePtr ret, lastChild;
|
xmlNodePtr ret, lastChild;
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
|
|||||||
* default namespace (XML Namespaces: "default namespaces
|
* default namespace (XML Namespaces: "default namespaces
|
||||||
* do not apply directly to attributes")
|
* do not apply directly to attributes")
|
||||||
*/
|
*/
|
||||||
if((attr->ns != NULL) && xmlC14NIsVisible(ctx, attr, cur)) {
|
if((attr->ns != NULL) && !xmlC14NIsXmlNs(attr->ns) && xmlC14NIsVisible(ctx, attr, cur)) {
|
||||||
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
|
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
|
||||||
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
|
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
|
||||||
if(!already_rendered && visible) {
|
if(!already_rendered && visible) {
|
||||||
@@ -802,7 +802,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
|
|||||||
if(xmlStrlen(attr->ns->prefix) == 0) {
|
if(xmlStrlen(attr->ns->prefix) == 0) {
|
||||||
has_empty_ns = 1;
|
has_empty_ns = 1;
|
||||||
}
|
}
|
||||||
} else if(attr->ns == NULL) {
|
} else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) {
|
||||||
has_visibly_utilized_empty_ns = 1;
|
has_visibly_utilized_empty_ns = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -946,6 +946,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
|
|||||||
* xmlC14NProcessAttrsAxis:
|
* xmlC14NProcessAttrsAxis:
|
||||||
* @ctx: the C14N context
|
* @ctx: the C14N context
|
||||||
* @cur: the current node
|
* @cur: the current node
|
||||||
|
* @parent_visible: the visibility of parent node
|
||||||
*
|
*
|
||||||
* Prints out canonical attribute axis of the current node to the
|
* Prints out canonical attribute axis of the current node to the
|
||||||
* buffer from C14N context as follows
|
* buffer from C14N context as follows
|
||||||
@@ -974,7 +975,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
|
|||||||
* Returns 0 on success or -1 on fail.
|
* Returns 0 on success or -1 on fail.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur)
|
xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
|
||||||
{
|
{
|
||||||
xmlAttrPtr attr;
|
xmlAttrPtr attr;
|
||||||
xmlListPtr list;
|
xmlListPtr list;
|
||||||
@@ -1009,7 +1010,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur)
|
|||||||
* include attributes in "xml" namespace defined in ancestors
|
* include attributes in "xml" namespace defined in ancestors
|
||||||
* (only for non-exclusive XML Canonicalization)
|
* (only for non-exclusive XML Canonicalization)
|
||||||
*/
|
*/
|
||||||
if ((!ctx->exclusive) && (cur->parent != NULL)
|
if (parent_visible && (!ctx->exclusive) && (cur->parent != NULL)
|
||||||
&& (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) {
|
&& (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) {
|
||||||
/*
|
/*
|
||||||
* If XPath node-set is not specified then the parent is always
|
* If XPath node-set is not specified then the parent is always
|
||||||
@@ -1138,6 +1139,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
|
|||||||
/*
|
/*
|
||||||
* Save ns_rendered stack position
|
* Save ns_rendered stack position
|
||||||
*/
|
*/
|
||||||
|
memset(&state, 0, sizeof(state));
|
||||||
xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state);
|
xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state);
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
@@ -1171,12 +1173,10 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
|
|||||||
xmlC14NVisibleNsStackShift(ctx->ns_rendered);
|
xmlC14NVisibleNsStackShift(ctx->ns_rendered);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(visible) {
|
ret = xmlC14NProcessAttrsAxis(ctx, cur, visible);
|
||||||
ret = xmlC14NProcessAttrsAxis(ctx, cur);
|
if (ret < 0) {
|
||||||
if (ret < 0) {
|
xmlC14NErrInternal("processing attributes axis");
|
||||||
xmlC14NErrInternal("processing attributes axis");
|
return (-1);
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|||||||
@@ -1200,8 +1200,6 @@ static void
|
|||||||
xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
||||||
xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup)
|
xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup)
|
||||||
{
|
{
|
||||||
xmlChar *uri = NULL;
|
|
||||||
xmlChar *URL = NULL;
|
|
||||||
xmlChar *base = NULL;
|
xmlChar *base = NULL;
|
||||||
xmlCatalogEntryPtr entry = NULL;
|
xmlCatalogEntryPtr entry = NULL;
|
||||||
|
|
||||||
@@ -1288,10 +1286,6 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
|
|||||||
}
|
}
|
||||||
if (base != NULL)
|
if (base != NULL)
|
||||||
xmlFree(base);
|
xmlFree(base);
|
||||||
if (uri != NULL)
|
|
||||||
xmlFree(uri);
|
|
||||||
if (URL != NULL)
|
|
||||||
xmlFree(URL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1546,6 +1540,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
|
|||||||
cur->next = xmlNewCatalogEntry(typ, orig, replace,
|
cur->next = xmlNewCatalogEntry(typ, orig, replace,
|
||||||
NULL, catal->prefer, NULL);
|
NULL, catal->prefer, NULL);
|
||||||
if (doregister) {
|
if (doregister) {
|
||||||
|
catal->type = XML_CATA_CATALOG;
|
||||||
cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
|
cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
|
||||||
if (cur != NULL)
|
if (cur != NULL)
|
||||||
cur->children = catal->children;
|
cur->children = catal->children;
|
||||||
@@ -1648,7 +1643,8 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
|
|||||||
if (xmlStrEqual(sysID, cur->name)) {
|
if (xmlStrEqual(sysID, cur->name)) {
|
||||||
if (xmlDebugCatalogs)
|
if (xmlDebugCatalogs)
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"Found system match %s\n", cur->name);
|
"Found system match %s, using %s\n",
|
||||||
|
cur->name, cur->URL);
|
||||||
catal->depth--;
|
catal->depth--;
|
||||||
return(xmlStrdup(cur->URL));
|
return(xmlStrdup(cur->URL));
|
||||||
}
|
}
|
||||||
@@ -3218,7 +3214,7 @@ xmlLoadCatalogs(const char *pathss) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
cur = pathss;
|
cur = pathss;
|
||||||
while ((cur != NULL) && (*cur != 0)) {
|
while (*cur != 0) {
|
||||||
while (xmlIsBlank_ch(*cur)) cur++;
|
while (xmlIsBlank_ch(*cur)) cur++;
|
||||||
if (*cur != 0) {
|
if (*cur != 0) {
|
||||||
paths = cur;
|
paths = cur;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* This file is automatically generated from the cvs source
|
* This file is automatically generated from the cvs source
|
||||||
* definition files using the genChRanges.py Python script
|
* definition files using the genChRanges.py Python script
|
||||||
*
|
*
|
||||||
* Generation date: Tue Nov 18 08:14:21 2003
|
* Generation date: Mon Mar 27 11:09:48 2006
|
||||||
* Sources: chvalid.def
|
* Sources: chvalid.def
|
||||||
* William Brack <wbrack@mmm.com.hk>
|
* William Brack <wbrack@mmm.com.hk>
|
||||||
*/
|
*/
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
* allowed.
|
* allowed.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
unsigned char xmlIsPubidChar_tab[256] = {
|
const unsigned char xmlIsPubidChar_tab[256] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
|
||||||
@@ -46,65 +46,66 @@ unsigned char xmlIsPubidChar_tab[256] = {
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00 };
|
0x00, 0x00, 0x00, 0x00 };
|
||||||
|
|
||||||
static xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131}, {0x134, 0x13e},
|
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
|
||||||
{0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3}, {0x1cd, 0x1f0},
|
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
|
||||||
{0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8}, {0x2bb, 0x2c1},
|
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
|
||||||
{0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, {0x38e, 0x3a1},
|
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
|
||||||
{0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
|
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
|
||||||
{0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3}, {0x401, 0x40c},
|
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
|
||||||
{0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481}, {0x490, 0x4c4},
|
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
|
||||||
{0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb}, {0x4ee, 0x4f5},
|
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
|
||||||
{0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559}, {0x561, 0x586},
|
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
|
||||||
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
|
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
|
||||||
{0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce}, {0x6d0, 0x6d3},
|
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
|
||||||
{0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939}, {0x93d, 0x93d},
|
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
|
||||||
{0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
|
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
|
||||||
{0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9dc, 0x9dd},
|
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
|
||||||
{0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10},
|
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
|
||||||
{0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36},
|
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
|
||||||
{0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74},
|
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
|
||||||
{0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
|
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
|
||||||
{0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
|
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
|
||||||
{0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28},
|
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
|
||||||
{0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39}, {0xb3d, 0xb3d},
|
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
|
||||||
{0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a}, {0xb8e, 0xb90},
|
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
|
||||||
{0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f},
|
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
|
||||||
{0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9},
|
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
|
||||||
{0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33},
|
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
|
||||||
{0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90},
|
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
|
||||||
{0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcde, 0xcde},
|
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
|
||||||
{0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
|
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
|
||||||
{0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e}, {0xe30, 0xe30},
|
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
|
||||||
{0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82}, {0xe84, 0xe84},
|
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
|
||||||
{0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
|
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
|
||||||
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
|
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
|
||||||
{0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0}, {0xeb2, 0xeb3},
|
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
|
||||||
{0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47}, {0xf49, 0xf69},
|
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
|
||||||
{0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100}, {0x1102, 0x1103},
|
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
|
||||||
{0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c}, {0x110e, 0x1112},
|
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
|
||||||
{0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140}, {0x114c, 0x114c},
|
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
|
||||||
{0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155}, {0x1159, 0x1159},
|
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
|
||||||
{0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165}, {0x1167, 0x1167},
|
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
|
||||||
{0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173}, {0x1175, 0x1175},
|
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
|
||||||
{0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab}, {0x11ae, 0x11af},
|
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
|
||||||
{0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2}, {0x11eb, 0x11eb},
|
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
|
||||||
{0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9},
|
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
|
||||||
{0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d},
|
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
|
||||||
{0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d},
|
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
|
||||||
{0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe},
|
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
|
||||||
{0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb},
|
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
|
||||||
{0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2126, 0x2126},
|
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
|
||||||
{0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182}, {0x3041, 0x3094},
|
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
|
||||||
{0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
|
{0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
|
||||||
xmlChRangeGroup xmlIsBaseCharGroup =
|
const xmlChRangeGroup xmlIsBaseCharGroup =
|
||||||
{197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
|
{197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
|
||||||
|
|
||||||
static xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff}, {0xe000, 0xfffd}};
|
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
|
||||||
static xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
|
{0xe000, 0xfffd}};
|
||||||
xmlChRangeGroup xmlIsCharGroup =
|
static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
|
||||||
|
const xmlChRangeGroup xmlIsCharGroup =
|
||||||
{2, 1, xmlIsChar_srng, xmlIsChar_lrng};
|
{2, 1, xmlIsChar_srng, xmlIsChar_lrng};
|
||||||
|
|
||||||
static xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
|
static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
|
||||||
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
||||||
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
||||||
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
|
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
|
||||||
@@ -129,25 +130,27 @@ static xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
|
|||||||
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
|
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
|
||||||
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
|
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
|
||||||
{0x3099, 0x3099}, {0x309a, 0x309a}};
|
{0x3099, 0x3099}, {0x309a, 0x309a}};
|
||||||
xmlChRangeGroup xmlIsCombiningGroup =
|
const xmlChRangeGroup xmlIsCombiningGroup =
|
||||||
{95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
|
{95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
|
||||||
|
|
||||||
static xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669}, {0x6f0, 0x6f9},
|
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
|
||||||
{0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f}, {0xae6, 0xaef},
|
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
|
||||||
{0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f}, {0xce6, 0xcef},
|
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
|
||||||
{0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, {0xf20, 0xf29}};
|
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
||||||
xmlChRangeGroup xmlIsDigitGroup =
|
{0xf20, 0xf29}};
|
||||||
|
const xmlChRangeGroup xmlIsDigitGroup =
|
||||||
{14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
|
{14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
|
||||||
|
|
||||||
static xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0}, {0x2d1, 0x2d1},
|
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
|
||||||
{0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46}, {0xec6, 0xec6},
|
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
|
||||||
{0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e}, {0x30fc, 0x30fe}};
|
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
|
||||||
xmlChRangeGroup xmlIsExtenderGroup =
|
{0x30fc, 0x30fe}};
|
||||||
|
const xmlChRangeGroup xmlIsExtenderGroup =
|
||||||
{10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
|
{10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
|
||||||
|
|
||||||
static xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
|
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
|
||||||
{0x3021, 0x3029}, {0x4e00, 0x9fa5}};
|
{0x3021, 0x3029}, {0x4e00, 0x9fa5}};
|
||||||
xmlChRangeGroup xmlIsIdeographicGroup =
|
const xmlChRangeGroup xmlIsIdeographicGroup =
|
||||||
{3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
|
{3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
|
||||||
|
|
||||||
|
|
||||||
@@ -162,10 +165,10 @@ xmlChRangeGroup xmlIsIdeographicGroup =
|
|||||||
* Returns: true if character valid, false otherwise
|
* Returns: true if character valid, false otherwise
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xmlCharInRange (unsigned int val, const xmlChRangeGroupPtr rptr) {
|
xmlCharInRange (unsigned int val, const xmlChRangeGroup *rptr) {
|
||||||
int low, high, mid;
|
int low, high, mid;
|
||||||
xmlChSRangePtr sptr;
|
const xmlChSRange *sptr;
|
||||||
xmlChLRangePtr lptr;
|
const xmlChLRange *lptr;
|
||||||
|
|
||||||
if (rptr == NULL) return(0);
|
if (rptr == NULL) return(0);
|
||||||
if (val < 0x10000) { /* is val in 'short' or 'long' array? */
|
if (val < 0x10000) { /* is val in 'short' or 'long' array? */
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
#include <libxml/relaxng.h>
|
#include <libxml/relaxng.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define DUMP_TEXT_TYPE 1
|
||||||
|
|
||||||
typedef struct _xmlDebugCtxt xmlDebugCtxt;
|
typedef struct _xmlDebugCtxt xmlDebugCtxt;
|
||||||
typedef xmlDebugCtxt *xmlDebugCtxtPtr;
|
typedef xmlDebugCtxt *xmlDebugCtxtPtr;
|
||||||
struct _xmlDebugCtxt {
|
struct _xmlDebugCtxt {
|
||||||
@@ -46,6 +48,7 @@ struct _xmlDebugCtxt {
|
|||||||
int check; /* do just checkings */
|
int check; /* do just checkings */
|
||||||
int errors; /* number of errors found */
|
int errors; /* number of errors found */
|
||||||
int nodict; /* if the document has no dictionnary */
|
int nodict; /* if the document has no dictionnary */
|
||||||
|
int options; /* options */
|
||||||
};
|
};
|
||||||
|
|
||||||
static void xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node);
|
static void xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node);
|
||||||
@@ -63,6 +66,7 @@ xmlCtxtDumpInitCtxt(xmlDebugCtxtPtr ctxt)
|
|||||||
ctxt->node = NULL;
|
ctxt->node = NULL;
|
||||||
ctxt->dict = NULL;
|
ctxt->dict = NULL;
|
||||||
ctxt->nodict = 0;
|
ctxt->nodict = 0;
|
||||||
|
ctxt->options = 0;
|
||||||
for (i = 0; i < 100; i++)
|
for (i = 0; i < 100; i++)
|
||||||
ctxt->shift[i] = ' ';
|
ctxt->shift[i] = ' ';
|
||||||
ctxt->shift[100] = 0;
|
ctxt->shift[100] = 0;
|
||||||
@@ -344,8 +348,10 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
|
|||||||
|
|
||||||
if ((node->type != XML_ELEMENT_NODE) &&
|
if ((node->type != XML_ELEMENT_NODE) &&
|
||||||
(node->type != XML_ATTRIBUTE_NODE) &&
|
(node->type != XML_ATTRIBUTE_NODE) &&
|
||||||
|
(node->type != XML_ELEMENT_DECL) &&
|
||||||
(node->type != XML_ATTRIBUTE_DECL) &&
|
(node->type != XML_ATTRIBUTE_DECL) &&
|
||||||
(node->type != XML_DTD_NODE) &&
|
(node->type != XML_DTD_NODE) &&
|
||||||
|
(node->type != XML_ELEMENT_DECL) &&
|
||||||
(node->type != XML_HTML_DOCUMENT_NODE) &&
|
(node->type != XML_HTML_DOCUMENT_NODE) &&
|
||||||
(node->type != XML_DOCUMENT_NODE)) {
|
(node->type != XML_DOCUMENT_NODE)) {
|
||||||
if (node->content != NULL)
|
if (node->content != NULL)
|
||||||
@@ -900,9 +906,18 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
if (!ctxt->check) {
|
if (!ctxt->check) {
|
||||||
xmlCtxtDumpSpaces(ctxt);
|
xmlCtxtDumpSpaces(ctxt);
|
||||||
if (node->name == (const xmlChar *) xmlStringTextNoenc)
|
if (node->name == (const xmlChar *) xmlStringTextNoenc)
|
||||||
fprintf(ctxt->output, "TEXT no enc\n");
|
fprintf(ctxt->output, "TEXT no enc");
|
||||||
else
|
else
|
||||||
fprintf(ctxt->output, "TEXT\n");
|
fprintf(ctxt->output, "TEXT");
|
||||||
|
if (ctxt->options & DUMP_TEXT_TYPE) {
|
||||||
|
if (node->content == (xmlChar *) &(node->properties))
|
||||||
|
fprintf(ctxt->output, " compact\n");
|
||||||
|
else if (xmlDictOwns(ctxt->dict, node->content) == 1)
|
||||||
|
fprintf(ctxt->output, " interned\n");
|
||||||
|
else
|
||||||
|
fprintf(ctxt->output, "\n");
|
||||||
|
} else
|
||||||
|
fprintf(ctxt->output, "\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XML_CDATA_SECTION_NODE:
|
case XML_CDATA_SECTION_NODE:
|
||||||
@@ -1003,9 +1018,9 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
fprintf(ctxt->output, "PBM: doc == NULL !!!\n");
|
fprintf(ctxt->output, "PBM: doc == NULL !!!\n");
|
||||||
}
|
}
|
||||||
ctxt->depth++;
|
ctxt->depth++;
|
||||||
if (node->nsDef != NULL)
|
if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL))
|
||||||
xmlCtxtDumpNamespaceList(ctxt, node->nsDef);
|
xmlCtxtDumpNamespaceList(ctxt, node->nsDef);
|
||||||
if (node->properties != NULL)
|
if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL))
|
||||||
xmlCtxtDumpAttrList(ctxt, node->properties);
|
xmlCtxtDumpAttrList(ctxt, node->properties);
|
||||||
if (node->type != XML_ENTITY_REF_NODE) {
|
if (node->type != XML_ENTITY_REF_NODE) {
|
||||||
if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) {
|
if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) {
|
||||||
@@ -1050,7 +1065,8 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
xmlCtxtDumpOneNode(ctxt, node);
|
xmlCtxtDumpOneNode(ctxt, node);
|
||||||
if ((node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
|
if ((node->type != XML_NAMESPACE_DECL) &&
|
||||||
|
(node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
|
||||||
ctxt->depth++;
|
ctxt->depth++;
|
||||||
xmlCtxtDumpNodeList(ctxt, node->children);
|
xmlCtxtDumpNodeList(ctxt, node->children);
|
||||||
ctxt->depth--;
|
ctxt->depth--;
|
||||||
@@ -1487,6 +1503,7 @@ xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc)
|
|||||||
if (output == NULL)
|
if (output == NULL)
|
||||||
output = stdout;
|
output = stdout;
|
||||||
xmlCtxtDumpInitCtxt(&ctxt);
|
xmlCtxtDumpInitCtxt(&ctxt);
|
||||||
|
ctxt.options |= DUMP_TEXT_TYPE;
|
||||||
ctxt.output = output;
|
ctxt.output = output;
|
||||||
xmlCtxtDumpDocumentHead(&ctxt, doc);
|
xmlCtxtDumpDocumentHead(&ctxt, doc);
|
||||||
xmlCtxtDumpCleanCtxt(&ctxt);
|
xmlCtxtDumpCleanCtxt(&ctxt);
|
||||||
@@ -1507,6 +1524,7 @@ xmlDebugDumpDocument(FILE * output, xmlDocPtr doc)
|
|||||||
if (output == NULL)
|
if (output == NULL)
|
||||||
output = stdout;
|
output = stdout;
|
||||||
xmlCtxtDumpInitCtxt(&ctxt);
|
xmlCtxtDumpInitCtxt(&ctxt);
|
||||||
|
ctxt.options |= DUMP_TEXT_TYPE;
|
||||||
ctxt.output = output;
|
ctxt.output = output;
|
||||||
xmlCtxtDumpDocument(&ctxt, doc);
|
xmlCtxtDumpDocument(&ctxt, doc);
|
||||||
xmlCtxtDumpCleanCtxt(&ctxt);
|
xmlCtxtDumpCleanCtxt(&ctxt);
|
||||||
@@ -1527,6 +1545,7 @@ xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
|
|||||||
if (output == NULL)
|
if (output == NULL)
|
||||||
output = stdout;
|
output = stdout;
|
||||||
xmlCtxtDumpInitCtxt(&ctxt);
|
xmlCtxtDumpInitCtxt(&ctxt);
|
||||||
|
ctxt.options |= DUMP_TEXT_TYPE;
|
||||||
ctxt.output = output;
|
ctxt.output = output;
|
||||||
xmlCtxtDumpDTD(&ctxt, dtd);
|
xmlCtxtDumpDTD(&ctxt, dtd);
|
||||||
xmlCtxtDumpCleanCtxt(&ctxt);
|
xmlCtxtDumpCleanCtxt(&ctxt);
|
||||||
@@ -2122,6 +2141,37 @@ xmlShellRegisterNamespace(xmlShellCtxtPtr ctxt, char *arg,
|
|||||||
xmlFree(nsListDup);
|
xmlFree(nsListDup);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* xmlShellRegisterRootNamespaces:
|
||||||
|
* @ctxt: the shell context
|
||||||
|
* @arg: unused
|
||||||
|
* @node: the root element
|
||||||
|
* @node2: unused
|
||||||
|
*
|
||||||
|
* Implements the XML shell function "setrootns"
|
||||||
|
* which registers all namespaces declarations found on the root element.
|
||||||
|
*
|
||||||
|
* Returns 0 on success and a negative value otherwise.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
xmlShellRegisterRootNamespaces(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
|
||||||
|
xmlNodePtr root, xmlNodePtr node2 ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
xmlNsPtr ns;
|
||||||
|
|
||||||
|
if ((root == NULL) || (root->type != XML_ELEMENT_NODE) ||
|
||||||
|
(root->nsDef == NULL) || (ctxt == NULL) || (ctxt->pctxt == NULL))
|
||||||
|
return(-1);
|
||||||
|
ns = root->nsDef;
|
||||||
|
while (ns != NULL) {
|
||||||
|
if (ns->prefix == NULL)
|
||||||
|
xmlXPathRegisterNs(ctxt->pctxt, BAD_CAST "defaultns", ns->href);
|
||||||
|
else
|
||||||
|
xmlXPathRegisterNs(ctxt->pctxt, ns->prefix, ns->href);
|
||||||
|
ns = ns->next;
|
||||||
|
}
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2859,6 +2909,8 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||||||
fprintf(ctxt->output, "\txpath expr evaluate the XPath expression in that context and print the result\n");
|
fprintf(ctxt->output, "\txpath expr evaluate the XPath expression in that context and print the result\n");
|
||||||
fprintf(ctxt->output, "\tsetns nsreg register a namespace to a prefix in the XPath evaluation context\n");
|
fprintf(ctxt->output, "\tsetns nsreg register a namespace to a prefix in the XPath evaluation context\n");
|
||||||
fprintf(ctxt->output, "\t format for nsreg is: prefix=[nsuri] (i.e. prefix= unsets a prefix)\n");
|
fprintf(ctxt->output, "\t format for nsreg is: prefix=[nsuri] (i.e. prefix= unsets a prefix)\n");
|
||||||
|
fprintf(ctxt->output, "\tsetrootns register all namespace found on the root element\n");
|
||||||
|
fprintf(ctxt->output, "\t the default namespace if any uses 'defaultns' prefix\n");
|
||||||
#endif /* LIBXML_XPATH_ENABLED */
|
#endif /* LIBXML_XPATH_ENABLED */
|
||||||
fprintf(ctxt->output, "\tpwd display current working directory\n");
|
fprintf(ctxt->output, "\tpwd display current working directory\n");
|
||||||
fprintf(ctxt->output, "\tquit leave shell\n");
|
fprintf(ctxt->output, "\tquit leave shell\n");
|
||||||
@@ -2923,6 +2975,11 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||||||
} else {
|
} else {
|
||||||
xmlShellRegisterNamespace(ctxt, arg, NULL, NULL);
|
xmlShellRegisterNamespace(ctxt, arg, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(command, "setrootns")) {
|
||||||
|
xmlNodePtr root;
|
||||||
|
|
||||||
|
root = xmlDocGetRootElement(ctxt->doc);
|
||||||
|
xmlShellRegisterRootNamespaces(ctxt, NULL, root, NULL);
|
||||||
} else if (!strcmp(command, "xpath")) {
|
} else if (!strcmp(command, "xpath")) {
|
||||||
if (arg[0] == 0) {
|
if (arg[0] == 0) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ typedef xmlDictEntry *xmlDictEntryPtr;
|
|||||||
struct _xmlDictEntry {
|
struct _xmlDictEntry {
|
||||||
struct _xmlDictEntry *next;
|
struct _xmlDictEntry *next;
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
intptr_t len;
|
int len;
|
||||||
int valid;
|
int valid;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -51,8 +51,8 @@ struct _xmlDictStrings {
|
|||||||
xmlDictStringsPtr next;
|
xmlDictStringsPtr next;
|
||||||
xmlChar *free;
|
xmlChar *free;
|
||||||
xmlChar *end;
|
xmlChar *end;
|
||||||
intptr_t size;
|
int size;
|
||||||
intptr_t nbStrings;
|
int nbStrings;
|
||||||
xmlChar array[1];
|
xmlChar array[1];
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
@@ -125,10 +125,10 @@ xmlDictCleanup(void) {
|
|||||||
* Returns the pointer of the local string, or NULL in case of error.
|
* Returns the pointer of the local string, or NULL in case of error.
|
||||||
*/
|
*/
|
||||||
static const xmlChar *
|
static const xmlChar *
|
||||||
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, intptr_t namelen) {
|
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) {
|
||||||
xmlDictStringsPtr pool;
|
xmlDictStringsPtr pool;
|
||||||
const xmlChar *ret;
|
const xmlChar *ret;
|
||||||
intptr_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||||
|
|
||||||
pool = dict->strings;
|
pool = dict->strings;
|
||||||
while (pool != NULL) {
|
while (pool != NULL) {
|
||||||
@@ -176,12 +176,12 @@ found_pool:
|
|||||||
*/
|
*/
|
||||||
static const xmlChar *
|
static const xmlChar *
|
||||||
xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix,
|
xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix,
|
||||||
const xmlChar *name, intptr_t namelen)
|
const xmlChar *name, int namelen)
|
||||||
{
|
{
|
||||||
xmlDictStringsPtr pool;
|
xmlDictStringsPtr pool;
|
||||||
const xmlChar *ret;
|
const xmlChar *ret;
|
||||||
intptr_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
|
||||||
size_t plen;
|
int plen;
|
||||||
|
|
||||||
if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
|
if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
|
||||||
plen = xmlStrlen(prefix);
|
plen = xmlStrlen(prefix);
|
||||||
@@ -228,7 +228,7 @@ found_pool:
|
|||||||
* Calculate the hash key
|
* Calculate the hash key
|
||||||
*/
|
*/
|
||||||
static unsigned long
|
static unsigned long
|
||||||
xmlDictComputeKey(const xmlChar *name, intptr_t namelen) {
|
xmlDictComputeKey(const xmlChar *name, int namelen) {
|
||||||
unsigned long value = 0L;
|
unsigned long value = 0L;
|
||||||
|
|
||||||
if (name == NULL) return(0);
|
if (name == NULL) return(0);
|
||||||
@@ -258,10 +258,10 @@ xmlDictComputeKey(const xmlChar *name, intptr_t namelen) {
|
|||||||
* Calculate the hash key
|
* Calculate the hash key
|
||||||
*/
|
*/
|
||||||
static unsigned long
|
static unsigned long
|
||||||
xmlDictComputeQKey(const xmlChar *prefix, const xmlChar *name, intptr_t len)
|
xmlDictComputeQKey(const xmlChar *prefix, const xmlChar *name, int len)
|
||||||
{
|
{
|
||||||
unsigned long value = 0L;
|
unsigned long value = 0L;
|
||||||
size_t plen;
|
int plen;
|
||||||
|
|
||||||
if (prefix == NULL)
|
if (prefix == NULL)
|
||||||
return(xmlDictComputeKey(name, len));
|
return(xmlDictComputeKey(name, len));
|
||||||
@@ -560,7 +560,7 @@ xmlDictFree(xmlDictPtr dict) {
|
|||||||
* Returns the internal copy of the name or NULL in case of internal error
|
* Returns the internal copy of the name or NULL in case of internal error
|
||||||
*/
|
*/
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
xmlDictLookup(xmlDictPtr dict, const xmlChar *name, intptr_t len) {
|
xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
|
||||||
unsigned long key, okey, nbi = 0;
|
unsigned long key, okey, nbi = 0;
|
||||||
xmlDictEntryPtr entry;
|
xmlDictEntryPtr entry;
|
||||||
xmlDictEntryPtr insert;
|
xmlDictEntryPtr insert;
|
||||||
@@ -679,7 +679,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, intptr_t len) {
|
|||||||
* Returns the internal copy of the name or NULL if not found.
|
* Returns the internal copy of the name or NULL if not found.
|
||||||
*/
|
*/
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
xmlDictExists(xmlDictPtr dict, const xmlChar *name, intptr_t len) {
|
xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
|
||||||
unsigned long key, okey, nbi = 0;
|
unsigned long key, okey, nbi = 0;
|
||||||
xmlDictEntryPtr insert;
|
xmlDictEntryPtr insert;
|
||||||
|
|
||||||
@@ -776,7 +776,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
|
|||||||
xmlDictEntryPtr entry;
|
xmlDictEntryPtr entry;
|
||||||
xmlDictEntryPtr insert;
|
xmlDictEntryPtr insert;
|
||||||
const xmlChar *ret;
|
const xmlChar *ret;
|
||||||
intptr_t len;
|
int len;
|
||||||
|
|
||||||
if ((dict == NULL) || (name == NULL))
|
if ((dict == NULL) || (name == NULL))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "libxml/SAX2.h"
|
#include "libxml/SAX2.h"
|
||||||
#include "libxml/SAX.h"
|
#include "libxml/SAX.h"
|
||||||
#include "libxml/schemasInternals.h"
|
#include "libxml/schemasInternals.h"
|
||||||
|
#include "libxml/schematron.h"
|
||||||
#include "libxml/threads.h"
|
#include "libxml/threads.h"
|
||||||
#include "libxml/tree.h"
|
#include "libxml/tree.h"
|
||||||
#include "libxml/uri.h"
|
#include "libxml/uri.h"
|
||||||
@@ -300,6 +301,18 @@ extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias __attribut
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
|
||||||
|
#ifdef bottom_HTMLtree
|
||||||
|
#undef htmlDocDumpMemoryFormat
|
||||||
|
extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat __attribute((alias("htmlDocDumpMemoryFormat__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef htmlDocDumpMemoryFormat
|
||||||
|
extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_HTML_ENABLED)
|
#if defined(LIBXML_HTML_ENABLED)
|
||||||
#ifdef bottom_HTMLparser
|
#ifdef bottom_HTMLparser
|
||||||
#undef htmlElementAllowedHere
|
#undef htmlElementAllowedHere
|
||||||
@@ -1222,6 +1235,18 @@ extern __typeof (xmlAutomataNewEpsilon) xmlAutomataNewEpsilon__internal_alias __
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlAutomataNewNegTrans
|
||||||
|
extern __typeof (xmlAutomataNewNegTrans) xmlAutomataNewNegTrans __attribute((alias("xmlAutomataNewNegTrans__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlAutomataNewNegTrans
|
||||||
|
extern __typeof (xmlAutomataNewNegTrans) xmlAutomataNewNegTrans__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlAutomataNewNegTrans xmlAutomataNewNegTrans__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
|
||||||
#ifdef bottom_xmlregexp
|
#ifdef bottom_xmlregexp
|
||||||
#undef xmlAutomataNewOnceTrans
|
#undef xmlAutomataNewOnceTrans
|
||||||
@@ -2496,6 +2521,66 @@ extern __typeof (xmlCurrentChar) xmlCurrentChar__internal_alias __attribute((vis
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapAdoptNode
|
||||||
|
extern __typeof (xmlDOMWrapAdoptNode) xmlDOMWrapAdoptNode __attribute((alias("xmlDOMWrapAdoptNode__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapAdoptNode
|
||||||
|
extern __typeof (xmlDOMWrapAdoptNode) xmlDOMWrapAdoptNode__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapAdoptNode xmlDOMWrapAdoptNode__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapCloneNode
|
||||||
|
extern __typeof (xmlDOMWrapCloneNode) xmlDOMWrapCloneNode __attribute((alias("xmlDOMWrapCloneNode__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapCloneNode
|
||||||
|
extern __typeof (xmlDOMWrapCloneNode) xmlDOMWrapCloneNode__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapCloneNode xmlDOMWrapCloneNode__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapFreeCtxt
|
||||||
|
extern __typeof (xmlDOMWrapFreeCtxt) xmlDOMWrapFreeCtxt __attribute((alias("xmlDOMWrapFreeCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapFreeCtxt
|
||||||
|
extern __typeof (xmlDOMWrapFreeCtxt) xmlDOMWrapFreeCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapFreeCtxt xmlDOMWrapFreeCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapNewCtxt
|
||||||
|
extern __typeof (xmlDOMWrapNewCtxt) xmlDOMWrapNewCtxt __attribute((alias("xmlDOMWrapNewCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapNewCtxt
|
||||||
|
extern __typeof (xmlDOMWrapNewCtxt) xmlDOMWrapNewCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapNewCtxt xmlDOMWrapNewCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapReconcileNamespaces
|
||||||
|
extern __typeof (xmlDOMWrapReconcileNamespaces) xmlDOMWrapReconcileNamespaces __attribute((alias("xmlDOMWrapReconcileNamespaces__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapReconcileNamespaces
|
||||||
|
extern __typeof (xmlDOMWrapReconcileNamespaces) xmlDOMWrapReconcileNamespaces__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapReconcileNamespaces xmlDOMWrapReconcileNamespaces__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_tree
|
||||||
|
#undef xmlDOMWrapRemoveNode
|
||||||
|
extern __typeof (xmlDOMWrapRemoveNode) xmlDOMWrapRemoveNode __attribute((alias("xmlDOMWrapRemoveNode__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlDOMWrapRemoveNode
|
||||||
|
extern __typeof (xmlDOMWrapRemoveNode) xmlDOMWrapRemoveNode__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlDOMWrapRemoveNode xmlDOMWrapRemoveNode__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_DEBUG_ENABLED)
|
#if defined(LIBXML_DEBUG_ENABLED)
|
||||||
#ifdef bottom_debugXML
|
#ifdef bottom_debugXML
|
||||||
#undef xmlDebugCheckDocument
|
#undef xmlDebugCheckDocument
|
||||||
@@ -3044,6 +3129,234 @@ extern __typeof (xmlErrMemory) xmlErrMemory__internal_alias __attribute((visibil
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpCtxtNbCons
|
||||||
|
extern __typeof (xmlExpCtxtNbCons) xmlExpCtxtNbCons __attribute((alias("xmlExpCtxtNbCons__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpCtxtNbCons
|
||||||
|
extern __typeof (xmlExpCtxtNbCons) xmlExpCtxtNbCons__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpCtxtNbCons xmlExpCtxtNbCons__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpCtxtNbNodes
|
||||||
|
extern __typeof (xmlExpCtxtNbNodes) xmlExpCtxtNbNodes __attribute((alias("xmlExpCtxtNbNodes__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpCtxtNbNodes
|
||||||
|
extern __typeof (xmlExpCtxtNbNodes) xmlExpCtxtNbNodes__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpCtxtNbNodes xmlExpCtxtNbNodes__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpDump
|
||||||
|
extern __typeof (xmlExpDump) xmlExpDump __attribute((alias("xmlExpDump__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpDump
|
||||||
|
extern __typeof (xmlExpDump) xmlExpDump__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpDump xmlExpDump__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpExpDerive
|
||||||
|
extern __typeof (xmlExpExpDerive) xmlExpExpDerive __attribute((alias("xmlExpExpDerive__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpExpDerive
|
||||||
|
extern __typeof (xmlExpExpDerive) xmlExpExpDerive__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpExpDerive xmlExpExpDerive__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpFree
|
||||||
|
extern __typeof (xmlExpFree) xmlExpFree __attribute((alias("xmlExpFree__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpFree
|
||||||
|
extern __typeof (xmlExpFree) xmlExpFree__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpFree xmlExpFree__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpFreeCtxt
|
||||||
|
extern __typeof (xmlExpFreeCtxt) xmlExpFreeCtxt __attribute((alias("xmlExpFreeCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpFreeCtxt
|
||||||
|
extern __typeof (xmlExpFreeCtxt) xmlExpFreeCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpFreeCtxt xmlExpFreeCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpGetLanguage
|
||||||
|
extern __typeof (xmlExpGetLanguage) xmlExpGetLanguage __attribute((alias("xmlExpGetLanguage__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpGetLanguage
|
||||||
|
extern __typeof (xmlExpGetLanguage) xmlExpGetLanguage__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpGetLanguage xmlExpGetLanguage__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpGetStart
|
||||||
|
extern __typeof (xmlExpGetStart) xmlExpGetStart __attribute((alias("xmlExpGetStart__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpGetStart
|
||||||
|
extern __typeof (xmlExpGetStart) xmlExpGetStart__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpGetStart xmlExpGetStart__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpIsNillable
|
||||||
|
extern __typeof (xmlExpIsNillable) xmlExpIsNillable __attribute((alias("xmlExpIsNillable__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpIsNillable
|
||||||
|
extern __typeof (xmlExpIsNillable) xmlExpIsNillable__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpIsNillable xmlExpIsNillable__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpMaxToken
|
||||||
|
extern __typeof (xmlExpMaxToken) xmlExpMaxToken __attribute((alias("xmlExpMaxToken__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpMaxToken
|
||||||
|
extern __typeof (xmlExpMaxToken) xmlExpMaxToken__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpMaxToken xmlExpMaxToken__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpNewAtom
|
||||||
|
extern __typeof (xmlExpNewAtom) xmlExpNewAtom __attribute((alias("xmlExpNewAtom__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpNewAtom
|
||||||
|
extern __typeof (xmlExpNewAtom) xmlExpNewAtom__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpNewAtom xmlExpNewAtom__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpNewCtxt
|
||||||
|
extern __typeof (xmlExpNewCtxt) xmlExpNewCtxt __attribute((alias("xmlExpNewCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpNewCtxt
|
||||||
|
extern __typeof (xmlExpNewCtxt) xmlExpNewCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpNewCtxt xmlExpNewCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpNewOr
|
||||||
|
extern __typeof (xmlExpNewOr) xmlExpNewOr __attribute((alias("xmlExpNewOr__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpNewOr
|
||||||
|
extern __typeof (xmlExpNewOr) xmlExpNewOr__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpNewOr xmlExpNewOr__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpNewRange
|
||||||
|
extern __typeof (xmlExpNewRange) xmlExpNewRange __attribute((alias("xmlExpNewRange__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpNewRange
|
||||||
|
extern __typeof (xmlExpNewRange) xmlExpNewRange__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpNewRange xmlExpNewRange__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpNewSeq
|
||||||
|
extern __typeof (xmlExpNewSeq) xmlExpNewSeq __attribute((alias("xmlExpNewSeq__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpNewSeq
|
||||||
|
extern __typeof (xmlExpNewSeq) xmlExpNewSeq__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpNewSeq xmlExpNewSeq__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpParse
|
||||||
|
extern __typeof (xmlExpParse) xmlExpParse __attribute((alias("xmlExpParse__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpParse
|
||||||
|
extern __typeof (xmlExpParse) xmlExpParse__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpParse xmlExpParse__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpRef
|
||||||
|
extern __typeof (xmlExpRef) xmlExpRef __attribute((alias("xmlExpRef__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpRef
|
||||||
|
extern __typeof (xmlExpRef) xmlExpRef__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpRef xmlExpRef__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpStringDerive
|
||||||
|
extern __typeof (xmlExpStringDerive) xmlExpStringDerive __attribute((alias("xmlExpStringDerive__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpStringDerive
|
||||||
|
extern __typeof (xmlExpStringDerive) xmlExpStringDerive__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpStringDerive xmlExpStringDerive__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
|
||||||
|
#ifdef bottom_xmlregexp
|
||||||
|
#undef xmlExpSubsume
|
||||||
|
extern __typeof (xmlExpSubsume) xmlExpSubsume __attribute((alias("xmlExpSubsume__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlExpSubsume
|
||||||
|
extern __typeof (xmlExpSubsume) xmlExpSubsume__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlExpSubsume xmlExpSubsume__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef bottom_xmlIO
|
#ifdef bottom_xmlIO
|
||||||
#undef xmlFileClose
|
#undef xmlFileClose
|
||||||
extern __typeof (xmlFileClose) xmlFileClose __attribute((alias("xmlFileClose__internal_alias")));
|
extern __typeof (xmlFileClose) xmlFileClose __attribute((alias("xmlFileClose__internal_alias")));
|
||||||
@@ -3780,6 +4093,16 @@ extern __typeof (xmlHandleEntity) xmlHandleEntity__internal_alias __attribute((v
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_parser
|
||||||
|
#undef xmlHasFeature
|
||||||
|
extern __typeof (xmlHasFeature) xmlHasFeature __attribute((alias("xmlHasFeature__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlHasFeature
|
||||||
|
extern __typeof (xmlHasFeature) xmlHasFeature__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlHasFeature xmlHasFeature__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef bottom_tree
|
#ifdef bottom_tree
|
||||||
#undef xmlHasNsProp
|
#undef xmlHasNsProp
|
||||||
extern __typeof (xmlHasNsProp) xmlHasNsProp __attribute((alias("xmlHasNsProp__internal_alias")));
|
extern __typeof (xmlHasNsProp) xmlHasNsProp __attribute((alias("xmlHasNsProp__internal_alias")));
|
||||||
@@ -6270,6 +6593,18 @@ extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __at
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||||
|
#ifdef bottom_xmlIO
|
||||||
|
#undef xmlOutputBufferCreateBuffer
|
||||||
|
extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlOutputBufferCreateBuffer
|
||||||
|
extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||||
#ifdef bottom_xmlIO
|
#ifdef bottom_xmlIO
|
||||||
#undef xmlOutputBufferCreateFd
|
#undef xmlOutputBufferCreateFd
|
||||||
@@ -6996,6 +7331,16 @@ extern __typeof (xmlParseURI) xmlParseURI__internal_alias __attribute((visibilit
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef bottom_uri
|
||||||
|
#undef xmlParseURIRaw
|
||||||
|
extern __typeof (xmlParseURIRaw) xmlParseURIRaw __attribute((alias("xmlParseURIRaw__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlParseURIRaw
|
||||||
|
extern __typeof (xmlParseURIRaw) xmlParseURIRaw__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlParseURIRaw xmlParseURIRaw__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef bottom_uri
|
#ifdef bottom_uri
|
||||||
#undef xmlParseURIReference
|
#undef xmlParseURIReference
|
||||||
extern __typeof (xmlParseURIReference) xmlParseURIReference __attribute((alias("xmlParseURIReference__internal_alias")));
|
extern __typeof (xmlParseURIReference) xmlParseURIReference __attribute((alias("xmlParseURIReference__internal_alias")));
|
||||||
@@ -7336,6 +7681,18 @@ extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth__internal_alias __attrib
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_PATTERN_ENABLED)
|
||||||
|
#ifdef bottom_pattern
|
||||||
|
#undef xmlPatternMinDepth
|
||||||
|
extern __typeof (xmlPatternMinDepth) xmlPatternMinDepth __attribute((alias("xmlPatternMinDepth__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlPatternMinDepth
|
||||||
|
extern __typeof (xmlPatternMinDepth) xmlPatternMinDepth__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlPatternMinDepth xmlPatternMinDepth__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_PATTERN_ENABLED)
|
#if defined(LIBXML_PATTERN_ENABLED)
|
||||||
#ifdef bottom_pattern
|
#ifdef bottom_pattern
|
||||||
#undef xmlPatternStreamable
|
#undef xmlPatternStreamable
|
||||||
@@ -8070,6 +8427,18 @@ extern __typeof (xmlRelaxNGSetParserErrors) xmlRelaxNGSetParserErrors__internal_
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_relaxng
|
||||||
|
#undef xmlRelaxNGSetParserStructuredErrors
|
||||||
|
extern __typeof (xmlRelaxNGSetParserStructuredErrors) xmlRelaxNGSetParserStructuredErrors __attribute((alias("xmlRelaxNGSetParserStructuredErrors__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlRelaxNGSetParserStructuredErrors
|
||||||
|
extern __typeof (xmlRelaxNGSetParserStructuredErrors) xmlRelaxNGSetParserStructuredErrors__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlRelaxNGSetParserStructuredErrors xmlRelaxNGSetParserStructuredErrors__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_relaxng
|
#ifdef bottom_relaxng
|
||||||
#undef xmlRelaxNGSetValidErrors
|
#undef xmlRelaxNGSetValidErrors
|
||||||
@@ -8082,6 +8451,18 @@ extern __typeof (xmlRelaxNGSetValidErrors) xmlRelaxNGSetValidErrors__internal_al
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_relaxng
|
||||||
|
#undef xmlRelaxNGSetValidStructuredErrors
|
||||||
|
extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors __attribute((alias("xmlRelaxNGSetValidStructuredErrors__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlRelaxNGSetValidStructuredErrors
|
||||||
|
extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlRelaxNGSetValidStructuredErrors xmlRelaxNGSetValidStructuredErrors__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_relaxng
|
#ifdef bottom_relaxng
|
||||||
#undef xmlRelaxNGValidateDoc
|
#undef xmlRelaxNGValidateDoc
|
||||||
@@ -8278,7 +8659,7 @@ extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attrib
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||||
#ifdef bottom_SAX2
|
#ifdef bottom_SAX2
|
||||||
#undef xmlSAX2EndElement
|
#undef xmlSAX2EndElement
|
||||||
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
|
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
|
||||||
@@ -8524,7 +8905,7 @@ extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __at
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||||
#ifdef bottom_SAX2
|
#ifdef bottom_SAX2
|
||||||
#undef xmlSAX2StartElement
|
#undef xmlSAX2StartElement
|
||||||
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
|
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
|
||||||
@@ -8818,6 +9199,18 @@ extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute(
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||||
|
#ifdef bottom_xmlsave
|
||||||
|
#undef xmlSaveToBuffer
|
||||||
|
extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSaveToBuffer
|
||||||
|
extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_OUTPUT_ENABLED)
|
#if defined(LIBXML_OUTPUT_ENABLED)
|
||||||
#ifdef bottom_xmlsave
|
#ifdef bottom_xmlsave
|
||||||
#undef xmlSaveToFd
|
#undef xmlSaveToFd
|
||||||
@@ -9092,6 +9485,18 @@ extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue__internal_alias
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaGetCanonValueWhtsp
|
||||||
|
extern __typeof (xmlSchemaGetCanonValueWhtsp) xmlSchemaGetCanonValueWhtsp __attribute((alias("xmlSchemaGetCanonValueWhtsp__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaGetCanonValueWhtsp
|
||||||
|
extern __typeof (xmlSchemaGetCanonValueWhtsp) xmlSchemaGetCanonValueWhtsp__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaGetCanonValueWhtsp xmlSchemaGetCanonValueWhtsp__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemastypes
|
#ifdef bottom_xmlschemastypes
|
||||||
#undef xmlSchemaGetFacetValueAsULong
|
#undef xmlSchemaGetFacetValueAsULong
|
||||||
@@ -9176,6 +9581,18 @@ extern __typeof (xmlSchemaIsBuiltInTypeFacet) xmlSchemaIsBuiltInTypeFacet__inter
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaIsValid
|
||||||
|
extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid __attribute((alias("xmlSchemaIsValid__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaIsValid
|
||||||
|
extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaIsValid xmlSchemaIsValid__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemas
|
#ifdef bottom_xmlschemas
|
||||||
#undef xmlSchemaNewDocParserCtxt
|
#undef xmlSchemaNewDocParserCtxt
|
||||||
@@ -9236,6 +9653,18 @@ extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt__internal_alias
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaNewQNameValue
|
||||||
|
extern __typeof (xmlSchemaNewQNameValue) xmlSchemaNewQNameValue __attribute((alias("xmlSchemaNewQNameValue__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaNewQNameValue
|
||||||
|
extern __typeof (xmlSchemaNewQNameValue) xmlSchemaNewQNameValue__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaNewQNameValue xmlSchemaNewQNameValue__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemastypes
|
#ifdef bottom_xmlschemastypes
|
||||||
#undef xmlSchemaNewStringValue
|
#undef xmlSchemaNewStringValue
|
||||||
@@ -9272,6 +9701,30 @@ extern __typeof (xmlSchemaParse) xmlSchemaParse__internal_alias __attribute((vis
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaSAXPlug
|
||||||
|
extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug __attribute((alias("xmlSchemaSAXPlug__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaSAXPlug
|
||||||
|
extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaSAXPlug xmlSchemaSAXPlug__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaSAXUnplug
|
||||||
|
extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug __attribute((alias("xmlSchemaSAXUnplug__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaSAXUnplug
|
||||||
|
extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaSAXUnplug xmlSchemaSAXUnplug__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemas
|
#ifdef bottom_xmlschemas
|
||||||
#undef xmlSchemaSetParserErrors
|
#undef xmlSchemaSetParserErrors
|
||||||
@@ -9284,6 +9737,18 @@ extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors__internal_al
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaSetParserStructuredErrors
|
||||||
|
extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors __attribute((alias("xmlSchemaSetParserStructuredErrors__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaSetParserStructuredErrors
|
||||||
|
extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaSetParserStructuredErrors xmlSchemaSetParserStructuredErrors__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemas
|
#ifdef bottom_xmlschemas
|
||||||
#undef xmlSchemaSetValidErrors
|
#undef xmlSchemaSetValidErrors
|
||||||
@@ -9308,6 +9773,18 @@ extern __typeof (xmlSchemaSetValidOptions) xmlSchemaSetValidOptions__internal_al
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaSetValidStructuredErrors
|
||||||
|
extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors __attribute((alias("xmlSchemaSetValidStructuredErrors__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaSetValidStructuredErrors
|
||||||
|
extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaSetValidStructuredErrors xmlSchemaSetValidStructuredErrors__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemastypes
|
#ifdef bottom_xmlschemastypes
|
||||||
#undef xmlSchemaValPredefTypeNode
|
#undef xmlSchemaValPredefTypeNode
|
||||||
@@ -9380,6 +9857,18 @@ extern __typeof (xmlSchemaValidateFacetWhtsp) xmlSchemaValidateFacetWhtsp__inter
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemas
|
||||||
|
#undef xmlSchemaValidateFile
|
||||||
|
extern __typeof (xmlSchemaValidateFile) xmlSchemaValidateFile __attribute((alias("xmlSchemaValidateFile__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaValidateFile
|
||||||
|
extern __typeof (xmlSchemaValidateFile) xmlSchemaValidateFile__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaValidateFile xmlSchemaValidateFile__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemastypes
|
#ifdef bottom_xmlschemastypes
|
||||||
#undef xmlSchemaValidateLengthFacet
|
#undef xmlSchemaValidateLengthFacet
|
||||||
@@ -9452,6 +9941,54 @@ extern __typeof (xmlSchemaValidateStream) xmlSchemaValidateStream__internal_alia
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaValueAppend
|
||||||
|
extern __typeof (xmlSchemaValueAppend) xmlSchemaValueAppend __attribute((alias("xmlSchemaValueAppend__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaValueAppend
|
||||||
|
extern __typeof (xmlSchemaValueAppend) xmlSchemaValueAppend__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaValueAppend xmlSchemaValueAppend__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaValueGetAsBoolean
|
||||||
|
extern __typeof (xmlSchemaValueGetAsBoolean) xmlSchemaValueGetAsBoolean __attribute((alias("xmlSchemaValueGetAsBoolean__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaValueGetAsBoolean
|
||||||
|
extern __typeof (xmlSchemaValueGetAsBoolean) xmlSchemaValueGetAsBoolean__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaValueGetAsBoolean xmlSchemaValueGetAsBoolean__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaValueGetAsString
|
||||||
|
extern __typeof (xmlSchemaValueGetAsString) xmlSchemaValueGetAsString __attribute((alias("xmlSchemaValueGetAsString__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaValueGetAsString
|
||||||
|
extern __typeof (xmlSchemaValueGetAsString) xmlSchemaValueGetAsString__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaValueGetAsString xmlSchemaValueGetAsString__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlschemastypes
|
||||||
|
#undef xmlSchemaValueGetNext
|
||||||
|
extern __typeof (xmlSchemaValueGetNext) xmlSchemaValueGetNext __attribute((alias("xmlSchemaValueGetNext__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchemaValueGetNext
|
||||||
|
extern __typeof (xmlSchemaValueGetNext) xmlSchemaValueGetNext__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchemaValueGetNext xmlSchemaValueGetNext__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
#ifdef bottom_xmlschemastypes
|
#ifdef bottom_xmlschemastypes
|
||||||
#undef xmlSchemaWhiteSpaceReplace
|
#undef xmlSchemaWhiteSpaceReplace
|
||||||
@@ -9464,6 +10001,114 @@ extern __typeof (xmlSchemaWhiteSpaceReplace) xmlSchemaWhiteSpaceReplace__interna
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronFree
|
||||||
|
extern __typeof (xmlSchematronFree) xmlSchematronFree __attribute((alias("xmlSchematronFree__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronFree
|
||||||
|
extern __typeof (xmlSchematronFree) xmlSchematronFree__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronFree xmlSchematronFree__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronFreeParserCtxt
|
||||||
|
extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt __attribute((alias("xmlSchematronFreeParserCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronFreeParserCtxt
|
||||||
|
extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronFreeParserCtxt xmlSchematronFreeParserCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronFreeValidCtxt
|
||||||
|
extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt __attribute((alias("xmlSchematronFreeValidCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronFreeValidCtxt
|
||||||
|
extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronFreeValidCtxt xmlSchematronFreeValidCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronNewDocParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt __attribute((alias("xmlSchematronNewDocParserCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronNewDocParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronNewDocParserCtxt xmlSchematronNewDocParserCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronNewMemParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt __attribute((alias("xmlSchematronNewMemParserCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronNewMemParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronNewMemParserCtxt xmlSchematronNewMemParserCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronNewParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt __attribute((alias("xmlSchematronNewParserCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronNewParserCtxt
|
||||||
|
extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronNewParserCtxt xmlSchematronNewParserCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronNewValidCtxt
|
||||||
|
extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt __attribute((alias("xmlSchematronNewValidCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronNewValidCtxt
|
||||||
|
extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronNewValidCtxt xmlSchematronNewValidCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronParse
|
||||||
|
extern __typeof (xmlSchematronParse) xmlSchematronParse __attribute((alias("xmlSchematronParse__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronParse
|
||||||
|
extern __typeof (xmlSchematronParse) xmlSchematronParse__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronParse xmlSchematronParse__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_SCHEMATRON_ENABLED)
|
||||||
|
#ifdef bottom_schematron
|
||||||
|
#undef xmlSchematronValidateDoc
|
||||||
|
extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc __attribute((alias("xmlSchematronValidateDoc__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlSchematronValidateDoc
|
||||||
|
extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlSchematronValidateDoc xmlSchematronValidateDoc__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef bottom_tree
|
#ifdef bottom_tree
|
||||||
#undef xmlSearchNs
|
#undef xmlSearchNs
|
||||||
extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
|
extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
|
||||||
@@ -9864,7 +10509,6 @@ extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent__internal_al
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_PUSH_ENABLED)
|
|
||||||
#ifdef bottom_parser
|
#ifdef bottom_parser
|
||||||
#undef xmlStopParser
|
#undef xmlStopParser
|
||||||
extern __typeof (xmlStopParser) xmlStopParser __attribute((alias("xmlStopParser__internal_alias")));
|
extern __typeof (xmlStopParser) xmlStopParser __attribute((alias("xmlStopParser__internal_alias")));
|
||||||
@@ -9874,7 +10518,6 @@ extern __typeof (xmlStopParser) xmlStopParser__internal_alias __attribute((visib
|
|||||||
#define xmlStopParser xmlStopParser__internal_alias
|
#define xmlStopParser xmlStopParser__internal_alias
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef bottom_xmlstring
|
#ifdef bottom_xmlstring
|
||||||
#undef xmlStrEqual
|
#undef xmlStrEqual
|
||||||
@@ -10012,6 +10655,30 @@ extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr__internal_alias __attribut
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_PATTERN_ENABLED)
|
||||||
|
#ifdef bottom_pattern
|
||||||
|
#undef xmlStreamPushNode
|
||||||
|
extern __typeof (xmlStreamPushNode) xmlStreamPushNode __attribute((alias("xmlStreamPushNode__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlStreamPushNode
|
||||||
|
extern __typeof (xmlStreamPushNode) xmlStreamPushNode__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlStreamPushNode xmlStreamPushNode__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_PATTERN_ENABLED)
|
||||||
|
#ifdef bottom_pattern
|
||||||
|
#undef xmlStreamWantsAnyNode
|
||||||
|
extern __typeof (xmlStreamWantsAnyNode) xmlStreamWantsAnyNode __attribute((alias("xmlStreamWantsAnyNode__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlStreamWantsAnyNode
|
||||||
|
extern __typeof (xmlStreamWantsAnyNode) xmlStreamWantsAnyNode__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlStreamWantsAnyNode xmlStreamWantsAnyNode__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef bottom_parserInternals
|
#ifdef bottom_parserInternals
|
||||||
#undef xmlStringCurrentChar
|
#undef xmlStringCurrentChar
|
||||||
extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar __attribute((alias("xmlStringCurrentChar__internal_alias")));
|
extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar __attribute((alias("xmlStringCurrentChar__internal_alias")));
|
||||||
@@ -10850,7 +11517,7 @@ extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValu
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_READER_ENABLED)
|
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
|
||||||
#ifdef bottom_xmlreader
|
#ifdef bottom_xmlreader
|
||||||
#undef xmlTextReaderReadInnerXml
|
#undef xmlTextReaderReadInnerXml
|
||||||
extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias")));
|
extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias")));
|
||||||
@@ -10862,7 +11529,7 @@ extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml__internal_
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_READER_ENABLED)
|
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
|
||||||
#ifdef bottom_xmlreader
|
#ifdef bottom_xmlreader
|
||||||
#undef xmlTextReaderReadOuterXml
|
#undef xmlTextReaderReadOuterXml
|
||||||
extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias")));
|
extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias")));
|
||||||
@@ -10922,6 +11589,30 @@ extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__int
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlreader
|
||||||
|
#undef xmlTextReaderSchemaValidate
|
||||||
|
extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate __attribute((alias("xmlTextReaderSchemaValidate__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlTextReaderSchemaValidate
|
||||||
|
extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlTextReaderSchemaValidate xmlTextReaderSchemaValidate__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlreader
|
||||||
|
#undef xmlTextReaderSchemaValidateCtxt
|
||||||
|
extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt __attribute((alias("xmlTextReaderSchemaValidateCtxt__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlTextReaderSchemaValidateCtxt
|
||||||
|
extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlTextReaderSchemaValidateCtxt xmlTextReaderSchemaValidateCtxt__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_READER_ENABLED)
|
#if defined(LIBXML_READER_ENABLED)
|
||||||
#ifdef bottom_xmlreader
|
#ifdef bottom_xmlreader
|
||||||
#undef xmlTextReaderSetErrorHandler
|
#undef xmlTextReaderSetErrorHandler
|
||||||
@@ -10946,6 +11637,18 @@ extern __typeof (xmlTextReaderSetParserProp) xmlTextReaderSetParserProp__interna
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
|
#ifdef bottom_xmlreader
|
||||||
|
#undef xmlTextReaderSetSchema
|
||||||
|
extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema __attribute((alias("xmlTextReaderSetSchema__internal_alias")));
|
||||||
|
#else
|
||||||
|
#ifndef xmlTextReaderSetSchema
|
||||||
|
extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema__internal_alias __attribute((visibility("hidden")));
|
||||||
|
#define xmlTextReaderSetSchema xmlTextReaderSetSchema__internal_alias
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_READER_ENABLED)
|
#if defined(LIBXML_READER_ENABLED)
|
||||||
#ifdef bottom_xmlreader
|
#ifdef bottom_xmlreader
|
||||||
#undef xmlTextReaderSetStructuredErrorHandler
|
#undef xmlTextReaderSetStructuredErrorHandler
|
||||||
@@ -14350,7 +15053,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
|
||||||
#ifdef bottom_tree
|
#ifdef bottom_tree
|
||||||
#undef xmlValidateNCName
|
#undef xmlValidateNCName
|
||||||
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));
|
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));
|
||||||
|
|||||||
@@ -70,6 +70,32 @@ static void xmlRegisterCharEncodingHandlersISO8859x (void);
|
|||||||
|
|
||||||
static int xmlLittleEndian = 1;
|
static int xmlLittleEndian = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlEncodingErrMemory:
|
||||||
|
* @extra: extra informations
|
||||||
|
*
|
||||||
|
* Handle an out of memory condition
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlEncodingErrMemory(const char *extra)
|
||||||
|
{
|
||||||
|
__xmlSimpleError(XML_FROM_I18N, XML_ERR_NO_MEMORY, NULL, NULL, extra);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlErrEncoding:
|
||||||
|
* @error: the error number
|
||||||
|
* @msg: the error message
|
||||||
|
*
|
||||||
|
* n encoding error
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val)
|
||||||
|
{
|
||||||
|
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL,
|
||||||
|
XML_FROM_I18N, error, XML_ERR_FATAL,
|
||||||
|
NULL, 0, val, NULL, NULL, 0, 0, msg, val);
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -91,36 +117,30 @@ static int xmlLittleEndian = 1;
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
asciiToUTF8(unsigned char* out, intptr_t* outlen,
|
asciiToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* base = in;
|
const unsigned char* base = in;
|
||||||
const unsigned char* processed = in;
|
const unsigned char* processed = in;
|
||||||
unsigned char* outend = out + *outlen;
|
unsigned char* outend = out + *outlen;
|
||||||
const unsigned char* inend;
|
const unsigned char* inend;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
int bits;
|
|
||||||
|
|
||||||
inend = in + (*inlen);
|
inend = in + (*inlen);
|
||||||
while ((in < inend) && (out - outstart + 5 < *outlen)) {
|
while ((in < inend) && (out - outstart + 5 < *outlen)) {
|
||||||
c= *in++;
|
c= *in++;
|
||||||
|
|
||||||
/* assertion: c is a single UTF-4 value */
|
|
||||||
if (out >= outend)
|
if (out >= outend)
|
||||||
break;
|
break;
|
||||||
if (c < 0x80) { *out++= c; bits= -6; }
|
if (c < 0x80) {
|
||||||
else {
|
*out++ = c;
|
||||||
|
} else {
|
||||||
*outlen = out - outstart;
|
*outlen = out - outstart;
|
||||||
*inlen = processed - base;
|
*inlen = processed - base;
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; bits >= 0; bits-= 6) {
|
|
||||||
if (out >= outend)
|
|
||||||
break;
|
|
||||||
*out++= ((c >> bits) & 0x3F) | 0x80;
|
|
||||||
}
|
|
||||||
processed = (const unsigned char*) in;
|
processed = (const unsigned char*) in;
|
||||||
}
|
}
|
||||||
*outlen = out - outstart;
|
*outlen = out - outstart;
|
||||||
@@ -144,9 +164,9 @@ asciiToUTF8(unsigned char* out, intptr_t* outlen,
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF8Toascii(unsigned char* out, intptr_t* outlen,
|
UTF8Toascii(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
const unsigned char* processed = in;
|
const unsigned char* processed = in;
|
||||||
const unsigned char* outend;
|
const unsigned char* outend;
|
||||||
const unsigned char* outstart = out;
|
const unsigned char* outstart = out;
|
||||||
@@ -228,9 +248,9 @@ UTF8Toascii(unsigned char* out, intptr_t* outlen,
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
isolat1ToUTF8(unsigned char* out, intptr_t* outlen,
|
isolat1ToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* base = in;
|
const unsigned char* base = in;
|
||||||
unsigned char* outend;
|
unsigned char* outend;
|
||||||
@@ -276,11 +296,11 @@ isolat1ToUTF8(unsigned char* out, intptr_t* outlen,
|
|||||||
* The value of *inlen after return is the number of octets consumed
|
* The value of *inlen after return is the number of octets consumed
|
||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF8ToUTF8(unsigned char* out, intptr_t* outlen,
|
UTF8ToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* inb, intptr_t* inlenb)
|
const unsigned char* inb, int *inlenb)
|
||||||
{
|
{
|
||||||
intptr_t len;
|
int len;
|
||||||
|
|
||||||
if ((out == NULL) || (inb == NULL) || (outlen == NULL) || (inlenb == NULL))
|
if ((out == NULL) || (inb == NULL) || (outlen == NULL) || (inlenb == NULL))
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -317,9 +337,9 @@ UTF8ToUTF8(unsigned char* out, intptr_t* outlen,
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
UTF8Toisolat1(unsigned char* out, intptr_t* outlen,
|
UTF8Toisolat1(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
const unsigned char* processed = in;
|
const unsigned char* processed = in;
|
||||||
const unsigned char* outend;
|
const unsigned char* outend;
|
||||||
const unsigned char* outstart = out;
|
const unsigned char* outstart = out;
|
||||||
@@ -409,17 +429,16 @@ UTF8Toisolat1(unsigned char* out, intptr_t* outlen,
|
|||||||
* The value of *inlen after return is the number of octets consumed
|
* The value of *inlen after return is the number of octets consumed
|
||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF16LEToUTF8(unsigned char* out, intptr_t* outlen,
|
UTF16LEToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* inb, intptr_t* inlenb)
|
const unsigned char* inb, int *inlenb)
|
||||||
{
|
{
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* processed = inb;
|
const unsigned char* processed = inb;
|
||||||
unsigned char* outend = out + *outlen;
|
unsigned char* outend = out + *outlen;
|
||||||
unsigned short* in = (unsigned short*) inb;
|
unsigned short* in = (unsigned short*) inb;
|
||||||
unsigned short* inend;
|
unsigned short* inend;
|
||||||
unsigned int c, d;
|
unsigned int c, d, inlen;
|
||||||
size_t inlen;
|
|
||||||
unsigned char *tmp;
|
unsigned char *tmp;
|
||||||
int bits;
|
int bits;
|
||||||
|
|
||||||
@@ -495,18 +514,18 @@ UTF16LEToUTF8(unsigned char* out, intptr_t* outlen,
|
|||||||
* Returns the number of bytes written, or -1 if lack of space, or -2
|
* Returns the number of bytes written, or -1 if lack of space, or -2
|
||||||
* if the transcoding failed.
|
* if the transcoding failed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF8ToUTF16LE(unsigned char* outb, intptr_t* outlen,
|
UTF8ToUTF16LE(unsigned char* outb, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen)
|
const unsigned char* in, int *inlen)
|
||||||
{
|
{
|
||||||
unsigned short* out = (unsigned short*) outb;
|
unsigned short* out = (unsigned short*) outb;
|
||||||
const unsigned char* processed = in;
|
const unsigned char* processed = in;
|
||||||
const unsigned char *const instart = in;
|
const unsigned char *const instart = in;
|
||||||
unsigned short* outstart= out;
|
unsigned short* outstart= out;
|
||||||
unsigned short* outend;
|
unsigned short* outend;
|
||||||
const unsigned char* inend= in+*inlen;
|
const unsigned char* inend;
|
||||||
unsigned int c, d;
|
unsigned int c, d;
|
||||||
intptr_t trailing;
|
int trailing;
|
||||||
unsigned char *tmp;
|
unsigned char *tmp;
|
||||||
unsigned short tmp1, tmp2;
|
unsigned short tmp1, tmp2;
|
||||||
|
|
||||||
@@ -517,6 +536,7 @@ UTF8ToUTF16LE(unsigned char* outb, intptr_t* outlen,
|
|||||||
*inlen = 0;
|
*inlen = 0;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
inend= in + *inlen;
|
||||||
outend = out + (*outlen / 2);
|
outend = out + (*outlen / 2);
|
||||||
while (in < inend) {
|
while (in < inend) {
|
||||||
d= *in++;
|
d= *in++;
|
||||||
@@ -603,9 +623,9 @@ UTF8ToUTF16LE(unsigned char* outb, intptr_t* outlen,
|
|||||||
* Returns the number of bytes written, or -1 if lack of space, or -2
|
* Returns the number of bytes written, or -1 if lack of space, or -2
|
||||||
* if the transcoding failed.
|
* if the transcoding failed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF8ToUTF16(unsigned char* outb, intptr_t* outlen,
|
UTF8ToUTF16(unsigned char* outb, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen)
|
const unsigned char* in, int *inlen)
|
||||||
{
|
{
|
||||||
if (in == NULL) {
|
if (in == NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -647,17 +667,16 @@ UTF8ToUTF16(unsigned char* outb, intptr_t* outlen,
|
|||||||
* The value of *inlen after return is the number of octets consumed
|
* The value of *inlen after return is the number of octets consumed
|
||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF16BEToUTF8(unsigned char* out, intptr_t* outlen,
|
UTF16BEToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* inb, intptr_t* inlenb)
|
const unsigned char* inb, int *inlenb)
|
||||||
{
|
{
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* processed = inb;
|
const unsigned char* processed = inb;
|
||||||
unsigned char* outend = out + *outlen;
|
unsigned char* outend = out + *outlen;
|
||||||
unsigned short* in = (unsigned short*) inb;
|
unsigned short* in = (unsigned short*) inb;
|
||||||
unsigned short* inend;
|
unsigned short* inend;
|
||||||
unsigned int c, d;
|
unsigned int c, d, inlen;
|
||||||
size_t inlen;
|
|
||||||
unsigned char *tmp;
|
unsigned char *tmp;
|
||||||
int bits;
|
int bits;
|
||||||
|
|
||||||
@@ -737,18 +756,18 @@ UTF16BEToUTF8(unsigned char* out, intptr_t* outlen,
|
|||||||
* Returns the number of byte written, or -1 by lack of space, or -2
|
* Returns the number of byte written, or -1 by lack of space, or -2
|
||||||
* if the transcoding failed.
|
* if the transcoding failed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
|
UTF8ToUTF16BE(unsigned char* outb, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen)
|
const unsigned char* in, int *inlen)
|
||||||
{
|
{
|
||||||
unsigned short* out = (unsigned short*) outb;
|
unsigned short* out = (unsigned short*) outb;
|
||||||
const unsigned char* processed = in;
|
const unsigned char* processed = in;
|
||||||
const unsigned char *const instart = in;
|
const unsigned char *const instart = in;
|
||||||
unsigned short* outstart= out;
|
unsigned short* outstart= out;
|
||||||
unsigned short* outend;
|
unsigned short* outend;
|
||||||
const unsigned char* inend= in+*inlen;
|
const unsigned char* inend;
|
||||||
unsigned int c, d;
|
unsigned int c, d;
|
||||||
intptr_t trailing;
|
int trailing;
|
||||||
unsigned char *tmp;
|
unsigned char *tmp;
|
||||||
unsigned short tmp1, tmp2;
|
unsigned short tmp1, tmp2;
|
||||||
|
|
||||||
@@ -759,6 +778,7 @@ UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
|
|||||||
*inlen = 0;
|
*inlen = 0;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
inend= in + *inlen;
|
||||||
outend = out + (*outlen / 2);
|
outend = out + (*outlen / 2);
|
||||||
while (in < inend) {
|
while (in < inend) {
|
||||||
d= *in++;
|
d= *in++;
|
||||||
@@ -848,7 +868,7 @@ UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
|
|||||||
* Returns one of the XML_CHAR_ENCODING_... values.
|
* Returns one of the XML_CHAR_ENCODING_... values.
|
||||||
*/
|
*/
|
||||||
xmlCharEncoding
|
xmlCharEncoding
|
||||||
xmlDetectCharEncoding(const unsigned char* in, intptr_t len)
|
xmlDetectCharEncoding(const unsigned char* in, int len)
|
||||||
{
|
{
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
return(XML_CHAR_ENCODING_NONE);
|
return(XML_CHAR_ENCODING_NONE);
|
||||||
@@ -1241,7 +1261,7 @@ xmlNewCharEncodingHandler(const char *name,
|
|||||||
const char *alias;
|
const char *alias;
|
||||||
char upper[500];
|
char upper[500];
|
||||||
int i;
|
int i;
|
||||||
char *up = 0;
|
char *up = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do the alias resolution
|
* Do the alias resolution
|
||||||
@@ -1254,8 +1274,8 @@ xmlNewCharEncodingHandler(const char *name,
|
|||||||
* Keep only the uppercase version of the encoding.
|
* Keep only the uppercase version of the encoding.
|
||||||
*/
|
*/
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErr(XML_I18N_NO_NAME,
|
||||||
"xmlNewCharEncodingHandler : no name !\n");
|
"xmlNewCharEncodingHandler : no name !\n", NULL);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
for (i = 0;i < 499;i++) {
|
for (i = 0;i < 499;i++) {
|
||||||
@@ -1265,8 +1285,7 @@ xmlNewCharEncodingHandler(const char *name,
|
|||||||
upper[i] = 0;
|
upper[i] = 0;
|
||||||
up = xmlMemStrdup(upper);
|
up = xmlMemStrdup(upper);
|
||||||
if (up == NULL) {
|
if (up == NULL) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
|
||||||
"xmlNewCharEncodingHandler : out of memory !\n");
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1277,8 +1296,7 @@ xmlNewCharEncodingHandler(const char *name,
|
|||||||
xmlMalloc(sizeof(xmlCharEncodingHandler));
|
xmlMalloc(sizeof(xmlCharEncodingHandler));
|
||||||
if (handler == NULL) {
|
if (handler == NULL) {
|
||||||
xmlFree(up);
|
xmlFree(up);
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
|
||||||
"xmlNewCharEncodingHandler : out of memory !\n");
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
handler->input = input;
|
handler->input = input;
|
||||||
@@ -1321,12 +1339,13 @@ xmlInitCharEncodingHandlers(void) {
|
|||||||
|
|
||||||
if (*ptr == 0x12) xmlLittleEndian = 0;
|
if (*ptr == 0x12) xmlLittleEndian = 0;
|
||||||
else if (*ptr == 0x34) xmlLittleEndian = 1;
|
else if (*ptr == 0x34) xmlLittleEndian = 1;
|
||||||
else xmlGenericError(xmlGenericErrorContext,
|
else {
|
||||||
"Odd problem at endianness detection\n");
|
xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
|
||||||
|
"Odd problem at endianness detection\n", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (handlers == NULL) {
|
if (handlers == NULL) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErrMemory("xmlInitCharEncodingHandlers : out of memory !\n");
|
||||||
"xmlInitCharEncodingHandlers : out of memory !\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
|
xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
|
||||||
@@ -1396,16 +1415,15 @@ void
|
|||||||
xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
|
xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
|
||||||
if (handlers == NULL) xmlInitCharEncodingHandlers();
|
if (handlers == NULL) xmlInitCharEncodingHandlers();
|
||||||
if (handler == NULL) {
|
if (handler == NULL) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErr(XML_I18N_NO_HANDLER,
|
||||||
"xmlRegisterCharEncodingHandler: NULL handler !\n");
|
"xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbCharEncodingHandler >= MAX_ENCODING_HANDLERS) {
|
if (nbCharEncodingHandler >= MAX_ENCODING_HANDLERS) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErr(XML_I18N_EXCESS_HANDLER,
|
||||||
"xmlRegisterCharEncodingHandler: Too many handler registered\n");
|
"xmlRegisterCharEncodingHandler: Too many handler registered, see %s\n",
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
"MAX_ENCODING_HANDLERS");
|
||||||
"\tincrease MAX_ENCODING_HANDLERS : %s\n", __FILE__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlers[nbCharEncodingHandler++] = handler;
|
handlers[nbCharEncodingHandler++] = handler;
|
||||||
@@ -1614,7 +1632,7 @@ xmlFindCharEncodingHandler(const char *name) {
|
|||||||
#endif
|
#endif
|
||||||
return enc;
|
return enc;
|
||||||
} else if ((icv_in != (iconv_t) -1) || icv_out != (iconv_t) -1) {
|
} else if ((icv_in != (iconv_t) -1) || icv_out != (iconv_t) -1) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
|
||||||
"iconv : problems with filters for '%s'\n", name);
|
"iconv : problems with filters for '%s'\n", name);
|
||||||
}
|
}
|
||||||
#endif /* LIBXML_ICONV_ENABLED */
|
#endif /* LIBXML_ICONV_ENABLED */
|
||||||
@@ -1665,9 +1683,9 @@ xmlFindCharEncodingHandler(const char *name) {
|
|||||||
* as the return value is positive, else unpredictable.
|
* as the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of ocetes consumed.
|
* The value of @outlen after return is the number of ocetes consumed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlIconvWrapper(iconv_t cd, unsigned char *out, intptr_t* outlen,
|
xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
|
||||||
const unsigned char *in, intptr_t* inlen) {
|
const unsigned char *in, int *inlen) {
|
||||||
size_t icv_inlen, icv_outlen;
|
size_t icv_inlen, icv_outlen;
|
||||||
const char *icv_in = (const char *) in;
|
const char *icv_in = (const char *) in;
|
||||||
char *icv_out = (char *) out;
|
char *icv_out = (char *) out;
|
||||||
@@ -1680,13 +1698,8 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, intptr_t* outlen,
|
|||||||
icv_inlen = *inlen;
|
icv_inlen = *inlen;
|
||||||
icv_outlen = *outlen;
|
icv_outlen = *outlen;
|
||||||
ret = iconv(cd, (char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen);
|
ret = iconv(cd, (char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen);
|
||||||
if (in != NULL) {
|
*inlen -= icv_inlen;
|
||||||
*inlen -= icv_inlen;
|
*outlen -= icv_outlen;
|
||||||
*outlen -= icv_outlen;
|
|
||||||
} else {
|
|
||||||
*inlen = 0;
|
|
||||||
*outlen = 0;
|
|
||||||
}
|
|
||||||
if ((icv_inlen != 0) || (ret == -1)) {
|
if ((icv_inlen != 0) || (ret == -1)) {
|
||||||
#ifdef EILSEQ
|
#ifdef EILSEQ
|
||||||
if (errno == EILSEQ) {
|
if (errno == EILSEQ) {
|
||||||
@@ -1731,12 +1744,12 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, intptr_t* outlen,
|
|||||||
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
||||||
* the result of transformation can't fit into the encoding we want), or
|
* the result of transformation can't fit into the encoding we want), or
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
||||||
xmlBufferPtr in) {
|
xmlBufferPtr in) {
|
||||||
intptr_t ret = -2;
|
int ret = -2;
|
||||||
intptr_t written;
|
int written;
|
||||||
intptr_t toconv;
|
int toconv;
|
||||||
|
|
||||||
if (handler == NULL) return(-1);
|
if (handler == NULL) return(-1);
|
||||||
if (out == NULL) return(-1);
|
if (out == NULL) return(-1);
|
||||||
@@ -1817,13 +1830,13 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
|||||||
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
* -2 if the transcoding fails (for *in is not valid utf8 string or
|
||||||
* the result of transformation can't fit into the encoding we want), or
|
* the result of transformation can't fit into the encoding we want), or
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
||||||
xmlBufferPtr in)
|
xmlBufferPtr in)
|
||||||
{
|
{
|
||||||
intptr_t ret = -2;
|
int ret = -2;
|
||||||
intptr_t written;
|
int written;
|
||||||
intptr_t toconv;
|
int toconv;
|
||||||
|
|
||||||
if (handler == NULL)
|
if (handler == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
@@ -1880,20 +1893,24 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
|||||||
toconv, written, in->use);
|
toconv, written, in->use);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case -2:
|
case -2: {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
char buf[50];
|
||||||
"input conversion failed due to input error\n");
|
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
|
||||||
"Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
|
in->content[0], in->content[1],
|
||||||
in->content[0], in->content[1],
|
in->content[2], in->content[3]);
|
||||||
in->content[2], in->content[3]);
|
buf[49] = 0;
|
||||||
|
xmlEncodingErr(XML_I18N_CONV_FAILED,
|
||||||
|
"input conversion failed due to input error, bytes %s\n",
|
||||||
|
buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Ignore when input buffer is not on a boundary
|
* Ignore when input buffer is not on a boundary
|
||||||
*/
|
*/
|
||||||
if (ret == -3)
|
if (ret == -3)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
return (written);
|
return (written? written : ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1917,11 +1934,11 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
|
|||||||
int
|
int
|
||||||
xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
|
||||||
xmlBufferPtr in) {
|
xmlBufferPtr in) {
|
||||||
intptr_t ret = -2;
|
int ret = -2;
|
||||||
intptr_t written;
|
int written;
|
||||||
intptr_t writtentot = 0;
|
int writtentot = 0;
|
||||||
intptr_t toconv;
|
int toconv;
|
||||||
intptr_t output = 0;
|
int output = 0;
|
||||||
|
|
||||||
if (handler == NULL) return(-1);
|
if (handler == NULL) return(-1);
|
||||||
if (out == NULL) return(-1);
|
if (out == NULL) return(-1);
|
||||||
@@ -1999,8 +2016,8 @@ retry:
|
|||||||
}
|
}
|
||||||
#endif /* LIBXML_ICONV_ENABLED */
|
#endif /* LIBXML_ICONV_ENABLED */
|
||||||
else {
|
else {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlEncodingErr(XML_I18N_NO_OUTPUT,
|
||||||
"xmlCharEncOutFunc: no output function !\n");
|
"xmlCharEncOutFunc: no output function !\n", NULL);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2030,9 +2047,9 @@ retry:
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case -2: {
|
case -2: {
|
||||||
intptr_t len = in->use;
|
int len = in->use;
|
||||||
const xmlChar *utf = (const xmlChar *) in->content;
|
const xmlChar *utf = (const xmlChar *) in->content;
|
||||||
intptr_t cur;
|
int cur;
|
||||||
|
|
||||||
cur = xmlGetUTF8Char(utf, &len);
|
cur = xmlGetUTF8Char(utf, &len);
|
||||||
if (cur > 0) {
|
if (cur > 0) {
|
||||||
@@ -2051,19 +2068,23 @@ retry:
|
|||||||
* and continue the transcoding phase, hoping the error
|
* and continue the transcoding phase, hoping the error
|
||||||
* did not mangle the encoder state.
|
* did not mangle the encoder state.
|
||||||
*/
|
*/
|
||||||
snprintf((char *) charref, sizeof(charref), "&#%d;", cur);
|
snprintf((char *) &charref[0], sizeof(charref), "&#%d;", cur);
|
||||||
xmlBufferShrink(in, len);
|
xmlBufferShrink(in, len);
|
||||||
xmlBufferAddHead(in, charref, -1);
|
xmlBufferAddHead(in, charref, -1);
|
||||||
|
|
||||||
goto retry;
|
goto retry;
|
||||||
} else {
|
} else {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
char buf[50];
|
||||||
"output conversion failed due to conv error\n");
|
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
|
||||||
"Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
|
in->content[0], in->content[1],
|
||||||
in->content[0], in->content[1],
|
in->content[2], in->content[3]);
|
||||||
in->content[2], in->content[3]);
|
buf[49] = 0;
|
||||||
in->content[0] = ' ';
|
xmlEncodingErr(XML_I18N_CONV_FAILED,
|
||||||
|
"output conversion failed due to conv error, bytes %s\n",
|
||||||
|
buf);
|
||||||
|
if (in->alloc != XML_BUFFER_ALLOC_IMMUTABLE)
|
||||||
|
in->content[0] = ' ';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2132,7 +2153,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
|
|||||||
* Returns the index in bytes from the beginning of the entity or -1
|
* Returns the index in bytes from the beginning of the entity or -1
|
||||||
* in case the index could not be computed.
|
* in case the index could not be computed.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
long
|
||||||
xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
||||||
xmlParserInputPtr in;
|
xmlParserInputPtr in;
|
||||||
|
|
||||||
@@ -2140,7 +2161,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
|||||||
in = ctxt->input;
|
in = ctxt->input;
|
||||||
if (in == NULL) return(-1);
|
if (in == NULL) return(-1);
|
||||||
if ((in->buf != NULL) && (in->buf->encoder != NULL)) {
|
if ((in->buf != NULL) && (in->buf->encoder != NULL)) {
|
||||||
size_t unused = 0;
|
unsigned int unused = 0;
|
||||||
xmlCharEncodingHandler * handler = in->buf->encoder;
|
xmlCharEncodingHandler * handler = in->buf->encoder;
|
||||||
/*
|
/*
|
||||||
* Encoding conversion, compute the number of unused original
|
* Encoding conversion, compute the number of unused original
|
||||||
@@ -2150,9 +2171,9 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
|
|||||||
if (in->end - in->cur > 0) {
|
if (in->end - in->cur > 0) {
|
||||||
unsigned char convbuf[32000];
|
unsigned char convbuf[32000];
|
||||||
const unsigned char *cur = (const unsigned char *)in->cur;
|
const unsigned char *cur = (const unsigned char *)in->cur;
|
||||||
intptr_t toconv = in->end - in->cur, written = 32000;
|
int toconv = in->end - in->cur, written = 32000;
|
||||||
|
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (handler->output != NULL) {
|
if (handler->output != NULL) {
|
||||||
do {
|
do {
|
||||||
@@ -2327,8 +2348,8 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
|
|||||||
* The value of @outlen after return is the number of ocetes produced.
|
* The value of @outlen after return is the number of ocetes produced.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ISO8859xToUTF8(unsigned char* out, intptr_t* outlen,
|
ISO8859xToUTF8(unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen,
|
const unsigned char* in, int *inlen,
|
||||||
unsigned short const *unicodetable) {
|
unsigned short const *unicodetable) {
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
unsigned char* outend;
|
unsigned char* outend;
|
||||||
@@ -3116,129 +3137,129 @@ static unsigned char const xmltranscodetable_ISO8859_16 [48 + 9 * 64] = {
|
|||||||
* auto-generated functions for ISO-8859-2 .. ISO-8859-16
|
* auto-generated functions for ISO-8859-2 .. ISO-8859-16
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static intptr_t ISO8859_2ToUTF8 (unsigned char* out, intptr_t* outlen,
|
static int ISO8859_2ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_2);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_2);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_2 (unsigned char* out, intptr_t* outlen,
|
static int UTF8ToISO8859_2 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_2);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_3ToUTF8 (unsigned char* out, intptr_t* outlen,
|
static int ISO8859_3ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t* inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_3 (unsigned char* out, intptr_t* outlen,
|
static int UTF8ToISO8859_3 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_3);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_4ToUTF8 (unsigned char* out, intptr_t* outlen,
|
static int ISO8859_4ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_4);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_4);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_4 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_4 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_4);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_5ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_5ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_5 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_5 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_5);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_6ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_6ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_6);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_6);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_6 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_6 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_6);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_6);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_7ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_7ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_7);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_7);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_7 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_7 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_7);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_8ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_8ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_8);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_8);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_8 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_8);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_9ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_9ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_9);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_9);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_9 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_9 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_9);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_9);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_10ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_10ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_10);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_10);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_10 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_10 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_10);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_11ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_11ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_11);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_11);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_11 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_11 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_11);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_11);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_13ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_13ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_13);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_13);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_13 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_13 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_13);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_13);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_14ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_14ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_14);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_14);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_14 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_14 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_14);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_14);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_15ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_15ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_15);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_15);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_15 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_15 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_15);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_15);
|
||||||
}
|
}
|
||||||
|
|
||||||
static intptr_t ISO8859_16ToUTF8 (unsigned char* out, intptr_t *outlen,
|
static int ISO8859_16ToUTF8 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_16);
|
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_16);
|
||||||
}
|
}
|
||||||
static intptr_t UTF8ToISO8859_16 (unsigned char* out, intptr_t *outlen,
|
static int UTF8ToISO8859_16 (unsigned char* out, int *outlen,
|
||||||
const unsigned char* in, intptr_t *inlen) {
|
const unsigned char* in, int *inlen) {
|
||||||
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16);
|
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
|
|
||||||
while (*cur != '\0') {
|
while (*cur != '\0') {
|
||||||
if (out - buffer > buffer_size - 100) {
|
if (out - buffer > buffer_size - 100) {
|
||||||
intptr_t indx = out - buffer;
|
int indx = out - buffer;
|
||||||
|
|
||||||
growBufferReentrant();
|
growBufferReentrant();
|
||||||
out = &buffer[indx];
|
out = &buffer[indx];
|
||||||
@@ -560,7 +560,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
*out++ = xc;
|
*out++ = xc;
|
||||||
} else
|
} else
|
||||||
*/
|
*/
|
||||||
*out++ = *cur;
|
*out++ = *cur;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* We assume we have UTF-8 input.
|
* We assume we have UTF-8 input.
|
||||||
@@ -616,10 +616,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
/*
|
/*
|
||||||
* We could do multiple things here. Just save as a char ref
|
* We could do multiple things here. Just save as a char ref
|
||||||
*/
|
*/
|
||||||
if (html)
|
snprintf(buf, sizeof(buf), "&#x%X;", val);
|
||||||
snprintf(buf, sizeof(buf), "&#%d;", val);
|
|
||||||
else
|
|
||||||
snprintf(buf, sizeof(buf), "&#x%X;", val);
|
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
ptr = buf;
|
ptr = buf;
|
||||||
while (*ptr != 0) *out++ = *ptr++;
|
while (*ptr != 0) *out++ = *ptr++;
|
||||||
@@ -671,7 +668,7 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
|
|||||||
|
|
||||||
while (*cur != '\0') {
|
while (*cur != '\0') {
|
||||||
if (out - buffer > buffer_size - 10) {
|
if (out - buffer > buffer_size - 10) {
|
||||||
intptr_t indx = out - buffer;
|
int indx = out - buffer;
|
||||||
|
|
||||||
growBufferReentrant();
|
growBufferReentrant();
|
||||||
out = &buffer[indx];
|
out = &buffer[indx];
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libxml/globals.h>
|
#include <libxml/globals.h>
|
||||||
|
|
||||||
void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
#define XML_GET_VAR_STR(msg, str) { \
|
#define XML_GET_VAR_STR(msg, str) { \
|
||||||
int size; \
|
int size, prev_size = -1; \
|
||||||
int chars; \
|
int chars; \
|
||||||
char *larger; \
|
char *larger; \
|
||||||
va_list ap; \
|
va_list ap; \
|
||||||
@@ -35,8 +35,13 @@ void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
|||||||
va_start(ap, msg); \
|
va_start(ap, msg); \
|
||||||
chars = vsnprintf(str, size, msg, ap); \
|
chars = vsnprintf(str, size, msg, ap); \
|
||||||
va_end(ap); \
|
va_end(ap); \
|
||||||
if ((chars > -1) && (chars < size)) \
|
if ((chars > -1) && (chars < size)) { \
|
||||||
break; \
|
if (prev_size == chars) { \
|
||||||
|
break; \
|
||||||
|
} else { \
|
||||||
|
prev_size = chars; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
if (chars > -1) \
|
if (chars > -1) \
|
||||||
size += chars + 1; \
|
size += chars + 1; \
|
||||||
else \
|
else \
|
||||||
@@ -62,7 +67,7 @@ void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
|||||||
*
|
*
|
||||||
* Default handler for out of context error messages.
|
* Default handler for out of context error messages.
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
|
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
@@ -168,7 +173,7 @@ static void
|
|||||||
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
|
||||||
xmlGenericErrorFunc channel, void *data ) {
|
xmlGenericErrorFunc channel, void *data ) {
|
||||||
const xmlChar *cur, *base;
|
const xmlChar *cur, *base;
|
||||||
size_t n, col; /* GCC warns if signed, because compared with sizeof() */
|
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
|
||||||
xmlChar content[81]; /* space for 80 chars + line terminator */
|
xmlChar content[81]; /* space for 80 chars + line terminator */
|
||||||
xmlChar *ctnt;
|
xmlChar *ctnt;
|
||||||
|
|
||||||
@@ -293,8 +298,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
channel(data, "element %s: ", name);
|
channel(data, "element %s: ", name);
|
||||||
}
|
}
|
||||||
if (code == XML_ERR_OK)
|
|
||||||
return;
|
|
||||||
switch (domain) {
|
switch (domain) {
|
||||||
case XML_FROM_PARSER:
|
case XML_FROM_PARSER:
|
||||||
channel(data, "parser ");
|
channel(data, "parser ");
|
||||||
@@ -354,11 +357,12 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||||||
case XML_FROM_XSLT:
|
case XML_FROM_XSLT:
|
||||||
channel(data, "XSLT ");
|
channel(data, "XSLT ");
|
||||||
break;
|
break;
|
||||||
|
case XML_FROM_I18N:
|
||||||
|
channel(data, "encoding ");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (code == XML_ERR_OK)
|
|
||||||
return;
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case XML_ERR_NONE:
|
case XML_ERR_NONE:
|
||||||
channel(data, ": ");
|
channel(data, ": ");
|
||||||
@@ -373,11 +377,9 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||||||
channel(data, "error : ");
|
channel(data, "error : ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (code == XML_ERR_OK)
|
|
||||||
return;
|
|
||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
intptr_t len;
|
int len;
|
||||||
len = xmlStrlen((const xmlChar *)str);
|
len = xmlStrlen((const xmlChar *)str);
|
||||||
if ((len > 0) && (str[len - 1] != '\n'))
|
if ((len > 0) && (str[len - 1] != '\n'))
|
||||||
channel(data, "%s\n", str);
|
channel(data, "%s\n", str);
|
||||||
else
|
else
|
||||||
@@ -385,8 +387,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||||||
} else {
|
} else {
|
||||||
channel(data, "%s\n", "out of memory error");
|
channel(data, "%s\n", "out of memory error");
|
||||||
}
|
}
|
||||||
if (code == XML_ERR_OK)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ctxt != NULL) {
|
if (ctxt != NULL) {
|
||||||
xmlParserPrintFileContextInternal(input, channel, data);
|
xmlParserPrintFileContextInternal(input, channel, data);
|
||||||
@@ -437,12 +437,12 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
|
|||||||
* then forward the error message down the parser or generic
|
* then forward the error message down the parser or generic
|
||||||
* error callback handler
|
* error callback handler
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
__xmlRaiseError(xmlStructuredErrorFunc schannel,
|
__xmlRaiseError(xmlStructuredErrorFunc schannel,
|
||||||
xmlGenericErrorFunc channel, void *data, void *ctx,
|
xmlGenericErrorFunc channel, void *data, void *ctx,
|
||||||
void *nod, int domain, int code, xmlErrorLevel level,
|
void *nod, int domain, int code, xmlErrorLevel level,
|
||||||
const char *file, int line, const char *str1,
|
const char *file, int line, const char *str1,
|
||||||
const char *str2, const char *str3, int int1, intptr_t col,
|
const char *str2, const char *str3, int int1, int col,
|
||||||
const char *msg, ...)
|
const char *msg, ...)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = NULL;
|
xmlParserCtxtPtr ctxt = NULL;
|
||||||
@@ -512,8 +512,10 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||||||
} else if ((node != NULL) && (file == NULL)) {
|
} else if ((node != NULL) && (file == NULL)) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((node->doc != NULL) && (node->doc->URL != NULL))
|
if ((node->doc != NULL) && (node->doc->URL != NULL)) {
|
||||||
baseptr = node;
|
baseptr = node;
|
||||||
|
/* file = (const char *) node->doc->URL; */
|
||||||
|
}
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
|
((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
|
||||||
i++)
|
i++)
|
||||||
@@ -558,10 +560,19 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prev != NULL) {
|
if (prev != NULL) {
|
||||||
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
|
if (prev->type == XML_XINCLUDE_START) {
|
||||||
|
prev->type = XML_ELEMENT_NODE;
|
||||||
|
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
|
||||||
|
prev->type = XML_XINCLUDE_START;
|
||||||
|
} else {
|
||||||
|
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
to->file = (char *) xmlStrdup(baseptr->doc->URL);
|
to->file = (char *) xmlStrdup(baseptr->doc->URL);
|
||||||
|
if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
|
||||||
|
to->file = (char *) xmlStrdup(node->doc->URL);
|
||||||
|
}
|
||||||
file = to->file;
|
file = to->file;
|
||||||
}
|
}
|
||||||
to->line = line;
|
to->line = line;
|
||||||
@@ -593,8 +604,10 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||||||
schannel = xmlStructuredError;
|
schannel = xmlStructuredError;
|
||||||
else
|
else
|
||||||
channel = xmlGenericError;
|
channel = xmlGenericError;
|
||||||
|
if (!data) {
|
||||||
data = xmlGenericErrorContext;
|
data = xmlGenericErrorContext;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (schannel != NULL) {
|
if (schannel != NULL) {
|
||||||
schannel(data, to);
|
schannel(data, to);
|
||||||
return;
|
return;
|
||||||
@@ -653,7 +666,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
|
|||||||
* Display and format an error messages, gives file, line, position and
|
* Display and format an error messages, gives file, line, position and
|
||||||
* extra parameters.
|
* extra parameters.
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
xmlParserError(void *ctx, const char *msg, ...)
|
xmlParserError(void *ctx, const char *msg, ...)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
@@ -696,7 +709,7 @@ xmlParserError(void *ctx, const char *msg, ...)
|
|||||||
* Display and format a warning messages, gives file, line, position and
|
* Display and format a warning messages, gives file, line, position and
|
||||||
* extra parameters.
|
* extra parameters.
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
xmlParserWarning(void *ctx, const char *msg, ...)
|
xmlParserWarning(void *ctx, const char *msg, ...)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
@@ -745,13 +758,13 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
|||||||
* Display and format an validity error messages, gives file,
|
* Display and format an validity error messages, gives file,
|
||||||
* line, position and extra parameters.
|
* line, position and extra parameters.
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
xmlParserValidityError(void *ctx, const char *msg, ...)
|
xmlParserValidityError(void *ctx, const char *msg, ...)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlParserInputPtr input = NULL;
|
xmlParserInputPtr input = NULL;
|
||||||
char * str;
|
char * str;
|
||||||
intptr_t len = xmlStrlen((const xmlChar *) msg);
|
int len = xmlStrlen((const xmlChar *) msg);
|
||||||
static int had_info = 0;
|
static int had_info = 0;
|
||||||
|
|
||||||
if ((len > 1) && (msg[len - 2] != ':')) {
|
if ((len > 1) && (msg[len - 2] != ':')) {
|
||||||
@@ -789,13 +802,13 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
|||||||
* Display and format a validity warning messages, gives file, line,
|
* Display and format a validity warning messages, gives file, line,
|
||||||
* position and extra parameters.
|
* position and extra parameters.
|
||||||
*/
|
*/
|
||||||
void
|
void XMLCDECL
|
||||||
xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
xmlParserInputPtr input = NULL;
|
xmlParserInputPtr input = NULL;
|
||||||
char * str;
|
char * str;
|
||||||
intptr_t len = xmlStrlen((const xmlChar *) msg);
|
int len = xmlStrlen((const xmlChar *) msg);
|
||||||
|
|
||||||
if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
|
if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
|
||||||
input = ctxt->input;
|
input = ctxt->input;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ static xmlMutexPtr xmlThrDefMutex = NULL;
|
|||||||
*
|
*
|
||||||
* Additional initialisation for multi-threading
|
* Additional initialisation for multi-threading
|
||||||
*/
|
*/
|
||||||
void xmlInitGlobals()
|
void xmlInitGlobals(void)
|
||||||
{
|
{
|
||||||
xmlThrDefMutex = xmlNewMutex();
|
xmlThrDefMutex = xmlNewMutex();
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ void xmlInitGlobals()
|
|||||||
*
|
*
|
||||||
* Additional cleanup for multi-threading
|
* Additional cleanup for multi-threading
|
||||||
*/
|
*/
|
||||||
void xmlCleanupGlobals()
|
void xmlCleanupGlobals(void)
|
||||||
{
|
{
|
||||||
if (xmlThrDefMutex != NULL) {
|
if (xmlThrDefMutex != NULL) {
|
||||||
xmlFreeMutex(xmlThrDefMutex);
|
xmlFreeMutex(xmlThrDefMutex);
|
||||||
@@ -289,7 +289,7 @@ static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDe
|
|||||||
|
|
||||||
/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
|
/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
|
||||||
/* Must initialize xmlGenericError in xmlInitParser */
|
/* Must initialize xmlGenericError in xmlInitParser */
|
||||||
void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
/**
|
/**
|
||||||
@@ -344,7 +344,7 @@ static const char *xmlTreeIndentStringThrDef = " ";
|
|||||||
* Disabled by default
|
* Disabled by default
|
||||||
*/
|
*/
|
||||||
int xmlSaveNoEmptyTags = 0;
|
int xmlSaveNoEmptyTags = 0;
|
||||||
int xmlSaveNoEmptyTagsThrDef = 0;
|
static int xmlSaveNoEmptyTagsThrDef = 0;
|
||||||
|
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
/**
|
/**
|
||||||
@@ -496,10 +496,10 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
|
|||||||
|
|
||||||
xmlMutexLock(xmlThrDefMutex);
|
xmlMutexLock(xmlThrDefMutex);
|
||||||
|
|
||||||
#ifdef LIBXML_DOCB_ENABLED
|
#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||||
initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
|
initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
|
||||||
#endif
|
#endif
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
|
||||||
inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
|
inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# 2003, 2004 Free Software Foundation, Inc.
|
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
@@ -67,6 +67,7 @@ AUTOCONF = @AUTOCONF@
|
|||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
|
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
|
||||||
C14N_OBJ = @C14N_OBJ@
|
C14N_OBJ = @C14N_OBJ@
|
||||||
CATALOG_OBJ = @CATALOG_OBJ@
|
CATALOG_OBJ = @CATALOG_OBJ@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -160,6 +161,7 @@ TEST_PUSH = @TEST_PUSH@
|
|||||||
TEST_REGEXPS = @TEST_REGEXPS@
|
TEST_REGEXPS = @TEST_REGEXPS@
|
||||||
TEST_SAX = @TEST_SAX@
|
TEST_SAX = @TEST_SAX@
|
||||||
TEST_SCHEMAS = @TEST_SCHEMAS@
|
TEST_SCHEMAS = @TEST_SCHEMAS@
|
||||||
|
TEST_SCHEMATRON = @TEST_SCHEMATRON@
|
||||||
TEST_THREADS = @TEST_THREADS@
|
TEST_THREADS = @TEST_THREADS@
|
||||||
TEST_VALID = @TEST_VALID@
|
TEST_VALID = @TEST_VALID@
|
||||||
TEST_VTIME = @TEST_VTIME@
|
TEST_VTIME = @TEST_VTIME@
|
||||||
@@ -195,6 +197,7 @@ WITH_REGEXPS = @WITH_REGEXPS@
|
|||||||
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
|
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
|
||||||
WITH_SAX1 = @WITH_SAX1@
|
WITH_SAX1 = @WITH_SAX1@
|
||||||
WITH_SCHEMAS = @WITH_SCHEMAS@
|
WITH_SCHEMAS = @WITH_SCHEMAS@
|
||||||
|
WITH_SCHEMATRON = @WITH_SCHEMATRON@
|
||||||
WITH_THREADS = @WITH_THREADS@
|
WITH_THREADS = @WITH_THREADS@
|
||||||
WITH_TREE = @WITH_TREE@
|
WITH_TREE = @WITH_TREE@
|
||||||
WITH_TRIO = @WITH_TRIO@
|
WITH_TRIO = @WITH_TRIO@
|
||||||
@@ -316,7 +319,13 @@ uninstall-info-am:
|
|||||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
# (2) otherwise, pass the desired values on the `make' command line.
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
$(RECURSIVE_TARGETS):
|
$(RECURSIVE_TARGETS):
|
||||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
@failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
dot_seen=no; \
|
dot_seen=no; \
|
||||||
target=`echo $@ | sed s/-recursive//`; \
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
@@ -328,7 +337,7 @@ $(RECURSIVE_TARGETS):
|
|||||||
local_target="$$target"; \
|
local_target="$$target"; \
|
||||||
fi; \
|
fi; \
|
||||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
|| eval $$failcom; \
|
||||||
done; \
|
done; \
|
||||||
if test "$$dot_seen" = "no"; then \
|
if test "$$dot_seen" = "no"; then \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
@@ -336,7 +345,13 @@ $(RECURSIVE_TARGETS):
|
|||||||
|
|
||||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
maintainer-clean-recursive:
|
maintainer-clean-recursive:
|
||||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
@failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
dot_seen=no; \
|
dot_seen=no; \
|
||||||
case "$@" in \
|
case "$@" in \
|
||||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
@@ -357,7 +372,7 @@ maintainer-clean-recursive:
|
|||||||
local_target="$$target"; \
|
local_target="$$target"; \
|
||||||
fi; \
|
fi; \
|
||||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
|| eval $$failcom; \
|
||||||
done && test -z "$$fail"
|
done && test -z "$$fail"
|
||||||
tags-recursive:
|
tags-recursive:
|
||||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
|||||||
@@ -173,11 +173,13 @@ XMLPUBFUN void XMLCALL
|
|||||||
* to the xmlReadDoc() and similar calls.
|
* to the xmlReadDoc() and similar calls.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
|
||||||
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
||||||
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
||||||
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
||||||
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
||||||
HTML_PARSE_NONET = 1<<11 /* Forbid network access */
|
HTML_PARSE_NONET = 1<<11,/* Forbid network access */
|
||||||
|
HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
|
||||||
} htmlParserOption;
|
} htmlParserOption;
|
||||||
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
|
|||||||
@@ -75,6 +75,11 @@ XMLPUBFUN void XMLCALL
|
|||||||
htmlDocDumpMemory (xmlDocPtr cur,
|
htmlDocDumpMemory (xmlDocPtr cur,
|
||||||
xmlChar **mem,
|
xmlChar **mem,
|
||||||
int *size);
|
int *size);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
htmlDocDumpMemoryFormat (xmlDocPtr cur,
|
||||||
|
xmlChar **mem,
|
||||||
|
int *size,
|
||||||
|
int format);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
htmlDocDump (FILE *f,
|
htmlDocDump (FILE *f,
|
||||||
xmlDocPtr cur);
|
xmlDocPtr cur);
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ XMLPUBFUN void XMLCALL
|
|||||||
xmlSAX2SetDocumentLocator (void *ctx,
|
xmlSAX2SetDocumentLocator (void *ctx,
|
||||||
xmlSAXLocatorPtr loc);
|
xmlSAXLocatorPtr loc);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSAX2GetLineNumber (void *ctx);
|
xmlSAX2GetLineNumber (void *ctx);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSAX2GetColumnNumber (void *ctx);
|
xmlSAX2GetColumnNumber (void *ctx);
|
||||||
|
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
@@ -98,7 +98,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
xmlSAX2StartDocument (void *ctx);
|
xmlSAX2StartDocument (void *ctx);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2EndDocument (void *ctx);
|
xmlSAX2EndDocument (void *ctx);
|
||||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED)
|
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2StartElement (void *ctx,
|
xmlSAX2StartElement (void *ctx,
|
||||||
const xmlChar *fullname,
|
const xmlChar *fullname,
|
||||||
@@ -114,8 +114,8 @@ XMLPUBFUN void XMLCALL
|
|||||||
const xmlChar *URI,
|
const xmlChar *URI,
|
||||||
int nb_namespaces,
|
int nb_namespaces,
|
||||||
const xmlChar **namespaces,
|
const xmlChar **namespaces,
|
||||||
intptr_t nb_attributes,
|
int nb_attributes,
|
||||||
intptr_t nb_defaulted,
|
int nb_defaulted,
|
||||||
const xmlChar **attributes);
|
const xmlChar **attributes);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2EndElementNs (void *ctx,
|
xmlSAX2EndElementNs (void *ctx,
|
||||||
@@ -128,11 +128,11 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2Characters (void *ctx,
|
xmlSAX2Characters (void *ctx,
|
||||||
const xmlChar *ch,
|
const xmlChar *ch,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2IgnorableWhitespace (void *ctx,
|
xmlSAX2IgnorableWhitespace (void *ctx,
|
||||||
const xmlChar *ch,
|
const xmlChar *ch,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2ProcessingInstruction (void *ctx,
|
xmlSAX2ProcessingInstruction (void *ctx,
|
||||||
const xmlChar *target,
|
const xmlChar *target,
|
||||||
@@ -143,7 +143,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSAX2CDataBlock (void *ctx,
|
xmlSAX2CDataBlock (void *ctx,
|
||||||
const xmlChar *value,
|
const xmlChar *value,
|
||||||
intptr_t len);
|
int len);
|
||||||
|
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Summary: Unicode character range checking
|
* Summary: Unicode character range checking
|
||||||
* Description: this module exports interfaces for the character
|
* Description: this module exports interfaces for the character
|
||||||
* range validation APIs
|
* range validation APIs
|
||||||
*
|
*
|
||||||
* This file is automatically generated from the cvs source
|
* This file is automatically generated from the cvs source
|
||||||
* definition files using the genChRanges.py Python script
|
* definition files using the genChRanges.py Python script
|
||||||
*
|
*
|
||||||
* Generation date: Tue Nov 18 08:14:21 2003
|
* Generation date: Mon Mar 27 11:09:48 2006
|
||||||
* Sources: chvalid.def
|
* Sources: chvalid.def
|
||||||
* Author: William Brack <wbrack@mmm.com.hk>
|
* Author: William Brack <wbrack@mmm.com.hk>
|
||||||
*/
|
*/
|
||||||
@@ -44,15 +44,15 @@ typedef xmlChRangeGroup *xmlChRangeGroupPtr;
|
|||||||
struct _xmlChRangeGroup {
|
struct _xmlChRangeGroup {
|
||||||
int nbShortRange;
|
int nbShortRange;
|
||||||
int nbLongRange;
|
int nbLongRange;
|
||||||
xmlChSRangePtr shortRange; /* points to an array of ranges */
|
const xmlChSRange *shortRange; /* points to an array of ranges */
|
||||||
xmlChLRangePtr longRange;
|
const xmlChLRange *longRange;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Range checking routine
|
* Range checking routine
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
|
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,7 +77,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlIsBaseChar_ch((c)) : \
|
xmlIsBaseChar_ch((c)) : \
|
||||||
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsBlank_ch:
|
* xmlIsBlank_ch:
|
||||||
@@ -121,7 +121,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
|
|||||||
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
||||||
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsCombiningQ:
|
* xmlIsCombiningQ:
|
||||||
@@ -133,7 +133,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
|
|||||||
0 : \
|
0 : \
|
||||||
xmlCharInRange((c), &xmlIsCombiningGroup))
|
xmlCharInRange((c), &xmlIsCombiningGroup))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsDigit_ch:
|
* xmlIsDigit_ch:
|
||||||
@@ -153,7 +153,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
|
|||||||
xmlIsDigit_ch((c)) : \
|
xmlIsDigit_ch((c)) : \
|
||||||
xmlCharInRange((c), &xmlIsDigitGroup))
|
xmlCharInRange((c), &xmlIsDigitGroup))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsExtender_ch:
|
* xmlIsExtender_ch:
|
||||||
@@ -173,7 +173,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
|
|||||||
xmlIsExtender_ch((c)) : \
|
xmlIsExtender_ch((c)) : \
|
||||||
xmlCharInRange((c), &xmlIsExtenderGroup))
|
xmlCharInRange((c), &xmlIsExtenderGroup))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsIdeographicQ:
|
* xmlIsIdeographicQ:
|
||||||
@@ -187,8 +187,8 @@ XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
|
|||||||
((c) == 0x3007) || \
|
((c) == 0x3007) || \
|
||||||
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
||||||
|
|
||||||
XMLPUBVAR xmlChRangeGroup xmlIsIdeographicGroup;
|
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
|
||||||
XMLPUBVAR unsigned char xmlIsPubidChar_tab[256];
|
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsPubidChar_ch:
|
* xmlIsPubidChar_ch:
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlDictLookup (xmlDictPtr dict,
|
xmlDictLookup (xmlDictPtr dict,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlDictExists (xmlDictPtr dict,
|
xmlDictExists (xmlDictPtr dict,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlDictQLookup (xmlDictPtr dict,
|
xmlDictQLookup (xmlDictPtr dict,
|
||||||
const xmlChar *prefix,
|
const xmlChar *prefix,
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ typedef enum {
|
|||||||
* if the return value is positive, else unpredictiable.
|
* if the return value is positive, else unpredictiable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
typedef intptr_t (* xmlCharEncodingInputFunc)(unsigned char *out, intptr_t* outlen,
|
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
||||||
const unsigned char *in, intptr_t* inlen);
|
const unsigned char *in, int *inlen);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,8 +117,8 @@ typedef intptr_t (* xmlCharEncodingInputFunc)(unsigned char *out, intptr_t* outl
|
|||||||
* if the return value is positive, else unpredictiable.
|
* if the return value is positive, else unpredictiable.
|
||||||
* The value of @outlen after return is the number of octets produced.
|
* The value of @outlen after return is the number of octets produced.
|
||||||
*/
|
*/
|
||||||
typedef intptr_t (* xmlCharEncodingOutputFunc)(unsigned char *out, intptr_t* outlen,
|
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
||||||
const unsigned char *in, intptr_t* inlen);
|
const unsigned char *in, int *inlen);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -186,18 +186,18 @@ XMLPUBFUN const char * XMLCALL
|
|||||||
*/
|
*/
|
||||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||||
xmlDetectCharEncoding (const unsigned char *in,
|
xmlDetectCharEncoding (const unsigned char *in,
|
||||||
intptr_t len);
|
int len);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
||||||
xmlBufferPtr out,
|
xmlBufferPtr out,
|
||||||
xmlBufferPtr in);
|
xmlBufferPtr in);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
||||||
xmlBufferPtr out,
|
xmlBufferPtr out,
|
||||||
xmlBufferPtr in);
|
xmlBufferPtr in);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
||||||
xmlBufferPtr out,
|
xmlBufferPtr out,
|
||||||
xmlBufferPtr in);
|
xmlBufferPtr in);
|
||||||
@@ -208,17 +208,17 @@ XMLPUBFUN int XMLCALL
|
|||||||
* Export a few useful functions
|
* Export a few useful functions
|
||||||
*/
|
*/
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
UTF8Toisolat1 (unsigned char *out,
|
UTF8Toisolat1 (unsigned char *out,
|
||||||
intptr_t* outlen,
|
int *outlen,
|
||||||
const unsigned char *in,
|
const unsigned char *in,
|
||||||
intptr_t* inlen);
|
int *inlen);
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
isolat1ToUTF8 (unsigned char *out,
|
isolat1ToUTF8 (unsigned char *out,
|
||||||
intptr_t* outlen,
|
int *outlen,
|
||||||
const unsigned char *in,
|
const unsigned char *in,
|
||||||
intptr_t* inlen);
|
int *inlen);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ struct _xmlEntity {
|
|||||||
|
|
||||||
xmlChar *orig; /* content without ref substitution */
|
xmlChar *orig; /* content without ref substitution */
|
||||||
xmlChar *content; /* content or ndata if unparsed */
|
xmlChar *content; /* content or ndata if unparsed */
|
||||||
intptr_t length; /* the content length */
|
int length; /* the content length */
|
||||||
xmlEntityType etype; /* The entity type */
|
xmlEntityType etype; /* The entity type */
|
||||||
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
||||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ struct _xmlParserInput {
|
|||||||
const xmlChar *base; /* Base of the array to parse */
|
const xmlChar *base; /* Base of the array to parse */
|
||||||
const xmlChar *cur; /* Current char being parsed */
|
const xmlChar *cur; /* Current char being parsed */
|
||||||
const xmlChar *end; /* end of the array to parse */
|
const xmlChar *end; /* end of the array to parse */
|
||||||
intptr_t length; /* length if known */
|
int length; /* length if known */
|
||||||
int line; /* Current line */
|
int line; /* Current line */
|
||||||
intptr_t col; /* Current column */
|
int col; /* Current column */
|
||||||
/*
|
/*
|
||||||
* NOTE: consumed is only tested for equality in the parser code,
|
* NOTE: consumed is only tested for equality in the parser code,
|
||||||
* so even if there is an overflow this should not give troubles
|
* so even if there is an overflow this should not give troubles
|
||||||
* for parsing very large instances.
|
* for parsing very large instances.
|
||||||
*/
|
*/
|
||||||
size_t consumed; /* How many xmlChars already consumed */
|
unsigned long consumed; /* How many xmlChars already consumed */
|
||||||
xmlParserInputDeallocate free; /* function to deallocate the base */
|
xmlParserInputDeallocate free; /* function to deallocate the base */
|
||||||
const xmlChar *encoding; /* the encoding string for entity */
|
const xmlChar *encoding; /* the encoding string for entity */
|
||||||
const xmlChar *version; /* the version string for entity */
|
const xmlChar *version; /* the version string for entity */
|
||||||
@@ -89,9 +89,9 @@ typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
|
|||||||
struct _xmlParserNodeInfo {
|
struct _xmlParserNodeInfo {
|
||||||
const struct _xmlNode* node;
|
const struct _xmlNode* node;
|
||||||
/* Position & line # that text that created the node begins & ends on */
|
/* Position & line # that text that created the node begins & ends on */
|
||||||
size_t begin_pos;
|
unsigned long begin_pos;
|
||||||
unsigned long begin_line;
|
unsigned long begin_line;
|
||||||
size_t end_pos;
|
unsigned long end_pos;
|
||||||
unsigned long end_line;
|
unsigned long end_line;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,8 +228,8 @@ struct _xmlParserCtxt {
|
|||||||
int nameMax; /* Max depth of the parsing stack */
|
int nameMax; /* Max depth of the parsing stack */
|
||||||
const xmlChar * *nameTab; /* array of nodes */
|
const xmlChar * *nameTab; /* array of nodes */
|
||||||
|
|
||||||
intptr_t nbChars; /* number of xmlChar processed */
|
long nbChars; /* number of xmlChar processed */
|
||||||
intptr_t checkIndex; /* used by progressive parsing lookup */
|
long checkIndex; /* used by progressive parsing lookup */
|
||||||
int keepBlanks; /* ugly but ... */
|
int keepBlanks; /* ugly but ... */
|
||||||
int disableSAX; /* SAX callbacks are disabled */
|
int disableSAX; /* SAX callbacks are disabled */
|
||||||
int inSubset; /* Parsing is in int 1/ext 2 subset */
|
int inSubset; /* Parsing is in int 1/ext 2 subset */
|
||||||
@@ -247,8 +247,8 @@ struct _xmlParserCtxt {
|
|||||||
xmlParserInputPtr entity; /* used to check entities boundaries */
|
xmlParserInputPtr entity; /* used to check entities boundaries */
|
||||||
int charset; /* encoding of the in-memory content
|
int charset; /* encoding of the in-memory content
|
||||||
actually an xmlCharEncoding */
|
actually an xmlCharEncoding */
|
||||||
intptr_t nodelen; /* Those two fields are there to */
|
int nodelen; /* Those two fields are there to */
|
||||||
intptr_t nodemem; /* Speed up large node parsing */
|
int nodemem; /* Speed up large node parsing */
|
||||||
int pedantic; /* signal pedantic warnings */
|
int pedantic; /* signal pedantic warnings */
|
||||||
void *_private; /* For user data, libxml won't touch it */
|
void *_private; /* For user data, libxml won't touch it */
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ struct _xmlParserCtxt {
|
|||||||
int progressive; /* is this a progressive parsing */
|
int progressive; /* is this a progressive parsing */
|
||||||
xmlDictPtr dict; /* dictionnary for the parser */
|
xmlDictPtr dict; /* dictionnary for the parser */
|
||||||
const xmlChar * *atts; /* array for the attributes callbacks */
|
const xmlChar * *atts; /* array for the attributes callbacks */
|
||||||
intptr_t maxatts; /* the size of the array */
|
int maxatts; /* the size of the array */
|
||||||
int docdict; /* use strings from dict to build tree */
|
int docdict; /* use strings from dict to build tree */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -276,7 +276,7 @@ struct _xmlParserCtxt {
|
|||||||
int nsNr; /* the number of inherited namespaces */
|
int nsNr; /* the number of inherited namespaces */
|
||||||
int nsMax; /* the size of the arrays */
|
int nsMax; /* the size of the arrays */
|
||||||
const xmlChar * *nsTab; /* the array of prefix/namespace name */
|
const xmlChar * *nsTab; /* the array of prefix/namespace name */
|
||||||
intptr_t *attallocs; /* which attribute were allocated */
|
int *attallocs; /* which attribute were allocated */
|
||||||
void * *pushTab; /* array of data for push */
|
void * *pushTab; /* array of data for push */
|
||||||
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
|
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
|
||||||
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
|
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
|
||||||
@@ -307,8 +307,8 @@ struct _xmlParserCtxt {
|
|||||||
struct _xmlSAXLocator {
|
struct _xmlSAXLocator {
|
||||||
const xmlChar *(*getPublicId)(void *ctx);
|
const xmlChar *(*getPublicId)(void *ctx);
|
||||||
const xmlChar *(*getSystemId)(void *ctx);
|
const xmlChar *(*getSystemId)(void *ctx);
|
||||||
intptr_t (*getLineNumber)(void *ctx);
|
int (*getLineNumber)(void *ctx);
|
||||||
intptr_t (*getColumnNumber)(void *ctx);
|
int (*getColumnNumber)(void *ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -538,7 +538,7 @@ typedef void (*referenceSAXFunc) (void *ctx,
|
|||||||
*/
|
*/
|
||||||
typedef void (*charactersSAXFunc) (void *ctx,
|
typedef void (*charactersSAXFunc) (void *ctx,
|
||||||
const xmlChar *ch,
|
const xmlChar *ch,
|
||||||
intptr_t len);
|
int len);
|
||||||
/**
|
/**
|
||||||
* ignorableWhitespaceSAXFunc:
|
* ignorableWhitespaceSAXFunc:
|
||||||
* @ctx: the user data (XML parser context)
|
* @ctx: the user data (XML parser context)
|
||||||
@@ -550,7 +550,7 @@ typedef void (*charactersSAXFunc) (void *ctx,
|
|||||||
*/
|
*/
|
||||||
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
|
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
|
||||||
const xmlChar *ch,
|
const xmlChar *ch,
|
||||||
intptr_t len);
|
int len);
|
||||||
/**
|
/**
|
||||||
* processingInstructionSAXFunc:
|
* processingInstructionSAXFunc:
|
||||||
* @ctx: the user data (XML parser context)
|
* @ctx: the user data (XML parser context)
|
||||||
@@ -580,9 +580,9 @@ typedef void (*commentSAXFunc) (void *ctx,
|
|||||||
* Called when a pcdata block has been parsed.
|
* Called when a pcdata block has been parsed.
|
||||||
*/
|
*/
|
||||||
typedef void (*cdataBlockSAXFunc) (
|
typedef void (*cdataBlockSAXFunc) (
|
||||||
void *ctx,
|
void *ctx,
|
||||||
const xmlChar *value,
|
const xmlChar *value,
|
||||||
intptr_t len);
|
int len);
|
||||||
/**
|
/**
|
||||||
* warningSAXFunc:
|
* warningSAXFunc:
|
||||||
* @ctx: an XML parser context
|
* @ctx: an XML parser context
|
||||||
@@ -591,7 +591,7 @@ typedef void (*cdataBlockSAXFunc) (
|
|||||||
*
|
*
|
||||||
* Display and format a warning messages, callback.
|
* Display and format a warning messages, callback.
|
||||||
*/
|
*/
|
||||||
typedef void (*warningSAXFunc) (void *ctx,
|
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
|
||||||
const char *msg, ...);
|
const char *msg, ...);
|
||||||
/**
|
/**
|
||||||
* errorSAXFunc:
|
* errorSAXFunc:
|
||||||
@@ -601,7 +601,7 @@ typedef void (*warningSAXFunc) (void *ctx,
|
|||||||
*
|
*
|
||||||
* Display and format an error messages, callback.
|
* Display and format an error messages, callback.
|
||||||
*/
|
*/
|
||||||
typedef void (*errorSAXFunc) (void *ctx,
|
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
|
||||||
const char *msg, ...);
|
const char *msg, ...);
|
||||||
/**
|
/**
|
||||||
* fatalErrorSAXFunc:
|
* fatalErrorSAXFunc:
|
||||||
@@ -613,7 +613,7 @@ typedef void (*errorSAXFunc) (void *ctx,
|
|||||||
* Note: so far fatalError() SAX callbacks are not used, error()
|
* Note: so far fatalError() SAX callbacks are not used, error()
|
||||||
* get all the callbacks for errors.
|
* get all the callbacks for errors.
|
||||||
*/
|
*/
|
||||||
typedef void (*fatalErrorSAXFunc) (void *ctx,
|
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
|
||||||
const char *msg, ...);
|
const char *msg, ...);
|
||||||
/**
|
/**
|
||||||
* isStandaloneSAXFunc:
|
* isStandaloneSAXFunc:
|
||||||
@@ -681,8 +681,8 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
|
|||||||
const xmlChar *URI,
|
const xmlChar *URI,
|
||||||
int nb_namespaces,
|
int nb_namespaces,
|
||||||
const xmlChar **namespaces,
|
const xmlChar **namespaces,
|
||||||
intptr_t nb_attributes,
|
int nb_attributes,
|
||||||
intptr_t nb_defaulted,
|
int nb_defaulted,
|
||||||
const xmlChar **attributes);
|
const xmlChar **attributes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -813,12 +813,12 @@ XMLPUBFUN void XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Input functions
|
* Input functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParserInputRead (xmlParserInputPtr in,
|
xmlParserInputRead (xmlParserInputPtr in,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParserInputGrow (xmlParserInputPtr in,
|
xmlParserInputGrow (xmlParserInputPtr in,
|
||||||
intptr_t len);
|
int len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Basic parsing Interfaces
|
* Basic parsing Interfaces
|
||||||
@@ -830,16 +830,14 @@ XMLPUBFUN xmlDocPtr XMLCALL
|
|||||||
xmlParseFile (const char *filename);
|
xmlParseFile (const char *filename);
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlParseMemory (const char *buffer,
|
xmlParseMemory (const char *buffer,
|
||||||
intptr_t size);
|
int size);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSubstituteEntitiesDefault(int val);
|
xmlSubstituteEntitiesDefault(int val);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlKeepBlanksDefault (int val);
|
xmlKeepBlanksDefault (int val);
|
||||||
#ifdef LIBXML_PUSH_ENABLED
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlStopParser (xmlParserCtxtPtr ctxt);
|
xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||||
#endif /* LIBXML_PUSH_ENABLED */
|
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlPedanticParserDefault(int val);
|
xmlPedanticParserDefault(int val);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
@@ -882,12 +880,12 @@ XMLPUBFUN xmlDocPtr XMLCALL
|
|||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
intptr_t size,
|
int size,
|
||||||
int recovery);
|
int recovery);
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
intptr_t size,
|
int size,
|
||||||
int recovery,
|
int recovery,
|
||||||
void *data);
|
void *data);
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
@@ -1003,12 +1001,12 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
|||||||
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
|
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
const char *chunk,
|
const char *chunk,
|
||||||
intptr_t size,
|
int size,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParseChunk (xmlParserCtxtPtr ctxt,
|
xmlParseChunk (xmlParserCtxtPtr ctxt,
|
||||||
const char *chunk,
|
const char *chunk,
|
||||||
intptr_t size,
|
int size,
|
||||||
int terminate);
|
int terminate);
|
||||||
#endif /* LIBXML_PUSH_ENABLED */
|
#endif /* LIBXML_PUSH_ENABLED */
|
||||||
|
|
||||||
@@ -1062,7 +1060,7 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Index lookup, actually implemented in the encoding module
|
* Index lookup, actually implemented in the encoding module
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN long XMLCALL
|
||||||
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1090,7 +1088,8 @@ typedef enum {
|
|||||||
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
|
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
|
||||||
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
|
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
|
||||||
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
|
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
|
||||||
XML_PARSE_NOXINCNODE= 1<<15 /* do not generate XINCLUDE START/END nodes */
|
XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
|
||||||
|
XML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
|
||||||
} xmlParserOption;
|
} xmlParserOption;
|
||||||
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
@@ -1164,6 +1163,53 @@ XMLPUBFUN xmlDocPtr XMLCALL
|
|||||||
const char *encoding,
|
const char *encoding,
|
||||||
int options);
|
int options);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Library wide options
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* xmlFeature:
|
||||||
|
*
|
||||||
|
* Used to examine the existance of features that can be enabled
|
||||||
|
* or disabled at compile-time.
|
||||||
|
* They used to be called XML_FEATURE_xxx but this clashed with Expat
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
XML_WITH_THREAD = 1,
|
||||||
|
XML_WITH_TREE = 2,
|
||||||
|
XML_WITH_OUTPUT = 3,
|
||||||
|
XML_WITH_PUSH = 4,
|
||||||
|
XML_WITH_READER = 5,
|
||||||
|
XML_WITH_PATTERN = 6,
|
||||||
|
XML_WITH_WRITER = 7,
|
||||||
|
XML_WITH_SAX1 = 8,
|
||||||
|
XML_WITH_FTP = 9,
|
||||||
|
XML_WITH_HTTP = 10,
|
||||||
|
XML_WITH_VALID = 11,
|
||||||
|
XML_WITH_HTML = 12,
|
||||||
|
XML_WITH_LEGACY = 13,
|
||||||
|
XML_WITH_C14N = 14,
|
||||||
|
XML_WITH_CATALOG = 15,
|
||||||
|
XML_WITH_XPATH = 16,
|
||||||
|
XML_WITH_XPTR = 17,
|
||||||
|
XML_WITH_XINCLUDE = 18,
|
||||||
|
XML_WITH_ICONV = 19,
|
||||||
|
XML_WITH_ISO8859X = 20,
|
||||||
|
XML_WITH_UNICODE = 21,
|
||||||
|
XML_WITH_REGEXP = 22,
|
||||||
|
XML_WITH_AUTOMATA = 23,
|
||||||
|
XML_WITH_EXPR = 24,
|
||||||
|
XML_WITH_SCHEMAS = 25,
|
||||||
|
XML_WITH_SCHEMATRON = 26,
|
||||||
|
XML_WITH_MODULES = 27,
|
||||||
|
XML_WITH_DEBUG = 28,
|
||||||
|
XML_WITH_DEBUG_MEM = 29,
|
||||||
|
XML_WITH_DEBUG_RUN = 30,
|
||||||
|
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
||||||
|
} xmlFeature;
|
||||||
|
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlHasFeature (xmlFeature feature);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
|||||||
int options);
|
int options);
|
||||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||||
xmlCreateMemoryParserCtxt(const char *buffer,
|
xmlCreateMemoryParserCtxt(const char *buffer,
|
||||||
intptr_t size);
|
int size);
|
||||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||||
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
||||||
const xmlChar *ID,
|
const xmlChar *ID,
|
||||||
@@ -486,7 +486,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
|
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||||
const xmlChar *str,
|
const xmlChar *str,
|
||||||
intptr_t len,
|
int len,
|
||||||
int what,
|
int what,
|
||||||
xmlChar end,
|
xmlChar end,
|
||||||
xmlChar end2,
|
xmlChar end2,
|
||||||
@@ -520,9 +520,9 @@ XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
|
|||||||
*/
|
*/
|
||||||
XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
||||||
int *len);
|
int *len);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlCopyCharMultiByte (xmlChar *out,
|
XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
|
||||||
int val);
|
int val);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlCopyChar (intptr_t len,
|
XMLPUBFUN int XMLCALL xmlCopyChar (int len,
|
||||||
xmlChar *out,
|
xmlChar *out,
|
||||||
int val);
|
int val);
|
||||||
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
|
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
|
||||||
|
|||||||
@@ -29,6 +29,20 @@ extern "C" {
|
|||||||
typedef struct _xmlPattern xmlPattern;
|
typedef struct _xmlPattern xmlPattern;
|
||||||
typedef xmlPattern *xmlPatternPtr;
|
typedef xmlPattern *xmlPatternPtr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlPatternFlags:
|
||||||
|
*
|
||||||
|
* This is the set of options affecting the behaviour of pattern
|
||||||
|
* matching with this module
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
XML_PATTERN_DEFAULT = 0, /* simple pattern match */
|
||||||
|
XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
|
||||||
|
XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
|
||||||
|
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
|
||||||
|
} xmlPatternFlags;
|
||||||
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlFreePattern (xmlPatternPtr comp);
|
xmlFreePattern (xmlPatternPtr comp);
|
||||||
|
|
||||||
@@ -52,12 +66,19 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlPatternStreamable (xmlPatternPtr comp);
|
xmlPatternStreamable (xmlPatternPtr comp);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlPatternMaxDepth (xmlPatternPtr comp);
|
xmlPatternMaxDepth (xmlPatternPtr comp);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlPatternMinDepth (xmlPatternPtr comp);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlPatternFromRoot (xmlPatternPtr comp);
|
xmlPatternFromRoot (xmlPatternPtr comp);
|
||||||
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
|
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
|
||||||
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
|
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
|
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlStreamPushNode (xmlStreamCtxtPtr stream,
|
||||||
|
const xmlChar *name,
|
||||||
|
const xmlChar *ns,
|
||||||
|
int nodeType);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStreamPush (xmlStreamCtxtPtr stream,
|
xmlStreamPush (xmlStreamCtxtPtr stream,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
@@ -68,6 +89,8 @@ XMLPUBFUN int XMLCALL
|
|||||||
const xmlChar *ns);
|
const xmlChar *ns);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStreamPop (xmlStreamCtxtPtr stream);
|
xmlStreamPop (xmlStreamCtxtPtr stream);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
|
|||||||
/**
|
/**
|
||||||
* A schemas validation context
|
* A schemas validation context
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
|
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
|
||||||
typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
|
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
|
||||||
|
|
||||||
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
|
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
|
||||||
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
|
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
|
||||||
@@ -127,6 +127,11 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlRelaxNGValidityErrorFunc *err,
|
xmlRelaxNGValidityErrorFunc *err,
|
||||||
xmlRelaxNGValidityWarningFunc *warn,
|
xmlRelaxNGValidityWarningFunc *warn,
|
||||||
void **ctx);
|
void **ctx);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlRelaxNGSetParserStructuredErrors(
|
||||||
|
xmlRelaxNGParserCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror,
|
||||||
|
void *ctx);
|
||||||
XMLPUBFUN xmlRelaxNGPtr XMLCALL
|
XMLPUBFUN xmlRelaxNGPtr XMLCALL
|
||||||
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
@@ -152,6 +157,9 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlRelaxNGValidityErrorFunc *err,
|
xmlRelaxNGValidityErrorFunc *err,
|
||||||
xmlRelaxNGValidityWarningFunc *warn,
|
xmlRelaxNGValidityWarningFunc *warn,
|
||||||
void **ctx);
|
void **ctx);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror, void *ctx);
|
||||||
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
|
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
|
||||||
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
|
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
* Summary: internal interfaces for XML Schemas
|
* Summary: internal interfaces for XML Schemas
|
||||||
* Description: internal interfaces for the XML Schemas handling
|
* Description: internal interfaces for the XML Schemas handling
|
||||||
* and schema validity checking
|
* and schema validity checking
|
||||||
|
* The Schemas development is a Work In Progress.
|
||||||
|
* Some of those interfaces are not garanteed to be API or ABI stable !
|
||||||
*
|
*
|
||||||
* Copy: See Copyright for the status of this software.
|
* Copy: See Copyright for the status of this software.
|
||||||
*
|
*
|
||||||
@@ -83,7 +85,7 @@ typedef enum {
|
|||||||
XML_SCHEMA_TYPE_FACET,
|
XML_SCHEMA_TYPE_FACET,
|
||||||
XML_SCHEMA_TYPE_SIMPLE,
|
XML_SCHEMA_TYPE_SIMPLE,
|
||||||
XML_SCHEMA_TYPE_COMPLEX,
|
XML_SCHEMA_TYPE_COMPLEX,
|
||||||
XML_SCHEMA_TYPE_SEQUENCE,
|
XML_SCHEMA_TYPE_SEQUENCE = 6,
|
||||||
XML_SCHEMA_TYPE_CHOICE,
|
XML_SCHEMA_TYPE_CHOICE,
|
||||||
XML_SCHEMA_TYPE_ALL,
|
XML_SCHEMA_TYPE_ALL,
|
||||||
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
|
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
|
||||||
@@ -102,7 +104,8 @@ typedef enum {
|
|||||||
XML_SCHEMA_TYPE_IDC_UNIQUE,
|
XML_SCHEMA_TYPE_IDC_UNIQUE,
|
||||||
XML_SCHEMA_TYPE_IDC_KEY,
|
XML_SCHEMA_TYPE_IDC_KEY,
|
||||||
XML_SCHEMA_TYPE_IDC_KEYREF,
|
XML_SCHEMA_TYPE_IDC_KEYREF,
|
||||||
XML_SCHEMA_TYPE_PARTICLE,
|
XML_SCHEMA_TYPE_PARTICLE = 25,
|
||||||
|
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
|
||||||
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
|
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
|
||||||
XML_SCHEMA_FACET_MINEXCLUSIVE,
|
XML_SCHEMA_FACET_MINEXCLUSIVE,
|
||||||
XML_SCHEMA_FACET_MAXINCLUSIVE,
|
XML_SCHEMA_FACET_MAXINCLUSIVE,
|
||||||
@@ -115,7 +118,8 @@ typedef enum {
|
|||||||
XML_SCHEMA_FACET_LENGTH,
|
XML_SCHEMA_FACET_LENGTH,
|
||||||
XML_SCHEMA_FACET_MAXLENGTH,
|
XML_SCHEMA_FACET_MAXLENGTH,
|
||||||
XML_SCHEMA_FACET_MINLENGTH,
|
XML_SCHEMA_FACET_MINLENGTH,
|
||||||
XML_SCHEMA_EXTRA_QNAMEREF = 2000
|
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
|
||||||
|
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
|
||||||
} xmlSchemaTypeType;
|
} xmlSchemaTypeType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -124,7 +128,7 @@ typedef enum {
|
|||||||
XML_SCHEMA_CONTENT_ELEMENTS,
|
XML_SCHEMA_CONTENT_ELEMENTS,
|
||||||
XML_SCHEMA_CONTENT_MIXED,
|
XML_SCHEMA_CONTENT_MIXED,
|
||||||
XML_SCHEMA_CONTENT_SIMPLE,
|
XML_SCHEMA_CONTENT_SIMPLE,
|
||||||
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* obsolete, not used */
|
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
|
||||||
XML_SCHEMA_CONTENT_BASIC,
|
XML_SCHEMA_CONTENT_BASIC,
|
||||||
XML_SCHEMA_CONTENT_ANY
|
XML_SCHEMA_CONTENT_ANY
|
||||||
} xmlSchemaContentType;
|
} xmlSchemaContentType;
|
||||||
@@ -242,31 +246,32 @@ struct _xmlSchemaAnnot {
|
|||||||
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
|
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
|
||||||
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
|
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
|
||||||
struct _xmlSchemaAttribute {
|
struct _xmlSchemaAttribute {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type;
|
||||||
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
|
struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
|
||||||
const xmlChar *name; /* name of the declaration or empty if particle */
|
const xmlChar *name; /* the name of the declaration */
|
||||||
const xmlChar *id;
|
const xmlChar *id; /* Deprecated; not used */
|
||||||
const xmlChar *ref; /* the local name of the attribute decl. if a particle */
|
const xmlChar *ref; /* Deprecated; not used */
|
||||||
const xmlChar *refNs; /* the ns URI of the attribute decl. if a particle */
|
const xmlChar *refNs; /* Deprecated; not used */
|
||||||
const xmlChar *typeName; /* the local name of the type definition */
|
const xmlChar *typeName; /* the local name of the type definition */
|
||||||
const xmlChar *typeNs; /* the ns URI of the type definition */
|
const xmlChar *typeNs; /* the ns URI of the type definition */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
|
|
||||||
xmlSchemaTypePtr base; /* obsolete, not used */
|
xmlSchemaTypePtr base; /* Deprecated; not used */
|
||||||
int occurs;
|
int occurs; /* Deprecated; not used */
|
||||||
const xmlChar *defValue;
|
const xmlChar *defValue; /* The initial value of the value constraint */
|
||||||
xmlSchemaTypePtr subtypes; /* the type definition */
|
xmlSchemaTypePtr subtypes; /* the type definition */
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
const xmlChar *targetNamespace;
|
const xmlChar *targetNamespace;
|
||||||
int flags;
|
int flags;
|
||||||
const xmlChar *refPrefix;
|
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||||
xmlSchemaValPtr defVal;
|
xmlSchemaValPtr defVal; /* The compiled value constraint */
|
||||||
xmlSchemaAttributePtr refDecl;
|
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSchemaAttributeLink:
|
* xmlSchemaAttributeLink:
|
||||||
* Used to build a list of attribute uses on complexType definitions.
|
* Used to build a list of attribute uses on complexType definitions.
|
||||||
|
* WARNING: Deprecated; not used.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
|
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
|
||||||
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
|
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
|
||||||
@@ -301,11 +306,11 @@ typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
|
|||||||
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
|
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
|
||||||
struct _xmlSchemaWildcard {
|
struct _xmlSchemaWildcard {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type; /* The kind of type */
|
||||||
const xmlChar *id;
|
const xmlChar *id; /* Deprecated; not used */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
int minOccurs;
|
int minOccurs; /* Deprecated; not used */
|
||||||
int maxOccurs;
|
int maxOccurs; /* Deprecated; not used */
|
||||||
int processContents;
|
int processContents;
|
||||||
int any; /* Indicates if the ns constraint is of ##any */
|
int any; /* Indicates if the ns constraint is of ##any */
|
||||||
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
|
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
|
||||||
@@ -332,6 +337,19 @@ struct _xmlSchemaWildcard {
|
|||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
|
#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_ATTRGROUP_REDEFINED:
|
||||||
|
*
|
||||||
|
* The attr group was redefined.
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_ATTRGROUP_HAS_REFS:
|
||||||
|
*
|
||||||
|
* Whether this attr. group contains attr. group references.
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An attribute group definition.
|
* An attribute group definition.
|
||||||
*
|
*
|
||||||
@@ -345,17 +363,18 @@ struct _xmlSchemaAttributeGroup {
|
|||||||
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
|
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
const xmlChar *id;
|
const xmlChar *id;
|
||||||
const xmlChar *ref;
|
const xmlChar *ref; /* Deprecated; not used */
|
||||||
const xmlChar *refNs;
|
const xmlChar *refNs; /* Deprecated; not used */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
|
|
||||||
xmlSchemaAttributePtr attributes;
|
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
int flags;
|
int flags;
|
||||||
xmlSchemaWildcardPtr attributeWildcard;
|
xmlSchemaWildcardPtr attributeWildcard;
|
||||||
const xmlChar *refPrefix;
|
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||||
xmlSchemaAttributeGroupPtr refItem; /* The referenced attribute group */
|
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
|
||||||
const xmlChar *targetNamespace;
|
const xmlChar *targetNamespace;
|
||||||
|
void *attrUses;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -367,7 +386,7 @@ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
|
|||||||
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
|
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
|
||||||
struct _xmlSchemaTypeLink {
|
struct _xmlSchemaTypeLink {
|
||||||
struct _xmlSchemaTypeLink *next;/* the next type link ... */
|
struct _xmlSchemaTypeLink *next;/* the next type link ... */
|
||||||
xmlSchemaTypePtr type;/* the linked type*/
|
xmlSchemaTypePtr type;/* the linked type */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -416,6 +435,9 @@ struct _xmlSchemaFacetLink {
|
|||||||
* XML_SCHEMAS_TYPE_VARIETY_ABSENT:
|
* XML_SCHEMAS_TYPE_VARIETY_ABSENT:
|
||||||
*
|
*
|
||||||
* the simpleType has a variety of "absent".
|
* the simpleType has a variety of "absent".
|
||||||
|
* TODO: Actually not necessary :-/, since if
|
||||||
|
* none of the variety flags occur then it's
|
||||||
|
* automatically absent.
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
|
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
|
||||||
/**
|
/**
|
||||||
@@ -521,7 +543,56 @@ struct _xmlSchemaFacetLink {
|
|||||||
* indicates that the type is invalid
|
* indicates that the type is invalid
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
|
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
|
||||||
|
*
|
||||||
|
* a whitespace-facet value of "preserve"
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
|
||||||
|
*
|
||||||
|
* a whitespace-facet value of "replace"
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
|
||||||
|
*
|
||||||
|
* a whitespace-facet value of "collapse"
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_HAS_FACETS:
|
||||||
|
*
|
||||||
|
* has facets
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_NORMVALUENEEDED:
|
||||||
|
*
|
||||||
|
* indicates if the facets (pattern) need a normalized value
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_FIXUP_1:
|
||||||
|
*
|
||||||
|
* First stage of fixup was done.
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_REDEFINED:
|
||||||
|
*
|
||||||
|
* The type was redefined.
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_TYPE_REDEFINING:
|
||||||
|
*
|
||||||
|
* The type redefines an other type.
|
||||||
|
*/
|
||||||
|
/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _xmlSchemaType:
|
* _xmlSchemaType:
|
||||||
@@ -529,36 +600,38 @@ struct _xmlSchemaFacetLink {
|
|||||||
* Schemas type definition.
|
* Schemas type definition.
|
||||||
*/
|
*/
|
||||||
struct _xmlSchemaType {
|
struct _xmlSchemaType {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type; /* The kind of type */
|
||||||
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
|
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
const xmlChar *id;
|
const xmlChar *id ; /* Deprecated; not used */
|
||||||
const xmlChar *ref;
|
const xmlChar *ref; /* Deprecated; not used */
|
||||||
const xmlChar *refNs;
|
const xmlChar *refNs; /* Deprecated; not used */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
xmlSchemaTypePtr subtypes;
|
xmlSchemaTypePtr subtypes;
|
||||||
xmlSchemaAttributePtr attributes;
|
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
int minOccurs;
|
int minOccurs; /* Deprecated; not used */
|
||||||
int maxOccurs;
|
int maxOccurs; /* Deprecated; not used */
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
xmlSchemaContentType contentType;
|
xmlSchemaContentType contentType;
|
||||||
const xmlChar *base;
|
const xmlChar *base; /* Base type's local name */
|
||||||
const xmlChar *baseNs;
|
const xmlChar *baseNs; /* Base type's target namespace */
|
||||||
xmlSchemaTypePtr baseType;
|
xmlSchemaTypePtr baseType; /* The base type component */
|
||||||
xmlSchemaFacetPtr facets;
|
xmlSchemaFacetPtr facets; /* Local facets */
|
||||||
struct _xmlSchemaType *redef;/* possible redefinitions for the type */
|
struct _xmlSchemaType *redef; /* Deprecated; not used */
|
||||||
int recurse;
|
int recurse; /* Obsolete */
|
||||||
xmlSchemaAttributeLinkPtr attributeUses;
|
xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
|
||||||
xmlSchemaWildcardPtr attributeWildcard;
|
xmlSchemaWildcardPtr attributeWildcard;
|
||||||
int builtInType;
|
int builtInType; /* Type of built-in types. */
|
||||||
xmlSchemaTypeLinkPtr memberTypes;
|
xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
|
||||||
xmlSchemaFacetLinkPtr facetSet;
|
xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
|
||||||
const xmlChar *refPrefix;
|
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||||
xmlSchemaTypePtr contentTypeDef;
|
xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
|
||||||
xmlRegexpPtr contModel;
|
Could we use @subtypes for this? */
|
||||||
|
xmlRegexpPtr contModel; /* Holds the automaton of the content model */
|
||||||
const xmlChar *targetNamespace;
|
const xmlChar *targetNamespace;
|
||||||
|
void *attrUses;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -673,23 +746,35 @@ struct _xmlSchemaType {
|
|||||||
* substitution group exclusions: "restriction"
|
* substitution group exclusions: "restriction"
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
|
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
|
||||||
|
*
|
||||||
|
* the declaration is a substitution group head
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
|
||||||
|
/**
|
||||||
|
* XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
|
||||||
|
*
|
||||||
|
* this is set when the elem decl has been checked against
|
||||||
|
* all constraints
|
||||||
|
*/
|
||||||
|
#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
|
||||||
|
|
||||||
typedef struct _xmlSchemaElement xmlSchemaElement;
|
typedef struct _xmlSchemaElement xmlSchemaElement;
|
||||||
typedef xmlSchemaElement *xmlSchemaElementPtr;
|
typedef xmlSchemaElement *xmlSchemaElementPtr;
|
||||||
struct _xmlSchemaElement {
|
struct _xmlSchemaElement {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type; /* The kind of type */
|
||||||
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
|
struct _xmlSchemaType *next; /* Not used? */
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
const xmlChar *id;
|
const xmlChar *id; /* Deprecated; not used */
|
||||||
const xmlChar *ref; /* the local name of the element declaration if a particle */
|
const xmlChar *ref; /* Deprecated; not used */
|
||||||
const xmlChar *refNs; /* the ns URI of the element declaration if a particle */
|
const xmlChar *refNs; /* Deprecated; not used */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
xmlSchemaTypePtr subtypes; /* the type definition */
|
xmlSchemaTypePtr subtypes; /* the type definition */
|
||||||
xmlSchemaAttributePtr attributes;
|
xmlSchemaAttributePtr attributes;
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
int minOccurs;
|
int minOccurs; /* Deprecated; not used */
|
||||||
int maxOccurs;
|
int maxOccurs; /* Deprecated; not used */
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
const xmlChar *targetNamespace;
|
const xmlChar *targetNamespace;
|
||||||
@@ -698,13 +783,14 @@ struct _xmlSchemaElement {
|
|||||||
const xmlChar *substGroup;
|
const xmlChar *substGroup;
|
||||||
const xmlChar *substGroupNs;
|
const xmlChar *substGroupNs;
|
||||||
const xmlChar *scope;
|
const xmlChar *scope;
|
||||||
const xmlChar *value;
|
const xmlChar *value; /* The original value of the value constraint. */
|
||||||
struct _xmlSchemaElement *refDecl; /* the element declaration if a particle */
|
struct _xmlSchemaElement *refDecl; /* This will now be used for the
|
||||||
xmlRegexpPtr contModel;
|
substitution group affiliation */
|
||||||
|
xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
|
||||||
xmlSchemaContentType contentType;
|
xmlSchemaContentType contentType;
|
||||||
const xmlChar *refPrefix;
|
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||||
xmlSchemaValPtr defVal;
|
xmlSchemaValPtr defVal; /* The compiled value contraint. */
|
||||||
void *idcs;
|
void *idcs; /* The identity-constraint defs */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -737,14 +823,14 @@ struct _xmlSchemaElement {
|
|||||||
struct _xmlSchemaFacet {
|
struct _xmlSchemaFacet {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type; /* The kind of type */
|
||||||
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
|
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
|
||||||
const xmlChar *value;
|
const xmlChar *value; /* The original value */
|
||||||
const xmlChar *id;
|
const xmlChar *id; /* Obsolete */
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
int fixed;
|
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
|
||||||
int whitespace;
|
int whitespace;
|
||||||
xmlSchemaValPtr val;
|
xmlSchemaValPtr val; /* The compiled value */
|
||||||
xmlRegexpPtr regexp;
|
xmlRegexpPtr regexp; /* The regex for patterns */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -753,23 +839,31 @@ struct _xmlSchemaFacet {
|
|||||||
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
||||||
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
|
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
|
||||||
struct _xmlSchemaNotation {
|
struct _xmlSchemaNotation {
|
||||||
xmlSchemaTypeType type; /* The kind of type */
|
xmlSchemaTypeType type; /* The kind of type */
|
||||||
const xmlChar *name;
|
const xmlChar *name;
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
const xmlChar *identifier;
|
const xmlChar *identifier;
|
||||||
const xmlChar *targetNamespace;
|
const xmlChar *targetNamespace;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: Actually all those flags used for the schema should sit
|
||||||
|
* on the schema parser context, since they are used only
|
||||||
|
* during parsing an XML schema document, and not available
|
||||||
|
* on the component level as per spec.
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* XML_SCHEMAS_QUALIF_ELEM:
|
* XML_SCHEMAS_QUALIF_ELEM:
|
||||||
*
|
*
|
||||||
* the schema requires qualified elements
|
* Reflects elementFormDefault == qualified in
|
||||||
|
* an XML schema document.
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
|
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
|
||||||
/**
|
/**
|
||||||
* XML_SCHEMAS_QUALIF_ATTR:
|
* XML_SCHEMAS_QUALIF_ATTR:
|
||||||
*
|
*
|
||||||
* the schema requires qualified attributes
|
* Reflects attributeFormDefault == qualified in
|
||||||
|
* an XML schema document.
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
|
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
|
||||||
/**
|
/**
|
||||||
@@ -827,10 +921,10 @@ struct _xmlSchemaNotation {
|
|||||||
* A Schemas definition
|
* A Schemas definition
|
||||||
*/
|
*/
|
||||||
struct _xmlSchema {
|
struct _xmlSchema {
|
||||||
const xmlChar *name; /* schema name */
|
const xmlChar *name; /* schema name */
|
||||||
const xmlChar *targetNamespace; /* the target namespace */
|
const xmlChar *targetNamespace; /* the target namespace */
|
||||||
const xmlChar *version;
|
const xmlChar *version;
|
||||||
const xmlChar *id;
|
const xmlChar *id; /* Obsolete */
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlSchemaAnnotPtr annot;
|
xmlSchemaAnnotPtr annot;
|
||||||
int flags;
|
int flags;
|
||||||
@@ -849,8 +943,8 @@ struct _xmlSchema {
|
|||||||
void *includes; /* the includes, this is opaque for now */
|
void *includes; /* the includes, this is opaque for now */
|
||||||
int preserve; /* whether to free the document */
|
int preserve; /* whether to free the document */
|
||||||
int counter; /* used to give ononymous components unique names */
|
int counter; /* used to give ononymous components unique names */
|
||||||
xmlHashTablePtr idcDef;
|
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
|
||||||
void *volatiles; /* Misc. helper items (e.g. reference items) */
|
void *volatiles; /* Obsolete */
|
||||||
};
|
};
|
||||||
|
|
||||||
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
|
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ typedef xmlRMutex *xmlRMutexPtr;
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XMLPUBFUN xmlMutexPtr XMLCALL
|
XMLPUBFUN xmlMutexPtr XMLCALL
|
||||||
xmlNewMutex (void);
|
xmlNewMutex (void);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
|
|||||||
@@ -54,6 +54,33 @@ typedef xmlEntity *xmlEntityPtr;
|
|||||||
*/
|
*/
|
||||||
#define BASE_BUFFER_SIZE 4096
|
#define BASE_BUFFER_SIZE 4096
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlBufferAllocationScheme:
|
||||||
|
*
|
||||||
|
* A buffer allocation scheme can be defined to either match exactly the
|
||||||
|
* need or double it's allocated size each time it is found too small.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
XML_BUFFER_ALLOC_DOUBLEIT,
|
||||||
|
XML_BUFFER_ALLOC_EXACT,
|
||||||
|
XML_BUFFER_ALLOC_IMMUTABLE
|
||||||
|
} xmlBufferAllocationScheme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlBuffer:
|
||||||
|
*
|
||||||
|
* A buffer structure.
|
||||||
|
*/
|
||||||
|
typedef struct _xmlBuffer xmlBuffer;
|
||||||
|
typedef xmlBuffer *xmlBufferPtr;
|
||||||
|
struct _xmlBuffer {
|
||||||
|
xmlChar *content; /* The buffer content UTF8 */
|
||||||
|
unsigned int use; /* The buffer size used */
|
||||||
|
unsigned int size; /* The buffer size */
|
||||||
|
xmlBufferAllocationScheme alloc; /* The realloc method */
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XML_XML_NAMESPACE:
|
* XML_XML_NAMESPACE:
|
||||||
*
|
*
|
||||||
@@ -250,7 +277,6 @@ typedef enum {
|
|||||||
XML_ELEMENT_TYPE_ELEMENT
|
XML_ELEMENT_TYPE_ELEMENT
|
||||||
} xmlElementTypeVal;
|
} xmlElementTypeVal;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -402,33 +428,6 @@ struct _xmlRef {
|
|||||||
int lineno; /* The line number if attr is not available */
|
int lineno; /* The line number if attr is not available */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlBufferAllocationScheme:
|
|
||||||
*
|
|
||||||
* A buffer allocation scheme can be defined to either match exactly the
|
|
||||||
* need or double it's allocated size each time it is found too small.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
XML_BUFFER_ALLOC_DOUBLEIT,
|
|
||||||
XML_BUFFER_ALLOC_EXACT,
|
|
||||||
XML_BUFFER_ALLOC_IMMUTABLE
|
|
||||||
} xmlBufferAllocationScheme;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* xmlBuffer:
|
|
||||||
*
|
|
||||||
* A buffer structure.
|
|
||||||
*/
|
|
||||||
typedef struct _xmlBuffer xmlBuffer;
|
|
||||||
typedef xmlBuffer *xmlBufferPtr;
|
|
||||||
struct _xmlBuffer {
|
|
||||||
xmlChar *content; /* The buffer content UTF8 */
|
|
||||||
size_t use; /* The buffer size used */
|
|
||||||
size_t size; /* The buffer size */
|
|
||||||
xmlBufferAllocationScheme alloc; /* The realloc method */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNode:
|
* xmlNode:
|
||||||
*
|
*
|
||||||
@@ -509,6 +508,12 @@ struct _xmlDoc {
|
|||||||
void *psvi; /* for type/PSVI informations */
|
void *psvi; /* for type/PSVI informations */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
|
||||||
|
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
|
||||||
|
struct _xmlDOMWrapCtxt {
|
||||||
|
void * _private;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlChildrenNode:
|
* xmlChildrenNode:
|
||||||
*
|
*
|
||||||
@@ -536,7 +541,7 @@ struct _xmlDoc {
|
|||||||
/*
|
/*
|
||||||
* Some helper functions
|
* Some helper functions
|
||||||
*/
|
*/
|
||||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
|
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlValidateNCName (const xmlChar *value,
|
xmlValidateNCName (const xmlChar *value,
|
||||||
int space);
|
int space);
|
||||||
@@ -558,13 +563,13 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
xmlBuildQName (const xmlChar *ncname,
|
xmlBuildQName (const xmlChar *ncname,
|
||||||
const xmlChar *prefix,
|
const xmlChar *prefix,
|
||||||
xmlChar *memory,
|
xmlChar *memory,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlSplitQName2 (const xmlChar *name,
|
xmlSplitQName2 (const xmlChar *name,
|
||||||
xmlChar **prefix);
|
xmlChar **prefix);
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlSplitQName3 (const xmlChar *name,
|
xmlSplitQName3 (const xmlChar *name,
|
||||||
intptr_t *len);
|
int *len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handling Buffers.
|
* Handling Buffers.
|
||||||
@@ -584,32 +589,32 @@ XMLPUBFUN xmlBufferPtr XMLCALL
|
|||||||
size_t size);
|
size_t size);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferResize (xmlBufferPtr buf,
|
xmlBufferResize (xmlBufferPtr buf,
|
||||||
size_t size);
|
unsigned int size);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlBufferFree (xmlBufferPtr buf);
|
xmlBufferFree (xmlBufferPtr buf);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferDump (FILE *file,
|
xmlBufferDump (FILE *file,
|
||||||
xmlBufferPtr buf);
|
xmlBufferPtr buf);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferAdd (xmlBufferPtr buf,
|
xmlBufferAdd (xmlBufferPtr buf,
|
||||||
const xmlChar *str,
|
const xmlChar *str,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferAddHead (xmlBufferPtr buf,
|
xmlBufferAddHead (xmlBufferPtr buf,
|
||||||
const xmlChar *str,
|
const xmlChar *str,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferCat (xmlBufferPtr buf,
|
xmlBufferCat (xmlBufferPtr buf,
|
||||||
const xmlChar *str);
|
const xmlChar *str);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferCCat (xmlBufferPtr buf,
|
xmlBufferCCat (xmlBufferPtr buf,
|
||||||
const char *str);
|
const char *str);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferShrink (xmlBufferPtr buf,
|
xmlBufferShrink (xmlBufferPtr buf,
|
||||||
size_t len);
|
unsigned int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferGrow (xmlBufferPtr buf,
|
xmlBufferGrow (xmlBufferPtr buf,
|
||||||
size_t len);
|
unsigned int len);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlBufferEmpty (xmlBufferPtr buf);
|
xmlBufferEmpty (xmlBufferPtr buf);
|
||||||
XMLPUBFUN const xmlChar* XMLCALL
|
XMLPUBFUN const xmlChar* XMLCALL
|
||||||
@@ -617,7 +622,7 @@ XMLPUBFUN const xmlChar* XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
|
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
|
||||||
xmlBufferAllocationScheme scheme);
|
xmlBufferAllocationScheme scheme);
|
||||||
XMLPUBFUN size_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlBufferLength (const xmlBufferPtr buf);
|
xmlBufferLength (const xmlBufferPtr buf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -736,10 +741,10 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewDocTextLen (xmlDocPtr doc,
|
xmlNewDocTextLen (xmlDocPtr doc,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewTextLen (const xmlChar *content,
|
xmlNewTextLen (const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewDocComment (xmlDocPtr doc,
|
xmlNewDocComment (xmlDocPtr doc,
|
||||||
const xmlChar *content);
|
const xmlChar *content);
|
||||||
@@ -748,7 +753,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewCDataBlock (xmlDocPtr doc,
|
xmlNewCDataBlock (xmlDocPtr doc,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewCharRef (xmlDocPtr doc,
|
xmlNewCharRef (xmlDocPtr doc,
|
||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
@@ -844,7 +849,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextConcat (xmlNodePtr node,
|
xmlTextConcat (xmlNodePtr node,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlFreeNodeList (xmlNodePtr cur);
|
xmlFreeNodeList (xmlNodePtr cur);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
@@ -917,7 +922,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlStringLenGetNodeList (xmlDocPtr doc,
|
xmlStringLenGetNodeList (xmlDocPtr doc,
|
||||||
const xmlChar *value,
|
const xmlChar *value,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlNodeListGetString (xmlDocPtr doc,
|
xmlNodeListGetString (xmlDocPtr doc,
|
||||||
xmlNodePtr list,
|
xmlNodePtr list,
|
||||||
@@ -935,7 +940,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetContentLen (xmlNodePtr cur,
|
xmlNodeSetContentLen (xmlNodePtr cur,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
#endif /* LIBXML_TREE_ENABLED */
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeAddContent (xmlNodePtr cur,
|
xmlNodeAddContent (xmlNodePtr cur,
|
||||||
@@ -943,7 +948,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeAddContentLen (xmlNodePtr cur,
|
xmlNodeAddContentLen (xmlNodePtr cur,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlNodeGetContent (xmlNodePtr cur);
|
xmlNodeGetContent (xmlNodePtr cur);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
@@ -973,10 +978,8 @@ XMLPUBFUN void XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Removing content.
|
* Removing content.
|
||||||
*/
|
*/
|
||||||
#ifdef LIBXML_TREE_ENABLED
|
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlRemoveProp (xmlAttrPtr cur);
|
xmlRemoveProp (xmlAttrPtr cur);
|
||||||
#endif /* LIBXML_TREE_ENABLED */
|
|
||||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUnsetNsProp (xmlNodePtr node,
|
xmlUnsetNsProp (xmlNodePtr node,
|
||||||
@@ -1032,44 +1035,44 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
|
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
|
||||||
xmlChar **doc_txt_ptr,
|
xmlChar **doc_txt_ptr,
|
||||||
intptr_t* doc_txt_len,
|
int * doc_txt_len,
|
||||||
const char *txt_encoding);
|
const char *txt_encoding);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
|
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
|
||||||
xmlChar **doc_txt_ptr,
|
xmlChar **doc_txt_ptr,
|
||||||
intptr_t* doc_txt_len,
|
int * doc_txt_len,
|
||||||
const char *txt_encoding,
|
const char *txt_encoding,
|
||||||
int format);
|
int format);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlDocFormatDump (FILE *f,
|
xmlDocFormatDump (FILE *f,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
int format);
|
int format);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlDocDump (FILE *f,
|
xmlDocDump (FILE *f,
|
||||||
xmlDocPtr cur);
|
xmlDocPtr cur);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlElemDump (FILE *f,
|
xmlElemDump (FILE *f,
|
||||||
xmlDocPtr doc,
|
xmlDocPtr doc,
|
||||||
xmlNodePtr cur);
|
xmlNodePtr cur);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFile (const char *filename,
|
xmlSaveFile (const char *filename,
|
||||||
xmlDocPtr cur);
|
xmlDocPtr cur);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFormatFile (const char *filename,
|
xmlSaveFormatFile (const char *filename,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
int format);
|
int format);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlNodeDump (xmlBufferPtr buf,
|
xmlNodeDump (xmlBufferPtr buf,
|
||||||
xmlDocPtr doc,
|
xmlDocPtr doc,
|
||||||
xmlNodePtr cur,
|
xmlNodePtr cur,
|
||||||
int level,
|
int level,
|
||||||
int format);
|
int format);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFileTo (xmlOutputBufferPtr buf,
|
xmlSaveFileTo (xmlOutputBufferPtr buf,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
const char *encoding);
|
const char *encoding);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
|
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
@@ -1082,13 +1085,13 @@ XMLPUBFUN void XMLCALL
|
|||||||
int format,
|
int format,
|
||||||
const char *encoding);
|
const char *encoding);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFormatFileEnc (const char *filename,
|
xmlSaveFormatFileEnc (const char *filename,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
int format);
|
int format);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFileEnc (const char *filename,
|
xmlSaveFileEnc (const char *filename,
|
||||||
xmlDocPtr cur,
|
xmlDocPtr cur,
|
||||||
const char *encoding);
|
const char *encoding);
|
||||||
@@ -1114,6 +1117,39 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSetCompressMode (int mode);
|
xmlSetCompressMode (int mode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DOM-wrapper helper functions.
|
||||||
|
*/
|
||||||
|
XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
|
||||||
|
xmlDOMWrapNewCtxt (void);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
|
||||||
|
xmlNodePtr elem,
|
||||||
|
int options);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
|
||||||
|
xmlDocPtr sourceDoc,
|
||||||
|
xmlNodePtr node,
|
||||||
|
xmlDocPtr destDoc,
|
||||||
|
xmlNodePtr destParent,
|
||||||
|
int options);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
|
||||||
|
xmlDocPtr doc,
|
||||||
|
xmlNodePtr node,
|
||||||
|
int options);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
|
||||||
|
xmlDocPtr sourceDoc,
|
||||||
|
xmlNodePtr node,
|
||||||
|
xmlNodePtr *clonedNode,
|
||||||
|
xmlDocPtr destDoc,
|
||||||
|
xmlNodePtr destParent,
|
||||||
|
int deep,
|
||||||
|
int options);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -47,13 +47,16 @@ struct _xmlURI {
|
|||||||
XMLPUBFUN xmlURIPtr XMLCALL
|
XMLPUBFUN xmlURIPtr XMLCALL
|
||||||
xmlCreateURI (void);
|
xmlCreateURI (void);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlBuildURI (const xmlChar *URI,
|
xmlBuildURI (const xmlChar *URI,
|
||||||
const xmlChar *base);
|
const xmlChar *base);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlBuildRelativeURI (const xmlChar *URI,
|
xmlBuildRelativeURI (const xmlChar *URI,
|
||||||
const xmlChar *base);
|
const xmlChar *base);
|
||||||
XMLPUBFUN xmlURIPtr XMLCALL
|
XMLPUBFUN xmlURIPtr XMLCALL
|
||||||
xmlParseURI (const char *str);
|
xmlParseURI (const char *str);
|
||||||
|
XMLPUBFUN xmlURIPtr XMLCALL
|
||||||
|
xmlParseURIRaw (const char *str,
|
||||||
|
int raw);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParseURIReference (xmlURIPtr uri,
|
xmlParseURIReference (xmlURIPtr uri,
|
||||||
const char *str);
|
const char *str);
|
||||||
@@ -67,7 +70,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
const xmlChar *list);
|
const xmlChar *list);
|
||||||
XMLPUBFUN char * XMLCALL
|
XMLPUBFUN char * XMLCALL
|
||||||
xmlURIUnescapeString (const char *str,
|
xmlURIUnescapeString (const char *str,
|
||||||
intptr_t len,
|
int len,
|
||||||
char *target);
|
char *target);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlNormalizeURIPath (char *path);
|
xmlNormalizeURIPath (char *path);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ typedef xmlValidState *xmlValidStatePtr;
|
|||||||
* Callback called when a validity error is found. This is a message
|
* Callback called when a validity error is found. This is a message
|
||||||
* oriented function similar to an *printf function.
|
* oriented function similar to an *printf function.
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlValidityErrorFunc) (void *ctx,
|
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ typedef void (*xmlValidityErrorFunc) (void *ctx,
|
|||||||
* Callback called when a validity warning is found. This is a message
|
* Callback called when a validity warning is found. This is a message
|
||||||
* oriented function similar to an *printf function.
|
* oriented function similar to an *printf function.
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlValidityWarningFunc) (void *ctx,
|
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
@@ -193,15 +193,15 @@ XMLPUBFUN void XMLCALL
|
|||||||
xmlElementContentPtr cur);
|
xmlElementContentPtr cur);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSnprintfElementContent(char *buf,
|
xmlSnprintfElementContent(char *buf,
|
||||||
size_t size,
|
int size,
|
||||||
xmlElementContentPtr content,
|
xmlElementContentPtr content,
|
||||||
int glob);
|
int englob);
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/* DEPRECATED */
|
/* DEPRECATED */
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSprintfElementContent(char *buf,
|
xmlSprintfElementContent(char *buf,
|
||||||
xmlElementContentPtr content,
|
xmlElementContentPtr content,
|
||||||
int glob);
|
int englob);
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
/* DEPRECATED */
|
/* DEPRECATED */
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ XMLPUBFUN xmlElementPtr XMLCALL
|
|||||||
|
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
||||||
const xmlChar **list,
|
const xmlChar **names,
|
||||||
int *len,
|
int *len,
|
||||||
int max);
|
int max);
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* Returns 1 if yes and 0 if another Input module should be used
|
* Returns 1 if yes and 0 if another Input module should be used
|
||||||
*/
|
*/
|
||||||
typedef int (*xmlInputMatchCallback) (char const *filename);
|
typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
|
||||||
/**
|
/**
|
||||||
* xmlInputOpenCallback:
|
* xmlInputOpenCallback:
|
||||||
* @filename: the filename or URI
|
* @filename: the filename or URI
|
||||||
@@ -40,7 +40,7 @@ typedef int (*xmlInputMatchCallback) (char const *filename);
|
|||||||
*
|
*
|
||||||
* Returns an Input context or NULL in case or error
|
* Returns an Input context or NULL in case or error
|
||||||
*/
|
*/
|
||||||
typedef void * (*xmlInputOpenCallback) (char const *filename);
|
typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
|
||||||
/**
|
/**
|
||||||
* xmlInputReadCallback:
|
* xmlInputReadCallback:
|
||||||
* @context: an Input context
|
* @context: an Input context
|
||||||
@@ -51,7 +51,7 @@ typedef void * (*xmlInputOpenCallback) (char const *filename);
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes read or -1 in case of error
|
* Returns the number of bytes read or -1 in case of error
|
||||||
*/
|
*/
|
||||||
typedef intptr_t (*xmlInputReadCallback) (void * context, char * buffer, size_t len);
|
typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
|
||||||
/**
|
/**
|
||||||
* xmlInputCloseCallback:
|
* xmlInputCloseCallback:
|
||||||
* @context: an Input context
|
* @context: an Input context
|
||||||
@@ -60,7 +60,7 @@ typedef intptr_t (*xmlInputReadCallback) (void * context, char * buffer, size_t
|
|||||||
*
|
*
|
||||||
* Returns 0 or -1 in case of error
|
* Returns 0 or -1 in case of error
|
||||||
*/
|
*/
|
||||||
typedef int (*xmlInputCloseCallback) (void * context);
|
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/*
|
/*
|
||||||
@@ -77,7 +77,7 @@ typedef int (*xmlInputCloseCallback) (void * context);
|
|||||||
*
|
*
|
||||||
* Returns 1 if yes and 0 if another Output module should be used
|
* Returns 1 if yes and 0 if another Output module should be used
|
||||||
*/
|
*/
|
||||||
typedef int (*xmlOutputMatchCallback) (char const *filename);
|
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
|
||||||
/**
|
/**
|
||||||
* xmlOutputOpenCallback:
|
* xmlOutputOpenCallback:
|
||||||
* @filename: the filename or URI
|
* @filename: the filename or URI
|
||||||
@@ -86,7 +86,7 @@ typedef int (*xmlOutputMatchCallback) (char const *filename);
|
|||||||
*
|
*
|
||||||
* Returns an Output context or NULL in case or error
|
* Returns an Output context or NULL in case or error
|
||||||
*/
|
*/
|
||||||
typedef void * (*xmlOutputOpenCallback) (char const *filename);
|
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
|
||||||
/**
|
/**
|
||||||
* xmlOutputWriteCallback:
|
* xmlOutputWriteCallback:
|
||||||
* @context: an Output context
|
* @context: an Output context
|
||||||
@@ -97,8 +97,8 @@ typedef void * (*xmlOutputOpenCallback) (char const *filename);
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written or -1 in case of error
|
* Returns the number of bytes written or -1 in case of error
|
||||||
*/
|
*/
|
||||||
typedef intptr_t (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
|
||||||
size_t len);
|
int len);
|
||||||
/**
|
/**
|
||||||
* xmlOutputCloseCallback:
|
* xmlOutputCloseCallback:
|
||||||
* @context: an Output context
|
* @context: an Output context
|
||||||
@@ -107,7 +107,7 @@ typedef intptr_t (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
|||||||
*
|
*
|
||||||
* Returns 0 or -1 in case of error
|
* Returns 0 or -1 in case of error
|
||||||
*/
|
*/
|
||||||
typedef int (*xmlOutputCloseCallback) (void * context);
|
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -133,7 +133,7 @@ struct _xmlParserInputBuffer {
|
|||||||
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
|
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
|
||||||
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
|
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
|
||||||
int error;
|
int error;
|
||||||
size_t rawconsumed;/* amount consumed from raw */
|
unsigned long rawconsumed;/* amount consumed from raw */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ struct _xmlOutputBuffer {
|
|||||||
|
|
||||||
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
||||||
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
|
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
|
||||||
intptr_t written; /* total number of byte written */
|
int written; /* total number of byte written */
|
||||||
int error;
|
int error;
|
||||||
};
|
};
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
@@ -176,25 +176,25 @@ XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
|||||||
xmlParserInputBufferCreateFd (int fd,
|
xmlParserInputBufferCreateFd (int fd,
|
||||||
xmlCharEncoding enc);
|
xmlCharEncoding enc);
|
||||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||||
xmlParserInputBufferCreateMem (const char *mem, intptr_t size,
|
xmlParserInputBufferCreateMem (const char *mem, int size,
|
||||||
xmlCharEncoding enc);
|
xmlCharEncoding enc);
|
||||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||||
xmlParserInputBufferCreateStatic (const char *mem, intptr_t size,
|
xmlParserInputBufferCreateStatic (const char *mem, int size,
|
||||||
xmlCharEncoding enc);
|
xmlCharEncoding enc);
|
||||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||||
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
|
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
|
||||||
xmlInputCloseCallback ioclose,
|
xmlInputCloseCallback ioclose,
|
||||||
void *ioctx,
|
void *ioctx,
|
||||||
xmlCharEncoding enc);
|
xmlCharEncoding enc);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
||||||
intptr_t len,
|
int len,
|
||||||
const char *buf);
|
const char *buf);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
||||||
@@ -231,6 +231,10 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
|||||||
xmlOutputBufferCreateFile (FILE *file,
|
xmlOutputBufferCreateFile (FILE *file,
|
||||||
xmlCharEncodingHandlerPtr encoder);
|
xmlCharEncodingHandlerPtr encoder);
|
||||||
|
|
||||||
|
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||||
|
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
|
||||||
|
xmlCharEncodingHandlerPtr encoder);
|
||||||
|
|
||||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||||
xmlOutputBufferCreateFd (int fd,
|
xmlOutputBufferCreateFd (int fd,
|
||||||
xmlCharEncodingHandlerPtr encoder);
|
xmlCharEncodingHandlerPtr encoder);
|
||||||
@@ -241,21 +245,21 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
|||||||
void *ioctx,
|
void *ioctx,
|
||||||
xmlCharEncodingHandlerPtr encoder);
|
xmlCharEncodingHandlerPtr encoder);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
||||||
intptr_t len,
|
int len,
|
||||||
const char *buf);
|
const char *buf);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
||||||
const char *str);
|
const char *str);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
||||||
const xmlChar *str,
|
const xmlChar *str,
|
||||||
xmlCharEncodingOutputFunc escaping);
|
xmlCharEncodingOutputFunc escaping);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
||||||
|
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
@@ -305,10 +309,10 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlFileMatch (const char *filename);
|
xmlFileMatch (const char *filename);
|
||||||
XMLPUBFUN void * XMLCALL
|
XMLPUBFUN void * XMLCALL
|
||||||
xmlFileOpen (const char *filename);
|
xmlFileOpen (const char *filename);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlFileRead (void * context,
|
xmlFileRead (void * context,
|
||||||
char * buffer,
|
char * buffer,
|
||||||
size_t len);
|
int len);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlFileClose (void * context);
|
xmlFileClose (void * context);
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,14 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
|||||||
const xmlChar *token,
|
const xmlChar *token,
|
||||||
const xmlChar *token2,
|
const xmlChar *token2,
|
||||||
void *data);
|
void *data);
|
||||||
|
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||||
|
xmlAutomataNewNegTrans (xmlAutomataPtr am,
|
||||||
|
xmlAutomataStatePtr from,
|
||||||
|
xmlAutomataStatePtr to,
|
||||||
|
const xmlChar *token,
|
||||||
|
const xmlChar *token2,
|
||||||
|
void *data);
|
||||||
|
|
||||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||||
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
||||||
xmlAutomataStatePtr from,
|
xmlAutomataStatePtr from,
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ typedef enum {
|
|||||||
XML_FROM_VALID, /* The XML DTD validation with valid context */
|
XML_FROM_VALID, /* The XML DTD validation with valid context */
|
||||||
XML_FROM_CHECK, /* The error checking module */
|
XML_FROM_CHECK, /* The error checking module */
|
||||||
XML_FROM_WRITER, /* The xmlwriter module */
|
XML_FROM_WRITER, /* The xmlwriter module */
|
||||||
XML_FROM_MODULE /* The dynamically loaded module module*/
|
XML_FROM_MODULE, /* The dynamically loaded module module*/
|
||||||
|
XML_FROM_I18N /* The module handling character conversion */
|
||||||
} xmlErrorDomain;
|
} xmlErrorDomain;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,7 +83,7 @@ struct _xmlError {
|
|||||||
char *str2; /* extra string information */
|
char *str2; /* extra string information */
|
||||||
char *str3; /* extra string information */
|
char *str3; /* extra string information */
|
||||||
int int1; /* extra number information */
|
int int1; /* extra number information */
|
||||||
intptr_t int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
|
int int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
|
||||||
void *ctxt; /* the parser context if available */
|
void *ctxt; /* the parser context if available */
|
||||||
void *node; /* the node in the tree */
|
void *node; /* the node in the tree */
|
||||||
};
|
};
|
||||||
@@ -195,10 +196,17 @@ typedef enum {
|
|||||||
XML_WAR_NS_URI, /* 99 */
|
XML_WAR_NS_URI, /* 99 */
|
||||||
XML_WAR_NS_URI_RELATIVE, /* 100 */
|
XML_WAR_NS_URI_RELATIVE, /* 100 */
|
||||||
XML_ERR_MISSING_ENCODING, /* 101 */
|
XML_ERR_MISSING_ENCODING, /* 101 */
|
||||||
|
XML_WAR_SPACE_VALUE, /* 102 */
|
||||||
|
XML_ERR_NOT_STANDALONE, /* 103 */
|
||||||
|
XML_ERR_ENTITY_PROCESSING, /* 104 */
|
||||||
|
XML_ERR_NOTATION_PROCESSING, /* 105 */
|
||||||
|
XML_WAR_NS_COLUMN, /* 106 */
|
||||||
|
XML_WAR_ENTITY_REDEFINED, /* 107 */
|
||||||
XML_NS_ERR_XML_NAMESPACE = 200,
|
XML_NS_ERR_XML_NAMESPACE = 200,
|
||||||
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
||||||
XML_NS_ERR_QNAME, /* 202 */
|
XML_NS_ERR_QNAME, /* 202 */
|
||||||
XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
|
XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
|
||||||
|
XML_NS_ERR_EMPTY, /* 204 */
|
||||||
XML_DTD_ATTRIBUTE_DEFAULT = 500,
|
XML_DTD_ATTRIBUTE_DEFAULT = 500,
|
||||||
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
|
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
|
||||||
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
|
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
|
||||||
@@ -655,6 +663,7 @@ typedef enum {
|
|||||||
XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
|
XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
|
||||||
XML_SCHEMAV_CVC_IDC, /* 1877 */
|
XML_SCHEMAV_CVC_IDC, /* 1877 */
|
||||||
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
|
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
|
||||||
|
XML_SCHEMAV_MISC, /* 1879 */
|
||||||
XML_XPTR_UNKNOWN_SCHEME = 1900,
|
XML_XPTR_UNKNOWN_SCHEME = 1900,
|
||||||
XML_XPTR_CHILDSEQ_START, /* 1901 */
|
XML_XPTR_CHILDSEQ_START, /* 1901 */
|
||||||
XML_XPTR_EVAL_FAILED, /* 1902 */
|
XML_XPTR_EVAL_FAILED, /* 1902 */
|
||||||
@@ -752,6 +761,18 @@ typedef enum {
|
|||||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
|
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
|
||||||
XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
|
XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
|
||||||
XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
|
XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
|
||||||
|
XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
|
||||||
|
XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
|
||||||
|
XML_SCHEMAP_SRC_IMPORT, /* 3082 */
|
||||||
|
XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
|
||||||
|
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
|
||||||
|
XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
|
||||||
|
XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
|
||||||
|
XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
|
||||||
|
XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
|
||||||
|
XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
|
||||||
|
XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
|
||||||
|
XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
|
||||||
XML_MODULE_OPEN = 4900, /* 4900 */
|
XML_MODULE_OPEN = 4900, /* 4900 */
|
||||||
XML_MODULE_CLOSE, /* 4901 */
|
XML_MODULE_CLOSE, /* 4901 */
|
||||||
XML_CHECK_FOUND_ELEMENT = 5000,
|
XML_CHECK_FOUND_ELEMENT = 5000,
|
||||||
@@ -791,7 +812,12 @@ typedef enum {
|
|||||||
XML_CHECK_NOT_NCNAME, /* 5034 */
|
XML_CHECK_NOT_NCNAME, /* 5034 */
|
||||||
XML_CHECK_OUTSIDE_DICT, /* 5035 */
|
XML_CHECK_OUTSIDE_DICT, /* 5035 */
|
||||||
XML_CHECK_WRONG_NAME, /* 5036 */
|
XML_CHECK_WRONG_NAME, /* 5036 */
|
||||||
XML_CHECK_NAME_NOT_NULL /* 5037 */
|
XML_CHECK_NAME_NOT_NULL, /* 5037 */
|
||||||
|
XML_I18N_NO_NAME = 6000,
|
||||||
|
XML_I18N_NO_HANDLER, /* 6001 */
|
||||||
|
XML_I18N_EXCESS_HANDLER, /* 6002 */
|
||||||
|
XML_I18N_CONV_FAILED, /* 6003 */
|
||||||
|
XML_I18N_NO_OUTPUT /* 6004 */
|
||||||
#if 0
|
#if 0
|
||||||
XML_CHECK_, /* 5033 */
|
XML_CHECK_, /* 5033 */
|
||||||
XML_CHECK_X /* 503 */
|
XML_CHECK_X /* 503 */
|
||||||
@@ -807,7 +833,7 @@ typedef enum {
|
|||||||
* Signature of the function to use when there is an error and
|
* Signature of the function to use when there is an error and
|
||||||
* no parsing or validity context available .
|
* no parsing or validity context available .
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlGenericErrorFunc) (void *ctx,
|
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
/**
|
/**
|
||||||
@@ -818,7 +844,7 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
|
|||||||
* Signature of the function to use when there is an error and
|
* Signature of the function to use when there is an error and
|
||||||
* the module handles the new error reporting mechanism.
|
* the module handles the new error reporting mechanism.
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the following function to reset the two global variables
|
* Use the following function to reset the two global variables
|
||||||
@@ -837,19 +863,19 @@ XMLPUBFUN void XMLCALL
|
|||||||
* Default message routines used by SAX and Valid context for error
|
* Default message routines used by SAX and Valid context for error
|
||||||
* and warning reporting.
|
* and warning reporting.
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCDECL
|
||||||
xmlParserError (void *ctx,
|
xmlParserError (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCDECL
|
||||||
xmlParserWarning (void *ctx,
|
xmlParserWarning (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCDECL
|
||||||
xmlParserValidityError (void *ctx,
|
xmlParserValidityError (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCDECL
|
||||||
xmlParserValidityWarning (void *ctx,
|
xmlParserValidityWarning (void *ctx,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
...);
|
...);
|
||||||
|
|||||||
@@ -40,6 +40,13 @@
|
|||||||
* Macros which declare the called convention for exported functions
|
* Macros which declare the called convention for exported functions
|
||||||
*/
|
*/
|
||||||
#define XMLCALL
|
#define XMLCALL
|
||||||
|
/**
|
||||||
|
* XMLCDECL:
|
||||||
|
*
|
||||||
|
* Macro which declares the calling convention for exported functions that
|
||||||
|
* use '...'.
|
||||||
|
*/
|
||||||
|
#define XMLCDECL
|
||||||
|
|
||||||
/** DOC_DISABLE */
|
/** DOC_DISABLE */
|
||||||
|
|
||||||
@@ -48,6 +55,7 @@
|
|||||||
#undef XMLPUBFUN
|
#undef XMLPUBFUN
|
||||||
#undef XMLPUBVAR
|
#undef XMLPUBVAR
|
||||||
#undef XMLCALL
|
#undef XMLCALL
|
||||||
|
#undef XMLCDECL
|
||||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||||
#define XMLPUBFUN __declspec(dllexport)
|
#define XMLPUBFUN __declspec(dllexport)
|
||||||
#define XMLPUBVAR __declspec(dllexport)
|
#define XMLPUBVAR __declspec(dllexport)
|
||||||
@@ -59,7 +67,12 @@
|
|||||||
#define XMLPUBVAR extern
|
#define XMLPUBVAR extern
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define XMLCALL __cdecl
|
#if defined(LIBXML_FASTCALL)
|
||||||
|
#define XMLCALL __fastcall
|
||||||
|
#else
|
||||||
|
#define XMLCALL __cdecl
|
||||||
|
#endif
|
||||||
|
#define XMLCDECL __cdecl
|
||||||
#if !defined _REENTRANT
|
#if !defined _REENTRANT
|
||||||
#define _REENTRANT
|
#define _REENTRANT
|
||||||
#endif
|
#endif
|
||||||
@@ -70,6 +83,7 @@
|
|||||||
#undef XMLPUBFUN
|
#undef XMLPUBFUN
|
||||||
#undef XMLPUBVAR
|
#undef XMLPUBVAR
|
||||||
#undef XMLCALL
|
#undef XMLCALL
|
||||||
|
#undef XMLCDECL
|
||||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||||
#define XMLPUBFUN __declspec(dllexport)
|
#define XMLPUBFUN __declspec(dllexport)
|
||||||
#define XMLPUBVAR __declspec(dllexport) extern
|
#define XMLPUBVAR __declspec(dllexport) extern
|
||||||
@@ -82,6 +96,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define XMLCALL __cdecl
|
#define XMLCALL __cdecl
|
||||||
|
#define XMLCDECL __cdecl
|
||||||
#if !defined _REENTRANT
|
#if !defined _REENTRANT
|
||||||
#define _REENTRANT
|
#define _REENTRANT
|
||||||
#endif
|
#endif
|
||||||
@@ -92,6 +107,7 @@
|
|||||||
#undef XMLPUBFUN
|
#undef XMLPUBFUN
|
||||||
#undef XMLPUBVAR
|
#undef XMLPUBVAR
|
||||||
#undef XMLCALL
|
#undef XMLCALL
|
||||||
|
#undef XMLCDECL
|
||||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||||
#define XMLPUBFUN __declspec(dllexport)
|
#define XMLPUBFUN __declspec(dllexport)
|
||||||
#define XMLPUBVAR __declspec(dllexport)
|
#define XMLPUBVAR __declspec(dllexport)
|
||||||
@@ -104,6 +120,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define XMLCALL __cdecl
|
#define XMLCALL __cdecl
|
||||||
|
#define XMLCDECL __cdecl
|
||||||
#if !defined _REENTRANT
|
#if !defined _REENTRANT
|
||||||
#define _REENTRANT
|
#define _REENTRANT
|
||||||
#endif
|
#endif
|
||||||
@@ -114,6 +131,7 @@
|
|||||||
#undef XMLPUBFUN
|
#undef XMLPUBFUN
|
||||||
#undef XMLPUBVAR
|
#undef XMLPUBVAR
|
||||||
#undef XMLCALL
|
#undef XMLCALL
|
||||||
|
#undef XMLCDECL
|
||||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||||
#define XMLPUBFUN __declspec(dllexport)
|
#define XMLPUBFUN __declspec(dllexport)
|
||||||
#define XMLPUBVAR __declspec(dllexport)
|
#define XMLPUBVAR __declspec(dllexport)
|
||||||
@@ -126,6 +144,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define XMLCALL __cdecl
|
#define XMLCALL __cdecl
|
||||||
|
#define XMLCDECL __cdecl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compatibility */
|
/* Compatibility */
|
||||||
|
|||||||
@@ -88,14 +88,13 @@ typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The 4 interfaces used for all memory handling within libxml.
|
* The 4 interfaces used for all memory handling within libxml.
|
||||||
|
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMallocAtomic;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
|
||||||
|
LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
|
|
||||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
|
|
||||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
|
|
||||||
LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
|
|
||||||
LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The way to overload the existing functions.
|
* The way to overload the existing functions.
|
||||||
* The xmlGc function have an extra entry for atomic block
|
* The xmlGc function have an extra entry for atomic block
|
||||||
@@ -138,9 +137,9 @@ XMLPUBFUN void XMLCALL
|
|||||||
/*
|
/*
|
||||||
* These are specific to the XML debug memory wrapper.
|
* These are specific to the XML debug memory wrapper.
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN size_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlMemUsed (void);
|
xmlMemUsed (void);
|
||||||
XMLPUBFUN size_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlMemBlocks (void);
|
xmlMemBlocks (void);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlMemDisplay (FILE *fp);
|
xmlMemDisplay (FILE *fp);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <libxml/xmlIO.h>
|
#include <libxml/xmlIO.h>
|
||||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||||
#include <libxml/relaxng.h>
|
#include <libxml/relaxng.h>
|
||||||
|
#include <libxml/xmlschemas.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBXML_READER_ENABLED
|
#ifdef LIBXML_READER_ENABLED
|
||||||
@@ -120,10 +121,15 @@ XMLPUBFUN void XMLCALL
|
|||||||
*/
|
*/
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextReaderRead (xmlTextReaderPtr reader);
|
xmlTextReaderRead (xmlTextReaderPtr reader);
|
||||||
|
|
||||||
|
#ifdef LIBXML_WRITER_ENABLED
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
|
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
|
||||||
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
|
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
|
||||||
|
#endif
|
||||||
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
@@ -247,7 +253,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
||||||
|
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
@@ -275,6 +281,16 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
||||||
xmlRelaxNGPtr schema);
|
xmlRelaxNGPtr schema);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
||||||
|
const char *xsd);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
|
||||||
|
xmlSchemaValidCtxtPtr ctxt,
|
||||||
|
int options);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
|
||||||
|
xmlSchemaPtr schema);
|
||||||
#endif
|
#endif
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
||||||
@@ -285,7 +301,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Index lookup
|
* Index lookup
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN long XMLCALL
|
||||||
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -304,7 +320,7 @@ XMLPUBFUN xmlTextReaderPtr XMLCALL
|
|||||||
int options);
|
int options);
|
||||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||||
xmlReaderForMemory (const char *buffer,
|
xmlReaderForMemory (const char *buffer,
|
||||||
intptr_t size,
|
int size,
|
||||||
const char *URL,
|
const char *URL,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
int options);
|
int options);
|
||||||
@@ -338,7 +354,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
intptr_t size,
|
int size,
|
||||||
const char *URL,
|
const char *URL,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
int options);
|
int options);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
|
#include <libxml/dict.h>
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -99,6 +100,113 @@ XMLPUBFUN int XMLCALL
|
|||||||
int *nbneg,
|
int *nbneg,
|
||||||
xmlChar **values,
|
xmlChar **values,
|
||||||
int *terminal);
|
int *terminal);
|
||||||
|
#ifdef LIBXML_EXPR_ENABLED
|
||||||
|
/*
|
||||||
|
* Formal regular expression handling
|
||||||
|
* Its goal is to do some formal work on content models
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* expressions are used within a context */
|
||||||
|
typedef struct _xmlExpCtxt xmlExpCtxt;
|
||||||
|
typedef xmlExpCtxt *xmlExpCtxtPtr;
|
||||||
|
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
|
||||||
|
XMLPUBFUN xmlExpCtxtPtr XMLCALL
|
||||||
|
xmlExpNewCtxt (int maxNodes,
|
||||||
|
xmlDictPtr dict);
|
||||||
|
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
|
||||||
|
|
||||||
|
/* Expressions are trees but the tree is opaque */
|
||||||
|
typedef struct _xmlExpNode xmlExpNode;
|
||||||
|
typedef xmlExpNode *xmlExpNodePtr;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
XML_EXP_EMPTY = 0,
|
||||||
|
XML_EXP_FORBID = 1,
|
||||||
|
XML_EXP_ATOM = 2,
|
||||||
|
XML_EXP_SEQ = 3,
|
||||||
|
XML_EXP_OR = 4,
|
||||||
|
XML_EXP_COUNT = 5
|
||||||
|
} xmlExpNodeType;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 2 core expressions shared by all for the empty language set
|
||||||
|
* and for the set with just the empty token
|
||||||
|
*/
|
||||||
|
XMLPUBVAR xmlExpNodePtr forbiddenExp;
|
||||||
|
XMLPUBVAR xmlExpNodePtr emptyExp;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expressions are reference counted internally
|
||||||
|
*/
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlExpFree (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlExpRef (xmlExpNodePtr expr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* constructors can be either manual or from a string
|
||||||
|
*/
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpParse (xmlExpCtxtPtr ctxt,
|
||||||
|
const char *expr);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
|
||||||
|
const xmlChar *name,
|
||||||
|
int len);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpNewOr (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr left,
|
||||||
|
xmlExpNodePtr right);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr left,
|
||||||
|
xmlExpNodePtr right);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpNewRange (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr subset,
|
||||||
|
int min,
|
||||||
|
int max);
|
||||||
|
/*
|
||||||
|
* The really interesting APIs
|
||||||
|
*/
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpIsNillable(xmlExpNodePtr expr);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpMaxToken (xmlExpNodePtr expr);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr,
|
||||||
|
const xmlChar**langList,
|
||||||
|
int len);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpGetStart (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr,
|
||||||
|
const xmlChar**tokList,
|
||||||
|
int len);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr,
|
||||||
|
const xmlChar *str,
|
||||||
|
int len);
|
||||||
|
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||||
|
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr,
|
||||||
|
xmlExpNodePtr sub);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlExpSubsume (xmlExpCtxtPtr ctxt,
|
||||||
|
xmlExpNodePtr expr,
|
||||||
|
xmlExpNodePtr sub);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlExpDump (xmlBufferPtr buf,
|
||||||
|
xmlExpNodePtr expr);
|
||||||
|
#endif /* LIBXML_EXPR_ENABLED */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ extern "C" {
|
|||||||
* to the xmlSaveToFd() and similar calls.
|
* to the xmlSaveToFd() and similar calls.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
XML_SAVE_FORMAT = 1<<0 /* format save output */
|
XML_SAVE_FORMAT = 1<<0, /* format save output */
|
||||||
|
XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
|
||||||
|
XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
|
||||||
|
XML_SAVE_NO_XHTML = 1<<3 /* disable XHTML1 specific rules */
|
||||||
} xmlSaveOption;
|
} xmlSaveOption;
|
||||||
|
|
||||||
|
|
||||||
@@ -42,14 +45,12 @@ XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
|||||||
xmlSaveToFilename (const char *filename,
|
xmlSaveToFilename (const char *filename,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
int options);
|
int options);
|
||||||
/******
|
|
||||||
Not yet implemented.
|
|
||||||
|
|
||||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||||
xmlSaveToBuffer (xmlBufferPtr buffer,
|
xmlSaveToBuffer (xmlBufferPtr buffer,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
int options);
|
int options);
|
||||||
******/
|
|
||||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||||
xmlSaveToIO (xmlOutputWriteCallback iowrite,
|
xmlSaveToIO (xmlOutputWriteCallback iowrite,
|
||||||
xmlOutputCloseCallback ioclose,
|
xmlOutputCloseCallback ioclose,
|
||||||
@@ -64,9 +65,9 @@ XMLPUBFUN long XMLCALL
|
|||||||
xmlSaveTree (xmlSaveCtxtPtr ctxt,
|
xmlSaveTree (xmlSaveCtxtPtr ctxt,
|
||||||
xmlNodePtr node);
|
xmlNodePtr node);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
|
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveClose (xmlSaveCtxtPtr ctxt);
|
xmlSaveClose (xmlSaveCtxtPtr ctxt);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
|
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
|
||||||
|
|||||||
@@ -87,8 +87,8 @@ typedef xmlSchema *xmlSchemaPtr;
|
|||||||
/**
|
/**
|
||||||
* A schemas validation context
|
* A schemas validation context
|
||||||
*/
|
*/
|
||||||
typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
|
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
|
||||||
typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
|
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
|
||||||
|
|
||||||
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
|
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
|
||||||
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
|
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
|
||||||
@@ -113,11 +113,18 @@ XMLPUBFUN void XMLCALL
|
|||||||
xmlSchemaValidityErrorFunc err,
|
xmlSchemaValidityErrorFunc err,
|
||||||
xmlSchemaValidityWarningFunc warn,
|
xmlSchemaValidityWarningFunc warn,
|
||||||
void *ctx);
|
void *ctx);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror,
|
||||||
|
void *ctx);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
|
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||||
xmlSchemaValidityErrorFunc * err,
|
xmlSchemaValidityErrorFunc * err,
|
||||||
xmlSchemaValidityWarningFunc * warn,
|
xmlSchemaValidityWarningFunc * warn,
|
||||||
void **ctx);
|
void **ctx);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
|
||||||
|
|
||||||
XMLPUBFUN xmlSchemaPtr XMLCALL
|
XMLPUBFUN xmlSchemaPtr XMLCALL
|
||||||
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
|
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
@@ -135,6 +142,10 @@ XMLPUBFUN void XMLCALL
|
|||||||
xmlSchemaValidityErrorFunc err,
|
xmlSchemaValidityErrorFunc err,
|
||||||
xmlSchemaValidityWarningFunc warn,
|
xmlSchemaValidityWarningFunc warn,
|
||||||
void *ctx);
|
void *ctx);
|
||||||
|
XMLPUBFUN void XMLCALL
|
||||||
|
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror,
|
||||||
|
void *ctx);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
||||||
xmlSchemaValidityErrorFunc *err,
|
xmlSchemaValidityErrorFunc *err,
|
||||||
@@ -162,6 +173,23 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlCharEncoding enc,
|
xmlCharEncoding enc,
|
||||||
xmlSAXHandlerPtr sax,
|
xmlSAXHandlerPtr sax,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
|
||||||
|
const char * filename,
|
||||||
|
int options);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interface to insert Schemas SAX velidation in a SAX stream
|
||||||
|
*/
|
||||||
|
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
|
||||||
|
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
|
||||||
|
|
||||||
|
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
|
||||||
|
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
|
||||||
|
xmlSAXHandlerPtr *sax,
|
||||||
|
void **user_data);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -111,13 +111,28 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
|
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
|
||||||
const xmlChar **retValue);
|
const xmlChar **retValue);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
|
||||||
|
const xmlChar **retValue,
|
||||||
|
xmlSchemaWhitespaceValueType ws);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaValueAppend (xmlSchemaValPtr prev,
|
||||||
|
xmlSchemaValPtr cur);
|
||||||
|
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||||
|
xmlSchemaValueGetNext (xmlSchemaValPtr cur);
|
||||||
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
|
xmlSchemaValueGetAsString (xmlSchemaValPtr val);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
|
||||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||||
xmlSchemaNewStringValue (xmlSchemaValType type,
|
xmlSchemaNewStringValue (xmlSchemaValType type,
|
||||||
const xmlChar *value);
|
const xmlChar *value);
|
||||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||||
xmlSchemaNewNOTATIONValue (const xmlChar *name,
|
xmlSchemaNewNOTATIONValue (const xmlChar *name,
|
||||||
const xmlChar *ns);
|
const xmlChar *ns);
|
||||||
|
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||||
|
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
|
||||||
|
const xmlChar *localName);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
|
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
|
||||||
xmlSchemaWhitespaceValueType xws,
|
xmlSchemaWhitespaceValueType xws,
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ extern "C" {
|
|||||||
* It's unsigned allowing to pinpoint case where char * are assigned
|
* It's unsigned allowing to pinpoint case where char * are assigned
|
||||||
* to xmlChar * (possibly making serialization back impossible).
|
* to xmlChar * (possibly making serialization back impossible).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned char xmlChar;
|
typedef unsigned char xmlChar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,16 +41,16 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
xmlStrdup (const xmlChar *cur);
|
xmlStrdup (const xmlChar *cur);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStrndup (const xmlChar *cur,
|
xmlStrndup (const xmlChar *cur,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlCharStrndup (const char *cur,
|
xmlCharStrndup (const char *cur,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlCharStrdup (const char *cur);
|
xmlCharStrdup (const char *cur);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStrsub (const xmlChar *str,
|
xmlStrsub (const xmlChar *str,
|
||||||
intptr_t start,
|
int start,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlStrchr (const xmlChar *str,
|
xmlStrchr (const xmlChar *str,
|
||||||
xmlChar val);
|
xmlChar val);
|
||||||
@@ -61,28 +60,28 @@ XMLPUBFUN const xmlChar * XMLCALL
|
|||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlStrcasestr (const xmlChar *str,
|
xmlStrcasestr (const xmlChar *str,
|
||||||
xmlChar *val);
|
xmlChar *val);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrcmp (const xmlChar *str1,
|
xmlStrcmp (const xmlChar *str1,
|
||||||
const xmlChar *str2);
|
const xmlChar *str2);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrncmp (const xmlChar *str1,
|
xmlStrncmp (const xmlChar *str1,
|
||||||
const xmlChar *str2,
|
const xmlChar *str2,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrcasecmp (const xmlChar *str1,
|
xmlStrcasecmp (const xmlChar *str1,
|
||||||
const xmlChar *str2);
|
const xmlChar *str2);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrncasecmp (const xmlChar *str1,
|
xmlStrncasecmp (const xmlChar *str1,
|
||||||
const xmlChar *str2,
|
const xmlChar *str2,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrEqual (const xmlChar *str1,
|
xmlStrEqual (const xmlChar *str1,
|
||||||
const xmlChar *str2);
|
const xmlChar *str2);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrQEqual (const xmlChar *pref,
|
xmlStrQEqual (const xmlChar *pref,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *str);
|
const xmlChar *str);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrlen (const xmlChar *str);
|
xmlStrlen (const xmlChar *str);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStrcat (xmlChar *cur,
|
xmlStrcat (xmlChar *cur,
|
||||||
@@ -90,48 +89,48 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStrncat (xmlChar *cur,
|
xmlStrncat (xmlChar *cur,
|
||||||
const xmlChar *add,
|
const xmlChar *add,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlStrncatNew (const xmlChar *str1,
|
xmlStrncatNew (const xmlChar *str1,
|
||||||
const xmlChar *str2,
|
const xmlChar *str2,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrPrintf (xmlChar *buf,
|
xmlStrPrintf (xmlChar *buf,
|
||||||
intptr_t len,
|
int len,
|
||||||
const xmlChar *msg,
|
const xmlChar *msg,
|
||||||
...);
|
...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlStrVPrintf (xmlChar *buf,
|
xmlStrVPrintf (xmlChar *buf,
|
||||||
intptr_t len,
|
int len,
|
||||||
const xmlChar *msg,
|
const xmlChar *msg,
|
||||||
va_list ap);
|
va_list ap);
|
||||||
|
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlGetUTF8Char (const unsigned char *utf,
|
xmlGetUTF8Char (const unsigned char *utf,
|
||||||
intptr_t *len);
|
int *len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlCheckUTF8 (const unsigned char *utf);
|
xmlCheckUTF8 (const unsigned char *utf);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUTF8Strsize (const xmlChar *utf,
|
xmlUTF8Strsize (const xmlChar *utf,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlUTF8Strndup (const xmlChar *utf,
|
xmlUTF8Strndup (const xmlChar *utf,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN const xmlChar * XMLCALL
|
XMLPUBFUN const xmlChar * XMLCALL
|
||||||
xmlUTF8Strpos (const xmlChar *utf,
|
xmlUTF8Strpos (const xmlChar *utf,
|
||||||
intptr_t pos);
|
int pos);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUTF8Strloc (const xmlChar *utf,
|
xmlUTF8Strloc (const xmlChar *utf,
|
||||||
const xmlChar *utfchar);
|
const xmlChar *utfchar);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlUTF8Strsub (const xmlChar *utf,
|
xmlUTF8Strsub (const xmlChar *utf,
|
||||||
intptr_t start,
|
int start,
|
||||||
intptr_t len);
|
int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUTF8Strlen (const xmlChar *utf);
|
xmlUTF8Strlen (const xmlChar *utf);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUTF8Size (const xmlChar *utf);
|
xmlUTF8Size (const xmlChar *utf);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlUTF8Charcmp (const xmlChar *utf1,
|
xmlUTF8Charcmp (const xmlChar *utf1,
|
||||||
const xmlChar *utf2);
|
const xmlChar *utf2);
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
*
|
*
|
||||||
* This file is automatically generated from the
|
* This file is automatically generated from the
|
||||||
* UCS description files of the Unicode Character Database
|
* UCS description files of the Unicode Character Database
|
||||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1d5b.html
|
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||||
* using the genUnicode.py Python script.
|
* using the genUnicode.py Python script.
|
||||||
*
|
*
|
||||||
* Generation date: Mon Nov 10 22:35:10 2003
|
* Generation date: Mon Mar 27 11:09:52 2006
|
||||||
* Sources: Blocks-4.0.1d1b.txt UnicodeData-4.0.1d1b.txt
|
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||||
* Author: Daniel Veillard
|
* Author: Daniel Veillard
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* the version string like "1.2.3"
|
* the version string like "1.2.3"
|
||||||
*/
|
*/
|
||||||
#define LIBXML_DOTTED_VERSION "2.6.19"
|
#define LIBXML_DOTTED_VERSION "2.6.26"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_VERSION:
|
* LIBXML_VERSION:
|
||||||
*
|
*
|
||||||
* the version number: 1.2.3 value is 1002003
|
* the version number: 1.2.3 value is 1002003
|
||||||
*/
|
*/
|
||||||
#define LIBXML_VERSION 20619
|
#define LIBXML_VERSION 20626
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_VERSION_STRING:
|
* LIBXML_VERSION_STRING:
|
||||||
*
|
*
|
||||||
* the version number string, 1.2.3 value is "1002003"
|
* the version number string, 1.2.3 value is "1002003"
|
||||||
*/
|
*/
|
||||||
#define LIBXML_VERSION_STRING "20619"
|
#define LIBXML_VERSION_STRING "20626"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_VERSION_EXTRA:
|
* LIBXML_VERSION_EXTRA:
|
||||||
*
|
*
|
||||||
* extra version information, used to show a CVS compilation
|
* extra version information, used to show a CVS compilation
|
||||||
*/
|
*/
|
||||||
#define LIBXML_VERSION_EXTRA ""
|
#define LIBXML_VERSION_EXTRA "-CVS2798"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_TEST_VERSION:
|
* LIBXML_TEST_VERSION:
|
||||||
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
* Macro to check that the libxml version in use is compatible with
|
* Macro to check that the libxml version in use is compatible with
|
||||||
* the version the software has been compiled against
|
* the version the software has been compiled against
|
||||||
*/
|
*/
|
||||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20619);
|
#define LIBXML_TEST_VERSION xmlCheckVersion(20626);
|
||||||
|
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
#if 0
|
#if 0
|
||||||
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the thread support is configured in
|
* Whether the thread support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#if defined(_REENTRANT) || defined(__MT__) || (_POSIX_C_SOURCE - 0 >= 199506L)
|
#if defined(_REENTRANT) || defined(__MT__) || (_POSIX_C_SOURCE - 0 >= 199506L)
|
||||||
#define LIBXML_THREAD_ENABLED
|
#define LIBXML_THREAD_ENABLED
|
||||||
#endif
|
#endif
|
||||||
@@ -137,7 +137,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the xmlPattern node selection interface is configured in
|
* Whether the xmlPattern node selection interface is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_PATTERN_ENABLED
|
#define LIBXML_PATTERN_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the FTP support is configured in
|
* Whether the FTP support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_FTP_ENABLED
|
#define LIBXML_FTP_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the HTTP support is configured in
|
* Whether the HTTP support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_HTTP_ENABLED
|
#define LIBXML_HTTP_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the DTD validation support is configured in
|
* Whether the DTD validation support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_VALID_ENABLED
|
#define LIBXML_VALID_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the HTML support is configured in
|
* Whether the HTML support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_HTML_ENABLED
|
#define LIBXML_HTML_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the deprecated APIs are compiled in for compatibility
|
* Whether the deprecated APIs are compiled in for compatibility
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_LEGACY_ENABLED
|
#define LIBXML_LEGACY_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the Canonicalization support is configured in
|
* Whether the Canonicalization support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_C14N_ENABLED
|
#define LIBXML_C14N_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the Catalog support is configured in
|
* Whether the Catalog support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_CATALOG_ENABLED
|
#define LIBXML_CATALOG_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the SGML Docbook support is configured in
|
* Whether the SGML Docbook support is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_DOCB_ENABLED
|
#define LIBXML_DOCB_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -236,7 +236,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether XPath is configured in
|
* Whether XPath is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_XPATH_ENABLED
|
#define LIBXML_XPATH_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether XPointer is configured in
|
* Whether XPointer is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_XPTR_ENABLED
|
#define LIBXML_XPTR_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether XInclude is configured in
|
* Whether XInclude is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_XINCLUDE_ENABLED
|
#define LIBXML_XINCLUDE_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether iconv support is available
|
* Whether iconv support is available
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_ICONV_ENABLED
|
#define LIBXML_ICONV_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether ISO-8859-* support is made available in case iconv is not
|
* Whether ISO-8859-* support is made available in case iconv is not
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_ISO8859X_ENABLED
|
#define LIBXML_ISO8859X_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether Debugging module is configured in
|
* Whether Debugging module is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_DEBUG_ENABLED
|
#define LIBXML_DEBUG_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the memory debugging is configured in
|
* Whether the memory debugging is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define DEBUG_MEMORY_LOCATION
|
#define DEBUG_MEMORY_LOCATION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the runtime debugging is configured in
|
* Whether the runtime debugging is configured in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_DEBUG_RUNTIME
|
#define LIBXML_DEBUG_RUNTIME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the regular expressions interfaces are compiled in
|
* Whether the regular expressions interfaces are compiled in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_REGEXP_ENABLED
|
#define LIBXML_REGEXP_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -326,27 +326,50 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether the automata interfaces are compiled in
|
* Whether the automata interfaces are compiled in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_AUTOMATA_ENABLED
|
#define LIBXML_AUTOMATA_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LIBXML_EXPR_ENABLED:
|
||||||
|
*
|
||||||
|
* Whether the formal expressions interfaces are compiled in
|
||||||
|
*/
|
||||||
|
#if 1
|
||||||
|
#define LIBXML_EXPR_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_SCHEMAS_ENABLED:
|
* LIBXML_SCHEMAS_ENABLED:
|
||||||
*
|
*
|
||||||
* Whether the Schemas validation interfaces are compiled in
|
* Whether the Schemas validation interfaces are compiled in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_SCHEMAS_ENABLED
|
#define LIBXML_SCHEMAS_ENABLED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LIBXML_SCHEMATRON_ENABLED:
|
||||||
|
*
|
||||||
|
* Whether the Schematron validation interfaces are compiled in
|
||||||
|
*/
|
||||||
|
#if 1
|
||||||
|
#define LIBXML_SCHEMATRON_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_MODULES_ENABLED:
|
* LIBXML_MODULES_ENABLED:
|
||||||
*
|
*
|
||||||
* Whether the module interfaces are compiled in
|
* Whether the module interfaces are compiled in
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
#define LIBXML_MODULES_ENABLED
|
#define LIBXML_MODULES_ENABLED
|
||||||
#define LIBXML_MODULE_EXTENSION ".dll"
|
/**
|
||||||
|
* LIBXML_MODULE_EXTENSION:
|
||||||
|
*
|
||||||
|
* the string suffix used by dynamic modules (usually shared libraries)
|
||||||
|
*/
|
||||||
|
#define LIBXML_MODULE_EXTENSION ".so"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -53,28 +53,28 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Document
|
* Document
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
|
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
|
||||||
const char *version,
|
const char *version,
|
||||||
const char *encoding,
|
const char *encoding,
|
||||||
const char *standalone);
|
const char *standalone);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Comments
|
* Comments
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
content);
|
content);
|
||||||
@@ -82,51 +82,51 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Elements
|
* Elements
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartElement(xmlTextWriterPtr writer,
|
xmlTextWriterStartElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name);
|
const xmlChar * name);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
prefix,
|
prefix,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
namespaceURI);
|
namespaceURI);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Elements conveniency functions
|
* Elements conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
content);
|
content);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
|
||||||
const xmlChar * prefix,
|
const xmlChar * prefix,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * namespaceURI,
|
const xmlChar * namespaceURI,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
|
||||||
const xmlChar * prefix,
|
const xmlChar * prefix,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * namespaceURI,
|
const xmlChar * namespaceURI,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
prefix,
|
prefix,
|
||||||
@@ -139,44 +139,44 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Text
|
* Text
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
|
||||||
const char *format, va_list argptr);
|
const char *format, va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
|
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
|
||||||
const xmlChar * content, intptr_t len);
|
const xmlChar * content, int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
|
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
|
||||||
const xmlChar * content);
|
const xmlChar * content);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const char
|
const char
|
||||||
*format, ...);
|
*format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const char
|
const char
|
||||||
*format,
|
*format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
content);
|
content);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
|
||||||
const char *data,
|
const char *data,
|
||||||
intptr_t start, intptr_t len);
|
int start, int len);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
|
||||||
const char *data,
|
const char *data,
|
||||||
intptr_t start, intptr_t len);
|
int start, int len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Attributes
|
* Attributes
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
|
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name);
|
const xmlChar * name);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
prefix,
|
prefix,
|
||||||
@@ -184,40 +184,40 @@ extern "C" {
|
|||||||
name,
|
name,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
namespaceURI);
|
namespaceURI);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Attributes conveniency functions
|
* Attributes conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
content);
|
content);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
|
||||||
const xmlChar * prefix,
|
const xmlChar * prefix,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * namespaceURI,
|
const xmlChar * namespaceURI,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
|
||||||
const xmlChar * prefix,
|
const xmlChar * prefix,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * namespaceURI,
|
const xmlChar * namespaceURI,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
prefix,
|
prefix,
|
||||||
@@ -231,23 +231,23 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* PI's
|
* PI's
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartPI(xmlTextWriterPtr writer,
|
xmlTextWriterStartPI(xmlTextWriterPtr writer,
|
||||||
const xmlChar * target);
|
const xmlChar * target);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PI conveniency functions
|
* PI conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
|
||||||
const xmlChar * target,
|
const xmlChar * target,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
|
||||||
const xmlChar * target,
|
const xmlChar * target,
|
||||||
const char *format, va_list argptr);
|
const char *format, va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWritePI(xmlTextWriterPtr writer,
|
xmlTextWriterWritePI(xmlTextWriterPtr writer,
|
||||||
const xmlChar * target,
|
const xmlChar * target,
|
||||||
const xmlChar * content);
|
const xmlChar * content);
|
||||||
@@ -262,48 +262,48 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* CDATA
|
* CDATA
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CDATA conveniency functions
|
* CDATA conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
|
||||||
const char *format, va_list argptr);
|
const char *format, va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
|
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
|
||||||
const xmlChar * content);
|
const xmlChar * content);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTD
|
* DTD
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
|
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
const xmlChar * sysid);
|
const xmlChar * sysid);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTD conveniency functions
|
* DTD conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
const xmlChar * sysid,
|
const xmlChar * sysid,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
const xmlChar * sysid,
|
const xmlChar * sysid,
|
||||||
const char *format, va_list argptr);
|
const char *format, va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
|
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
@@ -320,25 +320,25 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* DTD element definition
|
* DTD element definition
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
|
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name);
|
const xmlChar * name);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTD element definition conveniency functions
|
* DTD element definition conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
name,
|
name,
|
||||||
@@ -348,25 +348,25 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* DTD attribute list definition
|
* DTD attribute list definition
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
|
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name);
|
const xmlChar * name);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTD attribute list definition conveniency functions
|
* DTD attribute list definition conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
name,
|
name,
|
||||||
@@ -376,47 +376,47 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* DTD entity definition
|
* DTD entity definition
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
|
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
|
||||||
intptr_t pe, const xmlChar * name);
|
int pe, const xmlChar * name);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
|
||||||
writer);
|
writer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DTD entity definition conveniency functions
|
* DTD entity definition conveniency functions
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||||
intptr_t pe,
|
int pe,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format, ...);
|
const char *format, ...);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||||
intptr_t pe,
|
int pe,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const char *format,
|
const char *format,
|
||||||
va_list argptr);
|
va_list argptr);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
|
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
|
||||||
intptr_t pe,
|
int pe,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * content);
|
const xmlChar * content);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
|
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
|
||||||
intptr_t pe,
|
int pe,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
const xmlChar * sysid,
|
const xmlChar * sysid,
|
||||||
const xmlChar * ndataid);
|
const xmlChar * ndataid);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
|
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
|
||||||
writer,
|
writer,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
const xmlChar * sysid,
|
const xmlChar * sysid,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
ndataid);
|
ndataid);
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
|
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
|
||||||
writer, intptr_t pe,
|
writer, int pe,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
pubid,
|
pubid,
|
||||||
@@ -430,7 +430,7 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* DTD notation definition
|
* DTD notation definition
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
|
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
|
||||||
const xmlChar * name,
|
const xmlChar * name,
|
||||||
const xmlChar * pubid,
|
const xmlChar * pubid,
|
||||||
@@ -439,16 +439,16 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Indentation
|
* Indentation
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterSetIndent(xmlTextWriterPtr writer, intptr_t indent);
|
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
|
||||||
XMLPUBFUN intptr_t XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
|
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
|
||||||
const xmlChar * str);
|
const xmlChar * str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* misc
|
* misc
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN intptr_t XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
|
XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ extern "C" {
|
|||||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_XPATH_ENABLED
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
|
|
||||||
typedef struct _xmlXPathContext xmlXPathContext;
|
typedef struct _xmlXPathContext xmlXPathContext;
|
||||||
typedef xmlXPathContext *xmlXPathContextPtr;
|
typedef xmlXPathContext *xmlXPathContextPtr;
|
||||||
typedef struct _xmlXPathParserContext xmlXPathParserContext;
|
typedef struct _xmlXPathParserContext xmlXPathParserContext;
|
||||||
@@ -248,6 +249,23 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
|
|||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *ns_uri);
|
const xmlChar *ns_uri);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlXPathFlags:
|
||||||
|
* Flags for XPath engine compilation and runtime
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* XML_XPATH_CHECKNS:
|
||||||
|
*
|
||||||
|
* check namespaces at compilation
|
||||||
|
*/
|
||||||
|
#define XML_XPATH_CHECKNS (1<<0)
|
||||||
|
/**
|
||||||
|
* XML_XPATH_NOVAR:
|
||||||
|
*
|
||||||
|
* forbid variables in expression
|
||||||
|
*/
|
||||||
|
#define XML_XPATH_NOVAR (1<<1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlXPathContext:
|
* xmlXPathContext:
|
||||||
*
|
*
|
||||||
@@ -324,6 +342,10 @@ struct _xmlXPathContext {
|
|||||||
|
|
||||||
/* dictionnary */
|
/* dictionnary */
|
||||||
xmlDictPtr dict; /* dictionnary if any */
|
xmlDictPtr dict; /* dictionnary if any */
|
||||||
|
|
||||||
|
int flags; /* flags to control compilation */
|
||||||
|
/* Cache for reusal of XPath objects */
|
||||||
|
void *cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -468,7 +490,11 @@ XMLPUBFUN xmlXPathContextPtr XMLCALL
|
|||||||
xmlXPathNewContext (xmlDocPtr doc);
|
xmlXPathNewContext (xmlDocPtr doc);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
|
||||||
|
int active,
|
||||||
|
int value,
|
||||||
|
int options);
|
||||||
/**
|
/**
|
||||||
* Evaluation functions.
|
* Evaluation functions.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -84,10 +84,12 @@ static int isnan (double d) {
|
|||||||
#endif
|
#endif
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER)
|
||||||
#define mkdir(p,m) _mkdir(p)
|
#define mkdir(p,m) _mkdir(p)
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
|
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
#define mkdir(p,m) _mkdir(p)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Threading API to use should be specified here for compatibility reasons.
|
/* Threading API to use should be specified here for compatibility reasons.
|
||||||
|
|||||||
@@ -7,11 +7,29 @@
|
|||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#elif defined (WIN32)
|
#else
|
||||||
#undef HAVE_ERRNO_H
|
#undef HAVE_ERRNO_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#elif defined (LINUX)
|
|
||||||
#include <sys/socket.h>
|
/* the following is a workaround a problem for 'inline' keyword in said
|
||||||
|
header when compiled with Borland C++ 6 */
|
||||||
|
#if defined(__BORLANDC__) && !defined(__cplusplus)
|
||||||
|
#define inline __inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
|
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
|
||||||
|
#if defined(GetAddrInfo)
|
||||||
|
#define HAVE_GETADDRINFO
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
/* Include <errno.h> here to ensure that it doesn't get included later
|
||||||
|
* (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
|
||||||
|
#include <errno.h>
|
||||||
|
#undef EWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined SOCKLEN_T
|
#if !defined SOCKLEN_T
|
||||||
|
|||||||
@@ -673,7 +673,6 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
|||||||
*
|
*
|
||||||
* Creation of a Namespace, the old way using PI and without scoping
|
* Creation of a Namespace, the old way using PI and without scoping
|
||||||
* DEPRECATED !!!
|
* DEPRECATED !!!
|
||||||
* It now create a namespace on the root element of the document if found.
|
|
||||||
* Returns NULL this functionality had been removed
|
* Returns NULL this functionality had been removed
|
||||||
*/
|
*/
|
||||||
xmlNsPtr
|
xmlNsPtr
|
||||||
|
|||||||
@@ -19,10 +19,17 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(macintosh)
|
#if defined(macintosh)
|
||||||
#include "config-mac.h"
|
#include "config-mac.h"
|
||||||
#else
|
#else
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <libxml/xmlversion.h>
|
#include <libxml/xmlversion.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__Lynx__)
|
||||||
|
#include <stdio.h> /* pull definition of size_t */
|
||||||
|
#include <varargs.h>
|
||||||
|
int snprintf(char *, size_t, const char *, ...);
|
||||||
|
int vfprintf(FILE *, const char *, va_list);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WITH_TRIO
|
#ifndef WITH_TRIO
|
||||||
@@ -49,6 +56,14 @@ extern int __xmlRegisterCallbacks;
|
|||||||
*/
|
*/
|
||||||
void __xmlIOErr(int domain, int code, const char *extra);
|
void __xmlIOErr(int domain, int code, const char *extra);
|
||||||
void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
|
void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
|
||||||
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
|
/*
|
||||||
|
* internal function of HTML parser needed for xmlParseInNodeContext
|
||||||
|
* but not part of the API
|
||||||
|
*/
|
||||||
|
void __htmlParseContent(void *ctx);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef IN_LIBXML
|
#ifdef IN_LIBXML
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
|||||||
@@ -94,9 +94,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#define SOCKET int
|
#define SOCKET int
|
||||||
#endif
|
#endif
|
||||||
#if defined(VMS) || defined(__VMS)
|
|
||||||
#define XML_SOCKLEN_T unsigned int
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
#ifndef PF_INET
|
#ifndef PF_INET
|
||||||
@@ -108,10 +105,14 @@
|
|||||||
#define ss_family __ss_family
|
#define ss_family __ss_family
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef XML_SOCKLEN_T
|
||||||
|
#define XML_SOCKLEN_T unsigned int
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FTP_COMMAND_OK 200
|
#define FTP_COMMAND_OK 200
|
||||||
#define FTP_SYNTAX_ERROR 500
|
#define FTP_SYNTAX_ERROR 500
|
||||||
#define FTP_GET_PASSWD 331
|
#define FTP_GET_PASSWD 331
|
||||||
#define FTP_BUF_SIZE 512
|
#define FTP_BUF_SIZE 1024
|
||||||
|
|
||||||
#define XML_NANO_MAX_URLBUF 4096
|
#define XML_NANO_MAX_URLBUF 4096
|
||||||
|
|
||||||
@@ -315,7 +316,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
|
|||||||
}
|
}
|
||||||
if (URL == NULL) return;
|
if (URL == NULL) return;
|
||||||
|
|
||||||
uri = xmlParseURI(URL);
|
uri = xmlParseURIRaw(URL, 1);
|
||||||
if (uri == NULL)
|
if (uri == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -376,7 +377,7 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
|
|||||||
if (ctxt->hostname == NULL)
|
if (ctxt->hostname == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
uri = xmlParseURI(URL);
|
uri = xmlParseURIRaw(URL, 1);
|
||||||
if (uri == NULL)
|
if (uri == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
||||||
@@ -439,7 +440,7 @@ xmlNanoFTPScanProxy(const char *URL) {
|
|||||||
#endif
|
#endif
|
||||||
if (URL == NULL) return;
|
if (URL == NULL) return;
|
||||||
|
|
||||||
uri = xmlParseURI(URL);
|
uri = xmlParseURIRaw(URL, 1);
|
||||||
if ((uri == NULL) || (uri->scheme == NULL) ||
|
if ((uri == NULL) || (uri->scheme == NULL) ||
|
||||||
(strcmp(uri->scheme, "ftp")) || (uri->server == NULL)) {
|
(strcmp(uri->scheme, "ftp")) || (uri->server == NULL)) {
|
||||||
__xmlIOErr(XML_FROM_FTP, XML_FTP_URL_SYNTAX, "Syntax Error\n");
|
__xmlIOErr(XML_FROM_FTP, XML_FTP_URL_SYNTAX, "Syntax Error\n");
|
||||||
@@ -943,7 +944,7 @@ xmlNanoFTPConnect(void *ctx) {
|
|||||||
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_family = AF_INET;
|
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_family = AF_INET;
|
||||||
memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
|
memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
|
||||||
hp->h_addr_list[0], hp->h_length);
|
hp->h_addr_list[0], hp->h_length);
|
||||||
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port = htons (port);
|
((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port = (u_short)htons ((unsigned short)port);
|
||||||
ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
|
ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
|
||||||
addrlen = sizeof (struct sockaddr_in);
|
addrlen = sizeof (struct sockaddr_in);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
* daniel@veillard.com
|
* daniel@veillard.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* TODO add compression support, Send the Accept- , and decompress on the
|
|
||||||
fly with ZLIB if found at compile-time */
|
|
||||||
|
|
||||||
#define NEED_SOCKETS
|
#define NEED_SOCKETS
|
||||||
#define IN_LIBXML
|
#define IN_LIBXML
|
||||||
#include "libxml.h"
|
#include "libxml.h"
|
||||||
@@ -66,6 +63,10 @@
|
|||||||
#ifdef SUPPORT_IP6
|
#ifdef SUPPORT_IP6
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
#include <zlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
#include <stropts>
|
#include <stropts>
|
||||||
@@ -134,6 +135,7 @@ typedef struct xmlNanoHTTPCtxt {
|
|||||||
char *hostname; /* the host name */
|
char *hostname; /* the host name */
|
||||||
int port; /* the port */
|
int port; /* the port */
|
||||||
char *path; /* the path within the URL */
|
char *path; /* the path within the URL */
|
||||||
|
char *query; /* the query string */
|
||||||
SOCKET fd; /* the file descriptor for the socket */
|
SOCKET fd; /* the file descriptor for the socket */
|
||||||
int state; /* WRITE / READ / CLOSED */
|
int state; /* WRITE / READ / CLOSED */
|
||||||
char *out; /* buffer sent (zero terminated) */
|
char *out; /* buffer sent (zero terminated) */
|
||||||
@@ -151,6 +153,10 @@ typedef struct xmlNanoHTTPCtxt {
|
|||||||
char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */
|
char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */
|
||||||
char *encoding; /* encoding extracted from the contentType */
|
char *encoding; /* encoding extracted from the contentType */
|
||||||
char *mimeType; /* Mime-Type extracted from the contentType */
|
char *mimeType; /* Mime-Type extracted from the contentType */
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
z_stream *strm; /* Zlib stream object */
|
||||||
|
int usesGzip; /* "Content-Encoding: gzip" was detected */
|
||||||
|
#endif
|
||||||
} xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr;
|
} xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr;
|
||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
@@ -247,8 +253,10 @@ done:
|
|||||||
|
|
||||||
void
|
void
|
||||||
xmlNanoHTTPCleanup(void) {
|
xmlNanoHTTPCleanup(void) {
|
||||||
if (proxy != NULL)
|
if (proxy != NULL) {
|
||||||
xmlFree(proxy);
|
xmlFree(proxy);
|
||||||
|
proxy = NULL;
|
||||||
|
}
|
||||||
#ifdef _WINSOCKAPI_
|
#ifdef _WINSOCKAPI_
|
||||||
if (initialized)
|
if (initialized)
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
@@ -284,9 +292,13 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
|
|||||||
xmlFree(ctxt->path);
|
xmlFree(ctxt->path);
|
||||||
ctxt->path = NULL;
|
ctxt->path = NULL;
|
||||||
}
|
}
|
||||||
|
if (ctxt->query != NULL) {
|
||||||
|
xmlFree(ctxt->query);
|
||||||
|
ctxt->query = NULL;
|
||||||
|
}
|
||||||
if (URL == NULL) return;
|
if (URL == NULL) return;
|
||||||
|
|
||||||
uri = xmlParseURI(URL);
|
uri = xmlParseURIRaw(URL, 1);
|
||||||
if (uri == NULL)
|
if (uri == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -301,6 +313,8 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
|
|||||||
ctxt->path = xmlMemStrdup(uri->path);
|
ctxt->path = xmlMemStrdup(uri->path);
|
||||||
else
|
else
|
||||||
ctxt->path = xmlMemStrdup("/");
|
ctxt->path = xmlMemStrdup("/");
|
||||||
|
if (uri->query != NULL)
|
||||||
|
ctxt->query = xmlMemStrdup(uri->query);
|
||||||
if (uri->port != 0)
|
if (uri->port != 0)
|
||||||
ctxt->port = uri->port;
|
ctxt->port = uri->port;
|
||||||
|
|
||||||
@@ -337,7 +351,7 @@ xmlNanoHTTPScanProxy(const char *URL) {
|
|||||||
#endif
|
#endif
|
||||||
if (URL == NULL) return;
|
if (URL == NULL) return;
|
||||||
|
|
||||||
uri = xmlParseURI(URL);
|
uri = xmlParseURIRaw(URL, 1);
|
||||||
if ((uri == NULL) || (uri->scheme == NULL) ||
|
if ((uri == NULL) || (uri->scheme == NULL) ||
|
||||||
(strcmp(uri->scheme, "http")) || (uri->server == NULL)) {
|
(strcmp(uri->scheme, "http")) || (uri->server == NULL)) {
|
||||||
__xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Syntax Error\n");
|
__xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Syntax Error\n");
|
||||||
@@ -396,6 +410,7 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) {
|
|||||||
if (ctxt->hostname != NULL) xmlFree(ctxt->hostname);
|
if (ctxt->hostname != NULL) xmlFree(ctxt->hostname);
|
||||||
if (ctxt->protocol != NULL) xmlFree(ctxt->protocol);
|
if (ctxt->protocol != NULL) xmlFree(ctxt->protocol);
|
||||||
if (ctxt->path != NULL) xmlFree(ctxt->path);
|
if (ctxt->path != NULL) xmlFree(ctxt->path);
|
||||||
|
if (ctxt->query != NULL) xmlFree(ctxt->query);
|
||||||
if (ctxt->out != NULL) xmlFree(ctxt->out);
|
if (ctxt->out != NULL) xmlFree(ctxt->out);
|
||||||
if (ctxt->in != NULL) xmlFree(ctxt->in);
|
if (ctxt->in != NULL) xmlFree(ctxt->in);
|
||||||
if (ctxt->contentType != NULL) xmlFree(ctxt->contentType);
|
if (ctxt->contentType != NULL) xmlFree(ctxt->contentType);
|
||||||
@@ -403,6 +418,13 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) {
|
|||||||
if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
|
if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
|
||||||
if (ctxt->location != NULL) xmlFree(ctxt->location);
|
if (ctxt->location != NULL) xmlFree(ctxt->location);
|
||||||
if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader);
|
if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader);
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
if (ctxt->strm != NULL) {
|
||||||
|
inflateEnd(ctxt->strm);
|
||||||
|
xmlFree(ctxt->strm);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ctxt->state = XML_NANO_HTTP_NONE;
|
ctxt->state = XML_NANO_HTTP_NONE;
|
||||||
if (ctxt->fd >= 0) closesocket(ctxt->fd);
|
if (ctxt->fd >= 0) closesocket(ctxt->fd);
|
||||||
ctxt->fd = -1;
|
ctxt->fd = -1;
|
||||||
@@ -452,7 +474,14 @@ xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char * xmt_ptr, int outlen) {
|
|||||||
tv.tv_sec = timeout;
|
tv.tv_sec = timeout;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
FD_ZERO( &wfd );
|
FD_ZERO( &wfd );
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4018)
|
||||||
|
#endif
|
||||||
FD_SET( ctxt->fd, &wfd );
|
FD_SET( ctxt->fd, &wfd );
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
(void)select( ctxt->fd + 1, NULL, &wfd, NULL, &tv );
|
(void)select( ctxt->fd + 1, NULL, &wfd, NULL, &tv );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,7 +574,14 @@ xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) {
|
|||||||
tv.tv_sec = timeout;
|
tv.tv_sec = timeout;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
FD_ZERO(&rfd);
|
FD_ZERO(&rfd);
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4018)
|
||||||
|
#endif
|
||||||
FD_SET(ctxt->fd, &rfd);
|
FD_SET(ctxt->fd, &rfd);
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1)
|
if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1)
|
||||||
#if defined(EINTR)
|
#if defined(EINTR)
|
||||||
@@ -728,6 +764,26 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
|
|||||||
if (ctxt->authHeader != NULL)
|
if (ctxt->authHeader != NULL)
|
||||||
xmlFree(ctxt->authHeader);
|
xmlFree(ctxt->authHeader);
|
||||||
ctxt->authHeader = xmlMemStrdup(cur);
|
ctxt->authHeader = xmlMemStrdup(cur);
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
} else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Encoding:", 17) ) {
|
||||||
|
cur += 17;
|
||||||
|
while ((*cur == ' ') || (*cur == '\t')) cur++;
|
||||||
|
if ( !xmlStrncasecmp( BAD_CAST cur, BAD_CAST"gzip", 4) ) {
|
||||||
|
ctxt->usesGzip = 1;
|
||||||
|
|
||||||
|
ctxt->strm = xmlMalloc(sizeof(z_stream));
|
||||||
|
|
||||||
|
if (ctxt->strm != NULL) {
|
||||||
|
ctxt->strm->zalloc = Z_NULL;
|
||||||
|
ctxt->strm->zfree = Z_NULL;
|
||||||
|
ctxt->strm->opaque = Z_NULL;
|
||||||
|
ctxt->strm->avail_in = 0;
|
||||||
|
ctxt->strm->next_in = Z_NULL;
|
||||||
|
|
||||||
|
inflateInit2( ctxt->strm, 31 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) {
|
} else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) {
|
||||||
cur += 15;
|
cur += 15;
|
||||||
ctxt->ContentLength = strtol( cur, NULL, 10 );
|
ctxt->ContentLength = strtol( cur, NULL, 10 );
|
||||||
@@ -832,6 +888,10 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
|
|||||||
tv.tv_sec = timeout;
|
tv.tv_sec = timeout;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4018)
|
||||||
|
#endif
|
||||||
FD_ZERO(&wfd);
|
FD_ZERO(&wfd);
|
||||||
FD_SET(s, &wfd);
|
FD_SET(s, &wfd);
|
||||||
|
|
||||||
@@ -842,6 +902,9 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
|
|||||||
switch(select(s+1, NULL, &wfd, &xfd, &tv))
|
switch(select(s+1, NULL, &wfd, &xfd, &tv))
|
||||||
#else
|
#else
|
||||||
switch(select(s+1, NULL, &wfd, NULL, &tv))
|
switch(select(s+1, NULL, &wfd, NULL, &tv))
|
||||||
|
#endif
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -915,14 +978,21 @@ xmlNanoHTTPConnectHost(const char *host, int port)
|
|||||||
memset (&sockin, 0, sizeof(sockin));
|
memset (&sockin, 0, sizeof(sockin));
|
||||||
#ifdef SUPPORT_IP6
|
#ifdef SUPPORT_IP6
|
||||||
memset (&sockin6, 0, sizeof(sockin6));
|
memset (&sockin6, 0, sizeof(sockin6));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6)
|
||||||
if (have_ipv6 ())
|
if (have_ipv6 ())
|
||||||
#if !defined(HAVE_GETADDRINFO) && defined(RES_USE_INET6)
|
|
||||||
{
|
{
|
||||||
if (!(_res.options & RES_INIT))
|
if (!(_res.options & RES_INIT))
|
||||||
res_init();
|
res_init();
|
||||||
_res.options |= RES_USE_INET6;
|
_res.options |= RES_USE_INET6;
|
||||||
}
|
}
|
||||||
#elif defined(HAVE_GETADDRINFO)
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
|
||||||
|
if (have_ipv6 ())
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32))
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
struct addrinfo hints, *res, *result;
|
struct addrinfo hints, *res, *result;
|
||||||
@@ -938,41 +1008,44 @@ xmlNanoHTTPConnectHost(const char *host, int port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (res = result; res; res = res->ai_next) {
|
for (res = result; res; res = res->ai_next) {
|
||||||
if (res->ai_family == AF_INET || res->ai_family == AF_INET6) {
|
if (res->ai_family == AF_INET) {
|
||||||
if (res->ai_family == AF_INET6) {
|
if (res->ai_addrlen > sizeof(sockin)) {
|
||||||
if (res->ai_addrlen > sizeof(sockin6)) {
|
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
|
||||||
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
|
|
||||||
freeaddrinfo (result);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
memcpy (&sockin6, res->ai_addr, res->ai_addrlen);
|
|
||||||
sockin6.sin6_port = htons (port);
|
|
||||||
addr = (struct sockaddr *)&sockin6;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (res->ai_addrlen > sizeof(sockin)) {
|
|
||||||
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
|
|
||||||
freeaddrinfo (result);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
memcpy (&sockin, res->ai_addr, res->ai_addrlen);
|
|
||||||
sockin.sin_port = htons (port);
|
|
||||||
addr = (struct sockaddr *)&sockin;
|
|
||||||
}
|
|
||||||
|
|
||||||
s = xmlNanoHTTPConnectAttempt (addr);
|
|
||||||
if (s != -1) {
|
|
||||||
freeaddrinfo (result);
|
freeaddrinfo (result);
|
||||||
return (s);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
memcpy (&sockin, res->ai_addr, res->ai_addrlen);
|
||||||
|
sockin.sin_port = htons (port);
|
||||||
|
addr = (struct sockaddr *)&sockin;
|
||||||
|
#ifdef SUPPORT_IP6
|
||||||
|
} else if (have_ipv6 () && (res->ai_family == AF_INET6)) {
|
||||||
|
if (res->ai_addrlen > sizeof(sockin6)) {
|
||||||
|
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
|
||||||
|
freeaddrinfo (result);
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
memcpy (&sockin6, res->ai_addr, res->ai_addrlen);
|
||||||
|
sockin6.sin6_port = htons (port);
|
||||||
|
addr = (struct sockaddr *)&sockin6;
|
||||||
|
#endif
|
||||||
|
} else
|
||||||
|
continue; /* for */
|
||||||
|
|
||||||
|
s = xmlNanoHTTPConnectAttempt (addr);
|
||||||
|
if (s != -1) {
|
||||||
|
freeaddrinfo (result);
|
||||||
|
return (s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
freeaddrinfo (result);
|
freeaddrinfo (result);
|
||||||
return (-1);
|
}
|
||||||
} else
|
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
|
||||||
{
|
{
|
||||||
h = gethostbyname (host);
|
h = gethostbyname (host);
|
||||||
if (h == NULL) {
|
if (h == NULL) {
|
||||||
@@ -1026,7 +1099,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
|
|||||||
memcpy (&ia, h->h_addr_list[i], h->h_length);
|
memcpy (&ia, h->h_addr_list[i], h->h_length);
|
||||||
sockin.sin_family = h->h_addrtype;
|
sockin.sin_family = h->h_addrtype;
|
||||||
sockin.sin_addr = ia;
|
sockin.sin_addr = ia;
|
||||||
sockin.sin_port = htons (port);
|
sockin.sin_port = (u_short)htons ((unsigned short)port);
|
||||||
addr = (struct sockaddr *) &sockin;
|
addr = (struct sockaddr *) &sockin;
|
||||||
#ifdef SUPPORT_IP6
|
#ifdef SUPPORT_IP6
|
||||||
} else if (have_ipv6 () && (h->h_addrtype == AF_INET6)) {
|
} else if (have_ipv6 () && (h->h_addrtype == AF_INET6)) {
|
||||||
@@ -1049,6 +1122,8 @@ xmlNanoHTTPConnectHost(const char *host, int port)
|
|||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_HTTP
|
#ifdef DEBUG_HTTP
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlNanoHTTPConnectHost: unable to connect to '%s'.\n",
|
"xmlNanoHTTPConnectHost: unable to connect to '%s'.\n",
|
||||||
@@ -1113,11 +1188,38 @@ xmlNanoHTTPOpenRedir(const char *URL, char **contentType, char **redir) {
|
|||||||
int
|
int
|
||||||
xmlNanoHTTPRead(void *ctx, void *dest, int len) {
|
xmlNanoHTTPRead(void *ctx, void *dest, int len) {
|
||||||
xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
|
xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
int bytes_read = 0;
|
||||||
|
int orig_avail_in;
|
||||||
|
int z_ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ctx == NULL) return(-1);
|
if (ctx == NULL) return(-1);
|
||||||
if (dest == NULL) return(-1);
|
if (dest == NULL) return(-1);
|
||||||
if (len <= 0) return(0);
|
if (len <= 0) return(0);
|
||||||
|
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
if (ctxt->usesGzip == 1) {
|
||||||
|
if (ctxt->strm == NULL) return(0);
|
||||||
|
|
||||||
|
ctxt->strm->next_out = dest;
|
||||||
|
ctxt->strm->avail_out = len;
|
||||||
|
|
||||||
|
do {
|
||||||
|
orig_avail_in = ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr - bytes_read;
|
||||||
|
ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read);
|
||||||
|
|
||||||
|
z_ret = inflate(ctxt->strm, Z_NO_FLUSH);
|
||||||
|
bytes_read += orig_avail_in - ctxt->strm->avail_in;
|
||||||
|
|
||||||
|
if (z_ret != Z_OK) break;
|
||||||
|
} while (ctxt->strm->avail_out > 0 && xmlNanoHTTPRecv(ctxt) > 0);
|
||||||
|
|
||||||
|
ctxt->inrptr += bytes_read;
|
||||||
|
return(len - ctxt->strm->avail_out);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
while (ctxt->inptr - ctxt->inrptr < len) {
|
while (ctxt->inptr - ctxt->inrptr < len) {
|
||||||
if (xmlNanoHTTPRecv(ctxt) <= 0) break;
|
if (xmlNanoHTTPRecv(ctxt) <= 0) break;
|
||||||
}
|
}
|
||||||
@@ -1229,7 +1331,12 @@ retry:
|
|||||||
blen += strlen(headers) + 2;
|
blen += strlen(headers) + 2;
|
||||||
if (contentType && *contentType)
|
if (contentType && *contentType)
|
||||||
blen += strlen(*contentType) + 16;
|
blen += strlen(*contentType) + 16;
|
||||||
|
if (ctxt->query != NULL)
|
||||||
|
blen += strlen(ctxt->query) + 1;
|
||||||
blen += strlen(method) + strlen(ctxt->path) + 24;
|
blen += strlen(method) + strlen(ctxt->path) + 24;
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
blen += 23;
|
||||||
|
#endif
|
||||||
bp = (char*)xmlMallocAtomic(blen);
|
bp = (char*)xmlMallocAtomic(blen);
|
||||||
if ( bp == NULL ) {
|
if ( bp == NULL ) {
|
||||||
xmlNanoHTTPFreeCtxt( ctxt );
|
xmlNanoHTTPFreeCtxt( ctxt );
|
||||||
@@ -1252,9 +1359,16 @@ retry:
|
|||||||
else
|
else
|
||||||
p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
|
p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
|
||||||
|
|
||||||
|
if (ctxt->query != NULL)
|
||||||
|
p += snprintf( p, blen - (p - bp), "?%s", ctxt->query);
|
||||||
|
|
||||||
p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
|
p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
|
||||||
ctxt->hostname);
|
ctxt->hostname);
|
||||||
|
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
|
p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (contentType != NULL && *contentType)
|
if (contentType != NULL && *contentType)
|
||||||
p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
|
p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -211,7 +211,7 @@ xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIsLetter:
|
* xmlIsLetter:
|
||||||
* @c: an Unicode character (int)
|
* @c: an unicode character (int)
|
||||||
*
|
*
|
||||||
* Check whether the character is allowed by the production
|
* Check whether the character is allowed by the production
|
||||||
* [84] Letter ::= BaseChar | Ideographic
|
* [84] Letter ::= BaseChar | Ideographic
|
||||||
@@ -275,11 +275,11 @@ void check_buffer(xmlParserInputPtr in) {
|
|||||||
* Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
|
* Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
|
||||||
* end of this entity
|
* end of this entity
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlParserInputRead(xmlParserInputPtr in, int len) {
|
xmlParserInputRead(xmlParserInputPtr in, int len) {
|
||||||
intptr_t ret;
|
int ret;
|
||||||
intptr_t used;
|
int used;
|
||||||
intptr_t indx;
|
int indx;
|
||||||
|
|
||||||
if (in == NULL) return(-1);
|
if (in == NULL) return(-1);
|
||||||
#ifdef DEBUG_INPUT
|
#ifdef DEBUG_INPUT
|
||||||
@@ -326,10 +326,10 @@ xmlParserInputRead(xmlParserInputPtr in, int len) {
|
|||||||
* Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
|
* Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
|
||||||
* end of this entity
|
* end of this entity
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlParserInputGrow(xmlParserInputPtr in, intptr_t len) {
|
xmlParserInputGrow(xmlParserInputPtr in, int len) {
|
||||||
intptr_t ret;
|
int ret;
|
||||||
intptr_t indx;
|
int indx;
|
||||||
|
|
||||||
if (in == NULL) return(-1);
|
if (in == NULL) return(-1);
|
||||||
#ifdef DEBUG_INPUT
|
#ifdef DEBUG_INPUT
|
||||||
@@ -383,9 +383,9 @@ xmlParserInputGrow(xmlParserInputPtr in, intptr_t len) {
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlParserInputShrink(xmlParserInputPtr in) {
|
xmlParserInputShrink(xmlParserInputPtr in) {
|
||||||
intptr_t used;
|
int used;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
intptr_t indx;
|
int indx;
|
||||||
|
|
||||||
#ifdef DEBUG_INPUT
|
#ifdef DEBUG_INPUT
|
||||||
xmlGenericError(xmlGenericErrorContext, "Shrink\n");
|
xmlGenericError(xmlGenericErrorContext, "Shrink\n");
|
||||||
@@ -728,7 +728,7 @@ encoding_error:
|
|||||||
{
|
{
|
||||||
char buffer[150];
|
char buffer[150];
|
||||||
|
|
||||||
snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
|
snprintf(&buffer[0], 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
|
||||||
ctxt->input->cur[0], ctxt->input->cur[1],
|
ctxt->input->cur[0], ctxt->input->cur[1],
|
||||||
ctxt->input->cur[2], ctxt->input->cur[3]);
|
ctxt->input->cur[2], ctxt->input->cur[3]);
|
||||||
__xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
|
__xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
|
||||||
@@ -861,7 +861,7 @@ encoding_error:
|
|||||||
*
|
*
|
||||||
* Returns the number of xmlChar written
|
* Returns the number of xmlChar written
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlCopyCharMultiByte(xmlChar *out, int val) {
|
xmlCopyCharMultiByte(xmlChar *out, int val) {
|
||||||
if (out == NULL) return(0);
|
if (out == NULL) return(0);
|
||||||
/*
|
/*
|
||||||
@@ -904,11 +904,11 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
|
|||||||
* Returns the number of xmlChar written
|
* Returns the number of xmlChar written
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlCopyChar(intptr_t len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
|
xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
|
||||||
if (out == NULL) return(0);
|
if (out == NULL) return(0);
|
||||||
/* the len parameter is ignored */
|
/* the len parameter is ignored */
|
||||||
if (val >= 0x80) {
|
if (val >= 0x80) {
|
||||||
return(xmlCopyCharMultiByte (out, val));
|
return(xmlCopyCharMultiByte (out, val));
|
||||||
}
|
}
|
||||||
*out = (xmlChar) val;
|
*out = (xmlChar) val;
|
||||||
@@ -941,7 +941,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
|||||||
case XML_CHAR_ENCODING_ERROR:
|
case XML_CHAR_ENCODING_ERROR:
|
||||||
__xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
|
__xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
|
||||||
"encoding unknown\n", NULL, NULL);
|
"encoding unknown\n", NULL, NULL);
|
||||||
break;
|
return(-1);
|
||||||
case XML_CHAR_ENCODING_NONE:
|
case XML_CHAR_ENCODING_NONE:
|
||||||
/* let's assume it's UTF-8 without the XML decl */
|
/* let's assume it's UTF-8 without the XML decl */
|
||||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
||||||
@@ -972,7 +972,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
|||||||
*has also been converted into
|
*has also been converted into
|
||||||
*an UTF-8 BOM. Let's skip that BOM.
|
*an UTF-8 BOM. Let's skip that BOM.
|
||||||
*/
|
*/
|
||||||
if ((ctxt->input != NULL) &&
|
if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) &&
|
||||||
(ctxt->input->cur[0] == 0xEF) &&
|
(ctxt->input->cur[0] == 0xEF) &&
|
||||||
(ctxt->input->cur[1] == 0xBB) &&
|
(ctxt->input->cur[1] == 0xBB) &&
|
||||||
(ctxt->input->cur[2] == 0xBF)) {
|
(ctxt->input->cur[2] == 0xBF)) {
|
||||||
@@ -988,15 +988,6 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
|||||||
* Default handlers.
|
* Default handlers.
|
||||||
*/
|
*/
|
||||||
switch (enc) {
|
switch (enc) {
|
||||||
case XML_CHAR_ENCODING_ERROR:
|
|
||||||
__xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
|
|
||||||
"encoding unknown\n", NULL, NULL);
|
|
||||||
break;
|
|
||||||
case XML_CHAR_ENCODING_NONE:
|
|
||||||
/* let's assume it's UTF-8 without the XML decl */
|
|
||||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
|
||||||
return(0);
|
|
||||||
case XML_CHAR_ENCODING_UTF8:
|
|
||||||
case XML_CHAR_ENCODING_ASCII:
|
case XML_CHAR_ENCODING_ASCII:
|
||||||
/* default encoding, no conversion should be needed */
|
/* default encoding, no conversion should be needed */
|
||||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
||||||
@@ -1052,6 +1043,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
|||||||
*/
|
*/
|
||||||
if ((ctxt->inputNr == 1) &&
|
if ((ctxt->inputNr == 1) &&
|
||||||
(ctxt->encoding == NULL) &&
|
(ctxt->encoding == NULL) &&
|
||||||
|
(ctxt->input != NULL) &&
|
||||||
(ctxt->input->encoding != NULL)) {
|
(ctxt->input->encoding != NULL)) {
|
||||||
ctxt->encoding = xmlStrdup(ctxt->input->encoding);
|
ctxt->encoding = xmlStrdup(ctxt->input->encoding);
|
||||||
}
|
}
|
||||||
@@ -1072,6 +1064,8 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
|||||||
"encoding not supported %s\n",
|
"encoding not supported %s\n",
|
||||||
BAD_CAST "EUC-JP", NULL);
|
BAD_CAST "EUC-JP", NULL);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (handler == NULL)
|
if (handler == NULL)
|
||||||
@@ -1095,7 +1089,7 @@ int
|
|||||||
xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||||
xmlCharEncodingHandlerPtr handler)
|
xmlCharEncodingHandlerPtr handler)
|
||||||
{
|
{
|
||||||
intptr_t nbchars;
|
int nbchars;
|
||||||
|
|
||||||
if (handler == NULL)
|
if (handler == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
@@ -1135,8 +1129,8 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
|||||||
* Is there already some content down the pipe to convert ?
|
* Is there already some content down the pipe to convert ?
|
||||||
*/
|
*/
|
||||||
if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
|
if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
|
||||||
intptr_t processed;
|
int processed;
|
||||||
size_t use;
|
unsigned int use;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Specific handling of the Byte Order Mark for
|
* Specific handling of the Byte Order Mark for
|
||||||
@@ -1206,50 +1200,13 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
|||||||
|
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
} else {
|
} else if (input->length == 0) {
|
||||||
if ((input->length == 0) || (input->buf == NULL)) {
|
/*
|
||||||
/*
|
* When parsing a static memory array one must know the
|
||||||
* When parsing a static memory array one must know the
|
* size to be able to convert the buffer.
|
||||||
* size to be able to convert the buffer.
|
*/
|
||||||
*/
|
xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
|
||||||
xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
|
return (-1);
|
||||||
return (-1);
|
|
||||||
} else {
|
|
||||||
intptr_t processed;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Shrink the current input buffer.
|
|
||||||
* Move it as the raw buffer and create a new input buffer
|
|
||||||
*/
|
|
||||||
processed = input->cur - input->base;
|
|
||||||
|
|
||||||
input->buf->raw = xmlBufferCreate();
|
|
||||||
xmlBufferAdd(input->buf->raw, input->cur,
|
|
||||||
input->length - processed);
|
|
||||||
input->buf->buffer = xmlBufferCreate();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* convert as much as possible of the raw input
|
|
||||||
* to the parser reading buffer.
|
|
||||||
*/
|
|
||||||
nbchars = xmlCharEncInFunc(input->buf->encoder,
|
|
||||||
input->buf->buffer,
|
|
||||||
input->buf->raw);
|
|
||||||
if (nbchars < 0) {
|
|
||||||
xmlErrInternal(ctxt,
|
|
||||||
"switching encoding: encoder error\n",
|
|
||||||
NULL);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Conversion succeeded, get rid of the old buffer
|
|
||||||
*/
|
|
||||||
if ((input->free != NULL) && (input->base != NULL))
|
|
||||||
input->free((xmlChar *) input->base);
|
|
||||||
input->base = input->cur = input->buf->buffer->content;
|
|
||||||
input->end = &input->base[input->buf->buffer->use];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@@ -1267,9 +1224,11 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
|||||||
int
|
int
|
||||||
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
|
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
|
||||||
{
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
if (handler != NULL) {
|
if (handler != NULL) {
|
||||||
if (ctxt->input != NULL) {
|
if (ctxt->input != NULL) {
|
||||||
xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
|
ret = xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
|
||||||
} else {
|
} else {
|
||||||
xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
|
xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
|
||||||
NULL);
|
NULL);
|
||||||
@@ -1281,7 +1240,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
|
|||||||
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
ctxt->charset = XML_CHAR_ENCODING_UTF8;
|
||||||
} else
|
} else
|
||||||
return(-1);
|
return(-1);
|
||||||
return(0);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@@ -1490,17 +1449,20 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
|
|||||||
if (ctxt == NULL) return(NULL);
|
if (ctxt == NULL) return(NULL);
|
||||||
buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
|
buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
__xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
|
if (filename == NULL)
|
||||||
(const char *) filename);
|
__xmlLoaderErr(ctxt,
|
||||||
|
"failed to load external entity: NULL filename \n",
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
__xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
|
||||||
|
(const char *) filename);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inputStream = xmlNewInputStream(ctxt);
|
inputStream = xmlNewInputStream(ctxt);
|
||||||
if (inputStream == NULL) {
|
if (inputStream == NULL)
|
||||||
if (directory != NULL) xmlFree((char *) directory);
|
|
||||||
if (URI != NULL) xmlFree((char *) URI);
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
|
||||||
inputStream->buf = buf;
|
inputStream->buf = buf;
|
||||||
inputStream = xmlCheckHTTPInput(ctxt, inputStream);
|
inputStream = xmlCheckHTTPInput(ctxt, inputStream);
|
||||||
if (inputStream == NULL)
|
if (inputStream == NULL)
|
||||||
@@ -1792,7 +1754,7 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
xmlParserCtxtPtr
|
xmlParserCtxtPtr
|
||||||
xmlNewParserCtxt()
|
xmlNewParserCtxt(void)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt;
|
xmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
@@ -1910,7 +1872,7 @@ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
|
|||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
if ((seq == NULL) || (node == NULL))
|
if ((seq == NULL) || (node == NULL))
|
||||||
return (-1);
|
return ((unsigned long) -1);
|
||||||
|
|
||||||
/* Do a binary search for the key */
|
/* Do a binary search for the key */
|
||||||
lower = 1;
|
lower = 1;
|
||||||
@@ -1952,8 +1914,10 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
|
|||||||
/* Find pos and check to see if node is already in the sequence */
|
/* Find pos and check to see if node is already in the sequence */
|
||||||
pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
|
pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
|
||||||
info->node);
|
info->node);
|
||||||
if (pos < ctxt->node_seq.length
|
|
||||||
&& ctxt->node_seq.buffer[pos].node == info->node) {
|
if ((pos < ctxt->node_seq.length) &&
|
||||||
|
(ctxt->node_seq.buffer != NULL) &&
|
||||||
|
(ctxt->node_seq.buffer[pos].node == info->node)) {
|
||||||
ctxt->node_seq.buffer[pos] = *info;
|
ctxt->node_seq.buffer[pos] = *info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -45,27 +45,29 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
|
|||||||
(xmlStrEqual(node->ns->href, xmlRelaxNGNs)))
|
(xmlStrEqual(node->ns->href, xmlRelaxNGNs)))
|
||||||
|
|
||||||
|
|
||||||
/* #define DEBUG 1 */
|
#if 0
|
||||||
|
#define DEBUG 1
|
||||||
|
|
||||||
/* #define DEBUG_GRAMMAR 1 */
|
#define DEBUG_GRAMMAR 1
|
||||||
|
|
||||||
/* #define DEBUG_CONTENT 1 */
|
#define DEBUG_CONTENT 1
|
||||||
|
|
||||||
/* #define DEBUG_TYPE 1 */
|
#define DEBUG_TYPE 1
|
||||||
|
|
||||||
/* #define DEBUG_VALID 1 */
|
#define DEBUG_VALID 1
|
||||||
|
|
||||||
/* #define DEBUG_INTERLEAVE 1 */
|
#define DEBUG_INTERLEAVE 1
|
||||||
|
|
||||||
/* #define DEBUG_LIST 1 */
|
#define DEBUG_LIST 1
|
||||||
|
|
||||||
/* #define DEBUG_INCLUDE */
|
#define DEBUG_INCLUDE 1
|
||||||
|
|
||||||
/* #define DEBUG_ERROR 1 */
|
#define DEBUG_ERROR 1
|
||||||
|
|
||||||
/* #define DEBUG_COMPILE 1 */
|
#define DEBUG_COMPILE 1
|
||||||
|
|
||||||
/* #define DEBUG_PROGRESSIVE 1 */
|
#define DEBUG_PROGRESSIVE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_ERROR 5
|
#define MAX_ERROR 5
|
||||||
|
|
||||||
@@ -254,6 +256,7 @@ struct _xmlRelaxNGParserCtxt {
|
|||||||
#define FLAGS_IGNORABLE 1
|
#define FLAGS_IGNORABLE 1
|
||||||
#define FLAGS_NEGATIVE 2
|
#define FLAGS_NEGATIVE 2
|
||||||
#define FLAGS_MIXED_CONTENT 4
|
#define FLAGS_MIXED_CONTENT 4
|
||||||
|
#define FLAGS_NOERROR 8
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlRelaxNGInterleaveGroup:
|
* xmlRelaxNGInterleaveGroup:
|
||||||
@@ -435,10 +438,12 @@ xmlRngPErrMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *extra)
|
|||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
||||||
if (ctxt != NULL) {
|
if (ctxt != NULL) {
|
||||||
channel = ctxt->error;
|
if (ctxt->serror != NULL)
|
||||||
|
schannel = ctxt->serror;
|
||||||
|
else
|
||||||
|
channel = ctxt->error;
|
||||||
data = ctxt->userData;
|
data = ctxt->userData;
|
||||||
ctxt->nbErrors++;
|
ctxt->nbErrors++;
|
||||||
schannel = ctxt->serror;
|
|
||||||
}
|
}
|
||||||
if (extra)
|
if (extra)
|
||||||
__xmlRaiseError(schannel, channel, data,
|
__xmlRaiseError(schannel, channel, data,
|
||||||
@@ -468,10 +473,12 @@ xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra)
|
|||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
||||||
if (ctxt != NULL) {
|
if (ctxt != NULL) {
|
||||||
channel = ctxt->error;
|
if (ctxt->serror != NULL)
|
||||||
|
schannel = ctxt->serror;
|
||||||
|
else
|
||||||
|
channel = ctxt->error;
|
||||||
data = ctxt->userData;
|
data = ctxt->userData;
|
||||||
ctxt->nbErrors++;
|
ctxt->nbErrors++;
|
||||||
schannel = ctxt->serror;
|
|
||||||
}
|
}
|
||||||
if (extra)
|
if (extra)
|
||||||
__xmlRaiseError(schannel, channel, data,
|
__xmlRaiseError(schannel, channel, data,
|
||||||
@@ -506,10 +513,12 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
|
|||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
||||||
if (ctxt != NULL) {
|
if (ctxt != NULL) {
|
||||||
channel = ctxt->error;
|
if (ctxt->serror != NULL)
|
||||||
|
schannel = ctxt->serror;
|
||||||
|
else
|
||||||
|
channel = ctxt->error;
|
||||||
data = ctxt->userData;
|
data = ctxt->userData;
|
||||||
ctxt->nbErrors++;
|
ctxt->nbErrors++;
|
||||||
schannel = ctxt->serror;
|
|
||||||
}
|
}
|
||||||
__xmlRaiseError(schannel, channel, data,
|
__xmlRaiseError(schannel, channel, data,
|
||||||
NULL, node, XML_FROM_RELAXNGP,
|
NULL, node, XML_FROM_RELAXNGP,
|
||||||
@@ -538,10 +547,12 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
|
|||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
||||||
if (ctxt != NULL) {
|
if (ctxt != NULL) {
|
||||||
channel = ctxt->error;
|
if (ctxt->serror != NULL)
|
||||||
|
schannel = ctxt->serror;
|
||||||
|
else
|
||||||
|
channel = ctxt->error;
|
||||||
data = ctxt->userData;
|
data = ctxt->userData;
|
||||||
ctxt->nbErrors++;
|
ctxt->nbErrors++;
|
||||||
schannel = ctxt->serror;
|
|
||||||
}
|
}
|
||||||
__xmlRaiseError(schannel, channel, data,
|
__xmlRaiseError(schannel, channel, data,
|
||||||
NULL, node, XML_FROM_RELAXNGV,
|
NULL, node, XML_FROM_RELAXNGV,
|
||||||
@@ -1148,7 +1159,7 @@ xmlRelaxNGFreeStates(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
ctxt->freeStates = tmp;
|
ctxt->freeStates = tmp;
|
||||||
ctxt->freeStatesMax *= 2;
|
ctxt->freeStatesMax *= 2;
|
||||||
}
|
}
|
||||||
if ((ctxt == NULL) || (ctxt->freeState == NULL)) {
|
if ((ctxt == NULL) || (ctxt->freeStates == NULL)) {
|
||||||
xmlFree(states->tabState);
|
xmlFree(states->tabState);
|
||||||
xmlFree(states);
|
xmlFree(states);
|
||||||
} else {
|
} else {
|
||||||
@@ -1477,14 +1488,14 @@ xmlRelaxNGIncludePop(xmlRelaxNGParserCtxtPtr ctxt)
|
|||||||
xmlRelaxNGIncludePtr ret;
|
xmlRelaxNGIncludePtr ret;
|
||||||
|
|
||||||
if (ctxt->incNr <= 0)
|
if (ctxt->incNr <= 0)
|
||||||
return (0);
|
return (NULL);
|
||||||
ctxt->incNr--;
|
ctxt->incNr--;
|
||||||
if (ctxt->incNr > 0)
|
if (ctxt->incNr > 0)
|
||||||
ctxt->inc = ctxt->incTab[ctxt->incNr - 1];
|
ctxt->inc = ctxt->incTab[ctxt->incNr - 1];
|
||||||
else
|
else
|
||||||
ctxt->inc = NULL;
|
ctxt->inc = NULL;
|
||||||
ret = ctxt->incTab[ctxt->incNr];
|
ret = ctxt->incTab[ctxt->incNr];
|
||||||
ctxt->incTab[ctxt->incNr] = 0;
|
ctxt->incTab[ctxt->incNr] = NULL;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1552,8 +1563,10 @@ xmlRelaxNGRemoveRedefine(xmlRelaxNGParserCtxtPtr ctxt,
|
|||||||
children, name) == 1) {
|
children, name) == 1) {
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_INCLUDE
|
||||||
if (href != NULL)
|
if (href != NULL)
|
||||||
xmlFree(href);
|
xmlFree(href);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1889,14 +1902,14 @@ xmlRelaxNGDocumentPop(xmlRelaxNGParserCtxtPtr ctxt)
|
|||||||
xmlRelaxNGDocumentPtr ret;
|
xmlRelaxNGDocumentPtr ret;
|
||||||
|
|
||||||
if (ctxt->docNr <= 0)
|
if (ctxt->docNr <= 0)
|
||||||
return (0);
|
return (NULL);
|
||||||
ctxt->docNr--;
|
ctxt->docNr--;
|
||||||
if (ctxt->docNr > 0)
|
if (ctxt->docNr > 0)
|
||||||
ctxt->doc = ctxt->docTab[ctxt->docNr - 1];
|
ctxt->doc = ctxt->docTab[ctxt->docNr - 1];
|
||||||
else
|
else
|
||||||
ctxt->doc = NULL;
|
ctxt->doc = NULL;
|
||||||
ret = ctxt->docTab[ctxt->docNr];
|
ret = ctxt->docTab[ctxt->docNr];
|
||||||
ctxt->docTab[ctxt->docNr] = 0;
|
ctxt->docTab[ctxt->docNr] = NULL;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2220,7 +2233,7 @@ xmlRelaxNGShowValidError(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
{
|
{
|
||||||
xmlChar *msg;
|
xmlChar *msg;
|
||||||
|
|
||||||
if (ctxt->error == NULL)
|
if (ctxt->flags & FLAGS_NOERROR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_ERROR
|
#ifdef DEBUG_ERROR
|
||||||
@@ -2332,7 +2345,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
xmlRelaxNGValidErr err, const xmlChar * arg1,
|
xmlRelaxNGValidErr err, const xmlChar * arg1,
|
||||||
const xmlChar * arg2, int dup)
|
const xmlChar * arg2, int dup)
|
||||||
{
|
{
|
||||||
if ((ctxt == NULL) || (ctxt->error == NULL))
|
if (ctxt == NULL)
|
||||||
|
return;
|
||||||
|
if (ctxt->flags & FLAGS_NOERROR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_ERROR
|
#ifdef DEBUG_ERROR
|
||||||
@@ -2573,11 +2588,11 @@ xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
|
ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
xmlSchemaFreeValue(res1);
|
if ((comp1 == NULL) && (res1 != NULL))
|
||||||
|
xmlSchemaFreeValue(res1);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
if (res1 == NULL) {
|
if (res1 == NULL) {
|
||||||
xmlSchemaFreeValue(res1);
|
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
ret = xmlSchemaCompareValues(res1, res2);
|
ret = xmlSchemaCompareValues(res1, res2);
|
||||||
@@ -3564,7 +3579,7 @@ xmlRelaxNGParseValue(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
static xmlRelaxNGDefinePtr
|
static xmlRelaxNGDefinePtr
|
||||||
xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
||||||
{
|
{
|
||||||
xmlRelaxNGDefinePtr def = NULL, except, last = NULL;
|
xmlRelaxNGDefinePtr def = NULL, except;
|
||||||
xmlRelaxNGDefinePtr param, lastparam = NULL;
|
xmlRelaxNGDefinePtr param, lastparam = NULL;
|
||||||
xmlRelaxNGTypeLibraryPtr lib;
|
xmlRelaxNGTypeLibraryPtr lib;
|
||||||
xmlChar *type;
|
xmlChar *type;
|
||||||
@@ -3672,7 +3687,7 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
if ((content != NULL)
|
if ((content != NULL)
|
||||||
&& (xmlStrEqual(content->name, BAD_CAST "except"))) {
|
&& (xmlStrEqual(content->name, BAD_CAST "except"))) {
|
||||||
xmlNodePtr child;
|
xmlNodePtr child;
|
||||||
xmlRelaxNGDefinePtr tmp2, last2 = NULL;
|
xmlRelaxNGDefinePtr tmp2, last = NULL;
|
||||||
|
|
||||||
except = xmlRelaxNGNewDefine(ctxt, node);
|
except = xmlRelaxNGNewDefine(ctxt, node);
|
||||||
if (except == NULL) {
|
if (except == NULL) {
|
||||||
@@ -3680,11 +3695,7 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
}
|
}
|
||||||
except->type = XML_RELAXNG_EXCEPT;
|
except->type = XML_RELAXNG_EXCEPT;
|
||||||
child = content->children;
|
child = content->children;
|
||||||
if (last == NULL) {
|
def->content = except;
|
||||||
def->content = except;
|
|
||||||
} else {
|
|
||||||
last->next = except;
|
|
||||||
}
|
|
||||||
if (child == NULL) {
|
if (child == NULL) {
|
||||||
xmlRngPErr(ctxt, content, XML_RNGP_EXCEPT_NO_CONTENT,
|
xmlRngPErr(ctxt, content, XML_RNGP_EXCEPT_NO_CONTENT,
|
||||||
"except has no content\n", NULL, NULL);
|
"except has no content\n", NULL, NULL);
|
||||||
@@ -3692,11 +3703,11 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
while (child != NULL) {
|
while (child != NULL) {
|
||||||
tmp2 = xmlRelaxNGParsePattern(ctxt, child);
|
tmp2 = xmlRelaxNGParsePattern(ctxt, child);
|
||||||
if (tmp2 != NULL) {
|
if (tmp2 != NULL) {
|
||||||
if (last2 == NULL) {
|
if (last == NULL) {
|
||||||
except->content = last2 = tmp2;
|
except->content = last = tmp2;
|
||||||
} else {
|
} else {
|
||||||
last2->next = tmp2;
|
last->next = tmp2;
|
||||||
last2 = tmp2;
|
last = tmp2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
child = child->next;
|
child = child->next;
|
||||||
@@ -3739,10 +3750,10 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
|
|||||||
xmlNs ns;
|
xmlNs ns;
|
||||||
xmlRelaxNGValidCtxt ctxt;
|
xmlRelaxNGValidCtxt ctxt;
|
||||||
|
|
||||||
ctxt.flags = FLAGS_IGNORABLE;
|
|
||||||
|
|
||||||
memset(&ctxt, 0, sizeof(xmlRelaxNGValidCtxt));
|
memset(&ctxt, 0, sizeof(xmlRelaxNGValidCtxt));
|
||||||
|
|
||||||
|
ctxt.flags = FLAGS_IGNORABLE | FLAGS_NOERROR;
|
||||||
|
|
||||||
if ((def1->type == XML_RELAXNG_ELEMENT) ||
|
if ((def1->type == XML_RELAXNG_ELEMENT) ||
|
||||||
(def1->type == XML_RELAXNG_ATTRIBUTE)) {
|
(def1->type == XML_RELAXNG_ATTRIBUTE)) {
|
||||||
if (def2->type == XML_RELAXNG_TEXT)
|
if (def2->type == XML_RELAXNG_TEXT)
|
||||||
@@ -6908,6 +6919,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
|
|||||||
xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
|
xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
|
||||||
"xmlRelaxNGParse: externalRef has no href attribute\n",
|
"xmlRelaxNGParse: externalRef has no href attribute\n",
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
if (ns != NULL)
|
||||||
|
xmlFree(ns);
|
||||||
delete = cur;
|
delete = cur;
|
||||||
goto skip_children;
|
goto skip_children;
|
||||||
}
|
}
|
||||||
@@ -6916,6 +6929,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
|
|||||||
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
||||||
"Incorrect URI for externalRef %s\n",
|
"Incorrect URI for externalRef %s\n",
|
||||||
href, NULL);
|
href, NULL);
|
||||||
|
if (ns != NULL)
|
||||||
|
xmlFree(ns);
|
||||||
if (href != NULL)
|
if (href != NULL)
|
||||||
xmlFree(href);
|
xmlFree(href);
|
||||||
delete = cur;
|
delete = cur;
|
||||||
@@ -6925,6 +6940,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
|
|||||||
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
||||||
"Fragment forbidden in URI for externalRef %s\n",
|
"Fragment forbidden in URI for externalRef %s\n",
|
||||||
href, NULL);
|
href, NULL);
|
||||||
|
if (ns != NULL)
|
||||||
|
xmlFree(ns);
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
if (href != NULL)
|
if (href != NULL)
|
||||||
xmlFree(href);
|
xmlFree(href);
|
||||||
@@ -6938,6 +6955,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
|
|||||||
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
|
||||||
"Failed to compute URL for externalRef %s\n",
|
"Failed to compute URL for externalRef %s\n",
|
||||||
href, NULL);
|
href, NULL);
|
||||||
|
if (ns != NULL)
|
||||||
|
xmlFree(ns);
|
||||||
if (href != NULL)
|
if (href != NULL)
|
||||||
xmlFree(href);
|
xmlFree(href);
|
||||||
if (base != NULL)
|
if (base != NULL)
|
||||||
@@ -6954,6 +6973,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
|
|||||||
xmlRngPErr(ctxt, cur, XML_RNGP_EXTERNAL_REF_FAILURE,
|
xmlRngPErr(ctxt, cur, XML_RNGP_EXTERNAL_REF_FAILURE,
|
||||||
"Failed to load externalRef %s\n", URL,
|
"Failed to load externalRef %s\n", URL,
|
||||||
NULL);
|
NULL);
|
||||||
|
if (ns != NULL)
|
||||||
|
xmlFree(ns);
|
||||||
xmlFree(URL);
|
xmlFree(URL);
|
||||||
delete = cur;
|
delete = cur;
|
||||||
goto skip_children;
|
goto skip_children;
|
||||||
@@ -7310,7 +7331,6 @@ xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc)
|
|||||||
*
|
*
|
||||||
* parse a schema definition resource and build an internal
|
* parse a schema definition resource and build an internal
|
||||||
* XML Shema struture which can be used to validate instances.
|
* XML Shema struture which can be used to validate instances.
|
||||||
* *WARNING* this interface is highly subject to change
|
|
||||||
*
|
*
|
||||||
* Returns the internal XML RelaxNG structure built from the resource or
|
* Returns the internal XML RelaxNG structure built from the resource or
|
||||||
* NULL in case of error
|
* NULL in case of error
|
||||||
@@ -7374,13 +7394,16 @@ xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt)
|
|||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
xmlRngPErr(ctxt, (xmlNodePtr) doc,
|
xmlRngPErr(ctxt, (xmlNodePtr) doc,
|
||||||
XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
|
XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
|
||||||
ctxt->URL, NULL);
|
(ctxt->URL ? ctxt->URL : BAD_CAST "schemas"), NULL);
|
||||||
xmlFreeDoc(doc);
|
|
||||||
|
xmlFreeDoc(ctxt->document);
|
||||||
|
ctxt->document = NULL;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
ret = xmlRelaxNGParseDocument(ctxt, root);
|
ret = xmlRelaxNGParseDocument(ctxt, root);
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(ctxt->document);
|
||||||
|
ctxt->document = NULL;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7459,6 +7482,7 @@ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
|||||||
return;
|
return;
|
||||||
ctxt->error = err;
|
ctxt->error = err;
|
||||||
ctxt->warning = warn;
|
ctxt->warning = warn;
|
||||||
|
ctxt->serror = NULL;
|
||||||
ctxt->userData = ctx;
|
ctxt->userData = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7489,6 +7513,27 @@ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlRelaxNGSetParserStructuredErrors:
|
||||||
|
* @ctxt: a Relax-NG parser context
|
||||||
|
* @serror: the error callback
|
||||||
|
* @ctx: contextual data for the callbacks
|
||||||
|
*
|
||||||
|
* Set the callback functions used to handle errors for a parsing context
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror,
|
||||||
|
void *ctx)
|
||||||
|
{
|
||||||
|
if (ctxt == NULL)
|
||||||
|
return;
|
||||||
|
ctxt->serror = serror;
|
||||||
|
ctxt->error = NULL;
|
||||||
|
ctxt->warning = NULL;
|
||||||
|
ctxt->userData = ctx;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
@@ -7759,8 +7804,6 @@ xmlRelaxNGValidateCompiledCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
|
|||||||
#endif
|
#endif
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
fprintf(stderr, "callback on %s missing context\n", token);
|
fprintf(stderr, "callback on %s missing context\n", token);
|
||||||
if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
|
|
||||||
ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (define == NULL) {
|
if (define == NULL) {
|
||||||
@@ -7804,10 +7847,11 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
xmlRegExecCtxtPtr exec;
|
xmlRegExecCtxtPtr exec;
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int oldperr = ctxt->perr;
|
int oldperr;
|
||||||
|
|
||||||
if ((ctxt == NULL) || (regexp == NULL))
|
if ((ctxt == NULL) || (regexp == NULL))
|
||||||
return (-1);
|
return (-1);
|
||||||
|
oldperr = ctxt->perr;
|
||||||
exec = xmlRegNewExecCtxt(regexp,
|
exec = xmlRegNewExecCtxt(regexp,
|
||||||
xmlRelaxNGValidateCompiledCallback, ctxt);
|
xmlRelaxNGValidateCompiledCallback, ctxt);
|
||||||
ctxt->perr = 0;
|
ctxt->perr = 0;
|
||||||
@@ -7966,7 +8010,7 @@ xmlRelaxNGValidateProgressiveCallback(xmlRegExecCtxtPtr exec
|
|||||||
xmlRelaxNGValidCtxtPtr ctxt = (xmlRelaxNGValidCtxtPtr) inputdata;
|
xmlRelaxNGValidCtxtPtr ctxt = (xmlRelaxNGValidCtxtPtr) inputdata;
|
||||||
xmlRelaxNGDefinePtr define = (xmlRelaxNGDefinePtr) transdata;
|
xmlRelaxNGDefinePtr define = (xmlRelaxNGDefinePtr) transdata;
|
||||||
xmlRelaxNGValidStatePtr state, oldstate;
|
xmlRelaxNGValidStatePtr state, oldstate;
|
||||||
xmlNodePtr node = ctxt->pnode;
|
xmlNodePtr node;
|
||||||
int ret = 0, oldflags;
|
int ret = 0, oldflags;
|
||||||
|
|
||||||
#ifdef DEBUG_PROGRESSIVE
|
#ifdef DEBUG_PROGRESSIVE
|
||||||
@@ -7977,6 +8021,7 @@ xmlRelaxNGValidateProgressiveCallback(xmlRegExecCtxtPtr exec
|
|||||||
fprintf(stderr, "callback on %s missing context\n", token);
|
fprintf(stderr, "callback on %s missing context\n", token);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
node = ctxt->pnode;
|
||||||
ctxt->pstate = 1;
|
ctxt->pstate = 1;
|
||||||
if (define == NULL) {
|
if (define == NULL) {
|
||||||
if (token[0] == '#')
|
if (token[0] == '#')
|
||||||
@@ -8628,8 +8673,6 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
if (ctxt->errNr > 0)
|
if (ctxt->errNr > 0)
|
||||||
xmlRelaxNGPopErrors(ctxt, 0);
|
xmlRelaxNGPopErrors(ctxt, 0);
|
||||||
}
|
}
|
||||||
if (ret == 0)
|
|
||||||
xmlRelaxNGNextValue(ctxt);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XML_RELAXNG_LIST:{
|
case XML_RELAXNG_LIST:{
|
||||||
@@ -8732,13 +8775,8 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
cur = ctxt->state->value;
|
cur = ctxt->state->value;
|
||||||
}
|
}
|
||||||
ctxt->flags = oldflags;
|
ctxt->flags = oldflags;
|
||||||
if (ret != 0) {
|
if (ctxt->errNr > 0)
|
||||||
if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
|
xmlRelaxNGPopErrors(ctxt, 0);
|
||||||
xmlRelaxNGDumpValidError(ctxt);
|
|
||||||
} else {
|
|
||||||
if (ctxt->errNr > 0)
|
|
||||||
xmlRelaxNGPopErrors(ctxt, 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XML_RELAXNG_EXCEPT:{
|
case XML_RELAXNG_EXCEPT:{
|
||||||
@@ -9234,21 +9272,56 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
} else if (ctxt->states != NULL) {
|
} else if (ctxt->states != NULL) {
|
||||||
int j;
|
int j;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
int best = -1;
|
||||||
|
int lowattr = -1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PBM: what happen if there is attributes checks in the interleaves
|
||||||
|
*/
|
||||||
|
|
||||||
for (j = 0; j < ctxt->states->nbState; j++) {
|
for (j = 0; j < ctxt->states->nbState; j++) {
|
||||||
cur = ctxt->states->tabState[j]->seq;
|
cur = ctxt->states->tabState[j]->seq;
|
||||||
cur = xmlRelaxNGSkipIgnored(ctxt, cur);
|
cur = xmlRelaxNGSkipIgnored(ctxt, cur);
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
|
if (found == 0) {
|
||||||
|
lowattr = ctxt->states->tabState[j]->nbAttrLeft;
|
||||||
|
best = j;
|
||||||
|
}
|
||||||
found = 1;
|
found = 1;
|
||||||
break;
|
if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
|
||||||
}
|
/* try to keep the latest one to mach old heuristic */
|
||||||
|
lowattr = ctxt->states->tabState[j]->nbAttrLeft;
|
||||||
|
best = j;
|
||||||
|
}
|
||||||
|
if (lowattr == 0)
|
||||||
|
break;
|
||||||
|
} else if (found == 0) {
|
||||||
|
if (lowattr == -1) {
|
||||||
|
lowattr = ctxt->states->tabState[j]->nbAttrLeft;
|
||||||
|
best = j;
|
||||||
|
} else
|
||||||
|
if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
|
||||||
|
/* try to keep the latest one to mach old heuristic */
|
||||||
|
lowattr = ctxt->states->tabState[j]->nbAttrLeft;
|
||||||
|
best = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* BIG PBM: here we pick only one restarting point :-(
|
||||||
|
*/
|
||||||
if (ctxt->states->nbState > 0) {
|
if (ctxt->states->nbState > 0) {
|
||||||
xmlRelaxNGFreeValidState(ctxt, oldstate);
|
xmlRelaxNGFreeValidState(ctxt, oldstate);
|
||||||
oldstate =
|
if (best != -1) {
|
||||||
ctxt->states->tabState[ctxt->states->nbState - 1];
|
oldstate = ctxt->states->tabState[best];
|
||||||
|
ctxt->states->tabState[best] = NULL;
|
||||||
|
} else {
|
||||||
|
oldstate =
|
||||||
|
ctxt->states->tabState[ctxt->states->nbState - 1];
|
||||||
|
ctxt->states->tabState[ctxt->states->nbState - 1] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (j = 0; j < ctxt->states->nbState - 1; j++) {
|
for (j = 0; j < ctxt->states->nbState ; j++) {
|
||||||
xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[j]);
|
xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[j]);
|
||||||
}
|
}
|
||||||
xmlRelaxNGFreeStates(ctxt, ctxt->states);
|
xmlRelaxNGFreeStates(ctxt, ctxt->states);
|
||||||
@@ -10021,6 +10094,11 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
if (states == NULL) {
|
if (states == NULL) {
|
||||||
xmlRelaxNGNewStates(ctxt,
|
xmlRelaxNGNewStates(ctxt,
|
||||||
res->nbState - base);
|
res->nbState - base);
|
||||||
|
states = ctxt->states;
|
||||||
|
if (states == NULL) {
|
||||||
|
progress = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
states->nbState = 0;
|
states->nbState = 0;
|
||||||
for (i = base; i < res->nbState; i++)
|
for (i = base; i < res->nbState; i++)
|
||||||
@@ -10581,7 +10659,8 @@ xmlRelaxNGNewValidCtxt(xmlRelaxNGPtr schema)
|
|||||||
ret->errMax = 0;
|
ret->errMax = 0;
|
||||||
ret->err = NULL;
|
ret->err = NULL;
|
||||||
ret->errTab = NULL;
|
ret->errTab = NULL;
|
||||||
ret->idref = schema->idref;
|
if (schema != NULL)
|
||||||
|
ret->idref = schema->idref;
|
||||||
ret->states = NULL;
|
ret->states = NULL;
|
||||||
ret->freeState = NULL;
|
ret->freeState = NULL;
|
||||||
ret->freeStates = NULL;
|
ret->freeStates = NULL;
|
||||||
@@ -10650,6 +10729,27 @@ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
|||||||
ctxt->error = err;
|
ctxt->error = err;
|
||||||
ctxt->warning = warn;
|
ctxt->warning = warn;
|
||||||
ctxt->userData = ctx;
|
ctxt->userData = ctx;
|
||||||
|
ctxt->serror = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlRelaxNGSetValidStructuredErrors:
|
||||||
|
* @ctxt: a Relax-NG validation context
|
||||||
|
* @serror: the structured error function
|
||||||
|
* @ctx: the functions context
|
||||||
|
*
|
||||||
|
* Set the structured error callback
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||||
|
xmlStructuredErrorFunc serror, void *ctx)
|
||||||
|
{
|
||||||
|
if (ctxt == NULL)
|
||||||
|
return;
|
||||||
|
ctxt->serror = serror;
|
||||||
|
ctxt->error = NULL;
|
||||||
|
ctxt->warning = NULL;
|
||||||
|
ctxt->userData = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,6 +46,46 @@
|
|||||||
|
|
||||||
/* #define DEBUG_THREADS */
|
/* #define DEBUG_THREADS */
|
||||||
|
|
||||||
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
|
||||||
|
static int libxml_is_threaded = -1;
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#ifdef linux
|
||||||
|
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
|
||||||
|
extern int pthread_once (pthread_once_t *__once_control,
|
||||||
|
void (*__init_routine) (void))
|
||||||
|
__attribute((weak));
|
||||||
|
extern void *pthread_getspecific (pthread_key_t __key)
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_setspecific (pthread_key_t __key,
|
||||||
|
__const void *__pointer)
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_key_create (pthread_key_t *__key,
|
||||||
|
void (*__destr_function) (void *))
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_mutex_init ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_mutex_destroy ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_mutex_lock ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_mutex_unlock ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_cond_init ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_equal ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern pthread_t pthread_self ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_key_create ()
|
||||||
|
__attribute((weak));
|
||||||
|
extern int pthread_cond_signal ()
|
||||||
|
__attribute((weak));
|
||||||
|
#endif
|
||||||
|
#endif /* linux */
|
||||||
|
#endif /* __GNUC__ */
|
||||||
|
#endif /* HAVE_PTHREAD_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: this module still uses malloc/free and not xmlMalloc/xmlFree
|
* TODO: this module still uses malloc/free and not xmlMalloc/xmlFree
|
||||||
* to avoid some crazyness since xmlMalloc/xmlFree may actually
|
* to avoid some crazyness since xmlMalloc/xmlFree may actually
|
||||||
@@ -140,7 +180,8 @@ xmlNewMutex(void)
|
|||||||
if ((tok = malloc(sizeof(xmlMutex))) == NULL)
|
if ((tok = malloc(sizeof(xmlMutex))) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_init(&tok->lock, NULL);
|
if (libxml_is_threaded != 0)
|
||||||
|
pthread_mutex_init(&tok->lock, NULL);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
tok->mutex = CreateMutex(NULL, FALSE, NULL);
|
tok->mutex = CreateMutex(NULL, FALSE, NULL);
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
@@ -166,7 +207,8 @@ xmlFreeMutex(xmlMutexPtr tok)
|
|||||||
if (tok == NULL) return;
|
if (tok == NULL) return;
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_destroy(&tok->lock);
|
if (libxml_is_threaded != 0)
|
||||||
|
pthread_mutex_destroy(&tok->lock);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
CloseHandle(tok->mutex);
|
CloseHandle(tok->mutex);
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
@@ -187,7 +229,8 @@ xmlMutexLock(xmlMutexPtr tok)
|
|||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
return;
|
return;
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_lock(&tok->lock);
|
if (libxml_is_threaded != 0)
|
||||||
|
pthread_mutex_lock(&tok->lock);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
WaitForSingleObject(tok->mutex, INFINITE);
|
WaitForSingleObject(tok->mutex, INFINITE);
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
@@ -214,7 +257,8 @@ xmlMutexUnlock(xmlMutexPtr tok)
|
|||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
return;
|
return;
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_unlock(&tok->lock);
|
if (libxml_is_threaded != 0)
|
||||||
|
pthread_mutex_unlock(&tok->lock);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
ReleaseMutex(tok->mutex);
|
ReleaseMutex(tok->mutex);
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
@@ -243,10 +287,12 @@ xmlNewRMutex(void)
|
|||||||
if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
|
if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_init(&tok->lock, NULL);
|
if (libxml_is_threaded != 0) {
|
||||||
tok->held = 0;
|
pthread_mutex_init(&tok->lock, NULL);
|
||||||
tok->waiters = 0;
|
tok->held = 0;
|
||||||
pthread_cond_init(&tok->cv, NULL);
|
tok->waiters = 0;
|
||||||
|
pthread_cond_init(&tok->cv, NULL);
|
||||||
|
}
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
InitializeCriticalSection(&tok->cs);
|
InitializeCriticalSection(&tok->cs);
|
||||||
tok->count = 0;
|
tok->count = 0;
|
||||||
@@ -270,8 +316,11 @@ xmlNewRMutex(void)
|
|||||||
void
|
void
|
||||||
xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
|
xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
|
if (tok == NULL)
|
||||||
|
return;
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_destroy(&tok->lock);
|
if (libxml_is_threaded != 0)
|
||||||
|
pthread_mutex_destroy(&tok->lock);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
DeleteCriticalSection(&tok->cs);
|
DeleteCriticalSection(&tok->cs);
|
||||||
#elif defined HAVE_BEOS_THREADS
|
#elif defined HAVE_BEOS_THREADS
|
||||||
@@ -292,6 +341,9 @@ xmlRMutexLock(xmlRMutexPtr tok)
|
|||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
return;
|
return;
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
if (libxml_is_threaded == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
pthread_mutex_lock(&tok->lock);
|
pthread_mutex_lock(&tok->lock);
|
||||||
if (tok->held) {
|
if (tok->held) {
|
||||||
if (pthread_equal(tok->tid, pthread_self())) {
|
if (pthread_equal(tok->tid, pthread_self())) {
|
||||||
@@ -334,6 +386,9 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
|
|||||||
if (tok == NULL)
|
if (tok == NULL)
|
||||||
return;
|
return;
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
if (libxml_is_threaded == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
pthread_mutex_lock(&tok->lock);
|
pthread_mutex_lock(&tok->lock);
|
||||||
tok->held--;
|
tok->held--;
|
||||||
if (tok->held == 0) {
|
if (tok->held == 0) {
|
||||||
@@ -417,7 +472,7 @@ typedef struct _xmlGlobalStateCleanupHelperParams
|
|||||||
void *memory;
|
void *memory;
|
||||||
} xmlGlobalStateCleanupHelperParams;
|
} xmlGlobalStateCleanupHelperParams;
|
||||||
|
|
||||||
static void xmlGlobalStateCleanupHelper (void *p)
|
static void XMLCDECL xmlGlobalStateCleanupHelper (void *p)
|
||||||
{
|
{
|
||||||
xmlGlobalStateCleanupHelperParams *params = (xmlGlobalStateCleanupHelperParams *) p;
|
xmlGlobalStateCleanupHelperParams *params = (xmlGlobalStateCleanupHelperParams *) p;
|
||||||
WaitForSingleObject(params->thread, INFINITE);
|
WaitForSingleObject(params->thread, INFINITE);
|
||||||
@@ -470,6 +525,9 @@ xmlGetGlobalState(void)
|
|||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
xmlGlobalState *globalval;
|
xmlGlobalState *globalval;
|
||||||
|
|
||||||
|
if (libxml_is_threaded == 0)
|
||||||
|
return(NULL);
|
||||||
|
|
||||||
pthread_once(&once_control, xmlOnceInit);
|
pthread_once(&once_control, xmlOnceInit);
|
||||||
|
|
||||||
if ((globalval = (xmlGlobalState *)
|
if ((globalval = (xmlGlobalState *)
|
||||||
@@ -559,6 +617,8 @@ int
|
|||||||
xmlGetThreadId(void)
|
xmlGetThreadId(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
if (libxml_is_threaded == 0)
|
||||||
|
return(0);
|
||||||
return((int) pthread_self());
|
return((int) pthread_self());
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
@@ -580,6 +640,10 @@ int
|
|||||||
xmlIsMainThread(void)
|
xmlIsMainThread(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
if (libxml_is_threaded == -1)
|
||||||
|
xmlInitThreads();
|
||||||
|
if (libxml_is_threaded == 0)
|
||||||
|
return(1);
|
||||||
pthread_once(&once_control, xmlOnceInit);
|
pthread_once(&once_control, xmlOnceInit);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
xmlOnceInit ();
|
xmlOnceInit ();
|
||||||
@@ -646,6 +710,29 @@ xmlInitThreads(void)
|
|||||||
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
||||||
InitializeCriticalSection(&cleanup_helpers_cs);
|
InitializeCriticalSection(&cleanup_helpers_cs);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_PTHREAD_H
|
||||||
|
if (libxml_is_threaded == -1) {
|
||||||
|
if ((pthread_once != NULL) &&
|
||||||
|
(pthread_getspecific != NULL) &&
|
||||||
|
(pthread_setspecific != NULL) &&
|
||||||
|
(pthread_key_create != NULL) &&
|
||||||
|
(pthread_mutex_init != NULL) &&
|
||||||
|
(pthread_mutex_destroy != NULL) &&
|
||||||
|
(pthread_mutex_lock != NULL) &&
|
||||||
|
(pthread_mutex_unlock != NULL) &&
|
||||||
|
(pthread_cond_init != NULL) &&
|
||||||
|
(pthread_equal != NULL) &&
|
||||||
|
(pthread_self != NULL) &&
|
||||||
|
(pthread_key_create != NULL) &&
|
||||||
|
(pthread_cond_signal != NULL)) {
|
||||||
|
libxml_is_threaded = 1;
|
||||||
|
/* fprintf(stderr, "Running multithreaded\n"); */
|
||||||
|
} else {
|
||||||
|
/* fprintf(stderr, "Running without multithread\n"); */
|
||||||
|
libxml_is_threaded = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
3250
Extras/LibXML/tree.c
3250
Extras/LibXML/tree.c
File diff suppressed because it is too large
Load Diff
@@ -185,6 +185,8 @@
|
|||||||
* path = [ abs_path | opaque_part ]
|
* path = [ abs_path | opaque_part ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define STRNDUP(s, n) (char *) xmlStrndup((const xmlChar *)(s), (n))
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Generic URI structure functions *
|
* Generic URI structure functions *
|
||||||
@@ -224,8 +226,8 @@ xmlChar *
|
|||||||
xmlSaveUri(xmlURIPtr uri) {
|
xmlSaveUri(xmlURIPtr uri) {
|
||||||
xmlChar *ret = NULL;
|
xmlChar *ret = NULL;
|
||||||
const char *p;
|
const char *p;
|
||||||
intptr_t len;
|
int len;
|
||||||
intptr_t max;
|
int max;
|
||||||
|
|
||||||
if (uri == NULL) return(NULL);
|
if (uri == NULL) return(NULL);
|
||||||
|
|
||||||
@@ -809,7 +811,7 @@ static int is_hex(char c) {
|
|||||||
* Returns an copy of the string, but unescaped
|
* Returns an copy of the string, but unescaped
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
xmlURIUnescapeString(const char *str, intptr_t len, char *target) {
|
xmlURIUnescapeString(const char *str, int len, char *target) {
|
||||||
char *ret, *out;
|
char *ret, *out;
|
||||||
const char *in;
|
const char *in;
|
||||||
|
|
||||||
@@ -872,7 +874,7 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
|
|||||||
xmlChar *ret, ch;
|
xmlChar *ret, ch;
|
||||||
const xmlChar *in;
|
const xmlChar *in;
|
||||||
|
|
||||||
size_t len, out;
|
unsigned int len, out;
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@@ -1076,17 +1078,22 @@ xmlURIEscape(const xmlChar * str)
|
|||||||
static int
|
static int
|
||||||
xmlParseURIFragment(xmlURIPtr uri, const char **str)
|
xmlParseURIFragment(xmlURIPtr uri, const char **str)
|
||||||
{
|
{
|
||||||
const char *cur = *str;
|
const char *cur;
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
|
cur = *str;
|
||||||
|
|
||||||
while (IS_URIC(cur) || IS_UNWISE(cur))
|
while (IS_URIC(cur) || IS_UNWISE(cur))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->fragment != NULL)
|
if (uri->fragment != NULL)
|
||||||
xmlFree(uri->fragment);
|
xmlFree(uri->fragment);
|
||||||
uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->fragment = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return (0);
|
return (0);
|
||||||
@@ -1106,17 +1113,23 @@ xmlParseURIFragment(xmlURIPtr uri, const char **str)
|
|||||||
static int
|
static int
|
||||||
xmlParseURIQuery(xmlURIPtr uri, const char **str)
|
xmlParseURIQuery(xmlURIPtr uri, const char **str)
|
||||||
{
|
{
|
||||||
const char *cur = *str;
|
const char *cur;
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
while (IS_URIC(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))
|
cur = *str;
|
||||||
|
|
||||||
|
while ((IS_URIC(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->query != NULL)
|
if (uri->query != NULL)
|
||||||
xmlFree(uri->query);
|
xmlFree(uri->query);
|
||||||
uri->query = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->query = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->query = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return (0);
|
return (0);
|
||||||
@@ -1147,8 +1160,7 @@ xmlParseURIScheme(xmlURIPtr uri, const char **str) {
|
|||||||
while (IS_SCHEME(*cur)) cur++;
|
while (IS_SCHEME(*cur)) cur++;
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->scheme != NULL) xmlFree(uri->scheme);
|
if (uri->scheme != NULL) xmlFree(uri->scheme);
|
||||||
/* !!! strndup */
|
uri->scheme = STRNDUP(*str, cur - *str);
|
||||||
uri->scheme = xmlURIUnescapeString(*str, cur - *str, NULL);
|
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return(0);
|
return(0);
|
||||||
@@ -1174,16 +1186,21 @@ xmlParseURIOpaquePart(xmlURIPtr uri, const char **str)
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
cur = *str;
|
cur = *str;
|
||||||
if (!(IS_URIC_NO_SLASH(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))) {
|
if (!((IS_URIC_NO_SLASH(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))) {
|
||||||
return (3);
|
return (3);
|
||||||
}
|
}
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
while (IS_URIC(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))
|
while ((IS_URIC(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->opaque != NULL)
|
if (uri->opaque != NULL)
|
||||||
xmlFree(uri->opaque);
|
xmlFree(uri->opaque);
|
||||||
uri->opaque = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->opaque = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->opaque = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return (0);
|
return (0);
|
||||||
@@ -1235,7 +1252,10 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) {
|
|||||||
if (*cur == '@') {
|
if (*cur == '@') {
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->user != NULL) xmlFree(uri->user);
|
if (uri->user != NULL) xmlFree(uri->user);
|
||||||
uri->user = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->path = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->user = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
cur++;
|
cur++;
|
||||||
} else {
|
} else {
|
||||||
@@ -1349,7 +1369,10 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) {
|
|||||||
uri->authority = NULL;
|
uri->authority = NULL;
|
||||||
if (host[0] != '[') { /* it's not an IPV6 addr */
|
if (host[0] != '[') { /* it's not an IPV6 addr */
|
||||||
if (uri->server != NULL) xmlFree(uri->server);
|
if (uri->server != NULL) xmlFree(uri->server);
|
||||||
uri->server = xmlURIUnescapeString(host, cur - host, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->server = STRNDUP(host, cur - host);
|
||||||
|
else
|
||||||
|
uri->server = xmlURIUnescapeString(host, cur - host, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -1392,16 +1415,21 @@ xmlParseURIRelSegment(xmlURIPtr uri, const char **str)
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
cur = *str;
|
cur = *str;
|
||||||
if (!(IS_SEGMENT(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))) {
|
if (!((IS_SEGMENT(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))) {
|
||||||
return (3);
|
return (3);
|
||||||
}
|
}
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
while (IS_SEGMENT(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))
|
while ((IS_SEGMENT(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
if (uri->path != NULL)
|
if (uri->path != NULL)
|
||||||
xmlFree(uri->path);
|
xmlFree(uri->path);
|
||||||
uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->path = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return (0);
|
return (0);
|
||||||
@@ -1432,11 +1460,13 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
|
|||||||
cur = *str;
|
cur = *str;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
while (IS_PCHAR(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))
|
while ((IS_PCHAR(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
while (*cur == ';') {
|
while (*cur == ';') {
|
||||||
cur++;
|
cur++;
|
||||||
while (IS_PCHAR(cur) || ((uri != NULL) && (uri->cleanup) && (IS_UNWISE(cur))))
|
while ((IS_PCHAR(cur)) ||
|
||||||
|
((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
|
||||||
NEXT(cur);
|
NEXT(cur);
|
||||||
}
|
}
|
||||||
if (*cur != '/')
|
if (*cur != '/')
|
||||||
@@ -1444,7 +1474,7 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
|
|||||||
cur++;
|
cur++;
|
||||||
} while (1);
|
} while (1);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
intptr_t len, len2 = 0;
|
int len, len2 = 0;
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1472,8 +1502,13 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
|
|||||||
len2++;
|
len2++;
|
||||||
}
|
}
|
||||||
path[len2] = 0;
|
path[len2] = 0;
|
||||||
if (cur - *str > 0)
|
if (cur - *str > 0) {
|
||||||
xmlURIUnescapeString(*str, cur - *str, &path[len2]);
|
if (uri->cleanup & 2) {
|
||||||
|
memcpy(&path[len2], *str, cur - *str);
|
||||||
|
path[len2 + (cur - *str)] = 0;
|
||||||
|
} else
|
||||||
|
xmlURIUnescapeString(*str, cur - *str, &path[len2]);
|
||||||
|
}
|
||||||
if (uri->path != NULL)
|
if (uri->path != NULL)
|
||||||
xmlFree(uri->path);
|
xmlFree(uri->path);
|
||||||
uri->path = path;
|
uri->path = path;
|
||||||
@@ -1538,7 +1573,10 @@ xmlParseURIAuthority(xmlURIPtr uri, const char **str) {
|
|||||||
if (uri->user != NULL) xmlFree(uri->user);
|
if (uri->user != NULL) xmlFree(uri->user);
|
||||||
uri->user = NULL;
|
uri->user = NULL;
|
||||||
if (uri->authority != NULL) xmlFree(uri->authority);
|
if (uri->authority != NULL) xmlFree(uri->authority);
|
||||||
uri->authority = xmlURIUnescapeString(*str, cur - *str, NULL);
|
if (uri->cleanup & 2)
|
||||||
|
uri->authority = STRNDUP(*str, cur - *str);
|
||||||
|
else
|
||||||
|
uri->authority = xmlURIUnescapeString(*str, cur - *str, NULL);
|
||||||
}
|
}
|
||||||
*str = cur;
|
*str = cur;
|
||||||
return(0);
|
return(0);
|
||||||
@@ -1761,6 +1799,38 @@ xmlParseURI(const char *str) {
|
|||||||
return(uri);
|
return(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlParseURIRaw:
|
||||||
|
* @str: the URI string to analyze
|
||||||
|
* @raw: if 1 unescaping of URI pieces are disabled
|
||||||
|
*
|
||||||
|
* Parse an URI but allows to keep intact the original fragments.
|
||||||
|
*
|
||||||
|
* URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
|
||||||
|
*
|
||||||
|
* Returns a newly built xmlURIPtr or NULL in case of error
|
||||||
|
*/
|
||||||
|
xmlURIPtr
|
||||||
|
xmlParseURIRaw(const char *str, int raw) {
|
||||||
|
xmlURIPtr uri;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (str == NULL)
|
||||||
|
return(NULL);
|
||||||
|
uri = xmlCreateURI();
|
||||||
|
if (uri != NULL) {
|
||||||
|
if (raw) {
|
||||||
|
uri->cleanup |= 2;
|
||||||
|
}
|
||||||
|
ret = xmlParseURIReference(uri, str);
|
||||||
|
if (ret) {
|
||||||
|
xmlFreeURI(uri);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(uri);
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Public functions *
|
* Public functions *
|
||||||
@@ -1785,7 +1855,7 @@ xmlParseURI(const char *str) {
|
|||||||
xmlChar *
|
xmlChar *
|
||||||
xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
|
||||||
xmlChar *val = NULL;
|
xmlChar *val = NULL;
|
||||||
intptr_t ret, len, indx, cur, out;
|
int ret, len, indx, cur, out;
|
||||||
xmlURIPtr ref = NULL;
|
xmlURIPtr ref = NULL;
|
||||||
xmlURIPtr bas = NULL;
|
xmlURIPtr bas = NULL;
|
||||||
xmlURIPtr res = NULL;
|
xmlURIPtr res = NULL;
|
||||||
@@ -2061,23 +2131,17 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
|||||||
{
|
{
|
||||||
xmlChar *val = NULL;
|
xmlChar *val = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
intptr_t ix;
|
int ix;
|
||||||
intptr_t pos = 0;
|
int pos = 0;
|
||||||
intptr_t nbslash = 0;
|
int nbslash = 0;
|
||||||
|
int len;
|
||||||
xmlURIPtr ref = NULL;
|
xmlURIPtr ref = NULL;
|
||||||
xmlURIPtr bas = NULL;
|
xmlURIPtr bas = NULL;
|
||||||
xmlChar *bptr, *uptr, *vptr;
|
xmlChar *bptr, *uptr, *vptr;
|
||||||
|
int remove_path = 0;
|
||||||
|
|
||||||
if ((URI == NULL) || (*URI == 0))
|
if ((URI == NULL) || (*URI == 0))
|
||||||
return NULL;
|
return NULL;
|
||||||
/*
|
|
||||||
* Special case - if URI starts with '.', we assume it's already
|
|
||||||
* in relative form, so nothing to do.
|
|
||||||
*/
|
|
||||||
if (*URI == '.') {
|
|
||||||
val = xmlStrdup (URI);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First parse URI into a standard form
|
* First parse URI into a standard form
|
||||||
@@ -2085,9 +2149,13 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
|||||||
ref = xmlCreateURI ();
|
ref = xmlCreateURI ();
|
||||||
if (ref == NULL)
|
if (ref == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
ret = xmlParseURIReference (ref, (const char *) URI);
|
/* If URI not already in "relative" form */
|
||||||
if (ret != 0)
|
if (URI[0] != '.') {
|
||||||
goto done; /* Error in URI, return NULL */
|
ret = xmlParseURIReference (ref, (const char *) URI);
|
||||||
|
if (ret != 0)
|
||||||
|
goto done; /* Error in URI, return NULL */
|
||||||
|
} else
|
||||||
|
ref->path = (char *)xmlStrdup(URI);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Next parse base into the same standard form
|
* Next parse base into the same standard form
|
||||||
@@ -2099,72 +2167,113 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
|||||||
bas = xmlCreateURI ();
|
bas = xmlCreateURI ();
|
||||||
if (bas == NULL)
|
if (bas == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
ret = xmlParseURIReference (bas, (const char *) base);
|
if (base[0] != '.') {
|
||||||
if (ret != 0)
|
ret = xmlParseURIReference (bas, (const char *) base);
|
||||||
goto done; /* Error in base, return NULL */
|
if (ret != 0)
|
||||||
|
goto done; /* Error in base, return NULL */
|
||||||
|
} else
|
||||||
|
bas->path = (char *)xmlStrdup(base);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the scheme / server on the URI differs from the base,
|
* If the scheme / server on the URI differs from the base,
|
||||||
* just return the URI
|
* just return the URI
|
||||||
*/
|
*/
|
||||||
if ((ref->scheme != NULL) &&
|
if ((ref->scheme != NULL) &&
|
||||||
((bas->scheme == NULL) ||
|
((bas->scheme == NULL) ||
|
||||||
xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme) ||
|
(xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) ||
|
||||||
xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server))) {
|
(xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) {
|
||||||
val = xmlStrdup (URI);
|
val = xmlStrdup (URI);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
if (xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path)) {
|
||||||
|
val = xmlStrdup(BAD_CAST "");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (bas->path == NULL) {
|
||||||
|
val = xmlStrdup((xmlChar *)ref->path);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (ref->path == NULL) {
|
||||||
|
ref->path = (char *) "/";
|
||||||
|
remove_path = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At this point (at last!) we can compare the two paths
|
* At this point (at last!) we can compare the two paths
|
||||||
*
|
*
|
||||||
* First we compare the two strings and find where they first differ
|
* First we take care of the special case where either of the
|
||||||
|
* two path components may be missing (bug 316224)
|
||||||
*/
|
*/
|
||||||
|
if (bas->path == NULL) {
|
||||||
|
if (ref->path != NULL) {
|
||||||
|
uptr = (xmlChar *) ref->path;
|
||||||
|
if (*uptr == '/')
|
||||||
|
uptr++;
|
||||||
|
val = xmlStrdup(uptr);
|
||||||
|
}
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
bptr = (xmlChar *)bas->path;
|
bptr = (xmlChar *)bas->path;
|
||||||
if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
|
if (ref->path == NULL) {
|
||||||
pos += 2;
|
for (ix = 0; bptr[ix] != 0; ix++) {
|
||||||
if ((*bptr == '.') && (bptr[1] == '/'))
|
|
||||||
bptr += 2;
|
|
||||||
else if ((*bptr == '/') && (ref->path[pos] != '/'))
|
|
||||||
bptr++;
|
|
||||||
while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
|
|
||||||
pos++;
|
|
||||||
|
|
||||||
if (bptr[pos] == ref->path[pos]) {
|
|
||||||
val = NULL; /* if no differences, return NULL */
|
|
||||||
goto done; /* (I can't imagine why anyone would do this) */
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* In URI, "back up" to the last '/' encountered. This will be the
|
|
||||||
* beginning of the "unique" suffix of URI
|
|
||||||
*/
|
|
||||||
ix = pos;
|
|
||||||
if ((ref->path[ix] == '/') && (ix > 0))
|
|
||||||
ix--;
|
|
||||||
for (; ix > 0; ix--) {
|
|
||||||
if (ref->path[ix] == '/')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (ix == 0) {
|
|
||||||
uptr = (xmlChar *)ref->path;
|
|
||||||
} else {
|
|
||||||
ix++;
|
|
||||||
uptr = (xmlChar *)&ref->path[ix];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* In base, count the number of '/' from the differing point
|
|
||||||
*/
|
|
||||||
if (bptr[pos] != ref->path[pos]) { /* check for trivial URI == base */
|
|
||||||
for (; bptr[ix] != 0; ix++) {
|
|
||||||
if (bptr[ix] == '/')
|
if (bptr[ix] == '/')
|
||||||
nbslash++;
|
nbslash++;
|
||||||
}
|
}
|
||||||
|
uptr = NULL;
|
||||||
|
len = 1; /* this is for a string terminator only */
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Next we compare the two strings and find where they first differ
|
||||||
|
*/
|
||||||
|
if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
|
||||||
|
pos += 2;
|
||||||
|
if ((*bptr == '.') && (bptr[1] == '/'))
|
||||||
|
bptr += 2;
|
||||||
|
else if ((*bptr == '/') && (ref->path[pos] != '/'))
|
||||||
|
bptr++;
|
||||||
|
while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
|
||||||
|
pos++;
|
||||||
|
|
||||||
|
if (bptr[pos] == ref->path[pos]) {
|
||||||
|
val = xmlStrdup(BAD_CAST "");
|
||||||
|
goto done; /* (I can't imagine why anyone would do this) */
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In URI, "back up" to the last '/' encountered. This will be the
|
||||||
|
* beginning of the "unique" suffix of URI
|
||||||
|
*/
|
||||||
|
ix = pos;
|
||||||
|
if ((ref->path[ix] == '/') && (ix > 0))
|
||||||
|
ix--;
|
||||||
|
else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == '/'))
|
||||||
|
ix -= 2;
|
||||||
|
for (; ix > 0; ix--) {
|
||||||
|
if (ref->path[ix] == '/')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (ix == 0) {
|
||||||
|
uptr = (xmlChar *)ref->path;
|
||||||
|
} else {
|
||||||
|
ix++;
|
||||||
|
uptr = (xmlChar *)&ref->path[ix];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In base, count the number of '/' from the differing point
|
||||||
|
*/
|
||||||
|
if (bptr[pos] != ref->path[pos]) {/* check for trivial URI == base */
|
||||||
|
for (; bptr[ix] != 0; ix++) {
|
||||||
|
if (bptr[ix] == '/')
|
||||||
|
nbslash++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
len = xmlStrlen (uptr) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbslash == 0) {
|
if (nbslash == 0) {
|
||||||
val = xmlStrdup (uptr);
|
if (uptr != NULL)
|
||||||
|
val = xmlStrdup (uptr);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2173,8 +2282,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
|||||||
* length of the remainder of the URI, plus enough space
|
* length of the remainder of the URI, plus enough space
|
||||||
* for the "../" groups, plus one for the terminator
|
* for the "../" groups, plus one for the terminator
|
||||||
*/
|
*/
|
||||||
ix = xmlStrlen (uptr) + 1;
|
val = (xmlChar *) xmlMalloc (len + 3 * nbslash);
|
||||||
val = (xmlChar *) xmlMalloc (ix + 3 * nbslash);
|
|
||||||
if (val == NULL) {
|
if (val == NULL) {
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlBuildRelativeURI: out of memory\n");
|
"xmlBuildRelativeURI: out of memory\n");
|
||||||
@@ -2192,12 +2300,25 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
|
|||||||
/*
|
/*
|
||||||
* Finish up with the end of the URI
|
* Finish up with the end of the URI
|
||||||
*/
|
*/
|
||||||
memcpy (vptr, uptr, ix);
|
if (uptr != NULL) {
|
||||||
|
if ((vptr > val) && (len > 0) &&
|
||||||
|
(uptr[0] == '/') && (vptr[-1] == '/')) {
|
||||||
|
memcpy (vptr, uptr + 1, len - 1);
|
||||||
|
vptr[len - 2] = 0;
|
||||||
|
} else {
|
||||||
|
memcpy (vptr, uptr, len);
|
||||||
|
vptr[len - 1] = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vptr[len - 1] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
/*
|
/*
|
||||||
* Free the working variables
|
* Free the working variables
|
||||||
*/
|
*/
|
||||||
|
if (remove_path != 0)
|
||||||
|
ref->path = NULL;
|
||||||
if (ref != NULL)
|
if (ref != NULL)
|
||||||
xmlFreeURI (ref);
|
xmlFreeURI (ref);
|
||||||
if (bas != NULL)
|
if (bas != NULL)
|
||||||
@@ -2226,12 +2347,13 @@ xmlChar*
|
|||||||
xmlCanonicPath(const xmlChar *path)
|
xmlCanonicPath(const xmlChar *path)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
intptr_t len = 0;
|
int len = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
xmlChar *p = NULL;
|
xmlChar *p = NULL;
|
||||||
#endif
|
#endif
|
||||||
xmlChar *ret;
|
|
||||||
xmlURIPtr uri;
|
xmlURIPtr uri;
|
||||||
|
xmlChar *ret;
|
||||||
|
const xmlChar *absuri;
|
||||||
|
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@@ -2240,12 +2362,47 @@ xmlCanonicPath(const xmlChar *path)
|
|||||||
return xmlStrdup(path);
|
return xmlStrdup(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
absuri = xmlStrstr(path, BAD_CAST "://");
|
||||||
|
if (absuri != NULL) {
|
||||||
|
int l, j;
|
||||||
|
unsigned char c;
|
||||||
|
xmlChar *escURI;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* this looks like an URI where some parts have not been
|
||||||
|
* escaped leading to a parsing problem check that the first
|
||||||
|
* part matches a protocol.
|
||||||
|
*/
|
||||||
|
l = absuri - path;
|
||||||
|
if ((l <= 0) || (l > 20))
|
||||||
|
goto path_processing;
|
||||||
|
for (j = 0;j < l;j++) {
|
||||||
|
c = path[j];
|
||||||
|
if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z'))))
|
||||||
|
goto path_processing;
|
||||||
|
}
|
||||||
|
|
||||||
|
escURI = xmlURIEscapeStr(path, BAD_CAST ":/?_.#&;=");
|
||||||
|
if (escURI != NULL) {
|
||||||
|
uri = xmlParseURI((const char *) escURI);
|
||||||
|
if (uri != NULL) {
|
||||||
|
xmlFreeURI(uri);
|
||||||
|
return escURI;
|
||||||
|
}
|
||||||
|
xmlFreeURI(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
path_processing:
|
||||||
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
|
/*
|
||||||
|
* This really need to be cleaned up by someone with a Windows box
|
||||||
|
*/
|
||||||
uri = xmlCreateURI();
|
uri = xmlCreateURI();
|
||||||
if (uri == NULL) {
|
if (uri == NULL) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
|
||||||
len = xmlStrlen(path);
|
len = xmlStrlen(path);
|
||||||
if ((len > 2) && IS_WINDOWS_PATH(path)) {
|
if ((len > 2) && IS_WINDOWS_PATH(path)) {
|
||||||
uri->scheme = xmlStrdup(BAD_CAST "file");
|
uri->scheme = xmlStrdup(BAD_CAST "file");
|
||||||
@@ -2262,15 +2419,21 @@ xmlCanonicPath(const xmlChar *path)
|
|||||||
*p = '/';
|
*p = '/';
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
uri->path = (char *) xmlStrdup((const xmlChar *) path);
|
|
||||||
#endif
|
|
||||||
if (uri->path == NULL) {
|
if (uri->path == NULL) {
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
ret = xmlSaveUri(uri);
|
|
||||||
|
if (uri->scheme == NULL) {
|
||||||
|
ret = xmlStrdup((const xmlChar *) path);
|
||||||
|
} else {
|
||||||
|
ret = xmlSaveUri(uri);
|
||||||
|
}
|
||||||
|
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
|
#else
|
||||||
|
ret = xmlStrdup((const xmlChar *) path);
|
||||||
|
#endif
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -453,14 +453,14 @@ nodeVPop(xmlValidCtxtPtr ctxt)
|
|||||||
xmlNodePtr ret;
|
xmlNodePtr ret;
|
||||||
|
|
||||||
if (ctxt->nodeNr <= 0)
|
if (ctxt->nodeNr <= 0)
|
||||||
return (0);
|
return (NULL);
|
||||||
ctxt->nodeNr--;
|
ctxt->nodeNr--;
|
||||||
if (ctxt->nodeNr > 0)
|
if (ctxt->nodeNr > 0)
|
||||||
ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];
|
ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];
|
||||||
else
|
else
|
||||||
ctxt->node = NULL;
|
ctxt->node = NULL;
|
||||||
ret = ctxt->nodeTab[ctxt->nodeNr];
|
ret = ctxt->nodeTab[ctxt->nodeNr];
|
||||||
ctxt->nodeTab[ctxt->nodeNr] = 0;
|
ctxt->nodeTab[ctxt->nodeNr] = NULL;
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1212,14 +1212,14 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
|
|||||||
* xmlSprintfElementContent:
|
* xmlSprintfElementContent:
|
||||||
* @buf: an output buffer
|
* @buf: an output buffer
|
||||||
* @content: An element table
|
* @content: An element table
|
||||||
* @glob: 1 if one must print the englobing parenthesis, 0 otherwise
|
* @englob: 1 if one must print the englobing parenthesis, 0 otherwise
|
||||||
*
|
*
|
||||||
* Deprecated, unsafe, use xmlSnprintfElementContent
|
* Deprecated, unsafe, use xmlSnprintfElementContent
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
|
xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
|
||||||
xmlElementContentPtr content ATTRIBUTE_UNUSED,
|
xmlElementContentPtr content ATTRIBUTE_UNUSED,
|
||||||
int glob ATTRIBUTE_UNUSED) {
|
int englob ATTRIBUTE_UNUSED) {
|
||||||
}
|
}
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
|
|
||||||
@@ -1228,14 +1228,14 @@ xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
|
|||||||
* @buf: an output buffer
|
* @buf: an output buffer
|
||||||
* @size: the buffer size
|
* @size: the buffer size
|
||||||
* @content: An element table
|
* @content: An element table
|
||||||
* @glob: 1 if one must print the englobing parenthesis, 0 otherwise
|
* @englob: 1 if one must print the englobing parenthesis, 0 otherwise
|
||||||
*
|
*
|
||||||
* This will dump the content of the element content definition
|
* This will dump the content of the element content definition
|
||||||
* Intended just for the debug routine
|
* Intended just for the debug routine
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content, int glob) {
|
xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int englob) {
|
||||||
size_t len;
|
int len;
|
||||||
|
|
||||||
if (content == NULL) return;
|
if (content == NULL) return;
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
@@ -1244,21 +1244,21 @@ xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content,
|
|||||||
strcat(buf, " ...");
|
strcat(buf, " ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (glob) strcat(buf, "(");
|
if (englob) strcat(buf, "(");
|
||||||
switch (content->type) {
|
switch (content->type) {
|
||||||
case XML_ELEMENT_CONTENT_PCDATA:
|
case XML_ELEMENT_CONTENT_PCDATA:
|
||||||
strcat(buf, "#PCDATA");
|
strcat(buf, "#PCDATA");
|
||||||
break;
|
break;
|
||||||
case XML_ELEMENT_CONTENT_ELEMENT:
|
case XML_ELEMENT_CONTENT_ELEMENT:
|
||||||
if (content->prefix != NULL) {
|
if (content->prefix != NULL) {
|
||||||
if ((intptr_t)(size - len) < xmlStrlen(content->prefix) + 10) {
|
if (size - len < xmlStrlen(content->prefix) + 10) {
|
||||||
strcat(buf, " ...");
|
strcat(buf, " ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
strcat(buf, (char *) content->prefix);
|
strcat(buf, (char *) content->prefix);
|
||||||
strcat(buf, ":");
|
strcat(buf, ":");
|
||||||
}
|
}
|
||||||
if ((intptr_t)(size - len) < xmlStrlen(content->name) + 10) {
|
if (size - len < xmlStrlen(content->name) + 10) {
|
||||||
strcat(buf, " ...");
|
strcat(buf, " ...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1306,7 +1306,7 @@ xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content,
|
|||||||
xmlSnprintfElementContent(buf, size, content->c2, 0);
|
xmlSnprintfElementContent(buf, size, content->c2, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (glob)
|
if (englob)
|
||||||
strcat(buf, ")");
|
strcat(buf, ")");
|
||||||
switch (content->ocur) {
|
switch (content->ocur) {
|
||||||
case XML_ELEMENT_CONTENT_ONCE:
|
case XML_ELEMENT_CONTENT_ONCE:
|
||||||
@@ -1485,6 +1485,10 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
|
|||||||
xmlFree(ns);
|
xmlFree(ns);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
if (ns != NULL) {
|
||||||
|
xmlFree(ns);
|
||||||
|
ns = NULL;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
|
ret = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
@@ -1864,6 +1868,7 @@ xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
|
|||||||
* xmlScanIDAttributeDecl:
|
* xmlScanIDAttributeDecl:
|
||||||
* @ctxt: the validation context
|
* @ctxt: the validation context
|
||||||
* @elem: the element name
|
* @elem: the element name
|
||||||
|
* @err: whether to raise errors here
|
||||||
*
|
*
|
||||||
* Verify that the element don't have too many ID attributes
|
* Verify that the element don't have too many ID attributes
|
||||||
* declared.
|
* declared.
|
||||||
@@ -1871,7 +1876,7 @@ xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
|
|||||||
* Returns the number of ID attributes found.
|
* Returns the number of ID attributes found.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
|
xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem, int err) {
|
||||||
xmlAttributePtr cur;
|
xmlAttributePtr cur;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@@ -1880,7 +1885,7 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
|
|||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if (cur->atype == XML_ATTRIBUTE_ID) {
|
if (cur->atype == XML_ATTRIBUTE_ID) {
|
||||||
ret ++;
|
ret ++;
|
||||||
if (ret > 1)
|
if ((ret > 1) && (err))
|
||||||
xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_MULTIPLE_ID,
|
xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_MULTIPLE_ID,
|
||||||
"Element %s has too many ID attributes defined : %s\n",
|
"Element %s has too many ID attributes defined : %s\n",
|
||||||
elem->name, cur->name, NULL);
|
elem->name, cur->name, NULL);
|
||||||
@@ -2058,6 +2063,12 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
|
|||||||
* fill the structure.
|
* fill the structure.
|
||||||
*/
|
*/
|
||||||
ret->atype = type;
|
ret->atype = type;
|
||||||
|
/*
|
||||||
|
* doc must be set before possible error causes call
|
||||||
|
* to xmlFreeAttribute (because it's used to check on
|
||||||
|
* dict use)
|
||||||
|
*/
|
||||||
|
ret->doc = dtd->doc;
|
||||||
if (dict) {
|
if (dict) {
|
||||||
ret->name = xmlDictLookup(dict, name, -1);
|
ret->name = xmlDictLookup(dict, name, -1);
|
||||||
ret->prefix = xmlDictLookup(dict, ns, -1);
|
ret->prefix = xmlDictLookup(dict, ns, -1);
|
||||||
@@ -2102,7 +2113,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
|
|||||||
|
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
#ifdef LIBXML_VALID_ENABLED
|
||||||
if ((type == XML_ATTRIBUTE_ID) &&
|
if ((type == XML_ATTRIBUTE_ID) &&
|
||||||
(xmlScanIDAttributeDecl(NULL, elemDef) != 0)) {
|
(xmlScanIDAttributeDecl(NULL, elemDef, 1) != 0)) {
|
||||||
xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
|
xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
|
||||||
"Element %s has too may ID attributes defined : %s\n",
|
"Element %s has too may ID attributes defined : %s\n",
|
||||||
elem, name, NULL);
|
elem, name, NULL);
|
||||||
@@ -2145,7 +2156,6 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
|
|||||||
* Link it to the DTD
|
* Link it to the DTD
|
||||||
*/
|
*/
|
||||||
ret->parent = dtd;
|
ret->parent = dtd;
|
||||||
ret->doc = dtd->doc;
|
|
||||||
if (dtd->last == NULL) {
|
if (dtd->last == NULL) {
|
||||||
dtd->children = dtd->last = (xmlNodePtr) ret;
|
dtd->children = dtd->last = (xmlNodePtr) ret;
|
||||||
} else {
|
} else {
|
||||||
@@ -2693,42 +2703,49 @@ xmlFreeIDTable(xmlIDTablePtr table) {
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
|
xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
|
||||||
|
if ((attr == NULL) || (attr->name == NULL)) return(0);
|
||||||
|
if ((attr->ns != NULL) && (attr->ns->prefix != NULL) &&
|
||||||
|
(!strcmp((char *) attr->name, "id")) &&
|
||||||
|
(!strcmp((char *) attr->ns->prefix, "xml")))
|
||||||
|
return(1);
|
||||||
if (doc == NULL) return(0);
|
if (doc == NULL) return(0);
|
||||||
if (attr == NULL) return(0);
|
|
||||||
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
|
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
|
||||||
return(0);
|
return(0);
|
||||||
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
|
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
|
||||||
if (((xmlStrEqual(BAD_CAST "id", attr->name)) ||
|
if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
|
||||||
(xmlStrEqual(BAD_CAST "name", attr->name))) &&
|
((xmlStrEqual(BAD_CAST "name", attr->name)) &&
|
||||||
((elem != NULL) && (!xmlStrEqual(elem->name, BAD_CAST "input"))))
|
((elem == NULL) || (!xmlStrEqual(elem->name, BAD_CAST "input")))))
|
||||||
return(1);
|
return(1);
|
||||||
return(0);
|
return(0);
|
||||||
|
} else if (elem == NULL) {
|
||||||
|
return(0);
|
||||||
} else {
|
} else {
|
||||||
xmlAttributePtr attrDecl;
|
xmlAttributePtr attrDecl = NULL;
|
||||||
|
|
||||||
if (elem == NULL) return(0);
|
xmlChar felem[50], fattr[50];
|
||||||
if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
|
xmlChar *fullelemname, *fullattrname;
|
||||||
xmlChar fn[50];
|
|
||||||
xmlChar *fullname;
|
|
||||||
|
|
||||||
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
|
fullelemname = (elem->ns != NULL && elem->ns->prefix != NULL) ?
|
||||||
if (fullname == NULL)
|
xmlBuildQName(elem->name, elem->ns->prefix, felem, 50) :
|
||||||
return(0);
|
(xmlChar *)elem->name;
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname,
|
|
||||||
attr->name);
|
fullattrname = (attr->ns != NULL && attr->ns->prefix != NULL) ?
|
||||||
|
xmlBuildQName(attr->name, attr->ns->prefix, fattr, 50) :
|
||||||
|
(xmlChar *)attr->name;
|
||||||
|
|
||||||
|
if (fullelemname != NULL && fullattrname != NULL) {
|
||||||
|
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullelemname,
|
||||||
|
fullattrname);
|
||||||
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname,
|
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullelemname,
|
||||||
attr->name);
|
fullattrname);
|
||||||
if ((fullname != fn) && (fullname != elem->name))
|
|
||||||
xmlFree(fullname);
|
|
||||||
} else {
|
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name,
|
|
||||||
attr->name);
|
|
||||||
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name,
|
|
||||||
attr->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((fullattrname != fattr) && (fullattrname != attr->name))
|
||||||
|
xmlFree(fullattrname);
|
||||||
|
if ((fullelemname != felem) && (fullelemname != elem->name))
|
||||||
|
xmlFree(fullelemname);
|
||||||
|
|
||||||
if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_ID))
|
if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_ID))
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
@@ -2768,6 +2785,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
|
|||||||
}
|
}
|
||||||
xmlHashRemoveEntry(table, ID, (xmlHashDeallocator) xmlFreeID);
|
xmlHashRemoveEntry(table, ID, (xmlHashDeallocator) xmlFreeID);
|
||||||
xmlFree(ID);
|
xmlFree(ID);
|
||||||
|
attr->atype = 0;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3855,7 +3873,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
|
|
||||||
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
|
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
|
||||||
if (fullname == NULL)
|
if (fullname == NULL)
|
||||||
return(0);
|
return(NULL);
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
|
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
|
||||||
if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
|
if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
|
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
|
||||||
@@ -3940,7 +3958,7 @@ xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
|
|||||||
|
|
||||||
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
|
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
|
||||||
if (fullname == NULL)
|
if (fullname == NULL)
|
||||||
return(0);
|
return(NULL);
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
|
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
|
||||||
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
if ((attrDecl == NULL) && (doc->extSubset != NULL))
|
||||||
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
|
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
|
||||||
@@ -4037,7 +4055,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset,
|
xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset,
|
||||||
attr->elem);
|
attr->elem);
|
||||||
if (elem != NULL) {
|
if (elem != NULL) {
|
||||||
nbId = xmlScanIDAttributeDecl(NULL, elem);
|
nbId = xmlScanIDAttributeDecl(NULL, elem, 0);
|
||||||
} else {
|
} else {
|
||||||
xmlAttributeTablePtr table;
|
xmlAttributeTablePtr table;
|
||||||
|
|
||||||
@@ -4046,9 +4064,11 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
* element in the external subset.
|
* element in the external subset.
|
||||||
*/
|
*/
|
||||||
nbId = 0;
|
nbId = 0;
|
||||||
table = (xmlAttributeTablePtr) doc->intSubset->attributes;
|
if (doc->intSubset != NULL) {
|
||||||
xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
|
table = (xmlAttributeTablePtr) doc->intSubset->attributes;
|
||||||
xmlValidateAttributeIdCallback, &nbId);
|
xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
|
||||||
|
xmlValidateAttributeIdCallback, &nbId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nbId > 1) {
|
if (nbId > 1) {
|
||||||
|
|
||||||
@@ -4059,7 +4079,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
int extId = 0;
|
int extId = 0;
|
||||||
elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem);
|
elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem);
|
||||||
if (elem != NULL) {
|
if (elem != NULL) {
|
||||||
extId = xmlScanIDAttributeDecl(NULL, elem);
|
extId = xmlScanIDAttributeDecl(NULL, elem, 0);
|
||||||
}
|
}
|
||||||
if (extId > 1) {
|
if (extId > 1) {
|
||||||
xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
|
xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
|
||||||
@@ -5846,24 +5866,12 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
NULL,NULL,NULL);
|
NULL,NULL,NULL);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (elem->properties != NULL) {
|
|
||||||
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
|
||||||
"Text element has attribute !\n",
|
|
||||||
NULL,NULL,NULL);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
if (elem->ns != NULL) {
|
if (elem->ns != NULL) {
|
||||||
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
||||||
"Text element has namespace !\n",
|
"Text element has namespace !\n",
|
||||||
NULL,NULL,NULL);
|
NULL,NULL,NULL);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (elem->nsDef != NULL) {
|
|
||||||
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
|
||||||
"Text element has namespace !\n",
|
|
||||||
NULL,NULL,NULL);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
if (elem->content == NULL) {
|
if (elem->content == NULL) {
|
||||||
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
|
||||||
"Text element has no content !\n",
|
"Text element has no content !\n",
|
||||||
@@ -6288,23 +6296,25 @@ xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret &= xmlValidateOneElement(ctxt, doc, elem);
|
ret &= xmlValidateOneElement(ctxt, doc, elem);
|
||||||
attr = elem->properties;
|
if (elem->type == XML_ELEMENT_NODE) {
|
||||||
while (attr != NULL) {
|
attr = elem->properties;
|
||||||
value = xmlNodeListGetString(doc, attr->children, 0);
|
while (attr != NULL) {
|
||||||
ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
|
value = xmlNodeListGetString(doc, attr->children, 0);
|
||||||
if (value != NULL)
|
ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
|
||||||
xmlFree((char *)value);
|
if (value != NULL)
|
||||||
attr= attr->next;
|
xmlFree((char *)value);
|
||||||
}
|
attr= attr->next;
|
||||||
ns = elem->nsDef;
|
}
|
||||||
while (ns != NULL) {
|
ns = elem->nsDef;
|
||||||
if (elem->ns == NULL)
|
while (ns != NULL) {
|
||||||
ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
|
if (elem->ns == NULL)
|
||||||
ns, ns->href);
|
ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
|
||||||
else
|
ns, ns->href);
|
||||||
ret &= xmlValidateOneNamespace(ctxt, doc, elem, elem->ns->prefix,
|
else
|
||||||
ns, ns->href);
|
ret &= xmlValidateOneNamespace(ctxt, doc, elem,
|
||||||
ns = ns->next;
|
elem->ns->prefix, ns, ns->href);
|
||||||
|
ns = ns->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
child = elem->children;
|
child = elem->children;
|
||||||
while (child != NULL) {
|
while (child != NULL) {
|
||||||
@@ -6752,7 +6762,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
|
|||||||
/**
|
/**
|
||||||
* xmlValidGetPotentialChildren:
|
* xmlValidGetPotentialChildren:
|
||||||
* @ctree: an element content tree
|
* @ctree: an element content tree
|
||||||
* @list: an array to store the list of child names
|
* @names: an array to store the list of child names
|
||||||
* @len: a pointer to the number of element in the list
|
* @len: a pointer to the number of element in the list
|
||||||
* @max: the size of the array
|
* @max: the size of the array
|
||||||
*
|
*
|
||||||
@@ -6762,32 +6772,33 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
|
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
||||||
|
const xmlChar **names,
|
||||||
int *len, int max) {
|
int *len, int max) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((ctree == NULL) || (list == NULL) || (len == NULL))
|
if ((ctree == NULL) || (names == NULL) || (len == NULL))
|
||||||
return(-1);
|
return(-1);
|
||||||
if (*len >= max) return(*len);
|
if (*len >= max) return(*len);
|
||||||
|
|
||||||
switch (ctree->type) {
|
switch (ctree->type) {
|
||||||
case XML_ELEMENT_CONTENT_PCDATA:
|
case XML_ELEMENT_CONTENT_PCDATA:
|
||||||
for (i = 0; i < *len;i++)
|
for (i = 0; i < *len;i++)
|
||||||
if (xmlStrEqual(BAD_CAST "#PCDATA", list[i])) return(*len);
|
if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len);
|
||||||
list[(*len)++] = BAD_CAST "#PCDATA";
|
names[(*len)++] = BAD_CAST "#PCDATA";
|
||||||
break;
|
break;
|
||||||
case XML_ELEMENT_CONTENT_ELEMENT:
|
case XML_ELEMENT_CONTENT_ELEMENT:
|
||||||
for (i = 0; i < *len;i++)
|
for (i = 0; i < *len;i++)
|
||||||
if (xmlStrEqual(ctree->name, list[i])) return(*len);
|
if (xmlStrEqual(ctree->name, names[i])) return(*len);
|
||||||
list[(*len)++] = ctree->name;
|
names[(*len)++] = ctree->name;
|
||||||
break;
|
break;
|
||||||
case XML_ELEMENT_CONTENT_SEQ:
|
case XML_ELEMENT_CONTENT_SEQ:
|
||||||
xmlValidGetPotentialChildren(ctree->c1, list, len, max);
|
xmlValidGetPotentialChildren(ctree->c1, names, len, max);
|
||||||
xmlValidGetPotentialChildren(ctree->c2, list, len, max);
|
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
|
||||||
break;
|
break;
|
||||||
case XML_ELEMENT_CONTENT_OR:
|
case XML_ELEMENT_CONTENT_OR:
|
||||||
xmlValidGetPotentialChildren(ctree->c1, list, len, max);
|
xmlValidGetPotentialChildren(ctree->c1, names, len, max);
|
||||||
xmlValidGetPotentialChildren(ctree->c2, list, len, max);
|
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6797,7 +6808,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
|
|||||||
/*
|
/*
|
||||||
* Dummy function to suppress messages while we try out valid elements
|
* Dummy function to suppress messages while we try out valid elements
|
||||||
*/
|
*/
|
||||||
static void xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
|
static void XMLCDECL xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
|
||||||
const char *msg ATTRIBUTE_UNUSED, ...) {
|
const char *msg ATTRIBUTE_UNUSED, ...) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ xmlXIncludeNewRef(xmlXIncludeCtxtPtr ctxt, const xmlChar *URI,
|
|||||||
ret->URI = xmlStrdup(URI);
|
ret->URI = xmlStrdup(URI);
|
||||||
ret->fragment = NULL;
|
ret->fragment = NULL;
|
||||||
ret->ref = ref;
|
ret->ref = ref;
|
||||||
ret->doc = 0;
|
ret->doc = NULL;
|
||||||
ret->count = 0;
|
ret->count = 0;
|
||||||
ret->xml = 0;
|
ret->xml = 0;
|
||||||
ret->inc = NULL;
|
ret->inc = NULL;
|
||||||
@@ -360,7 +360,7 @@ xmlXIncludeURLPop(xmlXIncludeCtxtPtr ctxt)
|
|||||||
else
|
else
|
||||||
ctxt->url = NULL;
|
ctxt->url = NULL;
|
||||||
ret = ctxt->urlTab[ctxt->urlNr];
|
ret = ctxt->urlTab[ctxt->urlNr];
|
||||||
ctxt->urlTab[ctxt->urlNr] = 0;
|
ctxt->urlTab[ctxt->urlNr] = NULL;
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
xmlFree(ret);
|
xmlFree(ret);
|
||||||
}
|
}
|
||||||
@@ -388,9 +388,11 @@ xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
|
|||||||
if (ctxt->incTab[i] != NULL)
|
if (ctxt->incTab[i] != NULL)
|
||||||
xmlXIncludeFreeRef(ctxt->incTab[i]);
|
xmlXIncludeFreeRef(ctxt->incTab[i]);
|
||||||
}
|
}
|
||||||
for (i = 0;i < ctxt->txtNr;i++) {
|
if (ctxt->txturlTab != NULL) {
|
||||||
if (ctxt->txturlTab[i] != NULL)
|
for (i = 0;i < ctxt->txtNr;i++) {
|
||||||
xmlFree(ctxt->txturlTab[i]);
|
if (ctxt->txturlTab[i] != NULL)
|
||||||
|
xmlFree(ctxt->txturlTab[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ctxt->incTab != NULL)
|
if (ctxt->incTab != NULL)
|
||||||
xmlFree(ctxt->incTab);
|
xmlFree(ctxt->incTab);
|
||||||
@@ -609,7 +611,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
/*
|
/*
|
||||||
* Check the URL against the stack for recursions
|
* Check the URL against the stack for recursions
|
||||||
*/
|
*/
|
||||||
if (!local) {
|
if ((!local) && (xml == 1)) {
|
||||||
for (i = 0;i < ctxt->urlNr;i++) {
|
for (i = 0;i < ctxt->urlNr;i++) {
|
||||||
if (xmlStrEqual(URL, ctxt->urlTab[i])) {
|
if (xmlStrEqual(URL, ctxt->urlTab[i])) {
|
||||||
xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
|
xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
|
||||||
@@ -1401,9 +1403,14 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
|
|||||||
URL = xmlSaveUri(uri);
|
URL = xmlSaveUri(uri);
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
if (URL == NULL) {
|
if (URL == NULL) {
|
||||||
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
|
if (ctxt->incTab != NULL)
|
||||||
XML_XINCLUDE_HREF_URI,
|
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
|
||||||
"invalid value URI %s\n", url);
|
XML_XINCLUDE_HREF_URI,
|
||||||
|
"invalid value URI %s\n", url);
|
||||||
|
else
|
||||||
|
xmlXIncludeErr(ctxt, NULL,
|
||||||
|
XML_XINCLUDE_HREF_URI,
|
||||||
|
"invalid value URI %s\n", url);
|
||||||
if (fragment != NULL)
|
if (fragment != NULL)
|
||||||
xmlFree(fragment);
|
xmlFree(fragment);
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -1663,32 +1670,81 @@ loaded:
|
|||||||
*/
|
*/
|
||||||
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
|
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
xmlChar *relURI;
|
xmlChar *base;
|
||||||
xmlChar *curBase;
|
xmlChar *curBase;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The base is only adjusted if necessary for the existing base
|
* The base is only adjusted if "necessary", i.e. if the xinclude node
|
||||||
|
* has a base specified, or the URL is relative
|
||||||
*/
|
*/
|
||||||
relURI = xmlBuildRelativeURI(URL, ctxt->base);
|
base = xmlGetNsProp(ctxt->incTab[nr]->ref, BAD_CAST "base",
|
||||||
if (relURI == NULL) { /* Error return */
|
XML_XML_NAMESPACE);
|
||||||
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
|
if (base == NULL) {
|
||||||
|
/*
|
||||||
|
* No xml:base on the xinclude node, so we check whether the
|
||||||
|
* URI base is different than (relative to) the context base
|
||||||
|
*/
|
||||||
|
curBase = xmlBuildRelativeURI(URL, ctxt->base);
|
||||||
|
if (curBase == NULL) { /* Error return */
|
||||||
|
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
|
||||||
XML_XINCLUDE_HREF_URI,
|
XML_XINCLUDE_HREF_URI,
|
||||||
"trying to build relative URI from %s\n", URL);
|
"trying to build relative URI from %s\n", URL);
|
||||||
} else {
|
} else {
|
||||||
if (xmlStrchr(relURI, (xmlChar) '/')) {
|
/* If the URI doesn't contain a slash, it's not relative */
|
||||||
node = ctxt->incTab[nr]->inc;
|
if (!xmlStrchr(curBase, (xmlChar) '/'))
|
||||||
while (node != NULL) {
|
xmlFree(curBase);
|
||||||
if (node->type == XML_ELEMENT_NODE) {
|
else
|
||||||
curBase = xmlNodeGetBase(node->doc, node);
|
base = curBase;
|
||||||
if ((curBase == NULL) || xmlStrEqual(curBase, node->doc->URL))
|
|
||||||
xmlNodeSetBase(node, relURI);
|
|
||||||
if (curBase != NULL)
|
|
||||||
xmlFree(curBase);
|
|
||||||
}
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
xmlFree(relURI);
|
}
|
||||||
|
if (base != NULL) { /* Adjustment may be needed */
|
||||||
|
node = ctxt->incTab[nr]->inc;
|
||||||
|
while (node != NULL) {
|
||||||
|
/* Only work on element nodes */
|
||||||
|
if (node->type == XML_ELEMENT_NODE) {
|
||||||
|
curBase = xmlNodeGetBase(node->doc, node);
|
||||||
|
/* If no current base, set it */
|
||||||
|
if (curBase == NULL) {
|
||||||
|
xmlNodeSetBase(node, base);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* If the current base is the same as the
|
||||||
|
* URL of the document, then reset it to be
|
||||||
|
* the specified xml:base or the relative URI
|
||||||
|
*/
|
||||||
|
if (xmlStrEqual(curBase, node->doc->URL)) {
|
||||||
|
xmlNodeSetBase(node, base);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* If the element already has an xml:base
|
||||||
|
* set, then relativise it if necessary
|
||||||
|
*/
|
||||||
|
xmlChar *xmlBase;
|
||||||
|
xmlBase = xmlGetNsProp(node,
|
||||||
|
BAD_CAST "base",
|
||||||
|
XML_XML_NAMESPACE);
|
||||||
|
if (xmlBase != NULL) {
|
||||||
|
xmlChar *relBase;
|
||||||
|
relBase = xmlBuildURI(xmlBase, base);
|
||||||
|
if (relBase == NULL) { /* error */
|
||||||
|
xmlXIncludeErr(ctxt,
|
||||||
|
ctxt->incTab[nr]->ref,
|
||||||
|
XML_XINCLUDE_HREF_URI,
|
||||||
|
"trying to rebuild base from %s\n",
|
||||||
|
xmlBase);
|
||||||
|
} else {
|
||||||
|
xmlNodeSetBase(node, relBase);
|
||||||
|
xmlFree(relBase);
|
||||||
|
}
|
||||||
|
xmlFree(xmlBase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlFree(curBase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
node = node->next;
|
||||||
|
}
|
||||||
|
xmlFree(base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) &&
|
if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) &&
|
||||||
@@ -1719,7 +1775,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
|
|||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
xmlURIPtr uri;
|
xmlURIPtr uri;
|
||||||
xmlChar *URL;
|
xmlChar *URL;
|
||||||
size_t i;
|
int i;
|
||||||
xmlChar *encoding = NULL;
|
xmlChar *encoding = NULL;
|
||||||
xmlCharEncoding enc = (xmlCharEncoding) 0;
|
xmlCharEncoding enc = (xmlCharEncoding) 0;
|
||||||
|
|
||||||
@@ -1807,7 +1863,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
|
|||||||
* Scan all chars from the resource and add the to the node
|
* Scan all chars from the resource and add the to the node
|
||||||
*/
|
*/
|
||||||
while (xmlParserInputBufferRead(buf, 128) > 0) {
|
while (xmlParserInputBufferRead(buf, 128) > 0) {
|
||||||
size_t len;
|
int len;
|
||||||
const xmlChar *content;
|
const xmlChar *content;
|
||||||
|
|
||||||
content = xmlBufferContent(buf->buffer);
|
content = xmlBufferContent(buf->buffer);
|
||||||
@@ -1903,7 +1959,7 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
|
|||||||
static xmlNodePtr
|
static xmlNodePtr
|
||||||
xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
|
xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
|
||||||
xmlXIncludeAddNode(ctxt, node);
|
xmlXIncludeAddNode(ctxt, node);
|
||||||
return(0);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2254,7 +2310,7 @@ static int
|
|||||||
xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
|
xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int i;
|
int i, start;
|
||||||
|
|
||||||
if ((doc == NULL) || (tree == NULL))
|
if ((doc == NULL) || (tree == NULL))
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -2266,6 +2322,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
start = ctxt->incNr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First phase: lookup the elements in the document
|
* First phase: lookup the elements in the document
|
||||||
@@ -2306,7 +2363,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
|
|||||||
/*
|
/*
|
||||||
* Second Phase : collect the infosets fragments
|
* Second Phase : collect the infosets fragments
|
||||||
*/
|
*/
|
||||||
for (i = ctxt->incBase;i < ctxt->incNr; i++) {
|
for (i = start;i < ctxt->incNr; i++) {
|
||||||
xmlXIncludeLoadNode(ctxt, i);
|
xmlXIncludeLoadNode(ctxt, i);
|
||||||
ret++;
|
ret++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Figure a portable way to know if a file is a directory. */
|
/* Figure a portable way to know if a file is a directory. */
|
||||||
#ifndef HAVE_STAT
|
#ifndef HAVE_STAT
|
||||||
# ifdef HAVE__STAT
|
# ifdef HAVE__STAT
|
||||||
@@ -189,6 +193,39 @@ static const char *IOerr[] = {
|
|||||||
"unknown address familly", /* EAFNOSUPPORT */
|
"unknown address familly", /* EAFNOSUPPORT */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||||
|
/**
|
||||||
|
* __xmlIOWin32UTF8ToWChar:
|
||||||
|
* @u8String: uft-8 string
|
||||||
|
*
|
||||||
|
* Convert a string from utf-8 to wchar (WINDOWS ONLY!)
|
||||||
|
*/
|
||||||
|
static wchar_t *
|
||||||
|
__xmlIOWin32UTF8ToWChar(const char *u8String)
|
||||||
|
{
|
||||||
|
wchar_t *wString = NULL;
|
||||||
|
|
||||||
|
if (u8String)
|
||||||
|
{
|
||||||
|
int wLen = MultiByteToWideChar(CP_UTF8,0,u8String,-1,NULL,0);
|
||||||
|
if (wLen)
|
||||||
|
{
|
||||||
|
wString = malloc((wLen+1) * sizeof(wchar_t));
|
||||||
|
if (wString)
|
||||||
|
{
|
||||||
|
if (MultiByteToWideChar(CP_UTF8,0,u8String,-1,wString,wLen+1) == 0)
|
||||||
|
{
|
||||||
|
free(wString);
|
||||||
|
wString = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return wString;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlIOErrMemory:
|
* xmlIOErrMemory:
|
||||||
* @extra: extra informations
|
* @extra: extra informations
|
||||||
@@ -553,22 +590,44 @@ int
|
|||||||
xmlCheckFilename (const char *path)
|
xmlCheckFilename (const char *path)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STAT
|
#ifdef HAVE_STAT
|
||||||
struct stat stat_buffer;
|
struct stat stat_buffer;
|
||||||
|
#endif
|
||||||
|
if (path == NULL)
|
||||||
|
return(0);
|
||||||
|
|
||||||
if (path == NULL)
|
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||||
return(0);
|
{
|
||||||
|
int retval = 0;
|
||||||
|
|
||||||
|
wchar_t *wPath = __xmlIOWin32UTF8ToWChar(path);
|
||||||
|
if (wPath)
|
||||||
|
{
|
||||||
|
struct _stat stat_buffer;
|
||||||
|
|
||||||
|
if (_wstat(wPath,&stat_buffer) == 0)
|
||||||
|
{
|
||||||
|
retval = 1;
|
||||||
|
|
||||||
|
if (((stat_buffer.st_mode & S_IFDIR) == S_IFDIR))
|
||||||
|
retval = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
free(wPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_STAT
|
||||||
if (stat(path, &stat_buffer) == -1)
|
if (stat(path, &stat_buffer) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef S_ISDIR
|
#ifdef S_ISDIR
|
||||||
if (S_ISDIR(stat_buffer.st_mode)) {
|
if (S_ISDIR(stat_buffer.st_mode))
|
||||||
return 2;
|
return 2;
|
||||||
}
|
#endif /* S_ISDIR */
|
||||||
#endif
|
#endif /* HAVE_STAT */
|
||||||
#endif
|
#endif /* WIN32 */
|
||||||
if (path == NULL)
|
|
||||||
return(0);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -588,11 +647,11 @@ xmlNop(void) {
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written
|
* Returns the number of bytes written
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlFdRead (void * context, char * buffer, size_t len) {
|
xmlFdRead (void * context, char * buffer, int len) {
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
ret = read((int) (size_t) context, &buffer[0], (unsigned int) len);
|
ret = read((int) (long) context, &buffer[0], len);
|
||||||
if (ret < 0) xmlIOErr(0, "read()");
|
if (ret < 0) xmlIOErr(0, "read()");
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@@ -608,12 +667,14 @@ xmlFdRead (void * context, char * buffer, size_t len) {
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written
|
* Returns the number of bytes written
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlFdWrite (void * context, const char * buffer, size_t len) {
|
xmlFdWrite (void * context, const char * buffer, int len) {
|
||||||
intptr_t ret;
|
int ret = 0;
|
||||||
|
|
||||||
ret = write((int) (size_t) context, &buffer[0], (unsigned int) len);
|
if (len > 0) {
|
||||||
if (ret < 0) xmlIOErr(0, "write()");
|
ret = write((int) (long) context, &buffer[0], len);
|
||||||
|
if (ret < 0) xmlIOErr(0, "write()");
|
||||||
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
@@ -629,7 +690,7 @@ xmlFdWrite (void * context, const char * buffer, size_t len) {
|
|||||||
static int
|
static int
|
||||||
xmlFdClose (void * context) {
|
xmlFdClose (void * context) {
|
||||||
int ret;
|
int ret;
|
||||||
ret = close((int) (size_t) context);
|
ret = close((int) (long) context);
|
||||||
if (ret < 0) xmlIOErr(0, "close()");
|
if (ret < 0) xmlIOErr(0, "close()");
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@@ -690,7 +751,18 @@ xmlFileOpen_real (const char *filename) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||||
fd = fopen(path, "rb");
|
{
|
||||||
|
wchar_t *wPath = __xmlIOWin32UTF8ToWChar(path);
|
||||||
|
if (wPath)
|
||||||
|
{
|
||||||
|
fd = _wfopen(wPath, L"rb");
|
||||||
|
free(wPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fd = fopen(path, "rb");
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
fd = fopen(path, "r");
|
fd = fopen(path, "r");
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
@@ -760,8 +832,24 @@ xmlFileOpenW (const char *filename) {
|
|||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
fd = fopen(path, "wb");
|
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
|
||||||
if (fd == NULL) xmlIOErr(0, path);
|
{
|
||||||
|
wchar_t *wPath = __xmlIOWin32UTF8ToWChar(path);
|
||||||
|
if (wPath)
|
||||||
|
{
|
||||||
|
fd = _wfopen(wPath, L"wb");
|
||||||
|
free(wPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fd = fopen(path, "wb");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
fd = fopen(path, "wb");
|
||||||
|
#endif /* WIN32 */
|
||||||
|
|
||||||
|
if (fd == NULL) xmlIOErr(0, path);
|
||||||
return((void *) fd);
|
return((void *) fd);
|
||||||
}
|
}
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
@@ -776,9 +864,9 @@ xmlFileOpenW (const char *filename) {
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written or < 0 in case of failure
|
* Returns the number of bytes written or < 0 in case of failure
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlFileRead (void * context, char * buffer, size_t len) {
|
xmlFileRead (void * context, char * buffer, int len) {
|
||||||
intptr_t ret;
|
int ret;
|
||||||
if ((context == NULL) || (buffer == NULL))
|
if ((context == NULL) || (buffer == NULL))
|
||||||
return(-1);
|
return(-1);
|
||||||
ret = fread(&buffer[0], 1, len, (FILE *) context);
|
ret = fread(&buffer[0], 1, len, (FILE *) context);
|
||||||
@@ -797,9 +885,9 @@ xmlFileRead (void * context, char * buffer, size_t len) {
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written
|
* Returns the number of bytes written
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlFileWrite (void * context, const char * buffer, size_t len) {
|
xmlFileWrite (void * context, const char * buffer, int len) {
|
||||||
size_t items;
|
int items;
|
||||||
|
|
||||||
if ((context == NULL) || (buffer == NULL))
|
if ((context == NULL) || (buffer == NULL))
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -860,6 +948,28 @@ xmlFileFlush (void * context) {
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
|
/**
|
||||||
|
* xmlBufferWrite:
|
||||||
|
* @context: the xmlBuffer
|
||||||
|
* @buffer: the data to write
|
||||||
|
* @len: number of bytes to write
|
||||||
|
*
|
||||||
|
* Write @len bytes from @buffer to the xml buffer
|
||||||
|
*
|
||||||
|
* Returns the number of bytes written
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
xmlBufferWrite (void * context, const char * buffer, int len) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = xmlBufferAdd((xmlBufferPtr) context, (const xmlChar *) buffer, len);
|
||||||
|
if (ret != 0)
|
||||||
|
return(-1);
|
||||||
|
return(len);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -1206,7 +1316,7 @@ xmlCreateZMemBuff( int compression ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set the header data. The CRC will be needed for the trailer */
|
/* Set the header data. The CRC will be needed for the trailer */
|
||||||
buff->crc = crc32( 0L, Z_NULL, 0 );
|
buff->crc = crc32( 0L, NULL, 0 );
|
||||||
hdr_lgth = snprintf( (char *)buff->zbuff, buff->size,
|
hdr_lgth = snprintf( (char *)buff->zbuff, buff->size,
|
||||||
"%c%c%c%c%c%c%c%c%c%c",
|
"%c%c%c%c%c%c%c%c%c%c",
|
||||||
GZ_MAGIC1, GZ_MAGIC2, Z_DEFLATED,
|
GZ_MAGIC1, GZ_MAGIC2, Z_DEFLATED,
|
||||||
@@ -2114,11 +2224,11 @@ xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) {
|
|||||||
*
|
*
|
||||||
* Returns the number of byte written or -1 in case of error.
|
* Returns the number of byte written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlOutputBufferClose(xmlOutputBufferPtr out)
|
xmlOutputBufferClose(xmlOutputBufferPtr out)
|
||||||
{
|
{
|
||||||
intptr_t written;
|
int written;
|
||||||
intptr_t err_rc = 0;
|
int err_rc = 0;
|
||||||
|
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
return (-1);
|
return (-1);
|
||||||
@@ -2250,9 +2360,9 @@ __xmlOutputBufferCreateFilename(const char *URI,
|
|||||||
|
|
||||||
puri = xmlParseURI(URI);
|
puri = xmlParseURI(URI);
|
||||||
if (puri != NULL) {
|
if (puri != NULL) {
|
||||||
|
#ifdef HAVE_ZLIB_H
|
||||||
if ((puri->scheme != NULL) &&
|
if ((puri->scheme != NULL) &&
|
||||||
(!xmlStrEqual(BAD_CAST puri->scheme, BAD_CAST "file")))
|
(!xmlStrEqual(BAD_CAST puri->scheme, BAD_CAST "file")))
|
||||||
#ifdef HAVE_ZLIB_H
|
|
||||||
is_file_uri = 0;
|
is_file_uri = 0;
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
@@ -2436,6 +2546,31 @@ xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) {
|
|||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlOutputBufferCreateBuffer:
|
||||||
|
* @buffer: a xmlBufferPtr
|
||||||
|
* @encoder: the encoding converter or NULL
|
||||||
|
*
|
||||||
|
* Create a buffered output for the progressive saving to a xmlBuffer
|
||||||
|
*
|
||||||
|
* Returns the new parser output or NULL
|
||||||
|
*/
|
||||||
|
xmlOutputBufferPtr
|
||||||
|
xmlOutputBufferCreateBuffer(xmlBufferPtr buffer,
|
||||||
|
xmlCharEncodingHandlerPtr encoder) {
|
||||||
|
xmlOutputBufferPtr ret;
|
||||||
|
|
||||||
|
if (buffer == NULL) return(NULL);
|
||||||
|
|
||||||
|
ret = xmlOutputBufferCreateIO((xmlOutputWriteCallback)
|
||||||
|
xmlBufferWrite,
|
||||||
|
(xmlOutputCloseCallback)
|
||||||
|
NULL, (void *) buffer, encoder);
|
||||||
|
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2456,7 +2591,7 @@ xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
|
|||||||
|
|
||||||
ret = xmlAllocParserInputBuffer(enc);
|
ret = xmlAllocParserInputBuffer(enc);
|
||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
ret->context = (void *) (intptr_t) fd;
|
ret->context = (void *) (long) fd;
|
||||||
ret->readcallback = xmlFdRead;
|
ret->readcallback = xmlFdRead;
|
||||||
ret->closecallback = xmlFdClose;
|
ret->closecallback = xmlFdClose;
|
||||||
}
|
}
|
||||||
@@ -2476,7 +2611,7 @@ xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
|
|||||||
* Returns the new parser input or NULL
|
* Returns the new parser input or NULL
|
||||||
*/
|
*/
|
||||||
xmlParserInputBufferPtr
|
xmlParserInputBufferPtr
|
||||||
xmlParserInputBufferCreateMem(const char *mem, intptr_t size, xmlCharEncoding enc) {
|
xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
|
||||||
xmlParserInputBufferPtr ret;
|
xmlParserInputBufferPtr ret;
|
||||||
int errcode;
|
int errcode;
|
||||||
|
|
||||||
@@ -2512,7 +2647,7 @@ xmlParserInputBufferCreateMem(const char *mem, intptr_t size, xmlCharEncoding en
|
|||||||
* Returns the new parser input or NULL
|
* Returns the new parser input or NULL
|
||||||
*/
|
*/
|
||||||
xmlParserInputBufferPtr
|
xmlParserInputBufferPtr
|
||||||
xmlParserInputBufferCreateStatic(const char *mem, intptr_t size,
|
xmlParserInputBufferCreateStatic(const char *mem, int size,
|
||||||
xmlCharEncoding enc) {
|
xmlCharEncoding enc) {
|
||||||
xmlParserInputBufferPtr ret;
|
xmlParserInputBufferPtr ret;
|
||||||
|
|
||||||
@@ -2536,11 +2671,11 @@ xmlParserInputBufferCreateStatic(const char *mem, intptr_t size,
|
|||||||
else
|
else
|
||||||
ret->raw = NULL;
|
ret->raw = NULL;
|
||||||
ret->compressed = -1;
|
ret->compressed = -1;
|
||||||
ret->context = (void*) mem;
|
ret->context = (void *) mem;
|
||||||
ret->readcallback = NULL;
|
ret->readcallback = NULL;
|
||||||
ret->closecallback = NULL;
|
ret->closecallback = NULL;
|
||||||
|
|
||||||
return ret;
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
@@ -2562,7 +2697,7 @@ xmlOutputBufferCreateFd(int fd, xmlCharEncodingHandlerPtr encoder) {
|
|||||||
|
|
||||||
ret = xmlAllocOutputBuffer(encoder);
|
ret = xmlAllocOutputBuffer(encoder);
|
||||||
if (ret != NULL) {
|
if (ret != NULL) {
|
||||||
ret->context = (void *) (intptr_t) fd;
|
ret->context = (void *) (long) fd;
|
||||||
ret->writecallback = xmlFdWrite;
|
ret->writecallback = xmlFdWrite;
|
||||||
ret->closecallback = NULL;
|
ret->closecallback = NULL;
|
||||||
}
|
}
|
||||||
@@ -2686,16 +2821,16 @@ xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
|
|||||||
* Returns the number of chars read and stored in the buffer, or -1
|
* Returns the number of chars read and stored in the buffer, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlParserInputBufferPush(xmlParserInputBufferPtr in,
|
xmlParserInputBufferPush(xmlParserInputBufferPtr in,
|
||||||
intptr_t len, const char *buf) {
|
int len, const char *buf) {
|
||||||
intptr_t nbchars = 0;
|
int nbchars = 0;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (len < 0) return(0);
|
if (len < 0) return(0);
|
||||||
if ((in == NULL) || (in->error)) return(-1);
|
if ((in == NULL) || (in->error)) return(-1);
|
||||||
if (in->encoder != NULL) {
|
if (in->encoder != NULL) {
|
||||||
size_t use;
|
unsigned int use;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store the data in the incoming raw buffer
|
* Store the data in the incoming raw buffer
|
||||||
@@ -2738,10 +2873,10 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
|
|||||||
* When reading from an Input channel indicated end of file or error
|
* When reading from an Input channel indicated end of file or error
|
||||||
* don't reread from it again.
|
* don't reread from it again.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
endOfInput (void * context ATTRIBUTE_UNUSED,
|
endOfInput (void * context ATTRIBUTE_UNUSED,
|
||||||
char * buffer ATTRIBUTE_UNUSED,
|
char * buffer ATTRIBUTE_UNUSED,
|
||||||
size_t len ATTRIBUTE_UNUSED) {
|
int len ATTRIBUTE_UNUSED) {
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2760,13 +2895,13 @@ endOfInput (void * context ATTRIBUTE_UNUSED,
|
|||||||
* Returns the number of chars read and stored in the buffer, or -1
|
* Returns the number of chars read and stored in the buffer, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlParserInputBufferGrow(xmlParserInputBufferPtr in, intptr_t len) {
|
xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
intptr_t res = 0;
|
int res = 0;
|
||||||
intptr_t nbchars = 0;
|
int nbchars = 0;
|
||||||
intptr_t buffree;
|
int buffree;
|
||||||
size_t needSize;
|
unsigned int needSize;
|
||||||
|
|
||||||
if ((in == NULL) || (in->error)) return(-1);
|
if ((in == NULL) || (in->error)) return(-1);
|
||||||
if ((len <= MINLEN) && (len != 4))
|
if ((len <= MINLEN) && (len != 4))
|
||||||
@@ -2806,7 +2941,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, intptr_t len) {
|
|||||||
}
|
}
|
||||||
len = res;
|
len = res;
|
||||||
if (in->encoder != NULL) {
|
if (in->encoder != NULL) {
|
||||||
size_t use;
|
unsigned int use;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store the data in the incoming raw buffer
|
* Store the data in the incoming raw buffer
|
||||||
@@ -2854,8 +2989,8 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, intptr_t len) {
|
|||||||
* Returns the number of chars read and stored in the buffer, or -1
|
* Returns the number of chars read and stored in the buffer, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlParserInputBufferRead(xmlParserInputBufferPtr in, intptr_t len) {
|
xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) {
|
||||||
if ((in == NULL) || (in->error)) return(-1);
|
if ((in == NULL) || (in->error)) return(-1);
|
||||||
if (in->readcallback != NULL)
|
if (in->readcallback != NULL)
|
||||||
return(xmlParserInputBufferGrow(in, len));
|
return(xmlParserInputBufferGrow(in, len));
|
||||||
@@ -2881,12 +3016,12 @@ xmlParserInputBufferRead(xmlParserInputBufferPtr in, intptr_t len) {
|
|||||||
* Returns the number of chars immediately written, or -1
|
* Returns the number of chars immediately written, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlOutputBufferWrite(xmlOutputBufferPtr out, intptr_t len, const char *buf) {
|
xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
|
||||||
intptr_t nbchars = 0; /* number of chars to output to I/O */
|
int nbchars = 0; /* number of chars to output to I/O */
|
||||||
intptr_t ret; /* return from function call */
|
int ret; /* return from function call */
|
||||||
intptr_t written = 0; /* number of char written to I/O so far */
|
int written = 0; /* number of char written to I/O so far */
|
||||||
intptr_t chunk; /* number of byte curreent processed from buf */
|
int chunk; /* number of byte curreent processed from buf */
|
||||||
|
|
||||||
if ((out == NULL) || (out->error)) return(-1);
|
if ((out == NULL) || (out->error)) return(-1);
|
||||||
if (len < 0) return(0);
|
if (len < 0) return(0);
|
||||||
@@ -2982,9 +3117,9 @@ done:
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlEscapeContent(unsigned char* out, intptr_t* outlen,
|
xmlEscapeContent(unsigned char* out, int *outlen,
|
||||||
const xmlChar* in, intptr_t* inlen) {
|
const xmlChar* in, int *inlen) {
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* base = in;
|
const unsigned char* base = in;
|
||||||
unsigned char* outend = out + *outlen;
|
unsigned char* outend = out + *outlen;
|
||||||
@@ -3044,16 +3179,16 @@ xmlEscapeContent(unsigned char* out, intptr_t* outlen,
|
|||||||
* Returns the number of chars immediately written, or -1
|
* Returns the number of chars immediately written, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
|
xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
|
||||||
xmlCharEncodingOutputFunc escaping) {
|
xmlCharEncodingOutputFunc escaping) {
|
||||||
intptr_t nbchars = 0; /* number of chars to output to I/O */
|
int nbchars = 0; /* number of chars to output to I/O */
|
||||||
intptr_t ret; /* return from function call */
|
int ret; /* return from function call */
|
||||||
intptr_t written = 0; /* number of char written to I/O so far */
|
int written = 0; /* number of char written to I/O so far */
|
||||||
intptr_t oldwritten=0;/* loop guard */
|
int oldwritten=0;/* loop guard */
|
||||||
intptr_t chunk; /* number of byte currently processed from str */
|
int chunk; /* number of byte currently processed from str */
|
||||||
intptr_t len; /* number of bytes in str */
|
int len; /* number of bytes in str */
|
||||||
intptr_t cons; /* byte from str consumed */
|
int cons; /* byte from str consumed */
|
||||||
|
|
||||||
if ((out == NULL) || (out->error) || (str == NULL) ||
|
if ((out == NULL) || (out->error) || (str == NULL) ||
|
||||||
(out->buffer == NULL) ||
|
(out->buffer == NULL) ||
|
||||||
@@ -3165,9 +3300,9 @@ done:
|
|||||||
* Returns the number of chars immediately written, or -1
|
* Returns the number of chars immediately written, or -1
|
||||||
* in case of error.
|
* in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) {
|
xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) {
|
||||||
size_t len;
|
int len;
|
||||||
|
|
||||||
if ((out == NULL) || (out->error)) return(-1);
|
if ((out == NULL) || (out->error)) return(-1);
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
@@ -3187,9 +3322,9 @@ xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) {
|
|||||||
*
|
*
|
||||||
* Returns the number of byte written or -1 in case of error.
|
* Returns the number of byte written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlOutputBufferFlush(xmlOutputBufferPtr out) {
|
xmlOutputBufferFlush(xmlOutputBufferPtr out) {
|
||||||
intptr_t nbchars = 0, ret = 0;
|
int nbchars = 0, ret = 0;
|
||||||
|
|
||||||
if ((out == NULL) || (out->error)) return(-1);
|
if ((out == NULL) || (out->error)) return(-1);
|
||||||
/*
|
/*
|
||||||
@@ -3279,7 +3414,7 @@ xmlParserGetDirectory(const char *filename) {
|
|||||||
if (getcwd(dir, 1024) != NULL) {
|
if (getcwd(dir, 1024) != NULL) {
|
||||||
dir[1023] = 0;
|
dir[1023] = 0;
|
||||||
ret = xmlMemStrdup(dir);
|
ret = xmlMemStrdup(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@@ -3533,7 +3668,6 @@ xmlGetExternalEntityLoader(void) {
|
|||||||
*
|
*
|
||||||
* Load an external entity, note that the use of this function for
|
* Load an external entity, note that the use of this function for
|
||||||
* unparsed entities may generate problems
|
* unparsed entities may generate problems
|
||||||
* TODO: a more generic External entity API must be designed
|
|
||||||
*
|
*
|
||||||
* Returns the xmlParserInputPtr or NULL
|
* Returns the xmlParserInputPtr or NULL
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -120,7 +120,10 @@ static void usershell(void) {
|
|||||||
command[i++] = *cur++;
|
command[i++] = *cur++;
|
||||||
}
|
}
|
||||||
command[i] = 0;
|
command[i] = 0;
|
||||||
if (i == 0) continue;
|
if (i == 0) {
|
||||||
|
free(cmdline);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
nbargs++;
|
nbargs++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
#include <libxml/threads.h>
|
#include <libxml/threads.h>
|
||||||
|
|
||||||
static int xmlMemInitialized = 0;
|
static int xmlMemInitialized = 0;
|
||||||
static size_t debugMemSize = 0;
|
static unsigned long debugMemSize = 0;
|
||||||
static size_t debugMemBlocks = 0;
|
static unsigned long debugMemBlocks = 0;
|
||||||
static size_t debugMaxMemSize = 0;
|
static unsigned long debugMaxMemSize = 0;
|
||||||
static xmlMutexPtr xmlMemMutex = NULL;
|
static xmlMutexPtr xmlMemMutex = NULL;
|
||||||
|
|
||||||
void xmlMallocBreakpoint(void);
|
void xmlMallocBreakpoint(void);
|
||||||
@@ -309,7 +309,7 @@ xmlMemMalloc(size_t size)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void *
|
void *
|
||||||
xmlReallocLoc(void *ptr, size_t size, const char * file, int line)
|
xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
|
||||||
{
|
{
|
||||||
MEMHDR *p;
|
MEMHDR *p;
|
||||||
unsigned long number;
|
unsigned long number;
|
||||||
@@ -325,6 +325,7 @@ xmlReallocLoc(void *ptr, size_t size, const char * file, int line)
|
|||||||
|
|
||||||
p = CLIENT_2_HDR(ptr);
|
p = CLIENT_2_HDR(ptr);
|
||||||
number = p->mh_number;
|
number = p->mh_number;
|
||||||
|
if (xmlMemStopAtBlock == number) xmlMallocBreakpoint();
|
||||||
if (p->mh_tag != MEMTAG) {
|
if (p->mh_tag != MEMTAG) {
|
||||||
Mem_Tag_Err(p);
|
Mem_Tag_Err(p);
|
||||||
goto error;
|
goto error;
|
||||||
@@ -429,6 +430,7 @@ xmlMemFree(void *ptr)
|
|||||||
Mem_Tag_Err(p);
|
Mem_Tag_Err(p);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
|
||||||
p->mh_tag = ~MEMTAG;
|
p->mh_tag = ~MEMTAG;
|
||||||
memset(target, -1, p->mh_size);
|
memset(target, -1, p->mh_size);
|
||||||
xmlMutexLock(xmlMemMutex);
|
xmlMutexLock(xmlMemMutex);
|
||||||
@@ -455,7 +457,7 @@ xmlMemFree(void *ptr)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"xmlMemFree(%lX) error\n", (unsigned long) (size_t) ptr);
|
"xmlMemFree(%lX) error\n", (unsigned long) ptr);
|
||||||
xmlMallocBreakpoint();
|
xmlMallocBreakpoint();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -545,7 +547,7 @@ xmlMemoryStrdup(const char *str) {
|
|||||||
* Returns an int representing the amount of memory allocated.
|
* Returns an int representing the amount of memory allocated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t
|
int
|
||||||
xmlMemUsed(void) {
|
xmlMemUsed(void) {
|
||||||
return(debugMemSize);
|
return(debugMemSize);
|
||||||
}
|
}
|
||||||
@@ -558,7 +560,7 @@ xmlMemUsed(void) {
|
|||||||
* Returns an int representing the number of blocks
|
* Returns an int representing the number of blocks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t
|
int
|
||||||
xmlMemBlocks(void) {
|
xmlMemBlocks(void) {
|
||||||
return(debugMemBlocks);
|
return(debugMemBlocks);
|
||||||
}
|
}
|
||||||
@@ -640,7 +642,18 @@ xmlMemDisplay(FILE *fp)
|
|||||||
time_t currentTime;
|
time_t currentTime;
|
||||||
char buf[500];
|
char buf[500];
|
||||||
struct tm * tstruct;
|
struct tm * tstruct;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
FILE *old_fp = fp;
|
||||||
|
|
||||||
|
if (fp == NULL) {
|
||||||
|
fp = fopen(".memorylist", "w");
|
||||||
|
if (fp == NULL)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef MEM_LIST
|
||||||
|
#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
|
||||||
currentTime = time(NULL);
|
currentTime = time(NULL);
|
||||||
tstruct = localtime(¤tTime);
|
tstruct = localtime(¤tTime);
|
||||||
strftime(buf, sizeof(buf) - 1, "%I:%M:%S %p", tstruct);
|
strftime(buf, sizeof(buf) - 1, "%I:%M:%S %p", tstruct);
|
||||||
@@ -666,6 +679,8 @@ xmlMemDisplay(FILE *fp)
|
|||||||
default:
|
default:
|
||||||
fprintf(fp,"Unknown memory block, may be corrupted");
|
fprintf(fp,"Unknown memory block, may be corrupted");
|
||||||
xmlMutexUnlock(xmlMemMutex);
|
xmlMutexUnlock(xmlMemMutex);
|
||||||
|
if (old_fp == NULL)
|
||||||
|
fclose(fp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
|
if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
|
||||||
@@ -684,6 +699,8 @@ xmlMemDisplay(FILE *fp)
|
|||||||
#else
|
#else
|
||||||
fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
|
fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
|
||||||
#endif
|
#endif
|
||||||
|
if (old_fp == NULL)
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MEM_LIST
|
#ifdef MEM_LIST
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ xmlModuleOpen(const char *name, int options ATTRIBUTE_UNUSED)
|
|||||||
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
|
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
|
||||||
XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
|
XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
|
||||||
name, NULL, 0, 0, "failed to open %s\n", name);
|
name, NULL, 0, 0, "failed to open %s\n", name);
|
||||||
return 0;
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
module->name = xmlStrdup((const xmlChar *) name);
|
module->name = xmlStrdup((const xmlChar *) name);
|
||||||
@@ -179,7 +179,7 @@ xmlModuleFree(xmlModulePtr module)
|
|||||||
{
|
{
|
||||||
if (NULL == module) {
|
if (NULL == module) {
|
||||||
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
|
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
|
||||||
XML_MODULE_CLOSE, XML_ERR_FATAL, NULL, 0, 0,
|
XML_MODULE_CLOSE, XML_ERR_FATAL, NULL, 0, NULL,
|
||||||
NULL, NULL, 0, 0, "null module pointer\n");
|
NULL, NULL, 0, 0, "null module pointer\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -195,6 +195,10 @@ xmlModuleFree(xmlModulePtr module)
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef RTLD_GLOBAL /* For Tru64 UNIX 4.0 */
|
||||||
|
#define RTLD_GLOBAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlModulePlatformOpen:
|
* xmlModulePlatformOpen:
|
||||||
* @name: path to the module
|
* @name: path to the module
|
||||||
@@ -277,10 +281,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol);
|
rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol);
|
||||||
if ((-1 == rc) && (0 == errno)) {
|
|
||||||
rc = shl_findsym(handle, name, TYPE_DATA, symbol);
|
|
||||||
}
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -84,8 +84,8 @@ struct _xmlSaveCtxt {
|
|||||||
int level;
|
int level;
|
||||||
int format;
|
int format;
|
||||||
char indent[MAX_INDENT + 1]; /* array for indenting output */
|
char indent[MAX_INDENT + 1]; /* array for indenting output */
|
||||||
intptr_t indent_nr;
|
int indent_nr;
|
||||||
intptr_t indent_size;
|
int indent_size;
|
||||||
xmlCharEncodingOutputFunc escape; /* used for element content */
|
xmlCharEncodingOutputFunc escape; /* used for element content */
|
||||||
xmlCharEncodingOutputFunc escapeAttr;/* used for attribute content */
|
xmlCharEncodingOutputFunc escapeAttr;/* used for attribute content */
|
||||||
};
|
};
|
||||||
@@ -200,9 +200,9 @@ xmlSerializeHexCharRef(unsigned char *out, int val) {
|
|||||||
* if the return value is positive, else unpredictable.
|
* if the return value is positive, else unpredictable.
|
||||||
* The value of @outlen after return is the number of octets consumed.
|
* The value of @outlen after return is the number of octets consumed.
|
||||||
*/
|
*/
|
||||||
static intptr_t
|
static int
|
||||||
xmlEscapeEntities(unsigned char* out, intptr_t* outlen,
|
xmlEscapeEntities(unsigned char* out, int *outlen,
|
||||||
const xmlChar* in, intptr_t* inlen) {
|
const xmlChar* in, int *inlen) {
|
||||||
unsigned char* outstart = out;
|
unsigned char* outstart = out;
|
||||||
const unsigned char* base = in;
|
const unsigned char* base = in;
|
||||||
unsigned char* outend = out + *outlen;
|
unsigned char* outend = out + *outlen;
|
||||||
@@ -326,7 +326,8 @@ error:
|
|||||||
static void
|
static void
|
||||||
xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
|
xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
intptr_t i, len;
|
int i;
|
||||||
|
int len;
|
||||||
|
|
||||||
if (ctxt == NULL) return;
|
if (ctxt == NULL) return;
|
||||||
if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
|
if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
|
||||||
@@ -342,6 +343,10 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
|
|||||||
ctxt->indent_size);
|
ctxt->indent_size);
|
||||||
ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
|
ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xmlSaveNoEmptyTags) {
|
||||||
|
ctxt->options |= XML_SAVE_NO_EMPTY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -379,13 +384,6 @@ xmlNewSaveCtxt(const char *encoding, int options)
|
|||||||
}
|
}
|
||||||
memset(ret, 0, sizeof(xmlSaveCtxt));
|
memset(ret, 0, sizeof(xmlSaveCtxt));
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the options
|
|
||||||
*/
|
|
||||||
ret->options = options;
|
|
||||||
if (options & XML_SAVE_FORMAT)
|
|
||||||
ret->format = 1;
|
|
||||||
|
|
||||||
if (encoding != NULL) {
|
if (encoding != NULL) {
|
||||||
ret->handler = xmlFindCharEncodingHandler(encoding);
|
ret->handler = xmlFindCharEncodingHandler(encoding);
|
||||||
if (ret->handler == NULL) {
|
if (ret->handler == NULL) {
|
||||||
@@ -398,6 +396,19 @@ xmlNewSaveCtxt(const char *encoding, int options)
|
|||||||
}
|
}
|
||||||
xmlSaveCtxtInit(ret);
|
xmlSaveCtxtInit(ret);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Use the options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Re-check this option as it may already have been set */
|
||||||
|
if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) {
|
||||||
|
options |= XML_SAVE_NO_EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret->options = options;
|
||||||
|
if (options & XML_SAVE_FORMAT)
|
||||||
|
ret->format = 1;
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,21 +725,26 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cur->type == XML_CDATA_SECTION_NODE) {
|
if (cur->type == XML_CDATA_SECTION_NODE) {
|
||||||
start = end = cur->content;
|
if (cur->content == NULL) {
|
||||||
while (*end != '\0') {
|
xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
|
||||||
if ((*end == ']') && (*(end + 1) == ']') && (*(end + 2) == '>')) {
|
} else {
|
||||||
end = end + 2;
|
start = end = cur->content;
|
||||||
xmlOutputBufferWrite(buf, 9, "<![CDATA[");
|
while (*end != '\0') {
|
||||||
xmlOutputBufferWrite(buf, end - start, (const char *)start);
|
if ((*end == ']') && (*(end + 1) == ']') &&
|
||||||
xmlOutputBufferWrite(buf, 3, "]]>");
|
(*(end + 2) == '>')) {
|
||||||
start = end;
|
end = end + 2;
|
||||||
|
xmlOutputBufferWrite(buf, 9, "<![CDATA[");
|
||||||
|
xmlOutputBufferWrite(buf, end - start, (const char *)start);
|
||||||
|
xmlOutputBufferWrite(buf, 3, "]]>");
|
||||||
|
start = end;
|
||||||
|
}
|
||||||
|
end++;
|
||||||
|
}
|
||||||
|
if (start != end) {
|
||||||
|
xmlOutputBufferWrite(buf, 9, "<![CDATA[");
|
||||||
|
xmlOutputBufferWriteString(buf, (const char *)start);
|
||||||
|
xmlOutputBufferWrite(buf, 3, "]]>");
|
||||||
}
|
}
|
||||||
end++;
|
|
||||||
}
|
|
||||||
if (start != end) {
|
|
||||||
xmlOutputBufferWrite(buf, 9, "<![CDATA[");
|
|
||||||
xmlOutputBufferWriteString(buf, (const char *)start);
|
|
||||||
xmlOutputBufferWrite(buf, 3, "]]>");
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -767,7 +783,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
xmlAttrListDumpOutput(ctxt, cur->properties);
|
xmlAttrListDumpOutput(ctxt, cur->properties);
|
||||||
|
|
||||||
if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
|
if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
|
||||||
(cur->children == NULL) && (!xmlSaveNoEmptyTags)) {
|
(cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) {
|
||||||
xmlOutputBufferWrite(buf, 2, "/>");
|
xmlOutputBufferWrite(buf, 2, "/>");
|
||||||
ctxt->format = format;
|
ctxt->format = format;
|
||||||
return;
|
return;
|
||||||
@@ -820,43 +836,41 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
|
|||||||
cur->encoding = BAD_CAST ctxt->encoding;
|
cur->encoding = BAD_CAST ctxt->encoding;
|
||||||
|
|
||||||
buf = ctxt->buf;
|
buf = ctxt->buf;
|
||||||
xmlOutputBufferWrite(buf, 14, "<?xml version=");
|
if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
|
||||||
if (cur->version != NULL)
|
xmlOutputBufferWrite(buf, 14, "<?xml version=");
|
||||||
xmlBufferWriteQuotedString(buf->buffer, cur->version);
|
if (cur->version != NULL)
|
||||||
else
|
xmlBufferWriteQuotedString(buf->buffer, cur->version);
|
||||||
xmlOutputBufferWrite(buf, 5, "\"1.0\"");
|
else
|
||||||
if (ctxt->encoding == NULL) {
|
xmlOutputBufferWrite(buf, 5, "\"1.0\"");
|
||||||
if (cur->encoding != NULL)
|
if (ctxt->encoding == NULL) {
|
||||||
encoding = cur->encoding;
|
if (cur->encoding != NULL)
|
||||||
else if (cur->charset != XML_CHAR_ENCODING_UTF8)
|
encoding = cur->encoding;
|
||||||
encoding = (const xmlChar *)
|
else if (cur->charset != XML_CHAR_ENCODING_UTF8)
|
||||||
xmlGetCharEncodingName((xmlCharEncoding) cur->charset);
|
encoding = (const xmlChar *)
|
||||||
|
xmlGetCharEncodingName((xmlCharEncoding) cur->charset);
|
||||||
|
}
|
||||||
|
if (encoding != NULL) {
|
||||||
|
xmlOutputBufferWrite(buf, 10, " encoding=");
|
||||||
|
xmlBufferWriteQuotedString(buf->buffer, (xmlChar *) encoding);
|
||||||
|
}
|
||||||
|
switch (cur->standalone) {
|
||||||
|
case 0:
|
||||||
|
xmlOutputBufferWrite(buf, 16, " standalone=\"no\"");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
xmlOutputBufferWrite(buf, 17, " standalone=\"yes\"");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xmlOutputBufferWrite(buf, 3, "?>\n");
|
||||||
}
|
}
|
||||||
if (encoding != NULL) {
|
|
||||||
xmlOutputBufferWrite(buf, 10, " encoding=");
|
|
||||||
xmlBufferWriteQuotedString(buf->buffer, (xmlChar *) encoding);
|
|
||||||
}
|
|
||||||
switch (cur->standalone) {
|
|
||||||
case 0:
|
|
||||||
xmlOutputBufferWrite(buf, 16, " standalone=\"no\"");
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
xmlOutputBufferWrite(buf, 17, " standalone=\"yes\"");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
xmlOutputBufferWrite(buf, 3, "?>\n");
|
|
||||||
|
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
dtd = xmlGetIntSubset(cur);
|
if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) {
|
||||||
if (dtd != NULL) {
|
dtd = xmlGetIntSubset(cur);
|
||||||
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
|
if (dtd != NULL) {
|
||||||
if (is_xhtml < 0) is_xhtml = 0;
|
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
|
||||||
}
|
if (is_xhtml < 0) is_xhtml = 0;
|
||||||
if (is_xhtml) {
|
}
|
||||||
if (encoding != NULL)
|
|
||||||
htmlSetMetaEncoding(cur, (const xmlChar *) ctxt->encoding);
|
|
||||||
else
|
|
||||||
htmlSetMetaEncoding(cur, BAD_CAST "UTF-8");
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (cur->children != NULL) {
|
if (cur->children != NULL) {
|
||||||
@@ -1078,12 +1092,17 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
||||||
int format;
|
int format, addmeta = 0;
|
||||||
xmlNodePtr tmp;
|
xmlNodePtr tmp;
|
||||||
xmlChar *start, *end;
|
xmlChar *start, *end;
|
||||||
xmlOutputBufferPtr buf;
|
xmlOutputBufferPtr buf;
|
||||||
|
|
||||||
if (cur == NULL) return;
|
if (cur == NULL) return;
|
||||||
|
if ((cur->type == XML_DOCUMENT_NODE) ||
|
||||||
|
(cur->type == XML_HTML_DOCUMENT_NODE)) {
|
||||||
|
xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (cur->type == XML_XINCLUDE_START)
|
if (cur->type == XML_XINCLUDE_START)
|
||||||
return;
|
return;
|
||||||
if (cur->type == XML_XINCLUDE_END)
|
if (cur->type == XML_XINCLUDE_END)
|
||||||
@@ -1092,6 +1111,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
|
xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (cur->type == XML_DOCUMENT_FRAG_NODE) {
|
||||||
|
xhtmlNodeListDumpOutput(ctxt, cur->children);
|
||||||
|
return;
|
||||||
|
}
|
||||||
buf = ctxt->buf;
|
buf = ctxt->buf;
|
||||||
if (cur->type == XML_ELEMENT_DECL) {
|
if (cur->type == XML_ELEMENT_DECL) {
|
||||||
xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
|
xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
|
||||||
@@ -1202,18 +1225,66 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
if (cur->properties != NULL)
|
if (cur->properties != NULL)
|
||||||
xhtmlAttrListDumpOutput(ctxt, cur->properties);
|
xhtmlAttrListDumpOutput(ctxt, cur->properties);
|
||||||
|
|
||||||
|
if ((cur->type == XML_ELEMENT_NODE) &&
|
||||||
|
(cur->parent != NULL) &&
|
||||||
|
(cur->parent->parent == (xmlNodePtr) cur->doc) &&
|
||||||
|
xmlStrEqual(cur->name, BAD_CAST"head") &&
|
||||||
|
xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
|
||||||
|
|
||||||
|
tmp = cur->children;
|
||||||
|
while (tmp != NULL) {
|
||||||
|
if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
|
||||||
|
xmlChar *httpequiv;
|
||||||
|
|
||||||
|
httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
|
||||||
|
if (httpequiv != NULL) {
|
||||||
|
if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
|
||||||
|
xmlFree(httpequiv);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
xmlFree(httpequiv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
if (tmp == NULL)
|
||||||
|
addmeta = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) {
|
if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) {
|
||||||
if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
|
if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
|
||||||
(xhtmlIsEmpty(cur) == 1)) {
|
((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) {
|
||||||
/*
|
/*
|
||||||
* C.2. Empty Elements
|
* C.2. Empty Elements
|
||||||
*/
|
*/
|
||||||
xmlOutputBufferWrite(buf, 3, " />");
|
xmlOutputBufferWrite(buf, 3, " />");
|
||||||
} else {
|
} else {
|
||||||
|
if (addmeta == 1) {
|
||||||
|
xmlOutputBufferWrite(buf, 1, ">");
|
||||||
|
if (ctxt->format) {
|
||||||
|
xmlOutputBufferWrite(buf, 1, "\n");
|
||||||
|
if (xmlIndentTreeOutput)
|
||||||
|
xmlOutputBufferWrite(buf, ctxt->indent_size *
|
||||||
|
(ctxt->level + 1 > ctxt->indent_nr ?
|
||||||
|
ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
|
||||||
|
}
|
||||||
|
xmlOutputBufferWriteString(buf,
|
||||||
|
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
|
||||||
|
if (ctxt->encoding) {
|
||||||
|
xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
|
||||||
|
} else {
|
||||||
|
xmlOutputBufferWrite(buf, 5, "UTF-8");
|
||||||
|
}
|
||||||
|
xmlOutputBufferWrite(buf, 4, "\" />");
|
||||||
|
if (ctxt->format)
|
||||||
|
xmlOutputBufferWrite(buf, 1, "\n");
|
||||||
|
} else {
|
||||||
|
xmlOutputBufferWrite(buf, 1, ">");
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* C.3. Element Minimization and Empty Element Content
|
* C.3. Element Minimization and Empty Element Content
|
||||||
*/
|
*/
|
||||||
xmlOutputBufferWrite(buf, 3, "></");
|
xmlOutputBufferWrite(buf, 2, "</");
|
||||||
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
|
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
|
||||||
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
|
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
|
||||||
xmlOutputBufferWrite(buf, 1, ":");
|
xmlOutputBufferWrite(buf, 1, ":");
|
||||||
@@ -1224,6 +1295,23 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
xmlOutputBufferWrite(buf, 1, ">");
|
xmlOutputBufferWrite(buf, 1, ">");
|
||||||
|
if (addmeta == 1) {
|
||||||
|
if (ctxt->format) {
|
||||||
|
xmlOutputBufferWrite(buf, 1, "\n");
|
||||||
|
if (xmlIndentTreeOutput)
|
||||||
|
xmlOutputBufferWrite(buf, ctxt->indent_size *
|
||||||
|
(ctxt->level + 1 > ctxt->indent_nr ?
|
||||||
|
ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
|
||||||
|
}
|
||||||
|
xmlOutputBufferWriteString(buf,
|
||||||
|
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
|
||||||
|
if (ctxt->encoding) {
|
||||||
|
xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
|
||||||
|
} else {
|
||||||
|
xmlOutputBufferWrite(buf, 5, "UTF-8");
|
||||||
|
}
|
||||||
|
xmlOutputBufferWrite(buf, 4, "\" />");
|
||||||
|
}
|
||||||
if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
|
if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
|
||||||
xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
|
xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
|
||||||
}
|
}
|
||||||
@@ -1239,25 +1327,26 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
xmlNodePtr child = cur->children;
|
xmlNodePtr child = cur->children;
|
||||||
|
|
||||||
while (child != NULL) {
|
while (child != NULL) {
|
||||||
if ((child->type == XML_TEXT_NODE) ||
|
if (child->type == XML_TEXT_NODE) {
|
||||||
(child->type == XML_CDATA_SECTION_NODE)) {
|
if ((xmlStrchr(child->content, '<') == NULL) &&
|
||||||
/*
|
(xmlStrchr(child->content, '&') == NULL) &&
|
||||||
* Apparently CDATA escaping for style just break on IE,
|
(xmlStrstr(child->content, BAD_CAST "]]>") == NULL)) {
|
||||||
* mozilla and galeon, so ...
|
/* Nothing to escape, so just output as is... */
|
||||||
*/
|
/* FIXME: Should we do something about "--" also? */
|
||||||
if (xmlStrEqual(cur->name, BAD_CAST "style") &&
|
|
||||||
(xmlStrchr(child->content, '<') == NULL) &&
|
|
||||||
(xmlStrchr(child->content, '>') == NULL) &&
|
|
||||||
(xmlStrchr(child->content, '&') == NULL)) {
|
|
||||||
int level = ctxt->level;
|
int level = ctxt->level;
|
||||||
int indent = ctxt->format;
|
int indent = ctxt->format;
|
||||||
|
|
||||||
ctxt->level = 0;
|
ctxt->level = 0;
|
||||||
ctxt->format = 0;
|
ctxt->format = 0;
|
||||||
xhtmlNodeDumpOutput(ctxt, child);
|
xmlOutputBufferWriteString(buf, (const char *) child->content);
|
||||||
|
/* (We cannot use xhtmlNodeDumpOutput() here because
|
||||||
|
* we wish to leave '>' unescaped!) */
|
||||||
ctxt->level = level;
|
ctxt->level = level;
|
||||||
ctxt->format = indent;
|
ctxt->format = indent;
|
||||||
} else {
|
} else {
|
||||||
|
/* We must use a CDATA section. Unfortunately,
|
||||||
|
* this will break CSS and JavaScript when read by
|
||||||
|
* a browser in HTML4-compliant mode. :-( */
|
||||||
start = end = child->content;
|
start = end = child->content;
|
||||||
while (*end != '\0') {
|
while (*end != '\0') {
|
||||||
if (*end == ']' &&
|
if (*end == ']' &&
|
||||||
@@ -1388,13 +1477,36 @@ xmlSaveToFilename(const char *filename, const char *encoding, int options)
|
|||||||
* with the encoding and the options given
|
* with the encoding and the options given
|
||||||
*
|
*
|
||||||
* Returns a new serialization context or NULL in case of error.
|
* Returns a new serialization context or NULL in case of error.
|
||||||
|
*/
|
||||||
|
|
||||||
xmlSaveCtxtPtr
|
xmlSaveCtxtPtr
|
||||||
xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
|
xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
|
||||||
{
|
{
|
||||||
TODO
|
xmlSaveCtxtPtr ret;
|
||||||
return(NULL);
|
xmlOutputBufferPtr out_buff;
|
||||||
|
xmlCharEncodingHandlerPtr handler;
|
||||||
|
|
||||||
|
ret = xmlNewSaveCtxt(encoding, options);
|
||||||
|
if (ret == NULL) return(NULL);
|
||||||
|
|
||||||
|
if (encoding != NULL) {
|
||||||
|
handler = xmlFindCharEncodingHandler(encoding);
|
||||||
|
if (handler == NULL) {
|
||||||
|
xmlFree(ret);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
handler = NULL;
|
||||||
|
out_buff = xmlOutputBufferCreateBuffer(buffer, handler);
|
||||||
|
if (out_buff == NULL) {
|
||||||
|
xmlFree(ret);
|
||||||
|
if (handler) xmlCharEncCloseFunc(handler);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret->buf = out_buff;
|
||||||
|
return(ret);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSaveToIO:
|
* xmlSaveToIO:
|
||||||
@@ -1477,7 +1589,7 @@ xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr node)
|
|||||||
*
|
*
|
||||||
* Returns the number of byte written or -1 in case of error.
|
* Returns the number of byte written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFlush(xmlSaveCtxtPtr ctxt)
|
xmlSaveFlush(xmlSaveCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
if (ctxt == NULL) return(-1);
|
if (ctxt == NULL) return(-1);
|
||||||
@@ -1494,10 +1606,10 @@ xmlSaveFlush(xmlSaveCtxtPtr ctxt)
|
|||||||
*
|
*
|
||||||
* Returns the number of byte written or -1 in case of error.
|
* Returns the number of byte written or -1 in case of error.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveClose(xmlSaveCtxtPtr ctxt)
|
xmlSaveClose(xmlSaveCtxtPtr ctxt)
|
||||||
{
|
{
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (ctxt == NULL) return(-1);
|
if (ctxt == NULL) return(-1);
|
||||||
ret = xmlSaveFlush(ctxt);
|
ret = xmlSaveFlush(ctxt);
|
||||||
@@ -1687,12 +1799,12 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
|
|||||||
*
|
*
|
||||||
* Returns the number of bytes written to the buffer or -1 in case of error
|
* Returns the number of bytes written to the buffer or -1 in case of error
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
|
xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
|
||||||
int format)
|
int format)
|
||||||
{
|
{
|
||||||
size_t use;
|
unsigned int use;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
xmlOutputBufferPtr outbuf;
|
xmlOutputBufferPtr outbuf;
|
||||||
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
@@ -1716,7 +1828,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
|
|||||||
xmlSaveErrMemory("creating buffer");
|
xmlSaveErrMemory("creating buffer");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
memset(outbuf, 0, sizeof(xmlOutputBuffer));
|
memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
|
||||||
outbuf->buffer = buf;
|
outbuf->buffer = buf;
|
||||||
outbuf->encoder = NULL;
|
outbuf->encoder = NULL;
|
||||||
outbuf->writecallback = NULL;
|
outbuf->writecallback = NULL;
|
||||||
@@ -1728,7 +1840,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
|
|||||||
xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL);
|
xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL);
|
||||||
xmlFree(outbuf);
|
xmlFree(outbuf);
|
||||||
ret = buf->use - use;
|
ret = buf->use - use;
|
||||||
return ret;
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1821,18 +1933,9 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
|||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
dtd = xmlGetIntSubset(doc);
|
dtd = xmlGetIntSubset(doc);
|
||||||
if (dtd != NULL) {
|
if (dtd != NULL) {
|
||||||
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
|
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
|
||||||
if (is_xhtml < 0)
|
if (is_xhtml < 0)
|
||||||
is_xhtml = 0;
|
is_xhtml = 0;
|
||||||
if ((is_xhtml) && (cur->parent == (xmlNodePtr) doc) &&
|
|
||||||
(cur->type == XML_ELEMENT_NODE) &&
|
|
||||||
(xmlStrEqual(cur->name, BAD_CAST "html"))) {
|
|
||||||
if (encoding != NULL)
|
|
||||||
htmlSetMetaEncoding((htmlDocPtr) doc,
|
|
||||||
(const xmlChar *) encoding);
|
|
||||||
else
|
|
||||||
htmlSetMetaEncoding((htmlDocPtr) doc, BAD_CAST "UTF-8");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_xhtml)
|
if (is_xhtml)
|
||||||
@@ -1859,7 +1962,7 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
|||||||
|
|
||||||
void
|
void
|
||||||
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
||||||
intptr_t * doc_txt_len, const char * txt_encoding,
|
int * doc_txt_len, const char * txt_encoding,
|
||||||
int format) {
|
int format) {
|
||||||
xmlSaveCtxt ctxt;
|
xmlSaveCtxt ctxt;
|
||||||
int dummy = 0;
|
int dummy = 0;
|
||||||
@@ -1978,7 +2081,7 @@ xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
||||||
intptr_t * doc_txt_len, const char * txt_encoding) {
|
int * doc_txt_len, const char * txt_encoding) {
|
||||||
xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
|
xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
|
||||||
txt_encoding, 0);
|
txt_encoding, 0);
|
||||||
}
|
}
|
||||||
@@ -1995,13 +2098,13 @@ xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
|
|||||||
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
|
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
|
||||||
* or xmlKeepBlanksDefault(0) was called
|
* or xmlKeepBlanksDefault(0) was called
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
|
xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
|
||||||
xmlSaveCtxt ctxt;
|
xmlSaveCtxt ctxt;
|
||||||
xmlOutputBufferPtr buf;
|
xmlOutputBufferPtr buf;
|
||||||
const char * encoding;
|
const char * encoding;
|
||||||
xmlCharEncodingHandlerPtr handler = NULL;
|
xmlCharEncodingHandlerPtr handler = NULL;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
#ifdef DEBUG_TREE
|
#ifdef DEBUG_TREE
|
||||||
@@ -2043,7 +2146,7 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
|
|||||||
*
|
*
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlDocDump(FILE *f, xmlDocPtr cur) {
|
xmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||||
return(xmlDocFormatDump (f, cur, 0));
|
return(xmlDocFormatDump (f, cur, 0));
|
||||||
}
|
}
|
||||||
@@ -2060,10 +2163,10 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
|
|||||||
*
|
*
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
|
xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
|
||||||
xmlSaveCtxt ctxt;
|
xmlSaveCtxt ctxt;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (buf == NULL) return(-1);
|
if (buf == NULL) return(-1);
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
@@ -2095,12 +2198,12 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
|
|||||||
*
|
*
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||||
const char *encoding, int format)
|
const char *encoding, int format)
|
||||||
{
|
{
|
||||||
xmlSaveCtxt ctxt;
|
xmlSaveCtxt ctxt;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (buf == NULL) return(-1);
|
if (buf == NULL) return(-1);
|
||||||
if ((cur == NULL) ||
|
if ((cur == NULL) ||
|
||||||
@@ -2134,13 +2237,13 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
|||||||
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
|
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
|
||||||
* or xmlKeepBlanksDefault(0) was called
|
* or xmlKeepBlanksDefault(0) was called
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
|
xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
|
||||||
const char * encoding, int format ) {
|
const char * encoding, int format ) {
|
||||||
xmlSaveCtxt ctxt;
|
xmlSaveCtxt ctxt;
|
||||||
xmlOutputBufferPtr buf;
|
xmlOutputBufferPtr buf;
|
||||||
xmlCharEncodingHandlerPtr handler = NULL;
|
xmlCharEncodingHandlerPtr handler = NULL;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if (cur == NULL)
|
if (cur == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -2188,7 +2291,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
|
|||||||
*
|
*
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
|
xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
|
||||||
return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) );
|
return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) );
|
||||||
}
|
}
|
||||||
@@ -2207,7 +2310,7 @@ xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
|
|||||||
*
|
*
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
|
xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
|
||||||
return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) );
|
return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) );
|
||||||
}
|
}
|
||||||
@@ -2222,7 +2325,7 @@ xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
|
|||||||
* used.
|
* used.
|
||||||
* returns: the number of bytes written or -1 in case of failure.
|
* returns: the number of bytes written or -1 in case of failure.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlSaveFile(const char *filename, xmlDocPtr cur) {
|
xmlSaveFile(const char *filename, xmlDocPtr cur) {
|
||||||
return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
|
return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
* Returns a new xmlChar * or NULL
|
* Returns a new xmlChar * or NULL
|
||||||
*/
|
*/
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlStrndup(const xmlChar *cur, intptr_t len) {
|
xmlStrndup(const xmlChar *cur, int len) {
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
|
|
||||||
if ((cur == NULL) || (len < 0)) return(NULL);
|
if ((cur == NULL) || (len < 0)) return(NULL);
|
||||||
@@ -82,8 +82,8 @@ xmlStrdup(const xmlChar *cur) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlCharStrndup(const char *cur, intptr_t len) {
|
xmlCharStrndup(const char *cur, int len) {
|
||||||
intptr_t i;
|
int i;
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
|
|
||||||
if ((cur == NULL) || (len < 0)) return(NULL);
|
if ((cur == NULL) || (len < 0)) return(NULL);
|
||||||
@@ -128,9 +128,9 @@ xmlCharStrdup(const char *cur) {
|
|||||||
* Returns the integer result of the comparison
|
* Returns the integer result of the comparison
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
|
xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
|
||||||
register intptr_t tmp;
|
register int tmp;
|
||||||
|
|
||||||
if (str1 == str2) return(0);
|
if (str1 == str2) return(0);
|
||||||
if (str1 == NULL) return(-1);
|
if (str1 == NULL) return(-1);
|
||||||
@@ -147,13 +147,13 @@ xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
|
|||||||
* @str1: the first xmlChar *
|
* @str1: the first xmlChar *
|
||||||
* @str2: the second xmlChar *
|
* @str2: the second xmlChar *
|
||||||
*
|
*
|
||||||
* Check if both string are equal of have same content
|
* Check if both strings are equal of have same content.
|
||||||
* Should be a bit more readable and faster than xmlStrEqual()
|
* Should be a bit more readable and faster than xmlStrcmp()
|
||||||
*
|
*
|
||||||
* Returns 1 if they are equal, 0 if they are different
|
* Returns 1 if they are equal, 0 if they are different
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
|
xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
|
||||||
if (str1 == str2) return(1);
|
if (str1 == str2) return(1);
|
||||||
if (str1 == NULL) return(0);
|
if (str1 == NULL) return(0);
|
||||||
@@ -175,7 +175,7 @@ xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
|
|||||||
* Returns 1 if they are equal, 0 if they are different
|
* Returns 1 if they are equal, 0 if they are different
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str) {
|
xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str) {
|
||||||
if (pref == NULL) return(xmlStrEqual(name, str));
|
if (pref == NULL) return(xmlStrEqual(name, str));
|
||||||
if (name == NULL) return(0);
|
if (name == NULL) return(0);
|
||||||
@@ -202,9 +202,9 @@ xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str) {
|
|||||||
* Returns the integer result of the comparison
|
* Returns the integer result of the comparison
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrncmp(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
|
xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) {
|
||||||
register intptr_t tmp;
|
register int tmp;
|
||||||
|
|
||||||
if (len <= 0) return(0);
|
if (len <= 0) return(0);
|
||||||
if (str1 == str2) return(0);
|
if (str1 == str2) return(0);
|
||||||
@@ -267,9 +267,9 @@ static const xmlChar casemap[256] = {
|
|||||||
* Returns the integer result of the comparison
|
* Returns the integer result of the comparison
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
|
xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
|
||||||
register intptr_t tmp;
|
register int tmp;
|
||||||
|
|
||||||
if (str1 == str2) return(0);
|
if (str1 == str2) return(0);
|
||||||
if (str1 == NULL) return(-1);
|
if (str1 == NULL) return(-1);
|
||||||
@@ -292,9 +292,9 @@ xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
|
|||||||
* Returns the integer result of the comparison
|
* Returns the integer result of the comparison
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
|
xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len) {
|
||||||
register intptr_t tmp;
|
register int tmp;
|
||||||
|
|
||||||
if (len <= 0) return(0);
|
if (len <= 0) return(0);
|
||||||
if (str1 == str2) return(0);
|
if (str1 == str2) return(0);
|
||||||
@@ -339,7 +339,7 @@ xmlStrchr(const xmlChar *str, xmlChar val) {
|
|||||||
|
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
xmlStrstr(const xmlChar *str, const xmlChar *val) {
|
xmlStrstr(const xmlChar *str, const xmlChar *val) {
|
||||||
intptr_t n;
|
int n;
|
||||||
|
|
||||||
if (str == NULL) return(NULL);
|
if (str == NULL) return(NULL);
|
||||||
if (val == NULL) return(NULL);
|
if (val == NULL) return(NULL);
|
||||||
@@ -367,7 +367,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) {
|
|||||||
|
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
xmlStrcasestr(const xmlChar *str, xmlChar *val) {
|
xmlStrcasestr(const xmlChar *str, xmlChar *val) {
|
||||||
intptr_t n;
|
int n;
|
||||||
|
|
||||||
if (str == NULL) return(NULL);
|
if (str == NULL) return(NULL);
|
||||||
if (val == NULL) return(NULL);
|
if (val == NULL) return(NULL);
|
||||||
@@ -394,8 +394,8 @@ xmlStrcasestr(const xmlChar *str, xmlChar *val) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlStrsub(const xmlChar *str, intptr_t start, intptr_t len) {
|
xmlStrsub(const xmlChar *str, int start, int len) {
|
||||||
intptr_t i;
|
int i;
|
||||||
|
|
||||||
if (str == NULL) return(NULL);
|
if (str == NULL) return(NULL);
|
||||||
if (start < 0) return(NULL);
|
if (start < 0) return(NULL);
|
||||||
@@ -418,9 +418,9 @@ xmlStrsub(const xmlChar *str, intptr_t start, intptr_t len) {
|
|||||||
* Returns the number of xmlChar contained in the ARRAY.
|
* Returns the number of xmlChar contained in the ARRAY.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlStrlen(const xmlChar *str) {
|
xmlStrlen(const xmlChar *str) {
|
||||||
intptr_t len = 0;
|
int len = 0;
|
||||||
|
|
||||||
if (str == NULL) return(0);
|
if (str == NULL) return(0);
|
||||||
while (*str != 0) { /* non input consuming */
|
while (*str != 0) { /* non input consuming */
|
||||||
@@ -437,19 +437,22 @@ xmlStrlen(const xmlChar *str) {
|
|||||||
* @len: the length of @add
|
* @len: the length of @add
|
||||||
*
|
*
|
||||||
* a strncat for array of xmlChar's, it will extend @cur with the len
|
* a strncat for array of xmlChar's, it will extend @cur with the len
|
||||||
* first bytes of @add.
|
* first bytes of @add. Note that if @len < 0 then this is an API error
|
||||||
|
* and NULL will be returned.
|
||||||
*
|
*
|
||||||
* Returns a new xmlChar *, the original @cur is reallocated if needed
|
* Returns a new xmlChar *, the original @cur is reallocated if needed
|
||||||
* and should not be freed
|
* and should not be freed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlStrncat(xmlChar *cur, const xmlChar *add, intptr_t len) {
|
xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
|
||||||
intptr_t size;
|
int size;
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
|
|
||||||
if ((add == NULL) || (len == 0))
|
if ((add == NULL) || (len == 0))
|
||||||
return(cur);
|
return(cur);
|
||||||
|
if (len < 0)
|
||||||
|
return(NULL);
|
||||||
if (cur == NULL)
|
if (cur == NULL)
|
||||||
return(xmlStrndup(add, len));
|
return(xmlStrndup(add, len));
|
||||||
|
|
||||||
@@ -468,16 +471,17 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, intptr_t len) {
|
|||||||
* xmlStrncatNew:
|
* xmlStrncatNew:
|
||||||
* @str1: first xmlChar string
|
* @str1: first xmlChar string
|
||||||
* @str2: second xmlChar string
|
* @str2: second xmlChar string
|
||||||
* @len: the len of @str2
|
* @len: the len of @str2 or < 0
|
||||||
*
|
*
|
||||||
* same as xmlStrncat, but creates a new string. The original
|
* same as xmlStrncat, but creates a new string. The original
|
||||||
* two strings are not freed.
|
* two strings are not freed. If @len is < 0 then the length
|
||||||
|
* will be calculated automatically.
|
||||||
*
|
*
|
||||||
* Returns a new xmlChar * or NULL
|
* Returns a new xmlChar * or NULL
|
||||||
*/
|
*/
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
|
xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
|
||||||
intptr_t size;
|
int size;
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
@@ -533,10 +537,10 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
|
|||||||
*
|
*
|
||||||
* Returns the number of characters written to @buf or -1 if an error occurs.
|
* Returns the number of characters written to @buf or -1 if an error occurs.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int XMLCDECL
|
||||||
xmlStrPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, ...) {
|
xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if((buf == NULL) || (msg == NULL)) {
|
if((buf == NULL) || (msg == NULL)) {
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -561,9 +565,9 @@ xmlStrPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, ...) {
|
|||||||
*
|
*
|
||||||
* Returns the number of characters written to @buf or -1 if an error occurs.
|
* Returns the number of characters written to @buf or -1 if an error occurs.
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlStrVPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, va_list ap) {
|
xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) {
|
||||||
intptr_t ret;
|
int ret;
|
||||||
|
|
||||||
if((buf == NULL) || (msg == NULL)) {
|
if((buf == NULL) || (msg == NULL)) {
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -599,10 +603,10 @@ xmlStrVPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, va_list ap) {
|
|||||||
*
|
*
|
||||||
* returns the numbers of bytes in the character, -1 on format error
|
* returns the numbers of bytes in the character, -1 on format error
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlUTF8Size(const xmlChar *utf) {
|
xmlUTF8Size(const xmlChar *utf) {
|
||||||
xmlChar mask;
|
xmlChar mask;
|
||||||
intptr_t len;
|
int len;
|
||||||
|
|
||||||
if (utf == NULL)
|
if (utf == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -630,7 +634,7 @@ xmlUTF8Size(const xmlChar *utf) {
|
|||||||
*
|
*
|
||||||
* returns result of the compare as with xmlStrncmp
|
* returns result of the compare as with xmlStrncmp
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) {
|
xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) {
|
||||||
|
|
||||||
if (utf1 == NULL ) {
|
if (utf1 == NULL ) {
|
||||||
@@ -650,9 +654,9 @@ xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) {
|
|||||||
*
|
*
|
||||||
* Returns the number of characters in the string or -1 in case of error
|
* Returns the number of characters in the string or -1 in case of error
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlUTF8Strlen(const xmlChar *utf) {
|
xmlUTF8Strlen(const xmlChar *utf) {
|
||||||
intptr_t ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (utf == NULL)
|
if (utf == NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -694,11 +698,16 @@ xmlUTF8Strlen(const xmlChar *utf) {
|
|||||||
* Returns the char value or -1 in case of error, and sets *len to
|
* Returns the char value or -1 in case of error, and sets *len to
|
||||||
* the actual number of bytes consumed (0 in case of error)
|
* the actual number of bytes consumed (0 in case of error)
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlGetUTF8Char(const unsigned char* utf, intptr_t* len) {
|
xmlGetUTF8Char(const unsigned char *utf, int *len) {
|
||||||
size_t c;
|
unsigned int c;
|
||||||
|
|
||||||
if (utf == NULL || len == NULL || *len < 1) goto error;
|
if (utf == NULL)
|
||||||
|
goto error;
|
||||||
|
if (len == NULL)
|
||||||
|
goto error;
|
||||||
|
if (*len < 1)
|
||||||
|
goto error;
|
||||||
|
|
||||||
c = utf[0];
|
c = utf[0];
|
||||||
if (c & 0x80) {
|
if (c & 0x80) {
|
||||||
@@ -760,10 +769,10 @@ error:
|
|||||||
*
|
*
|
||||||
* Return value: true if @utf is valid.
|
* Return value: true if @utf is valid.
|
||||||
**/
|
**/
|
||||||
intptr_t
|
int
|
||||||
xmlCheckUTF8(const unsigned char *utf)
|
xmlCheckUTF8(const unsigned char *utf)
|
||||||
{
|
{
|
||||||
intptr_t ix;
|
int ix;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
|
||||||
if (utf == NULL)
|
if (utf == NULL)
|
||||||
@@ -812,8 +821,8 @@ xmlCheckUTF8(const unsigned char *utf)
|
|||||||
* the first 'len' characters of ARRAY
|
* the first 'len' characters of ARRAY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
intptr_t
|
int
|
||||||
xmlUTF8Strsize(const xmlChar *utf, intptr_t len) {
|
xmlUTF8Strsize(const xmlChar *utf, int len) {
|
||||||
const xmlChar *ptr=utf;
|
const xmlChar *ptr=utf;
|
||||||
xmlChar ch;
|
xmlChar ch;
|
||||||
|
|
||||||
@@ -846,9 +855,9 @@ xmlUTF8Strsize(const xmlChar *utf, intptr_t len) {
|
|||||||
* Returns a new UTF8 * or NULL
|
* Returns a new UTF8 * or NULL
|
||||||
*/
|
*/
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlUTF8Strndup(const xmlChar *utf, intptr_t len) {
|
xmlUTF8Strndup(const xmlChar *utf, int len) {
|
||||||
xmlChar *ret;
|
xmlChar *ret;
|
||||||
intptr_t i;
|
int i;
|
||||||
|
|
||||||
if ((utf == NULL) || (len < 0)) return(NULL);
|
if ((utf == NULL) || (len < 0)) return(NULL);
|
||||||
i = xmlUTF8Strsize(utf, len);
|
i = xmlUTF8Strsize(utf, len);
|
||||||
@@ -875,7 +884,7 @@ xmlUTF8Strndup(const xmlChar *utf, intptr_t len) {
|
|||||||
* Returns a pointer to the UTF8 character or NULL
|
* Returns a pointer to the UTF8 character or NULL
|
||||||
*/
|
*/
|
||||||
const xmlChar *
|
const xmlChar *
|
||||||
xmlUTF8Strpos(const xmlChar *utf, intptr_t pos) {
|
xmlUTF8Strpos(const xmlChar *utf, int pos) {
|
||||||
xmlChar ch;
|
xmlChar ch;
|
||||||
|
|
||||||
if (utf == NULL) return(NULL);
|
if (utf == NULL) return(NULL);
|
||||||
@@ -906,9 +915,9 @@ xmlUTF8Strpos(const xmlChar *utf, intptr_t pos) {
|
|||||||
* Returns the relative character position of the desired char
|
* Returns the relative character position of the desired char
|
||||||
* or -1 if not found
|
* or -1 if not found
|
||||||
*/
|
*/
|
||||||
intptr_t
|
int
|
||||||
xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
|
xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
|
||||||
intptr_t i, size;
|
int i, size;
|
||||||
xmlChar ch;
|
xmlChar ch;
|
||||||
|
|
||||||
if (utf==NULL || utfchar==NULL) return -1;
|
if (utf==NULL || utfchar==NULL) return -1;
|
||||||
@@ -944,8 +953,8 @@ xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
xmlChar *
|
xmlChar *
|
||||||
xmlUTF8Strsub(const xmlChar *utf, intptr_t start, intptr_t len) {
|
xmlUTF8Strsub(const xmlChar *utf, int start, int len) {
|
||||||
intptr_t i;
|
int i;
|
||||||
xmlChar ch;
|
xmlChar ch;
|
||||||
|
|
||||||
if (utf == NULL) return(NULL);
|
if (utf == NULL) return(NULL);
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
*
|
*
|
||||||
* This file is automatically generated from the
|
* This file is automatically generated from the
|
||||||
* UCS description files of the Unicode Character Database
|
* UCS description files of the Unicode Character Database
|
||||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1d5b.html
|
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||||
* using the genUnicode.py Python script.
|
* using the genUnicode.py Python script.
|
||||||
*
|
*
|
||||||
* Generation date: Mon Nov 10 22:35:10 2003
|
* Generation date: Mon Mar 27 11:09:52 2006
|
||||||
* Sources: Blocks-4.0.1d1b.txt UnicodeData-4.0.1d1b.txt
|
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||||
* Daniel Veillard <veillard@redhat.com>
|
* Daniel Veillard <veillard@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -204,95 +204,95 @@ static xmlUnicodeRange xmlUnicodeCats[] = {
|
|||||||
{"Zp", xmlUCSIsCatZp},
|
{"Zp", xmlUCSIsCatZp},
|
||||||
{"Zs", xmlUCSIsCatZs}};
|
{"Zs", xmlUCSIsCatZs}};
|
||||||
|
|
||||||
static xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f}, {0xad, 0xad},
|
static const xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f},
|
||||||
{0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5},
|
{0xad, 0xad}, {0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f},
|
||||||
{0x200c, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f},
|
{0x17b4, 0x17b5}, {0x200b, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063},
|
||||||
{0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00}, {0xdfff, 0xe000},
|
{0x206a, 0x206f}, {0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00},
|
||||||
{0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
|
{0xdfff, 0xe000}, {0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
|
||||||
static xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
|
static const xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
|
||||||
{0xe0020, 0xe007f}, {0xf0000, 0xf0000}, {0xffffd, 0xffffd},
|
{0xe0020, 0xe007f}, {0xf0000, 0xf0000}, {0xffffd, 0xffffd},
|
||||||
{0x100000, 0x100000}, {0x10fffd, 0x10fffd} };
|
{0x100000, 0x100000}, {0x10fffd, 0x10fffd} };
|
||||||
static xmlChRangeGroup xmlCG = {18,7,xmlCS,xmlCL};
|
static xmlChRangeGroup xmlCG = {18,7,xmlCS,xmlCL};
|
||||||
|
|
||||||
static xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
|
static const xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
|
||||||
{0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200c, 0x200f},
|
{0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200b, 0x200f},
|
||||||
{0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f}, {0xfeff, 0xfeff},
|
{0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f}, {0xfeff, 0xfeff},
|
||||||
{0xfff9, 0xfffb} };
|
{0xfff9, 0xfffb} };
|
||||||
static xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
|
static const xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
|
||||||
{0xe0020, 0xe007f} };
|
{0xe0020, 0xe007f} };
|
||||||
static xmlChRangeGroup xmlCfG = {11,3,xmlCfS,xmlCfL};
|
static xmlChRangeGroup xmlCfG = {11,3,xmlCfS,xmlCfL};
|
||||||
|
|
||||||
static xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a}, {0xaa, 0xaa},
|
static const xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a},
|
||||||
{0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6}, {0xf8, 0x236},
|
{0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6},
|
||||||
{0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x2ee, 0x2ee},
|
{0xf8, 0x236}, {0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4},
|
||||||
{0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
|
{0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a},
|
||||||
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5}, {0x3f7, 0x3fb},
|
{0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5},
|
||||||
{0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5}, {0x4f8, 0x4f9},
|
{0x3f7, 0x3fb}, {0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5},
|
||||||
{0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559}, {0x561, 0x587},
|
{0x4f8, 0x4f9}, {0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559},
|
||||||
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x640, 0x64a},
|
{0x561, 0x587}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
|
||||||
{0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6},
|
{0x640, 0x64a}, {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5},
|
||||||
{0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710},
|
{0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff},
|
||||||
{0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5}, {0x7b1, 0x7b1},
|
{0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5},
|
||||||
{0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950}, {0x958, 0x961},
|
{0x7b1, 0x7b1}, {0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950},
|
||||||
{0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0},
|
{0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
|
||||||
{0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd}, {0x9dc, 0x9dd},
|
{0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd},
|
||||||
{0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10},
|
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
|
||||||
{0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36},
|
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
|
||||||
{0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74},
|
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
|
||||||
{0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0},
|
{0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
|
||||||
{0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0},
|
{0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
|
||||||
{0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28},
|
{0xad0, 0xad0}, {0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
|
||||||
{0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3d, 0xb3d},
|
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39},
|
||||||
{0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83},
|
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71},
|
||||||
{0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a},
|
{0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95},
|
||||||
{0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa},
|
{0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4},
|
||||||
{0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10},
|
{0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c},
|
||||||
{0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61},
|
{0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39},
|
||||||
{0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3},
|
{0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8},
|
||||||
{0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde}, {0xce0, 0xce1},
|
{0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde},
|
||||||
{0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28}, {0xd2a, 0xd39},
|
{0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
|
||||||
{0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
|
{0xd2a, 0xd39}, {0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1},
|
||||||
{0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe33},
|
{0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30},
|
||||||
{0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe87, 0xe88},
|
{0xe32, 0xe33}, {0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84},
|
||||||
{0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97}, {0xe99, 0xe9f},
|
{0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
|
||||||
{0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7}, {0xeaa, 0xeab},
|
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
|
||||||
{0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4},
|
{0xeaa, 0xeab}, {0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd},
|
||||||
{0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00}, {0xf40, 0xf47},
|
{0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00},
|
||||||
{0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021}, {0x1023, 0x1027},
|
{0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021},
|
||||||
{0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5}, {0x10d0, 0x10f8},
|
{0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5},
|
||||||
{0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9}, {0x1200, 0x1206},
|
{0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
|
||||||
{0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256},
|
{0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
|
||||||
{0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286}, {0x1288, 0x1288},
|
{0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
|
||||||
{0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0}, {0x12b2, 0x12b5},
|
{0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
|
||||||
{0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5}, {0x12c8, 0x12ce},
|
{0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
|
||||||
{0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e}, {0x1310, 0x1310},
|
{0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
|
||||||
{0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346}, {0x1348, 0x135a},
|
{0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
|
||||||
{0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676}, {0x1681, 0x169a},
|
{0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
|
||||||
{0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731},
|
{0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
|
||||||
{0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3},
|
{0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
|
||||||
{0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877}, {0x1880, 0x18a8},
|
{0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877},
|
||||||
{0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1d00, 0x1d6b},
|
{0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
|
||||||
{0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d},
|
{0x1d00, 0x1d6b}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15},
|
||||||
{0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59},
|
{0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
|
||||||
{0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
|
{0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d},
|
||||||
{0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc},
|
{0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4},
|
||||||
{0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4},
|
{0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
|
||||||
{0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2102, 0x2102},
|
{0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f},
|
||||||
{0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115}, {0x2119, 0x211d},
|
{0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115},
|
||||||
{0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d},
|
{0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128},
|
||||||
{0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f}, {0x2145, 0x2149},
|
{0x212a, 0x212d}, {0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f},
|
||||||
{0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c}, {0x3041, 0x3096},
|
{0x2145, 0x2149}, {0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c},
|
||||||
{0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312c},
|
{0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff},
|
||||||
{0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff}, {0x3400, 0x3400},
|
{0x3105, 0x312c}, {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff},
|
||||||
{0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5}, {0xa000, 0xa48c},
|
{0x3400, 0x3400}, {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5},
|
||||||
{0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d}, {0xfa30, 0xfa6a},
|
{0xa000, 0xa48c}, {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d},
|
||||||
{0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28},
|
{0xfa30, 0xfa6a}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d},
|
||||||
{0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41},
|
{0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e},
|
||||||
{0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f},
|
{0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d},
|
||||||
{0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc},
|
{0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74},
|
||||||
{0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe}, {0xffc2, 0xffc7},
|
{0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe},
|
||||||
{0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
|
{0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
|
||||||
static xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
static const xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
||||||
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
|
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
|
||||||
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
|
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
|
||||||
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10400, 0x1049d},
|
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10400, 0x1049d},
|
||||||
@@ -311,8 +311,8 @@ static xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
|||||||
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
|
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
|
||||||
static xmlChRangeGroup xmlLG = {279,50,xmlLS,xmlLL};
|
static xmlChRangeGroup xmlLG = {279,50,xmlLS,xmlLL};
|
||||||
|
|
||||||
static xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa}, {0xb5, 0xb5},
|
static const xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa},
|
||||||
{0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
|
{0xb5, 0xb5}, {0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
|
||||||
{0x103, 0x103}, {0x105, 0x105}, {0x107, 0x107}, {0x109, 0x109},
|
{0x103, 0x103}, {0x105, 0x105}, {0x107, 0x107}, {0x109, 0x109},
|
||||||
{0x10b, 0x10b}, {0x10d, 0x10d}, {0x10f, 0x10f}, {0x111, 0x111},
|
{0x10b, 0x10b}, {0x10d, 0x10d}, {0x10f, 0x10f}, {0x111, 0x111},
|
||||||
{0x113, 0x113}, {0x115, 0x115}, {0x117, 0x117}, {0x119, 0x119},
|
{0x113, 0x113}, {0x115, 0x115}, {0x117, 0x117}, {0x119, 0x119},
|
||||||
@@ -411,7 +411,7 @@ static xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa}, {0xb5, 0xb5},
|
|||||||
{0x2113, 0x2113}, {0x212f, 0x212f}, {0x2134, 0x2134}, {0x2139, 0x2139},
|
{0x2113, 0x2113}, {0x212f, 0x212f}, {0x2134, 0x2134}, {0x2139, 0x2139},
|
||||||
{0x213d, 0x213d}, {0x2146, 0x2149}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
|
{0x213d, 0x213d}, {0x2146, 0x2149}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
|
||||||
{0xff41, 0xff5a} };
|
{0xff41, 0xff5a} };
|
||||||
static xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
|
static const xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
|
||||||
{0x1d44e, 0x1d454}, {0x1d456, 0x1d467}, {0x1d482, 0x1d49b},
|
{0x1d44e, 0x1d454}, {0x1d456, 0x1d467}, {0x1d482, 0x1d49b},
|
||||||
{0x1d4b6, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
|
{0x1d4b6, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
|
||||||
{0x1d4c5, 0x1d4cf}, {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537},
|
{0x1d4c5, 0x1d4cf}, {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537},
|
||||||
@@ -423,7 +423,7 @@ static xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
|
|||||||
{0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9} };
|
{0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9} };
|
||||||
static xmlChRangeGroup xmlLlG = {396,28,xmlLlS,xmlLlL};
|
static xmlChRangeGroup xmlLlG = {396,28,xmlLlS,xmlLlL};
|
||||||
|
|
||||||
static xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
|
static const xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
|
||||||
{0x2e0, 0x2e4}, {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x559, 0x559},
|
{0x2e0, 0x2e4}, {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x559, 0x559},
|
||||||
{0x640, 0x640}, {0x6e5, 0x6e6}, {0xe46, 0xe46}, {0xec6, 0xec6},
|
{0x640, 0x640}, {0x6e5, 0x6e6}, {0xe46, 0xe46}, {0xec6, 0xec6},
|
||||||
{0x17d7, 0x17d7}, {0x1843, 0x1843}, {0x1d2c, 0x1d61}, {0x3005, 0x3005},
|
{0x17d7, 0x17d7}, {0x1843, 0x1843}, {0x1d2c, 0x1d61}, {0x3005, 0x3005},
|
||||||
@@ -431,7 +431,7 @@ static xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
|
|||||||
{0xff70, 0xff70}, {0xff9e, 0xff9f} };
|
{0xff70, 0xff70}, {0xff9e, 0xff9f} };
|
||||||
static xmlChRangeGroup xmlLmG = {20,0,xmlLmS,NULL};
|
static xmlChRangeGroup xmlLmG = {20,0,xmlLmS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlLoS[] = {{0x1bb, 0x1bb}, {0x1c0, 0x1c3},
|
static const xmlChSRange xmlLoS[] = {{0x1bb, 0x1bb}, {0x1c0, 0x1c3},
|
||||||
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
|
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
|
||||||
{0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6ee, 0x6ef},
|
{0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6ee, 0x6ef},
|
||||||
{0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710}, {0x712, 0x72f},
|
{0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710}, {0x712, 0x72f},
|
||||||
@@ -485,7 +485,7 @@ static xmlChSRange xmlLoS[] = {{0x1bb, 0x1bb}, {0x1c0, 0x1c3},
|
|||||||
{0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff66, 0xff6f}, {0xff71, 0xff9d},
|
{0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff66, 0xff6f}, {0xff71, 0xff9d},
|
||||||
{0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
|
{0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
|
||||||
{0xffda, 0xffdc} };
|
{0xffda, 0xffdc} };
|
||||||
static xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
static const xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
||||||
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
|
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
|
||||||
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
|
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
|
||||||
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10450, 0x1049d},
|
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10450, 0x1049d},
|
||||||
@@ -494,110 +494,110 @@ static xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
|
|||||||
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
|
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
|
||||||
static xmlChRangeGroup xmlLoG = {211,20,xmlLoS,xmlLoL};
|
static xmlChRangeGroup xmlLoG = {211,20,xmlLoS,xmlLoL};
|
||||||
|
|
||||||
static xmlChSRange xmlLtS[] = {{0x1c5, 0x1c5}, {0x1c8, 0x1c8},
|
static const xmlChSRange xmlLtS[] = {{0x1c5, 0x1c5}, {0x1c8, 0x1c8},
|
||||||
{0x1cb, 0x1cb}, {0x1f2, 0x1f2}, {0x1f88, 0x1f8f}, {0x1f98, 0x1f9f},
|
{0x1cb, 0x1cb}, {0x1f2, 0x1f2}, {0x1f88, 0x1f8f}, {0x1f98, 0x1f9f},
|
||||||
{0x1fa8, 0x1faf}, {0x1fbc, 0x1fbc}, {0x1fcc, 0x1fcc}, {0x1ffc, 0x1ffc} };
|
{0x1fa8, 0x1faf}, {0x1fbc, 0x1fbc}, {0x1fcc, 0x1fcc}, {0x1ffc, 0x1ffc} };
|
||||||
static xmlChRangeGroup xmlLtG = {10,0,xmlLtS,NULL};
|
static xmlChRangeGroup xmlLtG = {10,0,xmlLtS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6}, {0xd8, 0xde},
|
static const xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6},
|
||||||
{0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104}, {0x106, 0x106},
|
{0xd8, 0xde}, {0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104},
|
||||||
{0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c}, {0x10e, 0x10e},
|
{0x106, 0x106}, {0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c},
|
||||||
{0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114}, {0x116, 0x116},
|
{0x10e, 0x10e}, {0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114},
|
||||||
{0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c}, {0x11e, 0x11e},
|
{0x116, 0x116}, {0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c},
|
||||||
{0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124}, {0x126, 0x126},
|
{0x11e, 0x11e}, {0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124},
|
||||||
{0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c}, {0x12e, 0x12e},
|
{0x126, 0x126}, {0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c},
|
||||||
{0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134}, {0x136, 0x136},
|
{0x12e, 0x12e}, {0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134},
|
||||||
{0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d}, {0x13f, 0x13f},
|
{0x136, 0x136}, {0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d},
|
||||||
{0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145}, {0x147, 0x147},
|
{0x13f, 0x13f}, {0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145},
|
||||||
{0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e}, {0x150, 0x150},
|
{0x147, 0x147}, {0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e},
|
||||||
{0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156}, {0x158, 0x158},
|
{0x150, 0x150}, {0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156},
|
||||||
{0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e}, {0x160, 0x160},
|
{0x158, 0x158}, {0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e},
|
||||||
{0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166}, {0x168, 0x168},
|
{0x160, 0x160}, {0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166},
|
||||||
{0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e}, {0x170, 0x170},
|
{0x168, 0x168}, {0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e},
|
||||||
{0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176}, {0x178, 0x179},
|
{0x170, 0x170}, {0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176},
|
||||||
{0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182}, {0x184, 0x184},
|
{0x178, 0x179}, {0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182},
|
||||||
{0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191}, {0x193, 0x194},
|
{0x184, 0x184}, {0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191},
|
||||||
{0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0}, {0x1a2, 0x1a2},
|
{0x193, 0x194}, {0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0},
|
||||||
{0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9}, {0x1ac, 0x1ac},
|
{0x1a2, 0x1a2}, {0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9},
|
||||||
{0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5}, {0x1b7, 0x1b8},
|
{0x1ac, 0x1ac}, {0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5},
|
||||||
{0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7}, {0x1ca, 0x1ca},
|
{0x1b7, 0x1b8}, {0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7},
|
||||||
{0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1}, {0x1d3, 0x1d3},
|
{0x1ca, 0x1ca}, {0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1},
|
||||||
{0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9}, {0x1db, 0x1db},
|
{0x1d3, 0x1d3}, {0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9},
|
||||||
{0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2}, {0x1e4, 0x1e4},
|
{0x1db, 0x1db}, {0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2},
|
||||||
{0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea}, {0x1ec, 0x1ec},
|
{0x1e4, 0x1e4}, {0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea},
|
||||||
{0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4}, {0x1f6, 0x1f8},
|
{0x1ec, 0x1ec}, {0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4},
|
||||||
{0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe}, {0x200, 0x200},
|
{0x1f6, 0x1f8}, {0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe},
|
||||||
{0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206}, {0x208, 0x208},
|
{0x200, 0x200}, {0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206},
|
||||||
{0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e}, {0x210, 0x210},
|
{0x208, 0x208}, {0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e},
|
||||||
{0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216}, {0x218, 0x218},
|
{0x210, 0x210}, {0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216},
|
||||||
{0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e}, {0x220, 0x220},
|
{0x218, 0x218}, {0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e},
|
||||||
{0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226}, {0x228, 0x228},
|
{0x220, 0x220}, {0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226},
|
||||||
{0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e}, {0x230, 0x230},
|
{0x228, 0x228}, {0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e},
|
||||||
{0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
|
{0x230, 0x230}, {0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a},
|
||||||
{0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab}, {0x3d2, 0x3d4},
|
{0x38c, 0x38c}, {0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab},
|
||||||
{0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc}, {0x3de, 0x3de},
|
{0x3d2, 0x3d4}, {0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
|
||||||
{0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4}, {0x3e6, 0x3e6},
|
{0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4},
|
||||||
{0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec}, {0x3ee, 0x3ee},
|
{0x3e6, 0x3e6}, {0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec},
|
||||||
{0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa}, {0x400, 0x42f},
|
{0x3ee, 0x3ee}, {0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa},
|
||||||
{0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464}, {0x466, 0x466},
|
{0x400, 0x42f}, {0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464},
|
||||||
{0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c}, {0x46e, 0x46e},
|
{0x466, 0x466}, {0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c},
|
||||||
{0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474}, {0x476, 0x476},
|
{0x46e, 0x46e}, {0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474},
|
||||||
{0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c}, {0x47e, 0x47e},
|
{0x476, 0x476}, {0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c},
|
||||||
{0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c}, {0x48e, 0x48e},
|
{0x47e, 0x47e}, {0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c},
|
||||||
{0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494}, {0x496, 0x496},
|
{0x48e, 0x48e}, {0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494},
|
||||||
{0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c}, {0x49e, 0x49e},
|
{0x496, 0x496}, {0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c},
|
||||||
{0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4}, {0x4a6, 0x4a6},
|
{0x49e, 0x49e}, {0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4},
|
||||||
{0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac}, {0x4ae, 0x4ae},
|
{0x4a6, 0x4a6}, {0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac},
|
||||||
{0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4}, {0x4b6, 0x4b6},
|
{0x4ae, 0x4ae}, {0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4},
|
||||||
{0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc}, {0x4be, 0x4be},
|
{0x4b6, 0x4b6}, {0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc},
|
||||||
{0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5}, {0x4c7, 0x4c7},
|
{0x4be, 0x4be}, {0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5},
|
||||||
{0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd}, {0x4d0, 0x4d0},
|
{0x4c7, 0x4c7}, {0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd},
|
||||||
{0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6}, {0x4d8, 0x4d8},
|
{0x4d0, 0x4d0}, {0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6},
|
||||||
{0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de}, {0x4e0, 0x4e0},
|
{0x4d8, 0x4d8}, {0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de},
|
||||||
{0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6}, {0x4e8, 0x4e8},
|
{0x4e0, 0x4e0}, {0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6},
|
||||||
{0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee}, {0x4f0, 0x4f0},
|
{0x4e8, 0x4e8}, {0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee},
|
||||||
{0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8}, {0x500, 0x500},
|
{0x4f0, 0x4f0}, {0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8},
|
||||||
{0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506}, {0x508, 0x508},
|
{0x500, 0x500}, {0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506},
|
||||||
{0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e}, {0x531, 0x556},
|
{0x508, 0x508}, {0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e},
|
||||||
{0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02}, {0x1e04, 0x1e04},
|
{0x531, 0x556}, {0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02},
|
||||||
{0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a}, {0x1e0c, 0x1e0c},
|
{0x1e04, 0x1e04}, {0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a},
|
||||||
{0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12}, {0x1e14, 0x1e14},
|
{0x1e0c, 0x1e0c}, {0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12},
|
||||||
{0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a}, {0x1e1c, 0x1e1c},
|
{0x1e14, 0x1e14}, {0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a},
|
||||||
{0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22}, {0x1e24, 0x1e24},
|
{0x1e1c, 0x1e1c}, {0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22},
|
||||||
{0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a}, {0x1e2c, 0x1e2c},
|
{0x1e24, 0x1e24}, {0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a},
|
||||||
{0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32}, {0x1e34, 0x1e34},
|
{0x1e2c, 0x1e2c}, {0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32},
|
||||||
{0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a}, {0x1e3c, 0x1e3c},
|
{0x1e34, 0x1e34}, {0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a},
|
||||||
{0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42}, {0x1e44, 0x1e44},
|
{0x1e3c, 0x1e3c}, {0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42},
|
||||||
{0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a}, {0x1e4c, 0x1e4c},
|
{0x1e44, 0x1e44}, {0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a},
|
||||||
{0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52}, {0x1e54, 0x1e54},
|
{0x1e4c, 0x1e4c}, {0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52},
|
||||||
{0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a}, {0x1e5c, 0x1e5c},
|
{0x1e54, 0x1e54}, {0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a},
|
||||||
{0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62}, {0x1e64, 0x1e64},
|
{0x1e5c, 0x1e5c}, {0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62},
|
||||||
{0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a}, {0x1e6c, 0x1e6c},
|
{0x1e64, 0x1e64}, {0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a},
|
||||||
{0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72}, {0x1e74, 0x1e74},
|
{0x1e6c, 0x1e6c}, {0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72},
|
||||||
{0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a}, {0x1e7c, 0x1e7c},
|
{0x1e74, 0x1e74}, {0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a},
|
||||||
{0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82}, {0x1e84, 0x1e84},
|
{0x1e7c, 0x1e7c}, {0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82},
|
||||||
{0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a}, {0x1e8c, 0x1e8c},
|
{0x1e84, 0x1e84}, {0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a},
|
||||||
{0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92}, {0x1e94, 0x1e94},
|
{0x1e8c, 0x1e8c}, {0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92},
|
||||||
{0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4}, {0x1ea6, 0x1ea6},
|
{0x1e94, 0x1e94}, {0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4},
|
||||||
{0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac}, {0x1eae, 0x1eae},
|
{0x1ea6, 0x1ea6}, {0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac},
|
||||||
{0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4}, {0x1eb6, 0x1eb6},
|
{0x1eae, 0x1eae}, {0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4},
|
||||||
{0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc}, {0x1ebe, 0x1ebe},
|
{0x1eb6, 0x1eb6}, {0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc},
|
||||||
{0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4}, {0x1ec6, 0x1ec6},
|
{0x1ebe, 0x1ebe}, {0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4},
|
||||||
{0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc}, {0x1ece, 0x1ece},
|
{0x1ec6, 0x1ec6}, {0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc},
|
||||||
{0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4}, {0x1ed6, 0x1ed6},
|
{0x1ece, 0x1ece}, {0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4},
|
||||||
{0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc}, {0x1ede, 0x1ede},
|
{0x1ed6, 0x1ed6}, {0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc},
|
||||||
{0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4}, {0x1ee6, 0x1ee6},
|
{0x1ede, 0x1ede}, {0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4},
|
||||||
{0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec}, {0x1eee, 0x1eee},
|
{0x1ee6, 0x1ee6}, {0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec},
|
||||||
{0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4}, {0x1ef6, 0x1ef6},
|
{0x1eee, 0x1eee}, {0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4},
|
||||||
{0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d}, {0x1f28, 0x1f2f},
|
{0x1ef6, 0x1ef6}, {0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d},
|
||||||
{0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
|
{0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59},
|
||||||
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f}, {0x1fb8, 0x1fbb},
|
{0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f},
|
||||||
{0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb},
|
{0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec},
|
||||||
{0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d}, {0x2110, 0x2112},
|
{0x1ff8, 0x1ffb}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d},
|
||||||
{0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126},
|
{0x2110, 0x2112}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124},
|
||||||
{0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131}, {0x2133, 0x2133},
|
{0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131},
|
||||||
{0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
|
{0x2133, 0x2133}, {0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
|
||||||
static xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
|
static const xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
|
||||||
{0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c},
|
{0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c},
|
||||||
{0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6},
|
{0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6},
|
||||||
{0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9},
|
{0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9},
|
||||||
@@ -610,7 +610,7 @@ static xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
|
|||||||
{0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8} };
|
{0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8} };
|
||||||
static xmlChRangeGroup xmlLuG = {390,31,xmlLuS,xmlLuL};
|
static xmlChRangeGroup xmlLuG = {390,31,xmlLuS,xmlLuL};
|
||||||
|
|
||||||
static xmlChSRange xmlMS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
static const xmlChSRange xmlMS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
||||||
{0x483, 0x486}, {0x488, 0x489}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
{0x483, 0x486}, {0x488, 0x489}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
|
||||||
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
|
||||||
{0x610, 0x615}, {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc},
|
{0x610, 0x615}, {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc},
|
||||||
@@ -639,12 +639,12 @@ static xmlChSRange xmlMS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
|||||||
{0x17dd, 0x17dd}, {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x192b},
|
{0x17dd, 0x17dd}, {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x192b},
|
||||||
{0x1930, 0x193b}, {0x20d0, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a},
|
{0x1930, 0x193b}, {0x20d0, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a},
|
||||||
{0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
|
{0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
|
||||||
static xmlChLRange xmlML[] = {{0x1d165, 0x1d169}, {0x1d16d, 0x1d172},
|
static const xmlChLRange xmlML[] = {{0x1d165, 0x1d169}, {0x1d16d, 0x1d172},
|
||||||
{0x1d17b, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad},
|
{0x1d17b, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad},
|
||||||
{0xe0100, 0xe01ef} };
|
{0xe0100, 0xe01ef} };
|
||||||
static xmlChRangeGroup xmlMG = {113,6,xmlMS,xmlML};
|
static xmlChRangeGroup xmlMG = {113,6,xmlMS,xmlML};
|
||||||
|
|
||||||
static xmlChSRange xmlMcS[] = {{0x903, 0x903}, {0x93e, 0x940},
|
static const xmlChSRange xmlMcS[] = {{0x903, 0x903}, {0x93e, 0x940},
|
||||||
{0x949, 0x94c}, {0x982, 0x983}, {0x9be, 0x9c0}, {0x9c7, 0x9c8},
|
{0x949, 0x94c}, {0x982, 0x983}, {0x9be, 0x9c0}, {0x9c7, 0x9c8},
|
||||||
{0x9cb, 0x9cc}, {0x9d7, 0x9d7}, {0xa03, 0xa03}, {0xa3e, 0xa40},
|
{0x9cb, 0x9cc}, {0x9d7, 0x9d7}, {0xa03, 0xa03}, {0xa3e, 0xa40},
|
||||||
{0xa83, 0xa83}, {0xabe, 0xac0}, {0xac9, 0xac9}, {0xacb, 0xacc},
|
{0xa83, 0xa83}, {0xabe, 0xac0}, {0xac9, 0xac9}, {0xacb, 0xacc},
|
||||||
@@ -659,10 +659,10 @@ static xmlChSRange xmlMcS[] = {{0x903, 0x903}, {0x93e, 0x940},
|
|||||||
{0x1038, 0x1038}, {0x1056, 0x1057}, {0x17b6, 0x17b6}, {0x17be, 0x17c5},
|
{0x1038, 0x1038}, {0x1056, 0x1057}, {0x17b6, 0x17b6}, {0x17be, 0x17c5},
|
||||||
{0x17c7, 0x17c8}, {0x1923, 0x1926}, {0x1929, 0x192b}, {0x1930, 0x1931},
|
{0x17c7, 0x17c8}, {0x1923, 0x1926}, {0x1929, 0x192b}, {0x1930, 0x1931},
|
||||||
{0x1933, 0x1938} };
|
{0x1933, 0x1938} };
|
||||||
static xmlChLRange xmlMcL[] = {{0x1d165, 0x1d166}, {0x1d16d, 0x1d172} };
|
static const xmlChLRange xmlMcL[] = {{0x1d165, 0x1d166}, {0x1d16d, 0x1d172} };
|
||||||
static xmlChRangeGroup xmlMcG = {55,2,xmlMcS,xmlMcL};
|
static xmlChRangeGroup xmlMcG = {55,2,xmlMcS,xmlMcL};
|
||||||
|
|
||||||
static xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
static const xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
||||||
{0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, {0x5bb, 0x5bd},
|
{0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, {0x5bb, 0x5bd},
|
||||||
{0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, {0x610, 0x615},
|
{0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, {0x610, 0x615},
|
||||||
{0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6df, 0x6e4},
|
{0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6df, 0x6e4},
|
||||||
@@ -690,94 +690,95 @@ static xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
|
|||||||
{0x1932, 0x1932}, {0x1939, 0x193b}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1},
|
{0x1932, 0x1932}, {0x1939, 0x193b}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1},
|
||||||
{0x20e5, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e},
|
{0x20e5, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e},
|
||||||
{0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
|
{0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
|
||||||
static xmlChLRange xmlMnL[] = {{0x1d167, 0x1d169}, {0x1d17b, 0x1d182},
|
static const xmlChLRange xmlMnL[] = {{0x1d167, 0x1d169}, {0x1d17b, 0x1d182},
|
||||||
{0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0xe0100, 0xe01ef} };
|
{0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0xe0100, 0xe01ef} };
|
||||||
static xmlChRangeGroup xmlMnG = {108,5,xmlMnS,xmlMnL};
|
static xmlChRangeGroup xmlMnG = {108,5,xmlMnS,xmlMnL};
|
||||||
|
|
||||||
static xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3}, {0xb9, 0xb9},
|
static const xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3},
|
||||||
{0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9}, {0x966, 0x96f},
|
{0xb9, 0xb9}, {0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9},
|
||||||
{0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f}, {0xae6, 0xaef},
|
{0x966, 0x96f}, {0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f},
|
||||||
{0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f}, {0xce6, 0xcef},
|
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f},
|
||||||
{0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, {0xf20, 0xf33},
|
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
||||||
{0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0}, {0x17e0, 0x17e9},
|
{0xf20, 0xf33}, {0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0},
|
||||||
{0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f}, {0x2070, 0x2070},
|
{0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f},
|
||||||
{0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183}, {0x2460, 0x249b},
|
{0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183},
|
||||||
{0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007}, {0x3021, 0x3029},
|
{0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007},
|
||||||
{0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
|
{0x3021, 0x3029}, {0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229},
|
||||||
{0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
|
{0x3251, 0x325f}, {0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
|
||||||
static xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
|
static const xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
|
||||||
{0x1034a, 0x1034a}, {0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
|
{0x1034a, 0x1034a}, {0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
|
||||||
static xmlChRangeGroup xmlNG = {42,5,xmlNS,xmlNL};
|
static xmlChRangeGroup xmlNG = {42,5,xmlNS,xmlNL};
|
||||||
|
|
||||||
static xmlChSRange xmlNdS[] = {{0x30, 0x39}, {0x660, 0x669},
|
static const xmlChSRange xmlNdS[] = {{0x30, 0x39}, {0x660, 0x669},
|
||||||
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
|
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
|
||||||
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
|
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
|
||||||
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
|
||||||
{0xf20, 0xf29}, {0x1040, 0x1049}, {0x1369, 0x1371}, {0x17e0, 0x17e9},
|
{0xf20, 0xf29}, {0x1040, 0x1049}, {0x1369, 0x1371}, {0x17e0, 0x17e9},
|
||||||
{0x1810, 0x1819}, {0x1946, 0x194f}, {0xff10, 0xff19} };
|
{0x1810, 0x1819}, {0x1946, 0x194f}, {0xff10, 0xff19} };
|
||||||
static xmlChLRange xmlNdL[] = {{0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
|
static const xmlChLRange xmlNdL[] = {{0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
|
||||||
static xmlChRangeGroup xmlNdG = {21,2,xmlNdS,xmlNdL};
|
static xmlChRangeGroup xmlNdG = {21,2,xmlNdS,xmlNdL};
|
||||||
|
|
||||||
static xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9}, {0xbc, 0xbe},
|
static const xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9},
|
||||||
{0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33}, {0x1372, 0x137c},
|
{0xbc, 0xbe}, {0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33},
|
||||||
{0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089},
|
{0x1372, 0x137c}, {0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079},
|
||||||
{0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793},
|
{0x2080, 0x2089}, {0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff},
|
||||||
{0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f}, {0x3280, 0x3289},
|
{0x2776, 0x2793}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
|
||||||
{0x32b1, 0x32bf} };
|
{0x3280, 0x3289}, {0x32b1, 0x32bf} };
|
||||||
static xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
|
static const xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
|
||||||
static xmlChRangeGroup xmlNoG = {20,2,xmlNoS,xmlNoL};
|
static xmlChRangeGroup xmlNoG = {20,2,xmlNoS,xmlNoL};
|
||||||
|
|
||||||
static xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a}, {0x2c, 0x2f},
|
static const xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a},
|
||||||
{0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f}, {0x7b, 0x7b},
|
{0x2c, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f},
|
||||||
{0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7}, {0xbb, 0xbb},
|
{0x7b, 0x7b}, {0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7},
|
||||||
{0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387}, {0x55a, 0x55f},
|
{0xbb, 0xbb}, {0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387},
|
||||||
{0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0}, {0x5c3, 0x5c3},
|
{0x55a, 0x55f}, {0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0},
|
||||||
{0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b}, {0x61f, 0x61f},
|
{0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b},
|
||||||
{0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d}, {0x964, 0x965},
|
{0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d},
|
||||||
{0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f}, {0xe5a, 0xe5b},
|
{0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f},
|
||||||
{0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85}, {0x104a, 0x104f},
|
{0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85},
|
||||||
{0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e}, {0x169b, 0x169c},
|
{0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
|
||||||
{0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6}, {0x17d8, 0x17da},
|
{0x169b, 0x169c}, {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6},
|
||||||
{0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027}, {0x2030, 0x2043},
|
{0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027},
|
||||||
{0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057}, {0x207d, 0x207e},
|
{0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057},
|
||||||
{0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6}, {0x2768, 0x2775},
|
{0x207d, 0x207e}, {0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6},
|
||||||
{0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db}, {0x29fc, 0x29fd},
|
{0x2768, 0x2775}, {0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db},
|
||||||
{0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0x3030, 0x3030},
|
{0x29fc, 0x29fd}, {0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f},
|
||||||
{0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb}, {0xfd3e, 0xfd3f},
|
{0x3030, 0x3030}, {0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb},
|
||||||
{0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63}, {0xfe68, 0xfe68},
|
{0xfd3e, 0xfd3f}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63},
|
||||||
{0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a}, {0xff0c, 0xff0f},
|
{0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a},
|
||||||
{0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d}, {0xff3f, 0xff3f},
|
{0xff0c, 0xff0f}, {0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d},
|
||||||
{0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
|
{0xff3f, 0xff3f}, {0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
|
||||||
static xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
|
static const xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
|
||||||
static xmlChRangeGroup xmlPG = {84,2,xmlPS,xmlPL};
|
static xmlChRangeGroup xmlPG = {84,2,xmlPS,xmlPL};
|
||||||
|
|
||||||
static xmlChSRange xmlPdS[] = {{0x2d, 0x2d}, {0x58a, 0x58a},
|
static const xmlChSRange xmlPdS[] = {{0x2d, 0x2d}, {0x58a, 0x58a},
|
||||||
{0x1806, 0x1806}, {0x2010, 0x2015}, {0x301c, 0x301c}, {0x3030, 0x3030},
|
{0x1806, 0x1806}, {0x2010, 0x2015}, {0x301c, 0x301c}, {0x3030, 0x3030},
|
||||||
{0x30a0, 0x30a0}, {0xfe31, 0xfe32}, {0xfe58, 0xfe58}, {0xfe63, 0xfe63},
|
{0x30a0, 0x30a0}, {0xfe31, 0xfe32}, {0xfe58, 0xfe58}, {0xfe63, 0xfe63},
|
||||||
{0xff0d, 0xff0d} };
|
{0xff0d, 0xff0d} };
|
||||||
static xmlChRangeGroup xmlPdG = {11,0,xmlPdS,NULL};
|
static xmlChRangeGroup xmlPdG = {11,0,xmlPdS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d}, {0x7d, 0x7d},
|
static const xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d},
|
||||||
{0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c}, {0x2046, 0x2046},
|
{0x7d, 0x7d}, {0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c},
|
||||||
{0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a}, {0x23b5, 0x23b5},
|
{0x2046, 0x2046}, {0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a},
|
||||||
{0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d}, {0x276f, 0x276f},
|
{0x23b5, 0x23b5}, {0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d},
|
||||||
{0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775}, {0x27e7, 0x27e7},
|
{0x276f, 0x276f}, {0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775},
|
||||||
{0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984}, {0x2986, 0x2986},
|
{0x27e7, 0x27e7}, {0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984},
|
||||||
{0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c}, {0x298e, 0x298e},
|
{0x2986, 0x2986}, {0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c},
|
||||||
{0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994}, {0x2996, 0x2996},
|
{0x298e, 0x298e}, {0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994},
|
||||||
{0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db}, {0x29fd, 0x29fd},
|
{0x2996, 0x2996}, {0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db},
|
||||||
{0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d}, {0x300f, 0x300f},
|
{0x29fd, 0x29fd}, {0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d},
|
||||||
{0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017}, {0x3019, 0x3019},
|
{0x300f, 0x300f}, {0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017},
|
||||||
{0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f}, {0xfe36, 0xfe36},
|
{0x3019, 0x3019}, {0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f},
|
||||||
{0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c}, {0xfe3e, 0xfe3e},
|
{0xfe36, 0xfe36}, {0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c},
|
||||||
{0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44}, {0xfe48, 0xfe48},
|
{0xfe3e, 0xfe3e}, {0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44},
|
||||||
{0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e}, {0xff09, 0xff09},
|
{0xfe48, 0xfe48}, {0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e},
|
||||||
{0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60}, {0xff63, 0xff63} };
|
{0xff09, 0xff09}, {0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60},
|
||||||
|
{0xff63, 0xff63} };
|
||||||
static xmlChRangeGroup xmlPeG = {63,0,xmlPeS,NULL};
|
static xmlChRangeGroup xmlPeG = {63,0,xmlPeS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27}, {0x2a, 0x2a},
|
static const xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27},
|
||||||
{0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5c, 0x5c},
|
{0x2a, 0x2a}, {0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40},
|
||||||
{0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
|
{0x5c, 0x5c}, {0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
|
||||||
{0x387, 0x387}, {0x55a, 0x55f}, {0x589, 0x589}, {0x5be, 0x5be},
|
{0x387, 0x387}, {0x55a, 0x55f}, {0x589, 0x589}, {0x5be, 0x5be},
|
||||||
{0x5c0, 0x5c0}, {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d},
|
{0x5c0, 0x5c0}, {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d},
|
||||||
{0x61b, 0x61b}, {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4},
|
{0x61b, 0x61b}, {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4},
|
||||||
@@ -793,62 +794,63 @@ static xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27}, {0x2a, 0x2a},
|
|||||||
{0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff07},
|
{0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff07},
|
||||||
{0xff0a, 0xff0a}, {0xff0c, 0xff0c}, {0xff0e, 0xff0f}, {0xff1a, 0xff1b},
|
{0xff0a, 0xff0a}, {0xff0c, 0xff0c}, {0xff0e, 0xff0f}, {0xff1a, 0xff1b},
|
||||||
{0xff1f, 0xff20}, {0xff3c, 0xff3c}, {0xff61, 0xff61}, {0xff64, 0xff64} };
|
{0xff1f, 0xff20}, {0xff3c, 0xff3c}, {0xff61, 0xff61}, {0xff64, 0xff64} };
|
||||||
static xmlChLRange xmlPoL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
|
static const xmlChLRange xmlPoL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
|
||||||
static xmlChRangeGroup xmlPoG = {72,2,xmlPoS,xmlPoL};
|
static xmlChRangeGroup xmlPoG = {72,2,xmlPoS,xmlPoL};
|
||||||
|
|
||||||
static xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b}, {0x7b, 0x7b},
|
static const xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b},
|
||||||
{0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b}, {0x201a, 0x201a},
|
{0x7b, 0x7b}, {0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b},
|
||||||
{0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d}, {0x208d, 0x208d},
|
{0x201a, 0x201a}, {0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d},
|
||||||
{0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768}, {0x276a, 0x276a},
|
{0x208d, 0x208d}, {0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768},
|
||||||
{0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770}, {0x2772, 0x2772},
|
{0x276a, 0x276a}, {0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770},
|
||||||
{0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8}, {0x27ea, 0x27ea},
|
{0x2772, 0x2772}, {0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8},
|
||||||
{0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987}, {0x2989, 0x2989},
|
{0x27ea, 0x27ea}, {0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987},
|
||||||
{0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f}, {0x2991, 0x2991},
|
{0x2989, 0x2989}, {0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f},
|
||||||
{0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997}, {0x29d8, 0x29d8},
|
{0x2991, 0x2991}, {0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997},
|
||||||
{0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008}, {0x300a, 0x300a},
|
{0x29d8, 0x29d8}, {0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008},
|
||||||
{0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010}, {0x3014, 0x3014},
|
{0x300a, 0x300a}, {0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010},
|
||||||
{0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a}, {0x301d, 0x301d},
|
{0x3014, 0x3014}, {0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a},
|
||||||
{0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37}, {0xfe39, 0xfe39},
|
{0x301d, 0x301d}, {0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37},
|
||||||
{0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f}, {0xfe41, 0xfe41},
|
{0xfe39, 0xfe39}, {0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f},
|
||||||
{0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59}, {0xfe5b, 0xfe5b},
|
{0xfe41, 0xfe41}, {0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59},
|
||||||
{0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b}, {0xff5b, 0xff5b},
|
{0xfe5b, 0xfe5b}, {0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b},
|
||||||
{0xff5f, 0xff5f}, {0xff62, 0xff62} };
|
{0xff5b, 0xff5b}, {0xff5f, 0xff5f}, {0xff62, 0xff62} };
|
||||||
static xmlChRangeGroup xmlPsG = {65,0,xmlPsS,NULL};
|
static xmlChRangeGroup xmlPsG = {65,0,xmlPsS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b}, {0x3c, 0x3e},
|
static const xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b},
|
||||||
{0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e}, {0xa2, 0xa9},
|
{0x3c, 0x3e}, {0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e},
|
||||||
{0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6}, {0xb8, 0xb8},
|
{0xa2, 0xa9}, {0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6},
|
||||||
{0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5}, {0x2d2, 0x2df},
|
{0xb8, 0xb8}, {0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5},
|
||||||
{0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375}, {0x384, 0x385},
|
{0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
|
||||||
{0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f}, {0x6e9, 0x6e9},
|
{0x384, 0x385}, {0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f},
|
||||||
{0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa}, {0xaf1, 0xaf1},
|
{0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa},
|
||||||
{0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f}, {0xf01, 0xf03},
|
{0xaf1, 0xaf1}, {0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f},
|
||||||
{0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
|
{0xf01, 0xf03}, {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34},
|
||||||
{0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
|
{0xf36, 0xf36}, {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc},
|
||||||
{0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x1fbd, 0x1fbd},
|
{0xfcf, 0xfcf}, {0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff},
|
||||||
{0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf}, {0x1fed, 0x1fef},
|
{0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf},
|
||||||
{0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052}, {0x207a, 0x207c},
|
{0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052},
|
||||||
{0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101}, {0x2103, 0x2106},
|
{0x207a, 0x207c}, {0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101},
|
||||||
{0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
|
{0x2103, 0x2106}, {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118},
|
||||||
{0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
|
{0x211e, 0x2123}, {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129},
|
||||||
{0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144}, {0x214a, 0x214b},
|
{0x212e, 0x212e}, {0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144},
|
||||||
{0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0}, {0x2400, 0x2426},
|
{0x214a, 0x214b}, {0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0},
|
||||||
{0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617}, {0x2619, 0x267d},
|
{0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617},
|
||||||
{0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709},
|
{0x2619, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704},
|
||||||
{0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752},
|
{0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d},
|
||||||
{0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794},
|
{0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767},
|
||||||
{0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5}, {0x27f0, 0x2982},
|
{0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5},
|
||||||
{0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d}, {0x2e80, 0x2e99},
|
{0x27f0, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d},
|
||||||
{0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
|
{0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
|
||||||
{0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
|
{0x3004, 0x3004}, {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037},
|
||||||
{0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e},
|
{0x303e, 0x303f}, {0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f},
|
||||||
{0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f},
|
{0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d},
|
||||||
{0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff},
|
{0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff},
|
||||||
{0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd}, {0xfe62, 0xfe62},
|
{0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd},
|
||||||
{0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04}, {0xff0b, 0xff0b},
|
{0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
|
||||||
{0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xff5c, 0xff5c},
|
{0xff0b, 0xff0b}, {0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40},
|
||||||
{0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee}, {0xfffc, 0xfffd} };
|
{0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee},
|
||||||
static xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
|
{0xfffc, 0xfffd} };
|
||||||
|
static const xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
|
||||||
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
|
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
|
||||||
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
|
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
|
||||||
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356}, {0x1d6c1, 0x1d6c1},
|
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356}, {0x1d6c1, 0x1d6c1},
|
||||||
@@ -857,77 +859,79 @@ static xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
|
|||||||
{0x1d789, 0x1d789}, {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
|
{0x1d789, 0x1d789}, {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
|
||||||
static xmlChRangeGroup xmlSG = {133,20,xmlSS,xmlSL};
|
static xmlChRangeGroup xmlSG = {133,20,xmlSS,xmlSL};
|
||||||
|
|
||||||
static xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5}, {0x9f2, 0x9f3},
|
static const xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5},
|
||||||
{0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f}, {0x17db, 0x17db},
|
{0x9f2, 0x9f3}, {0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f},
|
||||||
{0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
|
{0x17db, 0x17db}, {0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69},
|
||||||
{0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
|
{0xff04, 0xff04}, {0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
|
||||||
static xmlChRangeGroup xmlScG = {13,0,xmlScS,NULL};
|
static xmlChRangeGroup xmlScG = {13,0,xmlScS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60}, {0xa8, 0xa8},
|
static const xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60},
|
||||||
{0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
|
{0xa8, 0xa8}, {0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
|
||||||
{0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
|
{0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
|
||||||
{0x384, 0x385}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf},
|
{0x384, 0x385}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf},
|
||||||
{0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x309b, 0x309c},
|
{0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x309b, 0x309c},
|
||||||
{0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xffe3, 0xffe3} };
|
{0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xffe3, 0xffe3} };
|
||||||
static xmlChRangeGroup xmlSkG = {22,0,xmlSkS,NULL};
|
static xmlChRangeGroup xmlSkG = {22,0,xmlSkS,NULL};
|
||||||
|
|
||||||
static xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e}, {0x7c, 0x7c},
|
static const xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e},
|
||||||
{0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7}, {0xf7, 0xf7},
|
{0x7c, 0x7c}, {0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7},
|
||||||
{0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052}, {0x207a, 0x207c},
|
{0xf7, 0xf7}, {0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052},
|
||||||
{0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b}, {0x2190, 0x2194},
|
{0x207a, 0x207c}, {0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b},
|
||||||
{0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3}, {0x21a6, 0x21a6},
|
{0x2190, 0x2194}, {0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3},
|
||||||
{0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2}, {0x21d4, 0x21d4},
|
{0x21a6, 0x21a6}, {0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2},
|
||||||
{0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321}, {0x237c, 0x237c},
|
{0x21d4, 0x21d4}, {0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321},
|
||||||
{0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1}, {0x25f8, 0x25ff},
|
{0x237c, 0x237c}, {0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1},
|
||||||
{0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff}, {0x2900, 0x2982},
|
{0x25f8, 0x25ff}, {0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff},
|
||||||
{0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff}, {0xfb29, 0xfb29},
|
{0x2900, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff},
|
||||||
{0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b}, {0xff1c, 0xff1e},
|
{0xfb29, 0xfb29}, {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b},
|
||||||
{0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2}, {0xffe9, 0xffec} };
|
{0xff1c, 0xff1e}, {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2},
|
||||||
static xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
|
{0xffe9, 0xffec} };
|
||||||
|
static const xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
|
||||||
{0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715}, {0x1d735, 0x1d735},
|
{0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715}, {0x1d735, 0x1d735},
|
||||||
{0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f}, {0x1d789, 0x1d789},
|
{0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f}, {0x1d789, 0x1d789},
|
||||||
{0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
|
{0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
|
||||||
static xmlChRangeGroup xmlSmG = {48,10,xmlSmS,xmlSmL};
|
static xmlChRangeGroup xmlSmG = {48,10,xmlSmS,xmlSmL};
|
||||||
|
|
||||||
static xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9}, {0xae, 0xae},
|
static const xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9},
|
||||||
{0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482}, {0x60e, 0x60f},
|
{0xae, 0xae}, {0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482},
|
||||||
{0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa}, {0xb70, 0xb70},
|
{0x60e, 0x60f}, {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa},
|
||||||
{0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03}, {0xf13, 0xf17},
|
{0xb70, 0xb70}, {0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03},
|
||||||
{0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36}, {0xf38, 0xf38},
|
{0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
|
||||||
{0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf}, {0x1940, 0x1940},
|
{0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
|
||||||
{0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106}, {0x2108, 0x2109},
|
{0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106},
|
||||||
{0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123}, {0x2125, 0x2125},
|
{0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
|
||||||
{0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e}, {0x2132, 0x2132},
|
{0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
|
||||||
{0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199}, {0x219c, 0x219f},
|
{0x2132, 0x2132}, {0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199},
|
||||||
{0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad}, {0x21af, 0x21cd},
|
{0x219c, 0x219f}, {0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad},
|
||||||
{0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3}, {0x2300, 0x2307},
|
{0x21af, 0x21cd}, {0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3},
|
||||||
{0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b}, {0x237d, 0x239a},
|
{0x2300, 0x2307}, {0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b},
|
||||||
{0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9},
|
{0x237d, 0x239a}, {0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a},
|
||||||
{0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7}, {0x2600, 0x2617},
|
{0x249c, 0x24e9}, {0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7},
|
||||||
{0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1},
|
{0x2600, 0x2617}, {0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691},
|
||||||
{0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b},
|
{0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727},
|
||||||
{0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e},
|
{0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756},
|
||||||
{0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be},
|
{0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af},
|
||||||
{0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3},
|
{0x27b1, 0x27be}, {0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99},
|
||||||
{0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004}, {0x3012, 0x3013},
|
{0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
|
||||||
{0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f}, {0x3190, 0x3191},
|
{0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
|
||||||
{0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250},
|
{0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243},
|
||||||
{0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe},
|
{0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0},
|
||||||
{0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfdfd, 0xfdfd},
|
{0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6},
|
||||||
{0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee}, {0xfffc, 0xfffd} };
|
{0xfdfd, 0xfdfd}, {0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee},
|
||||||
static xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
|
{0xfffc, 0xfffd} };
|
||||||
|
static const xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
|
||||||
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
|
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
|
||||||
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
|
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
|
||||||
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356} };
|
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356} };
|
||||||
static xmlChRangeGroup xmlSoG = {103,10,xmlSoS,xmlSoL};
|
static xmlChRangeGroup xmlSoG = {103,10,xmlSoS,xmlSoL};
|
||||||
|
|
||||||
static xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0}, {0x1680, 0x1680},
|
static const xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0},
|
||||||
{0x180e, 0x180e}, {0x2000, 0x200b}, {0x2028, 0x2029}, {0x202f, 0x202f},
|
{0x1680, 0x1680}, {0x180e, 0x180e}, {0x2000, 0x200a}, {0x2028, 0x2029},
|
||||||
{0x205f, 0x205f}, {0x3000, 0x3000} };
|
{0x202f, 0x202f}, {0x205f, 0x205f}, {0x3000, 0x3000} };
|
||||||
static xmlChRangeGroup xmlZG = {9,0,xmlZS,NULL};
|
static xmlChRangeGroup xmlZG = {9,0,xmlZS,NULL};
|
||||||
|
|
||||||
xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
|
static xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
|
||||||
xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
|
static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlUnicodeLookup:
|
* xmlUnicodeLookup:
|
||||||
@@ -3145,7 +3149,7 @@ xmlUCSIsCatZs(int code) {
|
|||||||
(code == 0xa0) ||
|
(code == 0xa0) ||
|
||||||
(code == 0x1680) ||
|
(code == 0x1680) ||
|
||||||
(code == 0x180e) ||
|
(code == 0x180e) ||
|
||||||
((code >= 0x2000) && (code <= 0x200b)) ||
|
((code >= 0x2000) && (code <= 0x200a)) ||
|
||||||
(code == 0x202f) ||
|
(code == 0x202f) ||
|
||||||
(code == 0x205f) ||
|
(code == 0x205f) ||
|
||||||
(code == 0x3000));
|
(code == 0x3000));
|
||||||
@@ -3170,7 +3174,6 @@ xmlUCSIsCat(int code, const char *cat) {
|
|||||||
return (func(code));
|
return (func(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define bottom_xmlunicode
|
#define bottom_xmlunicode
|
||||||
#include "elfgcchack.h"
|
#include "elfgcchack.h"
|
||||||
#endif /* LIBXML_UNICODE_ENABLED */
|
#endif /* LIBXML_UNICODE_ENABLED */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user