updated to more recent libxml2 version (work in progress)

This commit is contained in:
ejcoumans
2006-06-18 23:22:39 +00:00
parent c91d74bfa3
commit f2636f8d4b
70 changed files with 12357 additions and 3518 deletions

View File

@@ -192,16 +192,16 @@ htmlnamePop(htmlParserCtxtPtr ctxt)
const xmlChar *ret;
if (ctxt->nameNr <= 0)
return (0);
return (NULL);
ctxt->nameNr--;
if (ctxt->nameNr < 0)
return (0);
return (NULL);
if (ctxt->nameNr > 0)
ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
else
ctxt->name = NULL;
ret = ctxt->nameTab[ctxt->nameNr];
ctxt->nameTab[ctxt->nameNr] = 0;
ctxt->nameTab[ctxt->nameNr] = NULL;
return (ret);
}
@@ -230,7 +230,7 @@ htmlnamePop(htmlParserCtxtPtr ctxt)
* UTF-8 if we are using this mode. It returns an int.
* NEXT Skip to the next character, this does the proper decoding
* in UTF-8 mode. It also pop-up unfinished entities on the fly.
* 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
*/
@@ -964,7 +964,6 @@ NULL
static const char *htmlNoContentElements[] = {
"html",
"head",
"body",
NULL
};
@@ -1745,7 +1744,7 @@ htmlEntityLookup(const xmlChar *name) {
/**
* htmlEntityValueLookup:
* @value: the entity's Unicode value
* @value: the entity's unicode value
*
* Lookup the given entity in EntitiesTable
*
@@ -2042,6 +2041,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
unsigned int i;
int j;
xmlNodePtr lastChild;
xmlDtdPtr dtd;
for (j = 0;j < len;j++)
if (!(IS_BLANK_CH(str[j]))) return(0);
@@ -2054,8 +2054,17 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
return(1);
if (xmlStrEqual(ctxt->name, BAD_CAST"head"))
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);
lastChild = xmlGetLastChild(ctxt->node);
while ((lastChild) && (lastChild->type == XML_COMMENT_NODE))
@@ -2627,12 +2636,12 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
*/
static void
htmlParseScript(htmlParserCtxtPtr ctxt) {
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 1];
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
int nbchar = 0;
xmlChar cur;
int cur,l;
SHRINK;
cur = CUR;
cur = CUR_CHAR(l);
while (IS_CHAR_CH(cur)) {
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
(NXT(3) == '-')) {
@@ -2648,20 +2657,39 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
nbchar = 0;
htmlParseComment(ctxt);
cur = CUR;
cur = CUR_CHAR(l);
continue;
} else if ((cur == '<') && (NXT(1) == '/')) {
/*
* One should break here, the specification is clear:
* Authors should therefore escape "</" within the content.
* Escape mechanisms are specific to each scripting or
* style sheet language.
*/
if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
((NXT(2) >= 'a') && (NXT(2) <= 'z')))
break; /* while */
/*
* One should break here, the specification is clear:
* Authors should therefore escape "</" within the content.
* Escape mechanisms are specific to each scripting or
* style sheet language.
*
* In recovery mode, only break if end tag match the
* current tag, effectively ignoring all tags inside the
* 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 (ctxt->sax->cdataBlock!= NULL) {
/*
@@ -2673,9 +2701,11 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
nbchar = 0;
}
NEXT;
cur = CUR;
GROW;
NEXTL(l);
cur = CUR_CHAR(l);
}
if (!(IS_CHAR_CH(cur))) {
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
"Invalid char in CDATA 0x%X\n", cur);
@@ -2743,6 +2773,8 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
}
}
if (nbchar != 0) {
buf[nbchar] = 0;
/*
* 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? '/>'
*
* Returns 0 in case of success and -1 in case of error.
*/
static void
static int
htmlParseStartTag(htmlParserCtxtPtr ctxt) {
const xmlChar *name;
const xmlChar *attname;
xmlChar *attvalue;
const xmlChar **atts = ctxt->atts;
const xmlChar **atts;
int nbatts = 0;
int maxatts = ctxt->maxatts;
int maxatts;
int meta = 0;
int i;
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
"htmlParseStartTag: context error\n", NULL, NULL);
return;
return -1;
}
if (CUR != '<') return;
if (CUR != '<') return -1;
NEXT;
atts = ctxt->atts;
maxatts = ctxt->maxatts;
GROW;
name = htmlParseHTMLName(ctxt);
if (name == NULL) {
@@ -3379,7 +3415,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
/* Dump the bogus tag like browsers do */
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
NEXT;
return;
return -1;
}
if (xmlStrEqual(name, BAD_CAST"meta"))
meta = 1;
@@ -3402,14 +3438,14 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced <html> tag\n",
name, NULL);
return;
return 0;
}
if ((ctxt->nameNr != 1) &&
(xmlStrEqual(name, BAD_CAST"head"))) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced <head> tag\n",
name, NULL);
return;
return 0;
}
if (xmlStrEqual(name, BAD_CAST"body")) {
int indx;
@@ -3420,7 +3456,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
name, NULL);
while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
NEXT;
return;
return 0;
}
}
}
@@ -3533,6 +3569,8 @@ failed:
xmlFree((xmlChar *) atts[i]);
}
}
return 0;
}
/**
@@ -3575,6 +3613,15 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt)
if ((!IS_CHAR_CH(CUR)) || (CUR != '>')) {
htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
"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
NEXT;
@@ -3709,10 +3756,8 @@ htmlParseReference(htmlParserCtxtPtr ctxt) {
/**
* htmlParseContent:
* @ctxt: an HTML parser context
* @name: the node name
*
* Parse a content: comment, sub-element, reference or text.
*
*/
static void
@@ -3830,6 +3875,19 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
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:
* @ctxt: an HTML parser context
@@ -3847,16 +3905,15 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
xmlChar *currentNode = NULL;
const htmlElemDesc * info;
htmlParserNodeInfo node_info;
const xmlChar *oldname;
int failed;
int depth;
const xmlChar *oldptr;
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
"htmlParseStartTag: context error\n", NULL, NULL);
"htmlParseElement: context error\n", NULL, NULL);
return;
}
depth = ctxt->nameNr;
/* Capture start position */
if (ctxt->record_info) {
node_info.begin_pos = ctxt->input->consumed +
@@ -3864,11 +3921,9 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
node_info.begin_line = ctxt->input->line;
}
oldname = ctxt->name;
htmlParseStartTag(ctxt);
failed = htmlParseStartTag(ctxt);
name = ctxt->name;
if (((depth == ctxt->nameNr) && (xmlStrEqual(oldname, ctxt->name))) ||
(name == NULL)) {
if (failed || (name == NULL)) {
if (CUR == '>')
NEXT;
return;
@@ -3911,7 +3966,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
/*
* Capture end position and add node
*/
if ( currentNode != NULL && ctxt->record_info ) {
if (ctxt->record_info) {
node_info.end_pos = ctxt->input->consumed +
(CUR_PTR - ctxt->input->base);
node_info.end_line = ctxt->input->line;
@@ -4577,11 +4632,11 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
#endif
} else {
ctxt->instate = XML_PARSER_MISC;
}
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
"HPP: entering MISC\n");
xmlGenericError(xmlGenericErrorContext,
"HPP: entering MISC\n");
#endif
}
break;
case XML_PARSER_MISC:
SKIP_BLANKS;
@@ -4738,8 +4793,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
}
break;
case XML_PARSER_START_TAG: {
const xmlChar *name, *oldname;
int depth = ctxt->nameNr;
const xmlChar *name;
int failed;
const htmlElemDesc * info;
if (avail < 2)
@@ -4766,11 +4821,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
(htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0))
goto done;
oldname = ctxt->name;
htmlParseStartTag(ctxt);
failed = htmlParseStartTag(ctxt);
name = ctxt->name;
if (((depth == ctxt->nameNr) &&
(xmlStrEqual(oldname, ctxt->name))) ||
if (failed ||
(name == NULL)) {
if (CUR == '>')
NEXT;
@@ -4793,7 +4846,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
SKIP(2);
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
ctxt->sax->endElement(ctxt->userData, name);
oldname = htmlnamePop(ctxt);
htmlnamePop(ctxt);
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
@@ -4814,7 +4867,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
*/
if (xmlStrEqual(name, ctxt->name)) {
nodePop(ctxt);
oldname = htmlnamePop(ctxt);
htmlnamePop(ctxt);
}
ctxt->instate = XML_PARSER_CONTENT;
@@ -4831,7 +4884,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
if ((info != NULL) && (info->empty)) {
if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
ctxt->sax->endElement(ctxt->userData, name);
oldname = htmlnamePop(ctxt);
htmlnamePop(ctxt);
}
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
@@ -5178,10 +5231,18 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
(ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
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->cur = ctxt->input->base + cur;
ctxt->input->end =
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
#endif
@@ -5779,6 +5840,14 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
ctxt->options |= XML_PARSE_NOBLANKS;
} else
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;
return (options);
}

View File

@@ -506,16 +506,17 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
}
/**
* htmlDocDumpMemory:
* htmlDocDumpMemoryFormat:
* @cur: the document
* @mem: OUT: the memory pointer
* @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.
* It's up to the caller to free the memory.
*/
void
htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
xmlOutputBufferPtr buf;
xmlCharEncodingHandlerPtr handler = NULL;
const char *encoding;
@@ -552,6 +553,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
*size = 0;
return;
}
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
}
@@ -570,7 +573,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
return;
}
htmlDocContentDumpOutput(buf, cur, NULL);
htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
xmlOutputBufferFlush(buf);
if (buf->conv != NULL) {
*size = buf->conv->use;
@@ -582,6 +586,20 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
(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);
if (handler == NULL)
return(-1);
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
}

View File

@@ -83,15 +83,126 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
ctxt->errNo = error;
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror;
}
__xmlRaiseError(schannel,
ctxt->vctxt.error, ctxt->vctxt.userData,
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);
if (ctxt != NULL)
__xmlRaiseError(schannel,
ctxt->vctxt.error, ctxt->vctxt.userData,
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);
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)
{
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);
}
@@ -134,12 +245,12 @@ xmlSAX2GetSystemId(void *ctx)
*
* Returns an int
*/
intptr_t
int
xmlSAX2GetLineNumber(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
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
*/
intptr_t
int
xmlSAX2GetColumnNumber(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
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;
ret = xmlGetDocEntity(ctxt->myDoc, name);
if (ret != NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Entity(%s) document marked standalone but requires external subset\n",
name);
ctxt->valid = 0;
ctxt->wellFormed = 0;
xmlFatalErrMsg(ctxt, XML_ERR_NOT_STANDALONE,
"Entity(%s) document marked standalone but requires external subset\n",
name, NULL);
}
ctxt->myDoc->standalone = 1;
}
@@ -466,11 +574,8 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
if (val == 0) {
xmlAddChildList((xmlNodePtr) ret, children);
} else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Failure to process entity %s\n", name);
ctxt->wellFormed = 0;
ctxt->valid = 0;
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
"Failure to process entity %s\n", name, NULL);
ctxt->validate = 0;
return(NULL);
}
@@ -532,10 +637,10 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
if (ctxt->inSubset == 1) {
ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId,
systemId, content);
if ((ent == NULL) && (ctxt->pedantic) &&
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
"Entity(%s) already defined in the internal subset\n", name);
if ((ent == NULL) && (ctxt->pedantic))
xmlWarnMsg(ctxt, XML_WAR_ENTITY_REDEFINED,
"Entity(%s) already defined in the internal subset\n",
name);
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
xmlChar *URI;
const char *base = NULL;
@@ -568,9 +673,9 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
ent->URI = URI;
}
} else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2EntityDecl(%s) called while not in subset\n", name);
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
"SAX.xmlSAX2EntityDecl(%s) called while not in subset\n",
name, NULL);
}
}
@@ -595,7 +700,9 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
xmlAttributePtr attr;
xmlChar *name = NULL, *prefix = NULL;
if (ctx == NULL) return;
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"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,
(xmlAttributeDefault) def, defaultValue, tree);
else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n", name);
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
"SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n",
name, NULL);
xmlFreeEnumeration(tree);
return;
}
@@ -633,7 +740,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
if (ctxt->vctxt.valid == 0)
ctxt->valid = 0;
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,
attr);
#endif /* LIBXML_VALID_ENABLED */
@@ -659,7 +766,9 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlElementPtr elem = NULL;
if (ctx == NULL) return;
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"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,
name, (xmlElementTypeVal) type, content);
else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2ElementDecl(%s) called while not in subset\n",
name);
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
"SAX.xmlSAX2ElementDecl(%s) called while not in subset\n",
name, NULL);
return;
}
#ifdef LIBXML_VALID_ENABLED
@@ -704,18 +812,18 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNotationPtr nota = NULL;
if (ctx == NULL) return;
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
#endif
if ((publicId == NULL) && (systemId == NULL)) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n", name);
ctxt->valid = 0;
ctxt->wellFormed = 0;
xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
"SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n",
name, NULL);
return;
} else if (ctxt->inSubset == 1)
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,
publicId, systemId);
else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2NotationDecl(%s) called while not in subset\n", name);
xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
"SAX.xmlSAX2NotationDecl(%s) called while not in subset\n",
name, NULL);
return;
}
#ifdef LIBXML_VALID_ENABLED
if (nota == NULL) ctxt->valid = 0;
if (ctxt->validate && ctxt->wellFormed &&
ctxt->myDoc && ctxt->myDoc->intSubset)
if ((ctxt->validate) && (ctxt->wellFormed) &&
(ctxt->myDoc->intSubset != NULL))
ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc,
nota);
#endif /* LIBXML_VALID_ENABLED */
@@ -802,9 +910,9 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
ent->URI = URI;
}
} else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n", name);
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
"SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n",
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:
* @ctx: the user data (XML parser context)
@@ -956,13 +1064,13 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
name = xmlSplitQName(ctxt, fullname, &ns);
if ((name != NULL) && (name[0] == 0)) {
if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"invalid namespace declaration '%s'\n", fullname);
xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR,
"invalid namespace declaration '%s'\n",
fullname, NULL);
} else {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
"Avoid attribute ending with ':' like '%s'\n", fullname);
xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN,
"Avoid attribute ending with ':' like '%s'\n",
fullname, NULL);
}
if (ns != NULL)
xmlFree(ns);
@@ -1076,22 +1184,19 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
}
if (val[0] == 0) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Empty namespace name for prefix %s\n", name);
xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY,
"Empty namespace name for prefix %s\n", name, NULL);
}
if ((ctxt->pedantic != 0) && (val[0] != 0)) {
xmlURIPtr uri;
uri = xmlParseURI((const char *)val);
if (uri == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
xmlNsWarnMsg(ctxt, XML_WAR_NS_URI,
"xmlns:%s: %s not a valid URI\n", name, value);
} else {
if (uri->scheme == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
xmlNsWarnMsg(ctxt, XML_WAR_NS_URI_RELATIVE,
"xmlns:%s: URI %s is not absolute\n", name, value);
}
xmlFreeURI(uri);
@@ -1124,8 +1229,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlAttrPtr prop;
namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns);
if (namespace == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
"Namespace prefix %s of attribute %s is not defined\n",
ns, name);
}
@@ -1136,9 +1240,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
if ((xmlStrEqual(name, prop->name)) &&
((namespace == prop->ns) ||
(xmlStrEqual(namespace->href, prop->ns->href)))) {
ctxt->errNo = XML_ERR_ATTRIBUTE_REDEFINED;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED,
"Attribute %s in %s redefined\n",
name, namespace->href);
ctxt->wellFormed = 0;
@@ -1226,11 +1328,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.
*/
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);
else if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
/*
* Add the xml:id value
*
@@ -1242,7 +1340,10 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
(const char *) value, NULL);
}
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:
@@ -1669,7 +1770,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
* Returns the newly allocated string or NULL if not needed or error
*/
static xmlNodePtr
xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
xmlNodePtr ret;
const xmlChar *intern = NULL;
@@ -1687,6 +1788,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
xmlErrMemory(ctxt, "xmlSAX2Characters");
return(NULL);
}
memset(ret, 0, sizeof(xmlNode));
/*
* intern the formatting blanks found between tags, or the
* very short strings
@@ -1694,7 +1796,14 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
if (ctxt->dictNames) {
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] != '!')))) {
intern = xmlDictLookup(ctxt->dict, str, len);
} else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') &&
@@ -1708,7 +1817,6 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, intptr_t len) {
}
}
skip:
memset(ret, 0, sizeof(xmlNode));
ret->type = XML_TEXT_NODE;
ret->name = xmlStringText;
@@ -1950,16 +2058,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.
*/
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);
} else if ((prefix == ctxt->str_xml) &&
if ((prefix == ctxt->str_xml) &&
(localname[0] == 'i') && (localname[1] == 'd') &&
(localname[2] == 0)) {
/*
@@ -1977,6 +2076,15 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
}
#endif
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)
@@ -2007,8 +2115,8 @@ xmlSAX2StartElementNs(void *ctx,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
intptr_t nb_attributes,
intptr_t nb_defaulted,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -2016,7 +2124,7 @@ xmlSAX2StartElementNs(void *ctx,
xmlNodePtr parent;
xmlNsPtr last = NULL, ns;
const xmlChar *uri, *pref;
intptr_t i, j;
int i, j;
if (ctx == NULL) return;
parent = ctxt->node;
@@ -2137,9 +2245,13 @@ xmlSAX2StartElementNs(void *ctx,
*/
if ((URI != NULL) && (ret->ns == NULL)) {
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) {
ns = xmlNewNs(ret, NULL, prefix);
if (ns == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
return;
}
@@ -2259,7 +2371,7 @@ xmlSAX2Reference(void *ctx, const xmlChar *name)
* receiving some chars from the parser.
*/
void
xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr lastChild;
@@ -2317,17 +2429,20 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
* We try to minimaze realloc() uses and avoid copying
* and recomputing length over and over.
*/
if ((ctxt->nodemem == ctxt->nodelen + 1) &&
(xmlDictOwns(ctxt->dict, lastChild->content))) {
if (lastChild->content == (xmlChar *)&(lastChild->properties)) {
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);
}
if (ctxt->nodelen + len >= ctxt->nodemem) {
xmlChar *newbuf;
size_t size;
int size;
size = ctxt->nodemem + len;
size *= 2;
newbuf = (xmlChar *) xmlRealloc(lastChild->content,size);
newbuf = (xmlChar *) xmlRealloc(lastChild->content,size);
if (newbuf == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
return;
@@ -2370,7 +2485,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, intptr_t len)
* UNUSED: by default the DOM building will use xmlSAX2Characters
*/
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; */
#ifdef DEBUG_SAX
@@ -2406,6 +2521,14 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
if (ret == NULL) return;
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) {
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
return;
@@ -2458,6 +2581,14 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
#endif
ret = xmlNewDocComment(ctxt->myDoc, value);
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) {
xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
@@ -2499,7 +2630,7 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
* called when a pcdata block has been parsed
*/
void
xmlSAX2CDataBlock(void *ctx, const xmlChar *value, intptr_t len)
xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret, lastChild;

View File

@@ -793,7 +793,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
* default namespace (XML Namespaces: "default namespaces
* 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);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
if(!already_rendered && visible) {
@@ -802,7 +802,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
if(xmlStrlen(attr->ns->prefix) == 0) {
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;
}
}
@@ -946,6 +946,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
* xmlC14NProcessAttrsAxis:
* @ctx: the C14N context
* @cur: the current node
* @parent_visible: the visibility of parent node
*
* Prints out canonical attribute axis of the current node to the
* buffer from C14N context as follows
@@ -974,7 +975,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
* Returns 0 on success or -1 on fail.
*/
static int
xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur)
xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
{
xmlAttrPtr attr;
xmlListPtr list;
@@ -1009,7 +1010,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur)
* include attributes in "xml" namespace defined in ancestors
* (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))) {
/*
* 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
*/
memset(&state, 0, sizeof(state));
xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state);
if (visible) {
@@ -1171,12 +1173,10 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
xmlC14NVisibleNsStackShift(ctx->ns_rendered);
}
if(visible) {
ret = xmlC14NProcessAttrsAxis(ctx, cur);
if (ret < 0) {
xmlC14NErrInternal("processing attributes axis");
return (-1);
}
ret = xmlC14NProcessAttrsAxis(ctx, cur, visible);
if (ret < 0) {
xmlC14NErrInternal("processing attributes axis");
return (-1);
}
if (visible) {

View File

@@ -1200,8 +1200,6 @@ static void
xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup)
{
xmlChar *uri = NULL;
xmlChar *URL = NULL;
xmlChar *base = NULL;
xmlCatalogEntryPtr entry = NULL;
@@ -1288,10 +1286,6 @@ xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
}
if (base != NULL)
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,
NULL, catal->prefer, NULL);
if (doregister) {
catal->type = XML_CATA_CATALOG;
cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
if (cur != NULL)
cur->children = catal->children;
@@ -1648,7 +1643,8 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
if (xmlStrEqual(sysID, cur->name)) {
if (xmlDebugCatalogs)
xmlGenericError(xmlGenericErrorContext,
"Found system match %s\n", cur->name);
"Found system match %s, using %s\n",
cur->name, cur->URL);
catal->depth--;
return(xmlStrdup(cur->URL));
}
@@ -3218,7 +3214,7 @@ xmlLoadCatalogs(const char *pathss) {
return;
cur = pathss;
while ((cur != NULL) && (*cur != 0)) {
while (*cur != 0) {
while (xmlIsBlank_ch(*cur)) cur++;
if (*cur != 0) {
paths = cur;

View File

@@ -5,7 +5,7 @@
* This file is automatically generated from the cvs source
* 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
* William Brack <wbrack@mmm.com.hk>
*/
@@ -22,7 +22,7 @@
* 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, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
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 };
static xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131}, {0x134, 0x13e},
{0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3}, {0x1cd, 0x1f0},
{0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8}, {0x2bb, 0x2c1},
{0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, {0x38e, 0x3a1},
{0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
{0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3}, {0x401, 0x40c},
{0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481}, {0x490, 0x4c4},
{0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb}, {0x4ee, 0x4f5},
{0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559}, {0x561, 0x586},
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
{0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce}, {0x6d0, 0x6d3},
{0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939}, {0x93d, 0x93d},
{0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
{0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9dc, 0x9dd},
{0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10},
{0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36},
{0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74},
{0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
{0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
{0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28},
{0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39}, {0xb3d, 0xb3d},
{0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a}, {0xb8e, 0xb90},
{0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f},
{0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9},
{0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33},
{0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90},
{0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcde, 0xcde},
{0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
{0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e}, {0xe30, 0xe30},
{0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82}, {0xe84, 0xe84},
{0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
{0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0}, {0xeb2, 0xeb3},
{0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47}, {0xf49, 0xf69},
{0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100}, {0x1102, 0x1103},
{0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c}, {0x110e, 0x1112},
{0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140}, {0x114c, 0x114c},
{0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155}, {0x1159, 0x1159},
{0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165}, {0x1167, 0x1167},
{0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173}, {0x1175, 0x1175},
{0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab}, {0x11ae, 0x11af},
{0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2}, {0x11eb, 0x11eb},
{0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9},
{0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d},
{0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d},
{0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe},
{0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb},
{0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2126, 0x2126},
{0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182}, {0x3041, 0x3094},
{0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
xmlChRangeGroup xmlIsBaseCharGroup =
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
{0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
const xmlChRangeGroup xmlIsBaseCharGroup =
{197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
static xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff}, {0xe000, 0xfffd}};
static xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
xmlChRangeGroup xmlIsCharGroup =
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
{0xe000, 0xfffd}};
static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
const xmlChRangeGroup xmlIsCharGroup =
{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},
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
{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},
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
{0x3099, 0x3099}, {0x309a, 0x309a}};
xmlChRangeGroup xmlIsCombiningGroup =
const xmlChRangeGroup xmlIsCombiningGroup =
{95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
static xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669}, {0x6f0, 0x6f9},
{0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f}, {0xae6, 0xaef},
{0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f}, {0xce6, 0xcef},
{0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, {0xf20, 0xf29}};
xmlChRangeGroup xmlIsDigitGroup =
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
{0xf20, 0xf29}};
const xmlChRangeGroup xmlIsDigitGroup =
{14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
static xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0}, {0x2d1, 0x2d1},
{0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46}, {0xec6, 0xec6},
{0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e}, {0x30fc, 0x30fe}};
xmlChRangeGroup xmlIsExtenderGroup =
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
{0x30fc, 0x30fe}};
const xmlChRangeGroup xmlIsExtenderGroup =
{10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
static xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
{0x3021, 0x3029}, {0x4e00, 0x9fa5}};
xmlChRangeGroup xmlIsIdeographicGroup =
const xmlChRangeGroup xmlIsIdeographicGroup =
{3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
@@ -162,10 +165,10 @@ xmlChRangeGroup xmlIsIdeographicGroup =
* Returns: true if character valid, false otherwise
*/
int
xmlCharInRange (unsigned int val, const xmlChRangeGroupPtr rptr) {
xmlCharInRange (unsigned int val, const xmlChRangeGroup *rptr) {
int low, high, mid;
xmlChSRangePtr sptr;
xmlChLRangePtr lptr;
const xmlChSRange *sptr;
const xmlChLRange *lptr;
if (rptr == NULL) return(0);
if (val < 0x10000) { /* is val in 'short' or 'long' array? */

View File

@@ -34,6 +34,8 @@
#include <libxml/relaxng.h>
#endif
#define DUMP_TEXT_TYPE 1
typedef struct _xmlDebugCtxt xmlDebugCtxt;
typedef xmlDebugCtxt *xmlDebugCtxtPtr;
struct _xmlDebugCtxt {
@@ -46,6 +48,7 @@ struct _xmlDebugCtxt {
int check; /* do just checkings */
int errors; /* number of errors found */
int nodict; /* if the document has no dictionnary */
int options; /* options */
};
static void xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node);
@@ -63,6 +66,7 @@ xmlCtxtDumpInitCtxt(xmlDebugCtxtPtr ctxt)
ctxt->node = NULL;
ctxt->dict = NULL;
ctxt->nodict = 0;
ctxt->options = 0;
for (i = 0; i < 100; i++)
ctxt->shift[i] = ' ';
ctxt->shift[100] = 0;
@@ -344,8 +348,10 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
if ((node->type != XML_ELEMENT_NODE) &&
(node->type != XML_ATTRIBUTE_NODE) &&
(node->type != XML_ELEMENT_DECL) &&
(node->type != XML_ATTRIBUTE_DECL) &&
(node->type != XML_DTD_NODE) &&
(node->type != XML_ELEMENT_DECL) &&
(node->type != XML_HTML_DOCUMENT_NODE) &&
(node->type != XML_DOCUMENT_NODE)) {
if (node->content != NULL)
@@ -900,9 +906,18 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
if (!ctxt->check) {
xmlCtxtDumpSpaces(ctxt);
if (node->name == (const xmlChar *) xmlStringTextNoenc)
fprintf(ctxt->output, "TEXT no enc\n");
fprintf(ctxt->output, "TEXT no enc");
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;
case XML_CDATA_SECTION_NODE:
@@ -1003,9 +1018,9 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
fprintf(ctxt->output, "PBM: doc == NULL !!!\n");
}
ctxt->depth++;
if (node->nsDef != NULL)
if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL))
xmlCtxtDumpNamespaceList(ctxt, node->nsDef);
if (node->properties != NULL)
if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL))
xmlCtxtDumpAttrList(ctxt, node->properties);
if (node->type != XML_ENTITY_REF_NODE) {
if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) {
@@ -1050,7 +1065,8 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
return;
}
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++;
xmlCtxtDumpNodeList(ctxt, node->children);
ctxt->depth--;
@@ -1487,6 +1503,7 @@ xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDocumentHead(&ctxt, doc);
xmlCtxtDumpCleanCtxt(&ctxt);
@@ -1507,6 +1524,7 @@ xmlDebugDumpDocument(FILE * output, xmlDocPtr doc)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDocument(&ctxt, doc);
xmlCtxtDumpCleanCtxt(&ctxt);
@@ -1527,6 +1545,7 @@ xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
if (output == NULL)
output = stdout;
xmlCtxtDumpInitCtxt(&ctxt);
ctxt.options |= DUMP_TEXT_TYPE;
ctxt.output = output;
xmlCtxtDumpDTD(&ctxt, dtd);
xmlCtxtDumpCleanCtxt(&ctxt);
@@ -2122,6 +2141,37 @@ xmlShellRegisterNamespace(xmlShellCtxtPtr ctxt, char *arg,
xmlFree(nsListDup);
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
/**
@@ -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, "\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, "\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 */
fprintf(ctxt->output, "\tpwd display current working directory\n");
fprintf(ctxt->output, "\tquit leave shell\n");
@@ -2923,6 +2975,11 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
} else {
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")) {
if (arg[0] == 0) {
xmlGenericError(xmlGenericErrorContext,

View File

@@ -41,7 +41,7 @@ typedef xmlDictEntry *xmlDictEntryPtr;
struct _xmlDictEntry {
struct _xmlDictEntry *next;
const xmlChar *name;
intptr_t len;
int len;
int valid;
};
@@ -51,8 +51,8 @@ struct _xmlDictStrings {
xmlDictStringsPtr next;
xmlChar *free;
xmlChar *end;
intptr_t size;
intptr_t nbStrings;
int size;
int nbStrings;
xmlChar array[1];
};
/*
@@ -125,10 +125,10 @@ xmlDictCleanup(void) {
* Returns the pointer of the local string, or NULL in case of error.
*/
static const xmlChar *
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, intptr_t namelen) {
xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) {
xmlDictStringsPtr pool;
const xmlChar *ret;
intptr_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
pool = dict->strings;
while (pool != NULL) {
@@ -176,12 +176,12 @@ found_pool:
*/
static const xmlChar *
xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix,
const xmlChar *name, intptr_t namelen)
const xmlChar *name, int namelen)
{
xmlDictStringsPtr pool;
const xmlChar *ret;
intptr_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
size_t plen;
int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
int plen;
if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
plen = xmlStrlen(prefix);
@@ -228,7 +228,7 @@ found_pool:
* Calculate the hash key
*/
static unsigned long
xmlDictComputeKey(const xmlChar *name, intptr_t namelen) {
xmlDictComputeKey(const xmlChar *name, int namelen) {
unsigned long value = 0L;
if (name == NULL) return(0);
@@ -258,10 +258,10 @@ xmlDictComputeKey(const xmlChar *name, intptr_t namelen) {
* Calculate the hash key
*/
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;
size_t plen;
int plen;
if (prefix == NULL)
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
*/
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;
xmlDictEntryPtr entry;
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.
*/
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;
xmlDictEntryPtr insert;
@@ -776,7 +776,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
xmlDictEntryPtr entry;
xmlDictEntryPtr insert;
const xmlChar *ret;
intptr_t len;
int len;
if ((dict == NULL) || (name == NULL))
return(NULL);

View File

@@ -36,6 +36,7 @@
#include "libxml/SAX2.h"
#include "libxml/SAX.h"
#include "libxml/schemasInternals.h"
#include "libxml/schematron.h"
#include "libxml/threads.h"
#include "libxml/tree.h"
#include "libxml/uri.h"
@@ -300,6 +301,18 @@ extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias __attribut
#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)
#ifdef bottom_HTMLparser
#undef htmlElementAllowedHere
@@ -1222,6 +1235,18 @@ extern __typeof (xmlAutomataNewEpsilon) xmlAutomataNewEpsilon__internal_alias __
#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)
#ifdef bottom_xmlregexp
#undef xmlAutomataNewOnceTrans
@@ -2496,6 +2521,66 @@ extern __typeof (xmlCurrentChar) xmlCurrentChar__internal_alias __attribute((vis
#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)
#ifdef bottom_debugXML
#undef xmlDebugCheckDocument
@@ -3044,6 +3129,234 @@ extern __typeof (xmlErrMemory) xmlErrMemory__internal_alias __attribute((visibil
#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
#undef xmlFileClose
extern __typeof (xmlFileClose) xmlFileClose __attribute((alias("xmlFileClose__internal_alias")));
@@ -3780,6 +4093,16 @@ extern __typeof (xmlHandleEntity) xmlHandleEntity__internal_alias __attribute((v
#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
#undef xmlHasNsProp
extern __typeof (xmlHasNsProp) xmlHasNsProp __attribute((alias("xmlHasNsProp__internal_alias")));
@@ -6270,6 +6593,18 @@ extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __at
#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)
#ifdef bottom_xmlIO
#undef xmlOutputBufferCreateFd
@@ -6996,6 +7331,16 @@ extern __typeof (xmlParseURI) xmlParseURI__internal_alias __attribute((visibilit
#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
#undef xmlParseURIReference
extern __typeof (xmlParseURIReference) xmlParseURIReference __attribute((alias("xmlParseURIReference__internal_alias")));
@@ -7336,6 +7681,18 @@ extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth__internal_alias __attrib
#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)
#ifdef bottom_pattern
#undef xmlPatternStreamable
@@ -8070,6 +8427,18 @@ extern __typeof (xmlRelaxNGSetParserErrors) xmlRelaxNGSetParserErrors__internal_
#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)
#ifdef bottom_relaxng
#undef xmlRelaxNGSetValidErrors
@@ -8082,6 +8451,18 @@ extern __typeof (xmlRelaxNGSetValidErrors) xmlRelaxNGSetValidErrors__internal_al
#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)
#ifdef bottom_relaxng
#undef xmlRelaxNGValidateDoc
@@ -8278,7 +8659,7 @@ extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attrib
#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
#undef xmlSAX2EndElement
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
@@ -8524,7 +8905,7 @@ extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __at
#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
#undef xmlSAX2StartElement
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
@@ -8818,6 +9199,18 @@ extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute(
#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)
#ifdef bottom_xmlsave
#undef xmlSaveToFd
@@ -9092,6 +9485,18 @@ extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue__internal_alias
#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)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaGetFacetValueAsULong
@@ -9176,6 +9581,18 @@ extern __typeof (xmlSchemaIsBuiltInTypeFacet) xmlSchemaIsBuiltInTypeFacet__inter
#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)
#ifdef bottom_xmlschemas
#undef xmlSchemaNewDocParserCtxt
@@ -9236,6 +9653,18 @@ extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt__internal_alias
#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)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaNewStringValue
@@ -9272,6 +9701,30 @@ extern __typeof (xmlSchemaParse) xmlSchemaParse__internal_alias __attribute((vis
#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)
#ifdef bottom_xmlschemas
#undef xmlSchemaSetParserErrors
@@ -9284,6 +9737,18 @@ extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors__internal_al
#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)
#ifdef bottom_xmlschemas
#undef xmlSchemaSetValidErrors
@@ -9308,6 +9773,18 @@ extern __typeof (xmlSchemaSetValidOptions) xmlSchemaSetValidOptions__internal_al
#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)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaValPredefTypeNode
@@ -9380,6 +9857,18 @@ extern __typeof (xmlSchemaValidateFacetWhtsp) xmlSchemaValidateFacetWhtsp__inter
#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)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaValidateLengthFacet
@@ -9452,6 +9941,54 @@ extern __typeof (xmlSchemaValidateStream) xmlSchemaValidateStream__internal_alia
#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)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaWhiteSpaceReplace
@@ -9464,6 +10001,114 @@ extern __typeof (xmlSchemaWhiteSpaceReplace) xmlSchemaWhiteSpaceReplace__interna
#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
#undef xmlSearchNs
extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
@@ -9864,7 +10509,6 @@ extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent__internal_al
#endif
#endif
#if defined(LIBXML_PUSH_ENABLED)
#ifdef bottom_parser
#undef xmlStopParser
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
#endif
#endif
#endif
#ifdef bottom_xmlstring
#undef xmlStrEqual
@@ -10012,6 +10655,30 @@ extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr__internal_alias __attribut
#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
#undef xmlStringCurrentChar
extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar __attribute((alias("xmlStringCurrentChar__internal_alias")));
@@ -10850,7 +11517,7 @@ extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValu
#endif
#endif
#if defined(LIBXML_READER_ENABLED)
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderReadInnerXml
extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias")));
@@ -10862,7 +11529,7 @@ extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml__internal_
#endif
#endif
#if defined(LIBXML_READER_ENABLED)
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderReadOuterXml
extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias")));
@@ -10922,6 +11589,30 @@ extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__int
#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)
#ifdef bottom_xmlreader
#undef xmlTextReaderSetErrorHandler
@@ -10946,6 +11637,18 @@ extern __typeof (xmlTextReaderSetParserProp) xmlTextReaderSetParserProp__interna
#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)
#ifdef bottom_xmlreader
#undef xmlTextReaderSetStructuredErrorHandler
@@ -14350,7 +15053,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
#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
#undef xmlValidateNCName
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));

View File

@@ -70,6 +70,32 @@ static void xmlRegisterCharEncodingHandlersISO8859x (void);
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.
* The value of @outlen after return is the number of octets consumed.
*/
static intptr_t
asciiToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
static int
asciiToUTF8(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
unsigned char* outstart = out;
const unsigned char* base = in;
const unsigned char* processed = in;
unsigned char* outend = out + *outlen;
const unsigned char* inend;
unsigned int c;
int bits;
inend = in + (*inlen);
while ((in < inend) && (out - outstart + 5 < *outlen)) {
c= *in++;
/* assertion: c is a single UTF-4 value */
if (out >= outend)
break;
if (c < 0x80) { *out++= c; bits= -6; }
else {
if (c < 0x80) {
*out++ = c;
} else {
*outlen = out - outstart;
*inlen = processed - base;
return(-1);
}
for ( ; bits >= 0; bits-= 6) {
if (out >= outend)
break;
*out++= ((c >> bits) & 0x3F) | 0x80;
}
processed = (const unsigned char*) in;
}
*outlen = out - outstart;
@@ -144,9 +164,9 @@ asciiToUTF8(unsigned char* out, intptr_t* outlen,
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
static intptr_t
UTF8Toascii(unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
static int
UTF8Toascii(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
const unsigned char* processed = in;
const unsigned char* outend;
const unsigned char* outstart = out;
@@ -228,9 +248,9 @@ UTF8Toascii(unsigned char* out, intptr_t* outlen,
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
intptr_t
isolat1ToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
int
isolat1ToUTF8(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
unsigned char* outstart = out;
const unsigned char* base = in;
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
* if the return value is positive, else unpredictable.
*/
static intptr_t
UTF8ToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* inb, intptr_t* inlenb)
static int
UTF8ToUTF8(unsigned char* out, int *outlen,
const unsigned char* inb, int *inlenb)
{
intptr_t len;
int len;
if ((out == NULL) || (inb == NULL) || (outlen == NULL) || (inlenb == NULL))
return(-1);
@@ -317,9 +337,9 @@ UTF8ToUTF8(unsigned char* out, intptr_t* outlen,
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
intptr_t
UTF8Toisolat1(unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
int
UTF8Toisolat1(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
const unsigned char* processed = in;
const unsigned char* outend;
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
* if the return value is positive, else unpredictable.
*/
static intptr_t
UTF16LEToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* inb, intptr_t* inlenb)
static int
UTF16LEToUTF8(unsigned char* out, int *outlen,
const unsigned char* inb, int *inlenb)
{
unsigned char* outstart = out;
const unsigned char* processed = inb;
unsigned char* outend = out + *outlen;
unsigned short* in = (unsigned short*) inb;
unsigned short* inend;
unsigned int c, d;
size_t inlen;
unsigned int c, d, inlen;
unsigned char *tmp;
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
* if the transcoding failed.
*/
static intptr_t
UTF8ToUTF16LE(unsigned char* outb, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen)
static int
UTF8ToUTF16LE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
unsigned short* out = (unsigned short*) outb;
const unsigned char* processed = in;
const unsigned char *const instart = in;
unsigned short* outstart= out;
unsigned short* outend;
const unsigned char* inend= in+*inlen;
const unsigned char* inend;
unsigned int c, d;
intptr_t trailing;
int trailing;
unsigned char *tmp;
unsigned short tmp1, tmp2;
@@ -517,6 +536,7 @@ UTF8ToUTF16LE(unsigned char* outb, intptr_t* outlen,
*inlen = 0;
return(0);
}
inend= in + *inlen;
outend = out + (*outlen / 2);
while (in < inend) {
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
* if the transcoding failed.
*/
static intptr_t
UTF8ToUTF16(unsigned char* outb, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen)
static int
UTF8ToUTF16(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
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
* if the return value is positive, else unpredictable.
*/
static intptr_t
UTF16BEToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* inb, intptr_t* inlenb)
static int
UTF16BEToUTF8(unsigned char* out, int *outlen,
const unsigned char* inb, int *inlenb)
{
unsigned char* outstart = out;
const unsigned char* processed = inb;
unsigned char* outend = out + *outlen;
unsigned short* in = (unsigned short*) inb;
unsigned short* inend;
unsigned int c, d;
size_t inlen;
unsigned int c, d, inlen;
unsigned char *tmp;
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
* if the transcoding failed.
*/
static intptr_t
UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen)
static int
UTF8ToUTF16BE(unsigned char* outb, int *outlen,
const unsigned char* in, int *inlen)
{
unsigned short* out = (unsigned short*) outb;
const unsigned char* processed = in;
const unsigned char *const instart = in;
unsigned short* outstart= out;
unsigned short* outend;
const unsigned char* inend= in+*inlen;
const unsigned char* inend;
unsigned int c, d;
intptr_t trailing;
int trailing;
unsigned char *tmp;
unsigned short tmp1, tmp2;
@@ -759,6 +778,7 @@ UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
*inlen = 0;
return(0);
}
inend= in + *inlen;
outend = out + (*outlen / 2);
while (in < inend) {
d= *in++;
@@ -848,7 +868,7 @@ UTF8ToUTF16BE(unsigned char* outb, intptr_t* outlen,
* Returns one of the XML_CHAR_ENCODING_... values.
*/
xmlCharEncoding
xmlDetectCharEncoding(const unsigned char* in, intptr_t len)
xmlDetectCharEncoding(const unsigned char* in, int len)
{
if (in == NULL)
return(XML_CHAR_ENCODING_NONE);
@@ -1241,7 +1261,7 @@ xmlNewCharEncodingHandler(const char *name,
const char *alias;
char upper[500];
int i;
char *up = 0;
char *up = NULL;
/*
* Do the alias resolution
@@ -1254,8 +1274,8 @@ xmlNewCharEncodingHandler(const char *name,
* Keep only the uppercase version of the encoding.
*/
if (name == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlNewCharEncodingHandler : no name !\n");
xmlEncodingErr(XML_I18N_NO_NAME,
"xmlNewCharEncodingHandler : no name !\n", NULL);
return(NULL);
}
for (i = 0;i < 499;i++) {
@@ -1265,8 +1285,7 @@ xmlNewCharEncodingHandler(const char *name,
upper[i] = 0;
up = xmlMemStrdup(upper);
if (up == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlNewCharEncodingHandler : out of memory !\n");
xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
return(NULL);
}
@@ -1277,8 +1296,7 @@ xmlNewCharEncodingHandler(const char *name,
xmlMalloc(sizeof(xmlCharEncodingHandler));
if (handler == NULL) {
xmlFree(up);
xmlGenericError(xmlGenericErrorContext,
"xmlNewCharEncodingHandler : out of memory !\n");
xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
return(NULL);
}
handler->input = input;
@@ -1321,12 +1339,13 @@ xmlInitCharEncodingHandlers(void) {
if (*ptr == 0x12) xmlLittleEndian = 0;
else if (*ptr == 0x34) xmlLittleEndian = 1;
else xmlGenericError(xmlGenericErrorContext,
"Odd problem at endianness detection\n");
else {
xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
"Odd problem at endianness detection\n", NULL);
}
if (handlers == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlInitCharEncodingHandlers : out of memory !\n");
xmlEncodingErrMemory("xmlInitCharEncodingHandlers : out of memory !\n");
return;
}
xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
@@ -1396,16 +1415,15 @@ void
xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
if (handlers == NULL) xmlInitCharEncodingHandlers();
if (handler == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlRegisterCharEncodingHandler: NULL handler !\n");
xmlEncodingErr(XML_I18N_NO_HANDLER,
"xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
return;
}
if (nbCharEncodingHandler >= MAX_ENCODING_HANDLERS) {
xmlGenericError(xmlGenericErrorContext,
"xmlRegisterCharEncodingHandler: Too many handler registered\n");
xmlGenericError(xmlGenericErrorContext,
"\tincrease MAX_ENCODING_HANDLERS : %s\n", __FILE__);
xmlEncodingErr(XML_I18N_EXCESS_HANDLER,
"xmlRegisterCharEncodingHandler: Too many handler registered, see %s\n",
"MAX_ENCODING_HANDLERS");
return;
}
handlers[nbCharEncodingHandler++] = handler;
@@ -1614,7 +1632,7 @@ xmlFindCharEncodingHandler(const char *name) {
#endif
return enc;
} 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);
}
#endif /* LIBXML_ICONV_ENABLED */
@@ -1665,9 +1683,9 @@ xmlFindCharEncodingHandler(const char *name) {
* as the return value is positive, else unpredictable.
* The value of @outlen after return is the number of ocetes consumed.
*/
static intptr_t
xmlIconvWrapper(iconv_t cd, unsigned char *out, intptr_t* outlen,
const unsigned char *in, intptr_t* inlen) {
static int
xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
const unsigned char *in, int *inlen) {
size_t icv_inlen, icv_outlen;
const char *icv_in = (const char *) in;
char *icv_out = (char *) out;
@@ -1680,13 +1698,8 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, intptr_t* outlen,
icv_inlen = *inlen;
icv_outlen = *outlen;
ret = iconv(cd, (char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen);
if (in != NULL) {
*inlen -= icv_inlen;
*outlen -= icv_outlen;
} else {
*inlen = 0;
*outlen = 0;
}
*inlen -= icv_inlen;
*outlen -= icv_outlen;
if ((icv_inlen != 0) || (ret == -1)) {
#ifdef 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
* the result of transformation can't fit into the encoding we want), or
*/
intptr_t
int
xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
xmlBufferPtr in) {
intptr_t ret = -2;
intptr_t written;
intptr_t toconv;
int ret = -2;
int written;
int toconv;
if (handler == 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
* the result of transformation can't fit into the encoding we want), or
*/
intptr_t
int
xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
xmlBufferPtr in)
{
intptr_t ret = -2;
intptr_t written;
intptr_t toconv;
int ret = -2;
int written;
int toconv;
if (handler == NULL)
return (-1);
@@ -1880,20 +1893,24 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
toconv, written, in->use);
#endif
break;
case -2:
xmlGenericError(xmlGenericErrorContext,
"input conversion failed due to input error\n");
xmlGenericError(xmlGenericErrorContext,
"Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
in->content[0], in->content[1],
in->content[2], in->content[3]);
case -2: {
char buf[50];
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
in->content[0], in->content[1],
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
*/
if (ret == -3)
ret = 0;
return (written);
return (written? written : ret);
}
/**
@@ -1917,11 +1934,11 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
int
xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
xmlBufferPtr in) {
intptr_t ret = -2;
intptr_t written;
intptr_t writtentot = 0;
intptr_t toconv;
intptr_t output = 0;
int ret = -2;
int written;
int writtentot = 0;
int toconv;
int output = 0;
if (handler == NULL) return(-1);
if (out == NULL) return(-1);
@@ -1999,8 +2016,8 @@ retry:
}
#endif /* LIBXML_ICONV_ENABLED */
else {
xmlGenericError(xmlGenericErrorContext,
"xmlCharEncOutFunc: no output function !\n");
xmlEncodingErr(XML_I18N_NO_OUTPUT,
"xmlCharEncOutFunc: no output function !\n", NULL);
return(-1);
}
@@ -2030,9 +2047,9 @@ retry:
#endif
break;
case -2: {
intptr_t len = in->use;
int len = in->use;
const xmlChar *utf = (const xmlChar *) in->content;
intptr_t cur;
int cur;
cur = xmlGetUTF8Char(utf, &len);
if (cur > 0) {
@@ -2051,19 +2068,23 @@ retry:
* and continue the transcoding phase, hoping the error
* did not mangle the encoder state.
*/
snprintf((char *) charref, sizeof(charref), "&#%d;", cur);
snprintf((char *) &charref[0], sizeof(charref), "&#%d;", cur);
xmlBufferShrink(in, len);
xmlBufferAddHead(in, charref, -1);
goto retry;
} else {
xmlGenericError(xmlGenericErrorContext,
"output conversion failed due to conv error\n");
xmlGenericError(xmlGenericErrorContext,
"Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
in->content[0], in->content[1],
in->content[2], in->content[3]);
in->content[0] = ' ';
char buf[50];
snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
in->content[0], in->content[1],
in->content[2], in->content[3]);
buf[49] = 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;
}
@@ -2132,7 +2153,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
* Returns the index in bytes from the beginning of the entity or -1
* in case the index could not be computed.
*/
intptr_t
long
xmlByteConsumed(xmlParserCtxtPtr ctxt) {
xmlParserInputPtr in;
@@ -2140,7 +2161,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
in = ctxt->input;
if (in == NULL) return(-1);
if ((in->buf != NULL) && (in->buf->encoder != NULL)) {
size_t unused = 0;
unsigned int unused = 0;
xmlCharEncodingHandler * handler = in->buf->encoder;
/*
* Encoding conversion, compute the number of unused original
@@ -2150,9 +2171,9 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
if (in->end - in->cur > 0) {
unsigned char convbuf[32000];
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) {
do {
@@ -2327,8 +2348,8 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
* The value of @outlen after return is the number of ocetes produced.
*/
static int
ISO8859xToUTF8(unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen,
ISO8859xToUTF8(unsigned char* out, int *outlen,
const unsigned char* in, int *inlen,
unsigned short const *unicodetable) {
unsigned char* outstart = out;
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
*/
static intptr_t ISO8859_2ToUTF8 (unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
static int ISO8859_2ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_2);
}
static intptr_t UTF8ToISO8859_2 (unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
static int UTF8ToISO8859_2 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_2);
}
static intptr_t ISO8859_3ToUTF8 (unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t* inlen) {
static int ISO8859_3ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3);
}
static intptr_t UTF8ToISO8859_3 (unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_3 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_3);
}
static intptr_t ISO8859_4ToUTF8 (unsigned char* out, intptr_t* outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_4ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_4);
}
static intptr_t UTF8ToISO8859_4 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_4 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_4);
}
static intptr_t ISO8859_5ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_5ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5);
}
static intptr_t UTF8ToISO8859_5 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_5 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_5);
}
static intptr_t ISO8859_6ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_6ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_6);
}
static intptr_t UTF8ToISO8859_6 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_6 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_6);
}
static intptr_t ISO8859_7ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_7ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_7);
}
static intptr_t UTF8ToISO8859_7 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_7 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_7);
}
static intptr_t ISO8859_8ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_8ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_8);
}
static intptr_t UTF8ToISO8859_8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_8);
}
static intptr_t ISO8859_9ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_9ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_9);
}
static intptr_t UTF8ToISO8859_9 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_9 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_9);
}
static intptr_t ISO8859_10ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_10ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_10);
}
static intptr_t UTF8ToISO8859_10 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_10 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_10);
}
static intptr_t ISO8859_11ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_11ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_11);
}
static intptr_t UTF8ToISO8859_11 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_11 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_11);
}
static intptr_t ISO8859_13ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_13ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_13);
}
static intptr_t UTF8ToISO8859_13 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_13 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_13);
}
static intptr_t ISO8859_14ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_14ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_14);
}
static intptr_t UTF8ToISO8859_14 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_14 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_14);
}
static intptr_t ISO8859_15ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_15ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_15);
}
static intptr_t UTF8ToISO8859_15 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_15 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_15);
}
static intptr_t ISO8859_16ToUTF8 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int ISO8859_16ToUTF8 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_16);
}
static intptr_t UTF8ToISO8859_16 (unsigned char* out, intptr_t *outlen,
const unsigned char* in, intptr_t *inlen) {
static int UTF8ToISO8859_16 (unsigned char* out, int *outlen,
const unsigned char* in, int *inlen) {
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16);
}

View File

@@ -518,7 +518,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
while (*cur != '\0') {
if (out - buffer > buffer_size - 100) {
intptr_t indx = out - buffer;
int indx = out - buffer;
growBufferReentrant();
out = &buffer[indx];
@@ -560,7 +560,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
*out++ = xc;
} else
*/
*out++ = *cur;
*out++ = *cur;
} else {
/*
* 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
*/
if (html)
snprintf(buf, sizeof(buf), "&#%d;", val);
else
snprintf(buf, sizeof(buf), "&#x%X;", val);
snprintf(buf, sizeof(buf), "&#x%X;", val);
buf[sizeof(buf) - 1] = 0;
ptr = buf;
while (*ptr != 0) *out++ = *ptr++;
@@ -671,7 +668,7 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
while (*cur != '\0') {
if (out - buffer > buffer_size - 10) {
intptr_t indx = out - buffer;
int indx = out - buffer;
growBufferReentrant();
out = &buffer[indx];

View File

@@ -16,12 +16,12 @@
#include <libxml/xmlmemory.h>
#include <libxml/globals.h>
void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
const char *msg,
...);
#define XML_GET_VAR_STR(msg, str) { \
int size; \
int size, prev_size = -1; \
int chars; \
char *larger; \
va_list ap; \
@@ -35,8 +35,13 @@ void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
va_start(ap, msg); \
chars = vsnprintf(str, size, msg, ap); \
va_end(ap); \
if ((chars > -1) && (chars < size)) \
break; \
if ((chars > -1) && (chars < size)) { \
if (prev_size == chars) { \
break; \
} else { \
prev_size = chars; \
} \
} \
if (chars > -1) \
size += chars + 1; \
else \
@@ -62,7 +67,7 @@ void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
*
* Default handler for out of context error messages.
*/
void
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
@@ -168,7 +173,7 @@ static void
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlGenericErrorFunc channel, void *data ) {
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 *ctnt;
@@ -293,8 +298,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
if (name != NULL) {
channel(data, "element %s: ", name);
}
if (code == XML_ERR_OK)
return;
switch (domain) {
case XML_FROM_PARSER:
channel(data, "parser ");
@@ -354,11 +357,12 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
case XML_FROM_XSLT:
channel(data, "XSLT ");
break;
case XML_FROM_I18N:
channel(data, "encoding ");
break;
default:
break;
}
if (code == XML_ERR_OK)
return;
switch (level) {
case XML_ERR_NONE:
channel(data, ": ");
@@ -373,11 +377,9 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
channel(data, "error : ");
break;
}
if (code == XML_ERR_OK)
return;
if (str != NULL) {
intptr_t len;
len = xmlStrlen((const xmlChar *)str);
int len;
len = xmlStrlen((const xmlChar *)str);
if ((len > 0) && (str[len - 1] != '\n'))
channel(data, "%s\n", str);
else
@@ -385,8 +387,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
} else {
channel(data, "%s\n", "out of memory error");
}
if (code == XML_ERR_OK)
return;
if (ctxt != NULL) {
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
* error callback handler
*/
void
void XMLCDECL
__xmlRaiseError(xmlStructuredErrorFunc schannel,
xmlGenericErrorFunc channel, void *data, void *ctx,
void *nod, int domain, int code, xmlErrorLevel level,
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, ...)
{
xmlParserCtxtPtr ctxt = NULL;
@@ -512,8 +512,10 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
} else if ((node != NULL) && (file == NULL)) {
int i;
if ((node->doc != NULL) && (node->doc->URL != NULL))
if ((node->doc != NULL) && (node->doc->URL != NULL)) {
baseptr = node;
/* file = (const char *) node->doc->URL; */
}
for (i = 0;
((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
i++)
@@ -558,10 +560,19 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
}
}
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
#endif
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;
}
to->line = line;
@@ -593,8 +604,10 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
schannel = xmlStructuredError;
else
channel = xmlGenericError;
if (!data) {
data = xmlGenericErrorContext;
}
}
if (schannel != NULL) {
schannel(data, to);
return;
@@ -653,7 +666,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
* Display and format an error messages, gives file, line, position and
* extra parameters.
*/
void
void XMLCDECL
xmlParserError(void *ctx, const char *msg, ...)
{
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
* extra parameters.
*/
void
void XMLCDECL
xmlParserWarning(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -745,13 +758,13 @@ xmlParserWarning(void *ctx, const char *msg, ...)
* Display and format an validity error messages, gives file,
* line, position and extra parameters.
*/
void
void XMLCDECL
xmlParserValidityError(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlParserInputPtr input = NULL;
char * str;
intptr_t len = xmlStrlen((const xmlChar *) msg);
int len = xmlStrlen((const xmlChar *) msg);
static int had_info = 0;
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,
* position and extra parameters.
*/
void
void XMLCDECL
xmlParserValidityWarning(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlParserInputPtr input = NULL;
char * str;
intptr_t len = xmlStrlen((const xmlChar *) msg);
int len = xmlStrlen((const xmlChar *) msg);
if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
input = ctxt->input;

View File

@@ -44,7 +44,7 @@ static xmlMutexPtr xmlThrDefMutex = NULL;
*
* Additional initialisation for multi-threading
*/
void xmlInitGlobals()
void xmlInitGlobals(void)
{
xmlThrDefMutex = xmlNewMutex();
}
@@ -54,7 +54,7 @@ void xmlInitGlobals()
*
* Additional cleanup for multi-threading
*/
void xmlCleanupGlobals()
void xmlCleanupGlobals(void)
{
if (xmlThrDefMutex != NULL) {
xmlFreeMutex(xmlThrDefMutex);
@@ -289,7 +289,7 @@ static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDe
/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
/* Must initialize xmlGenericError in xmlInitParser */
void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
const char *msg,
...);
/**
@@ -344,7 +344,7 @@ static const char *xmlTreeIndentStringThrDef = " ";
* Disabled by default
*/
int xmlSaveNoEmptyTags = 0;
int xmlSaveNoEmptyTagsThrDef = 0;
static int xmlSaveNoEmptyTagsThrDef = 0;
#ifdef LIBXML_SAX1_ENABLED
/**
@@ -496,10 +496,10 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
xmlMutexLock(xmlThrDefMutex);
#ifdef LIBXML_DOCB_ENABLED
#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
#endif
#ifdef LIBXML_HTML_ENABLED
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
#endif

View File

@@ -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@
# 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
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -67,6 +67,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
C14N_OBJ = @C14N_OBJ@
CATALOG_OBJ = @CATALOG_OBJ@
CC = @CC@
@@ -160,6 +161,7 @@ TEST_PUSH = @TEST_PUSH@
TEST_REGEXPS = @TEST_REGEXPS@
TEST_SAX = @TEST_SAX@
TEST_SCHEMAS = @TEST_SCHEMAS@
TEST_SCHEMATRON = @TEST_SCHEMATRON@
TEST_THREADS = @TEST_THREADS@
TEST_VALID = @TEST_VALID@
TEST_VTIME = @TEST_VTIME@
@@ -195,6 +197,7 @@ WITH_REGEXPS = @WITH_REGEXPS@
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
WITH_SAX1 = @WITH_SAX1@
WITH_SCHEMAS = @WITH_SCHEMAS@
WITH_SCHEMATRON = @WITH_SCHEMATRON@
WITH_THREADS = @WITH_THREADS@
WITH_TREE = @WITH_TREE@
WITH_TRIO = @WITH_TRIO@
@@ -316,7 +319,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(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; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -328,7 +337,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -336,7 +345,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-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; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -357,7 +372,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

View File

@@ -173,11 +173,13 @@ XMLPUBFUN void XMLCALL
* to the xmlReadDoc() and similar calls.
*/
typedef enum {
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
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;
XMLPUBFUN void XMLCALL

View File

@@ -75,6 +75,11 @@ XMLPUBFUN void XMLCALL
htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN int XMLCALL
htmlDocDump (FILE *f,
xmlDocPtr cur);

View File

@@ -29,9 +29,9 @@ XMLPUBFUN void XMLCALL
xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2GetLineNumber (void *ctx);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2GetColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
@@ -98,7 +98,7 @@ XMLPUBFUN void XMLCALL
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL
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
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
@@ -114,8 +114,8 @@ XMLPUBFUN void XMLCALL
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
intptr_t nb_attributes,
intptr_t nb_defaulted,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
XMLPUBFUN void XMLCALL
xmlSAX2EndElementNs (void *ctx,
@@ -128,11 +128,11 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2Characters (void *ctx,
const xmlChar *ch,
intptr_t len);
int len);
XMLPUBFUN void XMLCALL
xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch,
intptr_t len);
int len);
XMLPUBFUN void XMLCALL
xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target,
@@ -143,7 +143,7 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2CDataBlock (void *ctx,
const xmlChar *value,
intptr_t len);
int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL

View File

@@ -1,12 +1,12 @@
/*
* Summary: Unicode character range checking
* Description: this module exports interfaces for the character
* range validation APIs
* range validation APIs
*
* This file is automatically generated from the cvs source
* 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
* Author: William Brack <wbrack@mmm.com.hk>
*/
@@ -44,15 +44,15 @@ typedef xmlChRangeGroup *xmlChRangeGroupPtr;
struct _xmlChRangeGroup {
int nbShortRange;
int nbLongRange;
xmlChSRangePtr shortRange; /* points to an array of ranges */
xmlChLRangePtr longRange;
const xmlChSRange *shortRange; /* points to an array of ranges */
const xmlChLRange *longRange;
};
/**
* Range checking routine
*/
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)) : \
xmlCharInRange((c), &xmlIsBaseCharGroup))
XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
/**
* xmlIsBlank_ch:
@@ -121,7 +121,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
/**
* xmlIsCombiningQ:
@@ -133,7 +133,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
0 : \
xmlCharInRange((c), &xmlIsCombiningGroup))
XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
/**
* xmlIsDigit_ch:
@@ -153,7 +153,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
xmlIsDigit_ch((c)) : \
xmlCharInRange((c), &xmlIsDigitGroup))
XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
/**
* xmlIsExtender_ch:
@@ -173,7 +173,7 @@ XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
xmlIsExtender_ch((c)) : \
xmlCharInRange((c), &xmlIsExtenderGroup))
XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
/**
* xmlIsIdeographicQ:
@@ -187,8 +187,8 @@ XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
((c) == 0x3007) || \
((0x3021 <= (c)) && ((c) <= 0x3029))))
XMLPUBVAR xmlChRangeGroup xmlIsIdeographicGroup;
XMLPUBVAR unsigned char xmlIsPubidChar_tab[256];
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
/**
* xmlIsPubidChar_ch:

View File

@@ -42,11 +42,11 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlDictLookup (xmlDictPtr dict,
const xmlChar *name,
intptr_t len);
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlDictExists (xmlDictPtr dict,
const xmlChar *name,
intptr_t len);
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlDictQLookup (xmlDictPtr dict,
const xmlChar *prefix,

View File

@@ -95,8 +95,8 @@ typedef enum {
* if the return value is positive, else unpredictiable.
* The value of @outlen after return is the number of octets consumed.
*/
typedef intptr_t (* xmlCharEncodingInputFunc)(unsigned char *out, intptr_t* outlen,
const unsigned char *in, intptr_t* inlen);
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
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.
* The value of @outlen after return is the number of octets produced.
*/
typedef intptr_t (* xmlCharEncodingOutputFunc)(unsigned char *out, intptr_t* outlen,
const unsigned char *in, intptr_t* inlen);
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
const unsigned char *in, int *inlen);
/*
@@ -186,18 +186,18 @@ XMLPUBFUN const char * XMLCALL
*/
XMLPUBFUN xmlCharEncoding XMLCALL
xmlDetectCharEncoding (const unsigned char *in,
intptr_t len);
int len);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
@@ -208,17 +208,17 @@ XMLPUBFUN int XMLCALL
* Export a few useful functions
*/
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
UTF8Toisolat1 (unsigned char *out,
intptr_t* outlen,
int *outlen,
const unsigned char *in,
intptr_t* inlen);
int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
isolat1ToUTF8 (unsigned char *out,
intptr_t* outlen,
int *outlen,
const unsigned char *in,
intptr_t* inlen);
int *inlen);
#ifdef __cplusplus
}
#endif

View File

@@ -48,7 +48,7 @@ struct _xmlEntity {
xmlChar *orig; /* content without ref substitution */
xmlChar *content; /* content or ndata if unparsed */
intptr_t length; /* the content length */
int length; /* the content length */
xmlEntityType etype; /* The entity type */
const xmlChar *ExternalID; /* External identifier for PUBLIC */
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */

View File

@@ -60,15 +60,15 @@ struct _xmlParserInput {
const xmlChar *base; /* Base of the array to parse */
const xmlChar *cur; /* Current char being parsed */
const xmlChar *end; /* end of the array to parse */
intptr_t length; /* length if known */
int length; /* length if known */
int line; /* Current line */
intptr_t col; /* Current column */
int col; /* Current column */
/*
* NOTE: consumed is only tested for equality in the parser code,
* so even if there is an overflow this should not give troubles
* 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 */
const xmlChar *encoding; /* the encoding string for entity */
const xmlChar *version; /* the version string for entity */
@@ -89,9 +89,9 @@ typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
struct _xmlParserNodeInfo {
const struct _xmlNode* node;
/* Position & line # that text that created the node begins & ends on */
size_t begin_pos;
unsigned long begin_pos;
unsigned long begin_line;
size_t end_pos;
unsigned long end_pos;
unsigned long end_line;
};
@@ -228,8 +228,8 @@ struct _xmlParserCtxt {
int nameMax; /* Max depth of the parsing stack */
const xmlChar * *nameTab; /* array of nodes */
intptr_t nbChars; /* number of xmlChar processed */
intptr_t checkIndex; /* used by progressive parsing lookup */
long nbChars; /* number of xmlChar processed */
long checkIndex; /* used by progressive parsing lookup */
int keepBlanks; /* ugly but ... */
int disableSAX; /* SAX callbacks are disabled */
int inSubset; /* Parsing is in int 1/ext 2 subset */
@@ -247,8 +247,8 @@ struct _xmlParserCtxt {
xmlParserInputPtr entity; /* used to check entities boundaries */
int charset; /* encoding of the in-memory content
actually an xmlCharEncoding */
intptr_t nodelen; /* Those two fields are there to */
intptr_t nodemem; /* Speed up large node parsing */
int nodelen; /* Those two fields are there to */
int nodemem; /* Speed up large node parsing */
int pedantic; /* signal pedantic warnings */
void *_private; /* For user data, libxml won't touch it */
@@ -259,7 +259,7 @@ struct _xmlParserCtxt {
int progressive; /* is this a progressive parsing */
xmlDictPtr dict; /* dictionnary for the parser */
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 */
/*
@@ -276,7 +276,7 @@ struct _xmlParserCtxt {
int nsNr; /* the number of inherited namespaces */
int nsMax; /* the size of the arrays */
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 */
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
@@ -307,8 +307,8 @@ struct _xmlParserCtxt {
struct _xmlSAXLocator {
const xmlChar *(*getPublicId)(void *ctx);
const xmlChar *(*getSystemId)(void *ctx);
intptr_t (*getLineNumber)(void *ctx);
intptr_t (*getColumnNumber)(void *ctx);
int (*getLineNumber)(void *ctx);
int (*getColumnNumber)(void *ctx);
};
/**
@@ -538,7 +538,7 @@ typedef void (*referenceSAXFunc) (void *ctx,
*/
typedef void (*charactersSAXFunc) (void *ctx,
const xmlChar *ch,
intptr_t len);
int len);
/**
* ignorableWhitespaceSAXFunc:
* @ctx: the user data (XML parser context)
@@ -550,7 +550,7 @@ typedef void (*charactersSAXFunc) (void *ctx,
*/
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const xmlChar *ch,
intptr_t len);
int len);
/**
* processingInstructionSAXFunc:
* @ctx: the user data (XML parser context)
@@ -580,9 +580,9 @@ typedef void (*commentSAXFunc) (void *ctx,
* Called when a pcdata block has been parsed.
*/
typedef void (*cdataBlockSAXFunc) (
void *ctx,
void *ctx,
const xmlChar *value,
intptr_t len);
int len);
/**
* warningSAXFunc:
* @ctx: an XML parser context
@@ -591,7 +591,7 @@ typedef void (*cdataBlockSAXFunc) (
*
* Display and format a warning messages, callback.
*/
typedef void (*warningSAXFunc) (void *ctx,
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
const char *msg, ...);
/**
* errorSAXFunc:
@@ -601,7 +601,7 @@ typedef void (*warningSAXFunc) (void *ctx,
*
* Display and format an error messages, callback.
*/
typedef void (*errorSAXFunc) (void *ctx,
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
const char *msg, ...);
/**
* fatalErrorSAXFunc:
@@ -613,7 +613,7 @@ typedef void (*errorSAXFunc) (void *ctx,
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
*/
typedef void (*fatalErrorSAXFunc) (void *ctx,
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
const char *msg, ...);
/**
* isStandaloneSAXFunc:
@@ -681,8 +681,8 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
intptr_t nb_attributes,
intptr_t nb_defaulted,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
/**
@@ -813,12 +813,12 @@ XMLPUBFUN void XMLCALL
/*
* Input functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputRead (xmlParserInputPtr in,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlParserInputGrow (xmlParserInputPtr in,
intptr_t len);
int len);
/*
* Basic parsing Interfaces
@@ -830,16 +830,14 @@ XMLPUBFUN xmlDocPtr XMLCALL
xmlParseFile (const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseMemory (const char *buffer,
intptr_t size);
int size);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
xmlSubstituteEntitiesDefault(int val);
XMLPUBFUN int XMLCALL
xmlKeepBlanksDefault (int val);
#ifdef LIBXML_PUSH_ENABLED
XMLPUBFUN void XMLCALL
xmlStopParser (xmlParserCtxtPtr ctxt);
#endif /* LIBXML_PUSH_ENABLED */
XMLPUBFUN int XMLCALL
xmlPedanticParserDefault(int val);
XMLPUBFUN int XMLCALL
@@ -882,12 +880,12 @@ XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
intptr_t size,
int size,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
intptr_t size,
int size,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
@@ -1003,12 +1001,12 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
intptr_t size,
int size,
const char *filename);
XMLPUBFUN int XMLCALL
xmlParseChunk (xmlParserCtxtPtr ctxt,
const char *chunk,
intptr_t size,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
@@ -1062,7 +1060,7 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
/*
* Index lookup, actually implemented in the encoding module
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN long XMLCALL
xmlByteConsumed (xmlParserCtxtPtr ctxt);
/*
@@ -1090,7 +1088,8 @@ typedef enum {
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
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;
XMLPUBFUN void XMLCALL
@@ -1164,6 +1163,53 @@ XMLPUBFUN xmlDocPtr XMLCALL
const char *encoding,
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
}
#endif

View File

@@ -286,7 +286,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
int options);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateMemoryParserCtxt(const char *buffer,
intptr_t size);
int size);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateEntityParserCtxt(const xmlChar *URL,
const xmlChar *ID,
@@ -486,7 +486,7 @@ XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
intptr_t len,
int len,
int what,
xmlChar end,
xmlChar end2,
@@ -520,9 +520,9 @@ XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
*/
XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len);
XMLPUBFUN intptr_t XMLCALL xmlCopyCharMultiByte (xmlChar *out,
XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
int val);
XMLPUBFUN intptr_t XMLCALL xmlCopyChar (intptr_t len,
XMLPUBFUN int XMLCALL xmlCopyChar (int len,
xmlChar *out,
int val);
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);

View File

@@ -29,6 +29,20 @@ extern "C" {
typedef struct _xmlPattern xmlPattern;
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
xmlFreePattern (xmlPatternPtr comp);
@@ -52,12 +66,19 @@ XMLPUBFUN int XMLCALL
xmlPatternStreamable (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternMaxDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternMinDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternFromRoot (xmlPatternPtr comp);
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
XMLPUBFUN void XMLCALL
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL
xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns,
int nodeType);
XMLPUBFUN int XMLCALL
xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar *name,
@@ -68,6 +89,8 @@ XMLPUBFUN int XMLCALL
const xmlChar *ns);
XMLPUBFUN int XMLCALL
xmlStreamPop (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
#ifdef __cplusplus
}
#endif

View File

@@ -27,8 +27,8 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
/**
* A schemas validation context
*/
typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
@@ -127,6 +127,11 @@ XMLPUBFUN int XMLCALL
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetParserStructuredErrors(
xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN xmlRelaxNGPtr XMLCALL
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
@@ -152,6 +157,9 @@ XMLPUBFUN int XMLCALL
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL

View File

@@ -2,6 +2,8 @@
* Summary: internal interfaces for XML Schemas
* Description: internal interfaces for the XML Schemas handling
* 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.
*
@@ -83,7 +85,7 @@ typedef enum {
XML_SCHEMA_TYPE_FACET,
XML_SCHEMA_TYPE_SIMPLE,
XML_SCHEMA_TYPE_COMPLEX,
XML_SCHEMA_TYPE_SEQUENCE,
XML_SCHEMA_TYPE_SEQUENCE = 6,
XML_SCHEMA_TYPE_CHOICE,
XML_SCHEMA_TYPE_ALL,
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
@@ -102,7 +104,8 @@ typedef enum {
XML_SCHEMA_TYPE_IDC_UNIQUE,
XML_SCHEMA_TYPE_IDC_KEY,
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_MINEXCLUSIVE,
XML_SCHEMA_FACET_MAXINCLUSIVE,
@@ -115,7 +118,8 @@ typedef enum {
XML_SCHEMA_FACET_LENGTH,
XML_SCHEMA_FACET_MAXLENGTH,
XML_SCHEMA_FACET_MINLENGTH,
XML_SCHEMA_EXTRA_QNAMEREF = 2000
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
} xmlSchemaTypeType;
typedef enum {
@@ -124,7 +128,7 @@ typedef enum {
XML_SCHEMA_CONTENT_ELEMENTS,
XML_SCHEMA_CONTENT_MIXED,
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_ANY
} xmlSchemaContentType;
@@ -242,31 +246,32 @@ struct _xmlSchemaAnnot {
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
struct _xmlSchemaAttribute {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
const xmlChar *name; /* name of the declaration or empty if particle */
const xmlChar *id;
const xmlChar *ref; /* the local name of the attribute decl. if a particle */
const xmlChar *refNs; /* the ns URI of the attribute decl. if a particle */
xmlSchemaTypeType type;
struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
const xmlChar *name; /* the name of the declaration */
const xmlChar *id; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
const xmlChar *typeName; /* the local name of the type definition */
const xmlChar *typeNs; /* the ns URI of the type definition */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr base; /* obsolete, not used */
int occurs;
const xmlChar *defValue;
xmlSchemaTypePtr base; /* Deprecated; not used */
int occurs; /* Deprecated; not used */
const xmlChar *defValue; /* The initial value of the value constraint */
xmlSchemaTypePtr subtypes; /* the type definition */
xmlNodePtr node;
const xmlChar *targetNamespace;
int flags;
const xmlChar *refPrefix;
xmlSchemaValPtr defVal;
xmlSchemaAttributePtr refDecl;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaValPtr defVal; /* The compiled value constraint */
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
};
/**
* xmlSchemaAttributeLink:
* Used to build a list of attribute uses on complexType definitions.
* WARNING: Deprecated; not used.
*/
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
@@ -301,11 +306,11 @@ typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
struct _xmlSchemaWildcard {
xmlSchemaTypeType type; /* The kind of type */
const xmlChar *id;
const xmlChar *id; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int minOccurs;
int maxOccurs;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int processContents;
int any; /* Indicates if the ns constraint is of ##any */
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
@@ -332,6 +337,19 @@ struct _xmlSchemaWildcard {
*/
#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.
*
@@ -345,17 +363,18 @@ struct _xmlSchemaAttributeGroup {
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
const xmlChar *name;
const xmlChar *id;
const xmlChar *ref;
const xmlChar *refNs;
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaAttributePtr attributes;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int flags;
xmlSchemaWildcardPtr attributeWildcard;
const xmlChar *refPrefix;
xmlSchemaAttributeGroupPtr refItem; /* The referenced attribute group */
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
const xmlChar *targetNamespace;
void *attrUses;
};
/**
@@ -367,7 +386,7 @@ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
struct _xmlSchemaTypeLink {
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:
*
* 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
/**
@@ -521,7 +543,56 @@ struct _xmlSchemaFacetLink {
* indicates that the type is invalid
*/
#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:
@@ -529,36 +600,38 @@ struct _xmlSchemaFacetLink {
* Schemas type definition.
*/
struct _xmlSchemaType {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
const xmlChar *name;
const xmlChar *id;
const xmlChar *ref;
const xmlChar *refNs;
const xmlChar *id ; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes;
xmlSchemaAttributePtr attributes;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int minOccurs;
int maxOccurs;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
xmlSchemaContentType contentType;
const xmlChar *base;
const xmlChar *baseNs;
xmlSchemaTypePtr baseType;
xmlSchemaFacetPtr facets;
struct _xmlSchemaType *redef;/* possible redefinitions for the type */
int recurse;
xmlSchemaAttributeLinkPtr attributeUses;
const xmlChar *base; /* Base type's local name */
const xmlChar *baseNs; /* Base type's target namespace */
xmlSchemaTypePtr baseType; /* The base type component */
xmlSchemaFacetPtr facets; /* Local facets */
struct _xmlSchemaType *redef; /* Deprecated; not used */
int recurse; /* Obsolete */
xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
xmlSchemaWildcardPtr attributeWildcard;
int builtInType;
xmlSchemaTypeLinkPtr memberTypes;
xmlSchemaFacetLinkPtr facetSet;
const xmlChar *refPrefix;
xmlSchemaTypePtr contentTypeDef;
xmlRegexpPtr contModel;
int builtInType; /* Type of built-in types. */
xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
Could we use @subtypes for this? */
xmlRegexpPtr contModel; /* Holds the automaton of the content model */
const xmlChar *targetNamespace;
void *attrUses;
};
/*
@@ -673,23 +746,35 @@ struct _xmlSchemaType {
* substitution group exclusions: "restriction"
*/
#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 xmlSchemaElement *xmlSchemaElementPtr;
struct _xmlSchemaElement {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next; /* Not used? */
const xmlChar *name;
const xmlChar *id;
const xmlChar *ref; /* the local name of the element declaration if a particle */
const xmlChar *refNs; /* the ns URI of the element declaration if a particle */
const xmlChar *id; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes; /* the type definition */
xmlSchemaAttributePtr attributes;
xmlNodePtr node;
int minOccurs;
int maxOccurs;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
const xmlChar *targetNamespace;
@@ -698,13 +783,14 @@ struct _xmlSchemaElement {
const xmlChar *substGroup;
const xmlChar *substGroupNs;
const xmlChar *scope;
const xmlChar *value;
struct _xmlSchemaElement *refDecl; /* the element declaration if a particle */
xmlRegexpPtr contModel;
const xmlChar *value; /* The original value of the value constraint. */
struct _xmlSchemaElement *refDecl; /* This will now be used for the
substitution group affiliation */
xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
xmlSchemaContentType contentType;
const xmlChar *refPrefix;
xmlSchemaValPtr defVal;
void *idcs;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaValPtr defVal; /* The compiled value contraint. */
void *idcs; /* The identity-constraint defs */
};
/*
@@ -737,14 +823,14 @@ struct _xmlSchemaElement {
struct _xmlSchemaFacet {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
const xmlChar *value;
const xmlChar *id;
const xmlChar *value; /* The original value */
const xmlChar *id; /* Obsolete */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int fixed;
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
int whitespace;
xmlSchemaValPtr val;
xmlRegexpPtr regexp;
xmlSchemaValPtr val; /* The compiled value */
xmlRegexpPtr regexp; /* The regex for patterns */
};
/**
@@ -753,23 +839,31 @@ struct _xmlSchemaFacet {
typedef struct _xmlSchemaNotation xmlSchemaNotation;
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
struct _xmlSchemaNotation {
xmlSchemaTypeType type; /* The kind of type */
xmlSchemaTypeType type; /* The kind of type */
const xmlChar *name;
xmlSchemaAnnotPtr annot;
const xmlChar *identifier;
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:
*
* the schema requires qualified elements
* Reflects elementFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
/**
* XML_SCHEMAS_QUALIF_ATTR:
*
* the schema requires qualified attributes
* Reflects attributeFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
/**
@@ -827,10 +921,10 @@ struct _xmlSchemaNotation {
* A Schemas definition
*/
struct _xmlSchema {
const xmlChar *name; /* schema name */
const xmlChar *targetNamespace; /* the target namespace */
const xmlChar *name; /* schema name */
const xmlChar *targetNamespace; /* the target namespace */
const xmlChar *version;
const xmlChar *id;
const xmlChar *id; /* Obsolete */
xmlDocPtr doc;
xmlSchemaAnnotPtr annot;
int flags;
@@ -849,8 +943,8 @@ struct _xmlSchema {
void *includes; /* the includes, this is opaque for now */
int preserve; /* whether to free the document */
int counter; /* used to give ononymous components unique names */
xmlHashTablePtr idcDef;
void *volatiles; /* Misc. helper items (e.g. reference items) */
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
void *volatiles; /* Obsolete */
};
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);

View File

@@ -36,7 +36,6 @@ typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN xmlMutexPtr XMLCALL
xmlNewMutex (void);
XMLPUBFUN void XMLCALL

View File

@@ -54,6 +54,33 @@ typedef xmlEntity *xmlEntityPtr;
*/
#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:
*
@@ -250,7 +277,6 @@ typedef enum {
XML_ELEMENT_TYPE_ELEMENT
} xmlElementTypeVal;
#ifdef __cplusplus
}
#endif
@@ -402,33 +428,6 @@ struct _xmlRef {
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:
*
@@ -509,6 +508,12 @@ struct _xmlDoc {
void *psvi; /* for type/PSVI informations */
};
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
struct _xmlDOMWrapCtxt {
void * _private;
};
/**
* xmlChildrenNode:
*
@@ -536,7 +541,7 @@ struct _xmlDoc {
/*
* 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
xmlValidateNCName (const xmlChar *value,
int space);
@@ -558,13 +563,13 @@ XMLPUBFUN xmlChar * XMLCALL
xmlBuildQName (const xmlChar *ncname,
const xmlChar *prefix,
xmlChar *memory,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlSplitQName2 (const xmlChar *name,
xmlChar **prefix);
XMLPUBFUN const xmlChar * XMLCALL
xmlSplitQName3 (const xmlChar *name,
intptr_t *len);
int *len);
/*
* Handling Buffers.
@@ -584,32 +589,32 @@ XMLPUBFUN xmlBufferPtr XMLCALL
size_t size);
XMLPUBFUN int XMLCALL
xmlBufferResize (xmlBufferPtr buf,
size_t size);
unsigned int size);
XMLPUBFUN void XMLCALL
xmlBufferFree (xmlBufferPtr buf);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferDump (FILE *file,
xmlBufferPtr buf);
XMLPUBFUN int XMLCALL
xmlBufferAdd (xmlBufferPtr buf,
const xmlChar *str,
intptr_t len);
int len);
XMLPUBFUN int XMLCALL
xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar *str,
intptr_t len);
int len);
XMLPUBFUN int XMLCALL
xmlBufferCat (xmlBufferPtr buf,
const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlBufferCCat (xmlBufferPtr buf,
const char *str);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferShrink (xmlBufferPtr buf,
size_t len);
XMLPUBFUN intptr_t XMLCALL
unsigned int len);
XMLPUBFUN int XMLCALL
xmlBufferGrow (xmlBufferPtr buf,
size_t len);
unsigned int len);
XMLPUBFUN void XMLCALL
xmlBufferEmpty (xmlBufferPtr buf);
XMLPUBFUN const xmlChar* XMLCALL
@@ -617,7 +622,7 @@ XMLPUBFUN const xmlChar* XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme);
XMLPUBFUN size_t XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferLength (const xmlBufferPtr buf);
/*
@@ -736,10 +741,10 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar *content,
intptr_t len);
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextLen (const xmlChar *content,
intptr_t len);
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocComment (xmlDocPtr doc,
const xmlChar *content);
@@ -748,7 +753,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar *content,
intptr_t len);
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCharRef (xmlDocPtr doc,
const xmlChar *name);
@@ -844,7 +849,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN int XMLCALL
xmlTextConcat (xmlNodePtr node,
const xmlChar *content,
intptr_t len);
int len);
XMLPUBFUN void XMLCALL
xmlFreeNodeList (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
@@ -917,7 +922,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlStringLenGetNodeList (xmlDocPtr doc,
const xmlChar *value,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
@@ -935,7 +940,7 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
intptr_t len);
int len);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlNodeAddContent (xmlNodePtr cur,
@@ -943,7 +948,7 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetContent (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
@@ -973,10 +978,8 @@ XMLPUBFUN void XMLCALL
/*
* Removing content.
*/
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN int XMLCALL
xmlRemoveProp (xmlAttrPtr cur);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlUnsetNsProp (xmlNodePtr node,
@@ -1032,44 +1035,44 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
intptr_t* doc_txt_len,
int * doc_txt_len,
const char *txt_encoding);
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
intptr_t* doc_txt_len,
int * doc_txt_len,
const char *txt_encoding,
int format);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN void XMLCALL
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
@@ -1082,13 +1085,13 @@ XMLPUBFUN void XMLCALL
int format,
const char *encoding);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
@@ -1114,6 +1117,39 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN void XMLCALL
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
}
#endif

View File

@@ -47,13 +47,16 @@ struct _xmlURI {
XMLPUBFUN xmlURIPtr XMLCALL
xmlCreateURI (void);
XMLPUBFUN xmlChar * XMLCALL
xmlBuildURI (const xmlChar *URI,
const xmlChar *base);
xmlBuildURI (const xmlChar *URI,
const xmlChar *base);
XMLPUBFUN xmlChar * XMLCALL
xmlBuildRelativeURI (const xmlChar *URI,
const xmlChar *base);
const xmlChar *base);
XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURI (const char *str);
XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURIRaw (const char *str,
int raw);
XMLPUBFUN int XMLCALL
xmlParseURIReference (xmlURIPtr uri,
const char *str);
@@ -67,7 +70,7 @@ XMLPUBFUN xmlChar * XMLCALL
const xmlChar *list);
XMLPUBFUN char * XMLCALL
xmlURIUnescapeString (const char *str,
intptr_t len,
int len,
char *target);
XMLPUBFUN int XMLCALL
xmlNormalizeURIPath (char *path);

View File

@@ -39,7 +39,7 @@ typedef xmlValidState *xmlValidStatePtr;
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (*xmlValidityErrorFunc) (void *ctx,
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
const char *msg,
...);
@@ -54,7 +54,7 @@ typedef void (*xmlValidityErrorFunc) (void *ctx,
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (*xmlValidityWarningFunc) (void *ctx,
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
const char *msg,
...);
@@ -193,15 +193,15 @@ XMLPUBFUN void XMLCALL
xmlElementContentPtr cur);
XMLPUBFUN void XMLCALL
xmlSnprintfElementContent(char *buf,
size_t size,
xmlElementContentPtr content,
int glob);
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
XMLPUBFUN void XMLCALL
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int glob);
xmlElementContentPtr content,
int englob);
#endif /* LIBXML_OUTPUT_ENABLED */
/* DEPRECATED */
@@ -410,7 +410,7 @@ XMLPUBFUN xmlElementPtr XMLCALL
XMLPUBFUN int XMLCALL
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **list,
const xmlChar **names,
int *len,
int max);

View File

@@ -31,7 +31,7 @@ extern "C" {
*
* 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:
* @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
*/
typedef void * (*xmlInputOpenCallback) (char const *filename);
typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
/**
* xmlInputReadCallback:
* @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
*/
typedef intptr_t (*xmlInputReadCallback) (void * context, char * buffer, size_t len);
typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
/**
* xmlInputCloseCallback:
* @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
*/
typedef int (*xmlInputCloseCallback) (void * context);
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
#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
*/
typedef int (*xmlOutputMatchCallback) (char const *filename);
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @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
*/
typedef void * (*xmlOutputOpenCallback) (char const *filename);
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @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
*/
typedef intptr_t (*xmlOutputWriteCallback) (void * context, const char * buffer,
size_t len);
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
* @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
*/
typedef int (*xmlOutputCloseCallback) (void * context);
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
@@ -133,7 +133,7 @@ struct _xmlParserInputBuffer {
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
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 conv; /* if encoder != NULL buffer for output */
intptr_t written; /* total number of byte written */
int written; /* total number of byte written */
int error;
};
#endif /* LIBXML_OUTPUT_ENABLED */
@@ -176,25 +176,25 @@ XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateFd (int fd,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateMem (const char *mem, intptr_t size,
xmlParserInputBufferCreateMem (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateStatic (const char *mem, intptr_t size,
xmlParserInputBufferCreateStatic (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
intptr_t len,
int len,
const char *buf);
XMLPUBFUN void XMLCALL
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
@@ -231,6 +231,10 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFile (FILE *file,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder);
@@ -241,21 +245,21 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWrite (xmlOutputBufferPtr out,
intptr_t len,
int len,
const char *buf);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferFlush (xmlOutputBufferPtr out);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferClose (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
@@ -305,10 +309,10 @@ XMLPUBFUN int XMLCALL
xmlFileMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlFileOpen (const char *filename);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlFileRead (void * context,
char * buffer,
size_t len);
int len);
XMLPUBFUN int XMLCALL
xmlFileClose (void * context);

View File

@@ -65,6 +65,14 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,

View File

@@ -60,7 +60,8 @@ typedef enum {
XML_FROM_VALID, /* The XML DTD validation with valid context */
XML_FROM_CHECK, /* The error checking 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;
/**
@@ -82,7 +83,7 @@ struct _xmlError {
char *str2; /* extra string information */
char *str3; /* extra string 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 *node; /* the node in the tree */
};
@@ -195,10 +196,17 @@ typedef enum {
XML_WAR_NS_URI, /* 99 */
XML_WAR_NS_URI_RELATIVE, /* 100 */
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_UNDEFINED_NAMESPACE, /* 201 */
XML_NS_ERR_QNAME, /* 202 */
XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
XML_NS_ERR_EMPTY, /* 204 */
XML_DTD_ATTRIBUTE_DEFAULT = 500,
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
@@ -655,6 +663,7 @@ typedef enum {
XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
XML_SCHEMAV_CVC_IDC, /* 1877 */
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
XML_SCHEMAV_MISC, /* 1879 */
XML_XPTR_UNKNOWN_SCHEME = 1900,
XML_XPTR_CHILDSEQ_START, /* 1901 */
XML_XPTR_EVAL_FAILED, /* 1902 */
@@ -752,6 +761,18 @@ typedef enum {
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
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_CLOSE, /* 4901 */
XML_CHECK_FOUND_ELEMENT = 5000,
@@ -791,7 +812,12 @@ typedef enum {
XML_CHECK_NOT_NCNAME, /* 5034 */
XML_CHECK_OUTSIDE_DICT, /* 5035 */
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
XML_CHECK_, /* 5033 */
XML_CHECK_X /* 503 */
@@ -807,7 +833,7 @@ typedef enum {
* Signature of the function to use when there is an error and
* no parsing or validity context available .
*/
typedef void (*xmlGenericErrorFunc) (void *ctx,
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
const char *msg,
...);
/**
@@ -818,7 +844,7 @@ typedef void (*xmlGenericErrorFunc) (void *ctx,
* Signature of the function to use when there is an error and
* 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
@@ -837,19 +863,19 @@ XMLPUBFUN void XMLCALL
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCDECL
xmlParserError (void *ctx,
const char *msg,
...);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCDECL
xmlParserWarning (void *ctx,
const char *msg,
...);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCDECL
xmlParserValidityError (void *ctx,
const char *msg,
...);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCDECL
xmlParserValidityWarning (void *ctx,
const char *msg,
...);

View File

@@ -40,6 +40,13 @@
* Macros which declare the called convention for exported functions
*/
#define XMLCALL
/**
* XMLCDECL:
*
* Macro which declares the calling convention for exported functions that
* use '...'.
*/
#define XMLCDECL
/** DOC_DISABLE */
@@ -48,6 +55,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -59,7 +67,12 @@
#define XMLPUBVAR extern
#endif
#endif
#define XMLCALL __cdecl
#if defined(LIBXML_FASTCALL)
#define XMLCALL __fastcall
#else
#define XMLCALL __cdecl
#endif
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -70,6 +83,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport) extern
@@ -82,6 +96,7 @@
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -92,6 +107,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -104,6 +120,7 @@
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
@@ -114,6 +131,7 @@
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
@@ -126,6 +144,7 @@
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#endif
/* Compatibility */

View File

@@ -88,14 +88,13 @@ typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
/*
* 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 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.
*/
XMLPUBFUN size_t XMLCALL
XMLPUBFUN int XMLCALL
xmlMemUsed (void);
XMLPUBFUN size_t XMLCALL
XMLPUBFUN int XMLCALL
xmlMemBlocks (void);
XMLPUBFUN void XMLCALL
xmlMemDisplay (FILE *fp);

View File

@@ -15,6 +15,7 @@
#include <libxml/xmlIO.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/relaxng.h>
#include <libxml/xmlschemas.h>
#endif
#ifdef LIBXML_READER_ENABLED
@@ -120,10 +121,15 @@ XMLPUBFUN void XMLCALL
*/
XMLPUBFUN int XMLCALL
xmlTextReaderRead (xmlTextReaderPtr reader);
#ifdef LIBXML_WRITER_ENABLED
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
#endif
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadString (xmlTextReaderPtr reader);
XMLPUBFUN int XMLCALL
@@ -247,7 +253,7 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN int XMLCALL
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
XMLPUBFUN xmlNodePtr XMLCALL
@@ -275,6 +281,16 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
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
XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
@@ -285,7 +301,7 @@ XMLPUBFUN int XMLCALL
/*
* Index lookup
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN long XMLCALL
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
/*
@@ -304,7 +320,7 @@ XMLPUBFUN xmlTextReaderPtr XMLCALL
int options);
XMLPUBFUN xmlTextReaderPtr XMLCALL
xmlReaderForMemory (const char *buffer,
intptr_t size,
int size,
const char *URL,
const char *encoding,
int options);
@@ -338,7 +354,7 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlReaderNewMemory (xmlTextReaderPtr reader,
const char *buffer,
intptr_t size,
int size,
const char *URL,
const char *encoding,
int options);

View File

@@ -40,6 +40,7 @@ typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
}
#endif
#include <libxml/tree.h>
#include <libxml/dict.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -99,6 +100,113 @@ XMLPUBFUN int XMLCALL
int *nbneg,
xmlChar **values,
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
}
#endif

View File

@@ -27,7 +27,10 @@ extern "C" {
* to the xmlSaveToFd() and similar calls.
*/
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;
@@ -42,14 +45,12 @@ XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToFilename (const char *filename,
const char *encoding,
int options);
/******
Not yet implemented.
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToBuffer (xmlBufferPtr buffer,
const char *encoding,
int options);
******/
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
@@ -64,9 +65,9 @@ XMLPUBFUN long XMLCALL
xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveClose (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,

View File

@@ -87,8 +87,8 @@ typedef xmlSchema *xmlSchemaPtr;
/**
* A schemas validation context
*/
typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
@@ -113,11 +113,18 @@ XMLPUBFUN void XMLCALL
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void XMLCALL
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void **ctx);
XMLPUBFUN int XMLCALL
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaPtr XMLCALL
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
@@ -135,6 +142,10 @@ XMLPUBFUN void XMLCALL
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void XMLCALL
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err,
@@ -156,12 +167,29 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
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
}
#endif

View File

@@ -111,13 +111,28 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
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
xmlSchemaNewStringValue (xmlSchemaValType type,
const xmlChar *value);
XMLPUBFUN xmlSchemaValPtr XMLCALL
xmlSchemaNewNOTATIONValue (const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN xmlSchemaValPtr XMLCALL
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
const xmlChar *localName);
XMLPUBFUN int XMLCALL
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
xmlSchemaWhitespaceValueType xws,

View File

@@ -25,7 +25,6 @@ extern "C" {
* It's unsigned allowing to pinpoint case where char * are assigned
* to xmlChar * (possibly making serialization back impossible).
*/
typedef unsigned char xmlChar;
/**
@@ -42,16 +41,16 @@ XMLPUBFUN xmlChar * XMLCALL
xmlStrdup (const xmlChar *cur);
XMLPUBFUN xmlChar * XMLCALL
xmlStrndup (const xmlChar *cur,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlCharStrndup (const char *cur,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlCharStrdup (const char *cur);
XMLPUBFUN xmlChar * XMLCALL
xmlStrsub (const xmlChar *str,
intptr_t start,
intptr_t len);
int start,
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlStrchr (const xmlChar *str,
xmlChar val);
@@ -61,28 +60,28 @@ XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlStrcasestr (const xmlChar *str,
xmlChar *val);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrcmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrncmp (const xmlChar *str1,
const xmlChar *str2,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlStrcasecmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrncasecmp (const xmlChar *str1,
const xmlChar *str2,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlStrEqual (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrQEqual (const xmlChar *pref,
const xmlChar *name,
const xmlChar *str);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrlen (const xmlChar *str);
XMLPUBFUN xmlChar * XMLCALL
xmlStrcat (xmlChar *cur,
@@ -90,48 +89,48 @@ XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlStrncat (xmlChar *cur,
const xmlChar *add,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlStrncatNew (const xmlChar *str1,
const xmlChar *str2,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int len);
XMLPUBFUN int XMLCALL
xmlStrPrintf (xmlChar *buf,
intptr_t len,
int len,
const xmlChar *msg,
...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlStrVPrintf (xmlChar *buf,
intptr_t len,
int len,
const xmlChar *msg,
va_list ap);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlGetUTF8Char (const unsigned char *utf,
intptr_t *len);
XMLPUBFUN intptr_t XMLCALL
int *len);
XMLPUBFUN int XMLCALL
xmlCheckUTF8 (const unsigned char *utf);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlUTF8Strsize (const xmlChar *utf,
intptr_t len);
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strndup (const xmlChar *utf,
intptr_t len);
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlUTF8Strpos (const xmlChar *utf,
intptr_t pos);
XMLPUBFUN intptr_t XMLCALL
int pos);
XMLPUBFUN int XMLCALL
xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar);
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strsub (const xmlChar *utf,
intptr_t start,
intptr_t len);
XMLPUBFUN intptr_t XMLCALL
int start,
int len);
XMLPUBFUN int XMLCALL
xmlUTF8Strlen (const xmlChar *utf);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlUTF8Size (const xmlChar *utf);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlUTF8Charcmp (const xmlChar *utf1,
const xmlChar *utf2);

View File

@@ -4,11 +4,11 @@
*
* This file is automatically generated from the
* 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.
*
* Generation date: Mon Nov 10 22:35:10 2003
* Sources: Blocks-4.0.1d1b.txt UnicodeData-4.0.1d1b.txt
* Generation date: Mon Mar 27 11:09:52 2006
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
* Author: Daniel Veillard
*/

View File

@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.6.19"
#define LIBXML_DOTTED_VERSION "2.6.26"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 1002003
*/
#define LIBXML_VERSION 20619
#define LIBXML_VERSION 20626
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "1002003"
*/
#define LIBXML_VERSION_STRING "20619"
#define LIBXML_VERSION_STRING "20626"
/**
* LIBXML_VERSION_EXTRA:
*
* extra version information, used to show a CVS compilation
*/
#define LIBXML_VERSION_EXTRA ""
#define LIBXML_VERSION_EXTRA "-CVS2798"
/**
* 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
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(20619);
#define LIBXML_TEST_VERSION xmlCheckVersion(20626);
#ifndef VMS
#if 0
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the thread support is configured in
*/
#if 0
#if 1
#if defined(_REENTRANT) || defined(__MT__) || (_POSIX_C_SOURCE - 0 >= 199506L)
#define LIBXML_THREAD_ENABLED
#endif
@@ -137,7 +137,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the xmlPattern node selection interface is configured in
*/
#if 0
#if 1
#define LIBXML_PATTERN_ENABLED
#endif
@@ -164,7 +164,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the FTP support is configured in
*/
#if 0
#if 1
#define LIBXML_FTP_ENABLED
#endif
@@ -173,7 +173,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the HTTP support is configured in
*/
#if 0
#if 1
#define LIBXML_HTTP_ENABLED
#endif
@@ -182,7 +182,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the DTD validation support is configured in
*/
#if 0
#if 1
#define LIBXML_VALID_ENABLED
#endif
@@ -191,7 +191,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the HTML support is configured in
*/
#if 0
#if 1
#define LIBXML_HTML_ENABLED
#endif
@@ -200,7 +200,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the deprecated APIs are compiled in for compatibility
*/
#if 0
#if 1
#define LIBXML_LEGACY_ENABLED
#endif
@@ -209,7 +209,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the Canonicalization support is configured in
*/
#if 0
#if 1
#define LIBXML_C14N_ENABLED
#endif
@@ -218,7 +218,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the Catalog support is configured in
*/
#if 0
#if 1
#define LIBXML_CATALOG_ENABLED
#endif
@@ -227,7 +227,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the SGML Docbook support is configured in
*/
#if 0
#if 1
#define LIBXML_DOCB_ENABLED
#endif
@@ -236,7 +236,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether XPath is configured in
*/
#if 0
#if 1
#define LIBXML_XPATH_ENABLED
#endif
@@ -245,7 +245,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether XPointer is configured in
*/
#if 0
#if 1
#define LIBXML_XPTR_ENABLED
#endif
@@ -254,7 +254,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether XInclude is configured in
*/
#if 0
#if 1
#define LIBXML_XINCLUDE_ENABLED
#endif
@@ -263,7 +263,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether iconv support is available
*/
#if 0
#if 1
#define LIBXML_ICONV_ENABLED
#endif
@@ -272,7 +272,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether ISO-8859-* support is made available in case iconv is not
*/
#if 0
#if 1
#define LIBXML_ISO8859X_ENABLED
#endif
@@ -281,7 +281,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether Debugging module is configured in
*/
#if 0
#if 1
#define LIBXML_DEBUG_ENABLED
#endif
@@ -290,7 +290,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the memory debugging is configured in
*/
#if 0
#if 1
#define DEBUG_MEMORY_LOCATION
#endif
@@ -299,7 +299,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the runtime debugging is configured in
*/
#if 0
#if 1
#define LIBXML_DEBUG_RUNTIME
#endif
@@ -317,7 +317,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the regular expressions interfaces are compiled in
*/
#if 0
#if 1
#define LIBXML_REGEXP_ENABLED
#endif
@@ -326,27 +326,50 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the automata interfaces are compiled in
*/
#if 0
#if 1
#define LIBXML_AUTOMATA_ENABLED
#endif
/**
* LIBXML_EXPR_ENABLED:
*
* Whether the formal expressions interfaces are compiled in
*/
#if 1
#define LIBXML_EXPR_ENABLED
#endif
/**
* LIBXML_SCHEMAS_ENABLED:
*
* Whether the Schemas validation interfaces are compiled in
*/
#if 0
#if 1
#define LIBXML_SCHEMAS_ENABLED
#endif
/**
* LIBXML_SCHEMATRON_ENABLED:
*
* Whether the Schematron validation interfaces are compiled in
*/
#if 1
#define LIBXML_SCHEMATRON_ENABLED
#endif
/**
* LIBXML_MODULES_ENABLED:
*
* Whether the module interfaces are compiled in
*/
#if 0
#if 1
#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
/**

View File

@@ -53,28 +53,28 @@ extern "C" {
/*
* Document
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
const char *version,
const char *encoding,
const char *standalone);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
writer);
/*
* Comments
*/
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
writer);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
writer,
const xmlChar *
content);
@@ -82,51 +82,51 @@ extern "C" {
/*
* Elements
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
writer);
/*
* Elements conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -139,44 +139,44 @@ extern "C" {
/*
* Text
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
const char *format, va_list argptr);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
const xmlChar * content, intptr_t len);
XMLPUBFUN intptr_t XMLCALL
const xmlChar * content, int len);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
const xmlChar * content);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
writer,
const char
*format, ...);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
writer,
const char
*format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
const xmlChar *
content);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
const char *data,
intptr_t start, intptr_t len);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
int start, int len);
XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
const char *data,
intptr_t start, intptr_t len);
int start, int len);
/*
* Attributes
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -184,40 +184,40 @@ extern "C" {
name,
const xmlChar *
namespaceURI);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
writer);
/*
* Attributes conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -231,23 +231,23 @@ extern "C" {
/*
* PI's
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartPI(xmlTextWriterPtr writer,
const xmlChar * target);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
/*
* PI conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, va_list argptr);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWritePI(xmlTextWriterPtr writer,
const xmlChar * target,
const xmlChar * content);
@@ -262,48 +262,48 @@ extern "C" {
/*
* CDATA
*/
XMLPUBFUN intptr_t XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
/*
* CDATA conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
const char *format, va_list argptr);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
const xmlChar * content);
/*
* DTD
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
/*
* DTD conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, va_list argptr);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
@@ -320,25 +320,25 @@ extern "C" {
/*
* DTD element definition
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
writer);
/*
* DTD element definition conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
writer,
const xmlChar *
name,
@@ -348,25 +348,25 @@ extern "C" {
/*
* DTD attribute list definition
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
writer);
/*
* DTD attribute list definition conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
writer,
const xmlChar *
name,
@@ -376,47 +376,47 @@ extern "C" {
/*
* DTD entity definition
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
intptr_t pe, const xmlChar * name);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
int pe, const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
writer);
/*
* DTD entity definition conveniency functions
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
intptr_t pe,
int pe,
const xmlChar * name,
const char *format, ...);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
intptr_t pe,
int pe,
const xmlChar * name,
const char *format,
va_list argptr);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
intptr_t pe,
int pe,
const xmlChar * name,
const xmlChar * content);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
intptr_t pe,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar *
ndataid);
XMLPUBFUN intptr_t XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
writer, intptr_t pe,
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
writer, int pe,
const xmlChar * name,
const xmlChar *
pubid,
@@ -430,7 +430,7 @@ extern "C" {
/*
* DTD notation definition
*/
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
@@ -439,16 +439,16 @@ extern "C" {
/*
* Indentation
*/
XMLPUBFUN intptr_t XMLCALL
xmlTextWriterSetIndent(xmlTextWriterPtr writer, intptr_t indent);
XMLPUBFUN intptr_t XMLCALL
XMLPUBFUN int XMLCALL
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
XMLPUBFUN int XMLCALL
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
const xmlChar * str);
/*
* misc
*/
XMLPUBFUN intptr_t XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
#ifdef __cplusplus
}

View File

@@ -35,6 +35,7 @@ extern "C" {
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
#ifdef LIBXML_XPATH_ENABLED
typedef struct _xmlXPathContext xmlXPathContext;
typedef xmlXPathContext *xmlXPathContextPtr;
typedef struct _xmlXPathParserContext xmlXPathParserContext;
@@ -248,6 +249,23 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
const xmlChar *name,
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:
*
@@ -324,6 +342,10 @@ struct _xmlXPathContext {
/* dictionnary */
xmlDictPtr dict; /* dictionnary if any */
int flags; /* flags to control compilation */
/* Cache for reusal of XPath objects */
void *cache;
};
/*
@@ -466,9 +488,13 @@ XMLPUBFUN xmlXPathObjectPtr XMLCALL
*/
XMLPUBFUN xmlXPathContextPtr XMLCALL
xmlXPathNewContext (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
XMLPUBFUN int XMLCALL
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,
int value,
int options);
/**
* Evaluation functions.
*/

View File

@@ -84,10 +84,12 @@ static int isnan (double d) {
#endif
#endif /* _MSC_VER */
#if defined(_MSC_VER) || defined(__MINGW32__)
#if defined(_MSC_VER)
#define mkdir(p,m) _mkdir(p)
#define snprintf _snprintf
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
#elif defined(__MINGW32__)
#define mkdir(p,m) _mkdir(p)
#endif
/* Threading API to use should be specified here for compatibility reasons.

View File

@@ -7,11 +7,29 @@
#ifdef _WIN32_WCE
#include <winsock.h>
#elif defined (WIN32)
#else
#undef HAVE_ERRNO_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
#if !defined SOCKLEN_T

View File

@@ -673,7 +673,6 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
*
* Creation of a Namespace, the old way using PI and without scoping
* DEPRECATED !!!
* It now create a namespace on the root element of the document if found.
* Returns NULL this functionality had been removed
*/
xmlNsPtr

View File

@@ -19,10 +19,17 @@
#endif
#if defined(macintosh)
#include "config-mac.h"
#include "config-mac.h"
#else
#include "config.h"
#include <libxml/xmlversion.h>
#include "config.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
#ifndef WITH_TRIO
@@ -49,6 +56,14 @@ extern int __xmlRegisterCallbacks;
*/
void __xmlIOErr(int domain, int code, const char *extra);
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 __GNUC__

View File

@@ -94,9 +94,6 @@
#endif
#define SOCKET int
#endif
#if defined(VMS) || defined(__VMS)
#define XML_SOCKLEN_T unsigned int
#endif
#ifdef __BEOS__
#ifndef PF_INET
@@ -108,10 +105,14 @@
#define ss_family __ss_family
#endif
#ifndef XML_SOCKLEN_T
#define XML_SOCKLEN_T unsigned int
#endif
#define FTP_COMMAND_OK 200
#define FTP_SYNTAX_ERROR 500
#define FTP_GET_PASSWD 331
#define FTP_BUF_SIZE 512
#define FTP_BUF_SIZE 1024
#define XML_NANO_MAX_URLBUF 4096
@@ -315,7 +316,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
}
if (URL == NULL) return;
uri = xmlParseURI(URL);
uri = xmlParseURIRaw(URL, 1);
if (uri == NULL)
return;
@@ -376,7 +377,7 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
if (ctxt->hostname == NULL)
return(-1);
uri = xmlParseURI(URL);
uri = xmlParseURIRaw(URL, 1);
if (uri == NULL)
return(-1);
@@ -439,7 +440,7 @@ xmlNanoFTPScanProxy(const char *URL) {
#endif
if (URL == NULL) return;
uri = xmlParseURI(URL);
uri = xmlParseURIRaw(URL, 1);
if ((uri == NULL) || (uri->scheme == NULL) ||
(strcmp(uri->scheme, "ftp")) || (uri->server == NULL)) {
__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;
memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
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);
addrlen = sizeof (struct sockaddr_in);
}

View File

@@ -11,9 +11,6 @@
* 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 IN_LIBXML
#include "libxml.h"
@@ -66,6 +63,10 @@
#ifdef SUPPORT_IP6
#include <resolv.h>
#endif
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
#ifdef VMS
#include <stropts>
@@ -134,6 +135,7 @@ typedef struct xmlNanoHTTPCtxt {
char *hostname; /* the host name */
int port; /* the port */
char *path; /* the path within the URL */
char *query; /* the query string */
SOCKET fd; /* the file descriptor for the socket */
int state; /* WRITE / READ / CLOSED */
char *out; /* buffer sent (zero terminated) */
@@ -151,6 +153,10 @@ typedef struct xmlNanoHTTPCtxt {
char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */
char *encoding; /* encoding 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;
static int initialized = 0;
@@ -247,8 +253,10 @@ done:
void
xmlNanoHTTPCleanup(void) {
if (proxy != NULL)
if (proxy != NULL) {
xmlFree(proxy);
proxy = NULL;
}
#ifdef _WINSOCKAPI_
if (initialized)
WSACleanup();
@@ -284,9 +292,13 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
xmlFree(ctxt->path);
ctxt->path = NULL;
}
if (ctxt->query != NULL) {
xmlFree(ctxt->query);
ctxt->query = NULL;
}
if (URL == NULL) return;
uri = xmlParseURI(URL);
uri = xmlParseURIRaw(URL, 1);
if (uri == NULL)
return;
@@ -301,6 +313,8 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
ctxt->path = xmlMemStrdup(uri->path);
else
ctxt->path = xmlMemStrdup("/");
if (uri->query != NULL)
ctxt->query = xmlMemStrdup(uri->query);
if (uri->port != 0)
ctxt->port = uri->port;
@@ -337,7 +351,7 @@ xmlNanoHTTPScanProxy(const char *URL) {
#endif
if (URL == NULL) return;
uri = xmlParseURI(URL);
uri = xmlParseURIRaw(URL, 1);
if ((uri == NULL) || (uri->scheme == NULL) ||
(strcmp(uri->scheme, "http")) || (uri->server == NULL)) {
__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->protocol != NULL) xmlFree(ctxt->protocol);
if (ctxt->path != NULL) xmlFree(ctxt->path);
if (ctxt->query != NULL) xmlFree(ctxt->query);
if (ctxt->out != NULL) xmlFree(ctxt->out);
if (ctxt->in != NULL) xmlFree(ctxt->in);
if (ctxt->contentType != NULL) xmlFree(ctxt->contentType);
@@ -403,6 +418,13 @@ xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) {
if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
if (ctxt->location != NULL) xmlFree(ctxt->location);
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;
if (ctxt->fd >= 0) closesocket(ctxt->fd);
ctxt->fd = -1;
@@ -452,7 +474,14 @@ xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char * xmt_ptr, int outlen) {
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO( &wfd );
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4018)
#endif
FD_SET( ctxt->fd, &wfd );
#ifdef _MSC_VER
#pragma warning(pop)
#endif
(void)select( ctxt->fd + 1, NULL, &wfd, NULL, &tv );
}
}
@@ -545,7 +574,14 @@ xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) {
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO(&rfd);
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4018)
#endif
FD_SET(ctxt->fd, &rfd);
#ifdef _MSC_VER
#pragma warning(pop)
#endif
if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1)
#if defined(EINTR)
@@ -728,6 +764,26 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
if (ctxt->authHeader != NULL)
xmlFree(ctxt->authHeader);
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) ) {
cur += 15;
ctxt->ContentLength = strtol( cur, NULL, 10 );
@@ -831,7 +887,11 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
tv.tv_sec = timeout;
tv.tv_usec = 0;
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4018)
#endif
FD_ZERO(&wfd);
FD_SET(s, &wfd);
@@ -842,6 +902,9 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
switch(select(s+1, NULL, &wfd, &xfd, &tv))
#else
switch(select(s+1, NULL, &wfd, NULL, &tv))
#endif
#ifdef _MSC_VER
#pragma warning(pop)
#endif
{
case 0:
@@ -915,14 +978,21 @@ xmlNanoHTTPConnectHost(const char *host, int port)
memset (&sockin, 0, sizeof(sockin));
#ifdef SUPPORT_IP6
memset (&sockin6, 0, sizeof(sockin6));
#endif
#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6)
if (have_ipv6 ())
#if !defined(HAVE_GETADDRINFO) && defined(RES_USE_INET6)
{
if (!(_res.options & RES_INIT))
res_init();
_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;
struct addrinfo hints, *res, *result;
@@ -938,42 +1008,45 @@ xmlNanoHTTPConnectHost(const char *host, int port)
}
for (res = result; res; res = res->ai_next) {
if (res->ai_family == AF_INET || res->ai_family == AF_INET6) {
if (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;
}
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) {
if (res->ai_family == AF_INET) {
if (res->ai_addrlen > sizeof(sockin)) {
__xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
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)
freeaddrinfo (result);
return (-1);
} else
}
#endif
#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
else
#endif
{
#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
{
h = gethostbyname (host);
if (h == NULL) {
@@ -1026,7 +1099,7 @@ xmlNanoHTTPConnectHost(const char *host, int port)
memcpy (&ia, h->h_addr_list[i], h->h_length);
sockin.sin_family = h->h_addrtype;
sockin.sin_addr = ia;
sockin.sin_port = htons (port);
sockin.sin_port = (u_short)htons ((unsigned short)port);
addr = (struct sockaddr *) &sockin;
#ifdef SUPPORT_IP6
} else if (have_ipv6 () && (h->h_addrtype == AF_INET6)) {
@@ -1049,6 +1122,8 @@ xmlNanoHTTPConnectHost(const char *host, int port)
return (s);
}
}
#endif
#ifdef DEBUG_HTTP
xmlGenericError(xmlGenericErrorContext,
"xmlNanoHTTPConnectHost: unable to connect to '%s'.\n",
@@ -1113,11 +1188,38 @@ xmlNanoHTTPOpenRedir(const char *URL, char **contentType, char **redir) {
int
xmlNanoHTTPRead(void *ctx, void *dest, int len) {
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 (dest == NULL) return(-1);
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) {
if (xmlNanoHTTPRecv(ctxt) <= 0) break;
}
@@ -1229,7 +1331,12 @@ retry:
blen += strlen(headers) + 2;
if (contentType && *contentType)
blen += strlen(*contentType) + 16;
if (ctxt->query != NULL)
blen += strlen(ctxt->query) + 1;
blen += strlen(method) + strlen(ctxt->path) + 24;
#ifdef HAVE_ZLIB_H
blen += 23;
#endif
bp = (char*)xmlMallocAtomic(blen);
if ( bp == NULL ) {
xmlNanoHTTPFreeCtxt( ctxt );
@@ -1252,9 +1359,16 @@ retry:
else
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",
ctxt->hostname);
#ifdef HAVE_ZLIB_H
p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
#endif
if (contentType != NULL && *contentType)
p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);

File diff suppressed because it is too large Load Diff

View File

@@ -211,7 +211,7 @@ xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
/**
* xmlIsLetter:
* @c: an Unicode character (int)
* @c: an unicode character (int)
*
* Check whether the character is allowed by the production
* [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
* end of this entity
*/
intptr_t
int
xmlParserInputRead(xmlParserInputPtr in, int len) {
intptr_t ret;
intptr_t used;
intptr_t indx;
int ret;
int used;
int indx;
if (in == NULL) return(-1);
#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
* end of this entity
*/
intptr_t
xmlParserInputGrow(xmlParserInputPtr in, intptr_t len) {
intptr_t ret;
intptr_t indx;
int
xmlParserInputGrow(xmlParserInputPtr in, int len) {
int ret;
int indx;
if (in == NULL) return(-1);
#ifdef DEBUG_INPUT
@@ -383,9 +383,9 @@ xmlParserInputGrow(xmlParserInputPtr in, intptr_t len) {
*/
void
xmlParserInputShrink(xmlParserInputPtr in) {
intptr_t used;
intptr_t ret;
intptr_t indx;
int used;
int ret;
int indx;
#ifdef DEBUG_INPUT
xmlGenericError(xmlGenericErrorContext, "Shrink\n");
@@ -728,7 +728,7 @@ encoding_error:
{
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[2], ctxt->input->cur[3]);
__xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
@@ -861,7 +861,7 @@ encoding_error:
*
* Returns the number of xmlChar written
*/
intptr_t
int
xmlCopyCharMultiByte(xmlChar *out, int val) {
if (out == NULL) return(0);
/*
@@ -904,11 +904,11 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
* Returns the number of xmlChar written
*/
intptr_t
xmlCopyChar(intptr_t len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
int
xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
if (out == NULL) return(0);
/* the len parameter is ignored */
if (val >= 0x80) {
if (val >= 0x80) {
return(xmlCopyCharMultiByte (out, val));
}
*out = (xmlChar) val;
@@ -941,7 +941,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
case XML_CHAR_ENCODING_ERROR:
__xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
"encoding unknown\n", NULL, NULL);
break;
return(-1);
case XML_CHAR_ENCODING_NONE:
/* let's assume it's UTF-8 without the XML decl */
ctxt->charset = XML_CHAR_ENCODING_UTF8;
@@ -972,7 +972,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
*has also been converted into
*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[1] == 0xBB) &&
(ctxt->input->cur[2] == 0xBF)) {
@@ -988,15 +988,6 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
* Default handlers.
*/
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:
/* default encoding, no conversion should be needed */
ctxt->charset = XML_CHAR_ENCODING_UTF8;
@@ -1052,6 +1043,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
*/
if ((ctxt->inputNr == 1) &&
(ctxt->encoding == NULL) &&
(ctxt->input != NULL) &&
(ctxt->input->encoding != NULL)) {
ctxt->encoding = xmlStrdup(ctxt->input->encoding);
}
@@ -1072,6 +1064,8 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
"encoding not supported %s\n",
BAD_CAST "EUC-JP", NULL);
break;
default:
break;
}
}
if (handler == NULL)
@@ -1095,7 +1089,7 @@ int
xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler)
{
intptr_t nbchars;
int nbchars;
if (handler == NULL)
return (-1);
@@ -1135,8 +1129,8 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
* Is there already some content down the pipe to convert ?
*/
if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
intptr_t processed;
size_t use;
int processed;
unsigned int use;
/*
* Specific handling of the Byte Order Mark for
@@ -1206,50 +1200,13 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
}
return (0);
} else {
if ((input->length == 0) || (input->buf == NULL)) {
/*
* When parsing a static memory array one must know the
* size to be able to convert the buffer.
*/
xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
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];
}
} else if (input->length == 0) {
/*
* When parsing a static memory array one must know the
* size to be able to convert the buffer.
*/
xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
return (-1);
}
return (0);
}
@@ -1267,9 +1224,11 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
int
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
{
int ret = 0;
if (handler != NULL) {
if (ctxt->input != NULL) {
xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
ret = xmlSwitchInputEncoding(ctxt, ctxt->input, handler);
} else {
xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
NULL);
@@ -1281,7 +1240,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
ctxt->charset = XML_CHAR_ENCODING_UTF8;
} else
return(-1);
return(0);
return(ret);
}
/************************************************************************
@@ -1490,17 +1449,20 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
if (ctxt == NULL) return(NULL);
buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
__xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
(const char *) filename);
if (filename == NULL)
__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);
}
inputStream = xmlNewInputStream(ctxt);
if (inputStream == NULL) {
if (directory != NULL) xmlFree((char *) directory);
if (URI != NULL) xmlFree((char *) URI);
if (inputStream == NULL)
return(NULL);
}
inputStream->buf = buf;
inputStream = xmlCheckHTTPInput(ctxt, inputStream);
if (inputStream == NULL)
@@ -1792,7 +1754,7 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
*/
xmlParserCtxtPtr
xmlNewParserCtxt()
xmlNewParserCtxt(void)
{
xmlParserCtxtPtr ctxt;
@@ -1910,7 +1872,7 @@ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
int found = 0;
if ((seq == NULL) || (node == NULL))
return (-1);
return ((unsigned long) -1);
/* Do a binary search for the key */
lower = 1;
@@ -1952,8 +1914,10 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
/* Find pos and check to see if node is already in the sequence */
pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
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;
}

File diff suppressed because it is too large Load Diff

View File

@@ -45,27 +45,29 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
(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
@@ -254,6 +256,7 @@ struct _xmlRelaxNGParserCtxt {
#define FLAGS_IGNORABLE 1
#define FLAGS_NEGATIVE 2
#define FLAGS_MIXED_CONTENT 4
#define FLAGS_NOERROR 8
/**
* xmlRelaxNGInterleaveGroup:
@@ -435,10 +438,12 @@ xmlRngPErrMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *extra)
void *data = NULL;
if (ctxt != NULL) {
channel = ctxt->error;
if (ctxt->serror != NULL)
schannel = ctxt->serror;
else
channel = ctxt->error;
data = ctxt->userData;
ctxt->nbErrors++;
schannel = ctxt->serror;
}
if (extra)
__xmlRaiseError(schannel, channel, data,
@@ -468,10 +473,12 @@ xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra)
void *data = NULL;
if (ctxt != NULL) {
channel = ctxt->error;
if (ctxt->serror != NULL)
schannel = ctxt->serror;
else
channel = ctxt->error;
data = ctxt->userData;
ctxt->nbErrors++;
schannel = ctxt->serror;
}
if (extra)
__xmlRaiseError(schannel, channel, data,
@@ -506,10 +513,12 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
void *data = NULL;
if (ctxt != NULL) {
channel = ctxt->error;
if (ctxt->serror != NULL)
schannel = ctxt->serror;
else
channel = ctxt->error;
data = ctxt->userData;
ctxt->nbErrors++;
schannel = ctxt->serror;
}
__xmlRaiseError(schannel, channel, data,
NULL, node, XML_FROM_RELAXNGP,
@@ -538,10 +547,12 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
void *data = NULL;
if (ctxt != NULL) {
channel = ctxt->error;
if (ctxt->serror != NULL)
schannel = ctxt->serror;
else
channel = ctxt->error;
data = ctxt->userData;
ctxt->nbErrors++;
schannel = ctxt->serror;
}
__xmlRaiseError(schannel, channel, data,
NULL, node, XML_FROM_RELAXNGV,
@@ -1148,7 +1159,7 @@ xmlRelaxNGFreeStates(xmlRelaxNGValidCtxtPtr ctxt,
ctxt->freeStates = tmp;
ctxt->freeStatesMax *= 2;
}
if ((ctxt == NULL) || (ctxt->freeState == NULL)) {
if ((ctxt == NULL) || (ctxt->freeStates == NULL)) {
xmlFree(states->tabState);
xmlFree(states);
} else {
@@ -1477,14 +1488,14 @@ xmlRelaxNGIncludePop(xmlRelaxNGParserCtxtPtr ctxt)
xmlRelaxNGIncludePtr ret;
if (ctxt->incNr <= 0)
return (0);
return (NULL);
ctxt->incNr--;
if (ctxt->incNr > 0)
ctxt->inc = ctxt->incTab[ctxt->incNr - 1];
else
ctxt->inc = NULL;
ret = ctxt->incTab[ctxt->incNr];
ctxt->incTab[ctxt->incNr] = 0;
ctxt->incTab[ctxt->incNr] = NULL;
return (ret);
}
@@ -1552,8 +1563,10 @@ xmlRelaxNGRemoveRedefine(xmlRelaxNGParserCtxtPtr ctxt,
children, name) == 1) {
found = 1;
}
#ifdef DEBUG_INCLUDE
if (href != NULL)
xmlFree(href);
#endif
}
}
}
@@ -1889,14 +1902,14 @@ xmlRelaxNGDocumentPop(xmlRelaxNGParserCtxtPtr ctxt)
xmlRelaxNGDocumentPtr ret;
if (ctxt->docNr <= 0)
return (0);
return (NULL);
ctxt->docNr--;
if (ctxt->docNr > 0)
ctxt->doc = ctxt->docTab[ctxt->docNr - 1];
else
ctxt->doc = NULL;
ret = ctxt->docTab[ctxt->docNr];
ctxt->docTab[ctxt->docNr] = 0;
ctxt->docTab[ctxt->docNr] = NULL;
return (ret);
}
@@ -2220,7 +2233,7 @@ xmlRelaxNGShowValidError(xmlRelaxNGValidCtxtPtr ctxt,
{
xmlChar *msg;
if (ctxt->error == NULL)
if (ctxt->flags & FLAGS_NOERROR)
return;
#ifdef DEBUG_ERROR
@@ -2332,7 +2345,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidErr err, const xmlChar * arg1,
const xmlChar * arg2, int dup)
{
if ((ctxt == NULL) || (ctxt->error == NULL))
if (ctxt == NULL)
return;
if (ctxt->flags & FLAGS_NOERROR)
return;
#ifdef DEBUG_ERROR
@@ -2573,11 +2588,11 @@ xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED,
}
ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
if (ret != 0) {
xmlSchemaFreeValue(res1);
if ((comp1 == NULL) && (res1 != NULL))
xmlSchemaFreeValue(res1);
return (-1);
}
if (res1 == NULL) {
xmlSchemaFreeValue(res1);
return (-1);
}
ret = xmlSchemaCompareValues(res1, res2);
@@ -3564,7 +3579,7 @@ xmlRelaxNGParseValue(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
static xmlRelaxNGDefinePtr
xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
{
xmlRelaxNGDefinePtr def = NULL, except, last = NULL;
xmlRelaxNGDefinePtr def = NULL, except;
xmlRelaxNGDefinePtr param, lastparam = NULL;
xmlRelaxNGTypeLibraryPtr lib;
xmlChar *type;
@@ -3672,7 +3687,7 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
if ((content != NULL)
&& (xmlStrEqual(content->name, BAD_CAST "except"))) {
xmlNodePtr child;
xmlRelaxNGDefinePtr tmp2, last2 = NULL;
xmlRelaxNGDefinePtr tmp2, last = NULL;
except = xmlRelaxNGNewDefine(ctxt, node);
if (except == NULL) {
@@ -3680,11 +3695,7 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
}
except->type = XML_RELAXNG_EXCEPT;
child = content->children;
if (last == NULL) {
def->content = except;
} else {
last->next = except;
}
def->content = except;
if (child == NULL) {
xmlRngPErr(ctxt, content, XML_RNGP_EXCEPT_NO_CONTENT,
"except has no content\n", NULL, NULL);
@@ -3692,11 +3703,11 @@ xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
while (child != NULL) {
tmp2 = xmlRelaxNGParsePattern(ctxt, child);
if (tmp2 != NULL) {
if (last2 == NULL) {
except->content = last2 = tmp2;
if (last == NULL) {
except->content = last = tmp2;
} else {
last2->next = tmp2;
last2 = tmp2;
last->next = tmp2;
last = tmp2;
}
}
child = child->next;
@@ -3739,10 +3750,10 @@ xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
xmlNs ns;
xmlRelaxNGValidCtxt ctxt;
ctxt.flags = FLAGS_IGNORABLE;
memset(&ctxt, 0, sizeof(xmlRelaxNGValidCtxt));
ctxt.flags = FLAGS_IGNORABLE | FLAGS_NOERROR;
if ((def1->type == XML_RELAXNG_ELEMENT) ||
(def1->type == XML_RELAXNG_ATTRIBUTE)) {
if (def2->type == XML_RELAXNG_TEXT)
@@ -6908,6 +6919,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
"xmlRelaxNGParse: externalRef has no href attribute\n",
NULL, NULL);
if (ns != NULL)
xmlFree(ns);
delete = cur;
goto skip_children;
}
@@ -6916,6 +6929,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Incorrect URI for externalRef %s\n",
href, NULL);
if (ns != NULL)
xmlFree(ns);
if (href != NULL)
xmlFree(href);
delete = cur;
@@ -6925,6 +6940,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Fragment forbidden in URI for externalRef %s\n",
href, NULL);
if (ns != NULL)
xmlFree(ns);
xmlFreeURI(uri);
if (href != NULL)
xmlFree(href);
@@ -6938,6 +6955,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Failed to compute URL for externalRef %s\n",
href, NULL);
if (ns != NULL)
xmlFree(ns);
if (href != NULL)
xmlFree(href);
if (base != NULL)
@@ -6954,6 +6973,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_EXTERNAL_REF_FAILURE,
"Failed to load externalRef %s\n", URL,
NULL);
if (ns != NULL)
xmlFree(ns);
xmlFree(URL);
delete = cur;
goto skip_children;
@@ -7310,7 +7331,6 @@ xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc)
*
* parse a schema definition resource and build an internal
* 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
* NULL in case of error
@@ -7374,13 +7394,16 @@ xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt)
if (root == NULL) {
xmlRngPErr(ctxt, (xmlNodePtr) doc,
XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
ctxt->URL, NULL);
xmlFreeDoc(doc);
(ctxt->URL ? ctxt->URL : BAD_CAST "schemas"), NULL);
xmlFreeDoc(ctxt->document);
ctxt->document = NULL;
return (NULL);
}
ret = xmlRelaxNGParseDocument(ctxt, root);
if (ret == NULL) {
xmlFreeDoc(doc);
xmlFreeDoc(ctxt->document);
ctxt->document = NULL;
return (NULL);
}
@@ -7459,6 +7482,7 @@ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
return;
ctxt->error = err;
ctxt->warning = warn;
ctxt->serror = NULL;
ctxt->userData = ctx;
}
@@ -7489,6 +7513,27 @@ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
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
/************************************************************************
@@ -7759,8 +7804,6 @@ xmlRelaxNGValidateCompiledCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
#endif
if (ctxt == NULL) {
fprintf(stderr, "callback on %s missing context\n", token);
if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
return;
}
if (define == NULL) {
@@ -7804,10 +7847,11 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
xmlRegExecCtxtPtr exec;
xmlNodePtr cur;
int ret = 0;
int oldperr = ctxt->perr;
int oldperr;
if ((ctxt == NULL) || (regexp == NULL))
return (-1);
oldperr = ctxt->perr;
exec = xmlRegNewExecCtxt(regexp,
xmlRelaxNGValidateCompiledCallback, ctxt);
ctxt->perr = 0;
@@ -7966,7 +8010,7 @@ xmlRelaxNGValidateProgressiveCallback(xmlRegExecCtxtPtr exec
xmlRelaxNGValidCtxtPtr ctxt = (xmlRelaxNGValidCtxtPtr) inputdata;
xmlRelaxNGDefinePtr define = (xmlRelaxNGDefinePtr) transdata;
xmlRelaxNGValidStatePtr state, oldstate;
xmlNodePtr node = ctxt->pnode;
xmlNodePtr node;
int ret = 0, oldflags;
#ifdef DEBUG_PROGRESSIVE
@@ -7977,6 +8021,7 @@ xmlRelaxNGValidateProgressiveCallback(xmlRegExecCtxtPtr exec
fprintf(stderr, "callback on %s missing context\n", token);
return;
}
node = ctxt->pnode;
ctxt->pstate = 1;
if (define == NULL) {
if (token[0] == '#')
@@ -8628,8 +8673,6 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
if (ctxt->errNr > 0)
xmlRelaxNGPopErrors(ctxt, 0);
}
if (ret == 0)
xmlRelaxNGNextValue(ctxt);
break;
}
case XML_RELAXNG_LIST:{
@@ -8732,13 +8775,8 @@ xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
cur = ctxt->state->value;
}
ctxt->flags = oldflags;
if (ret != 0) {
if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
xmlRelaxNGDumpValidError(ctxt);
} else {
if (ctxt->errNr > 0)
xmlRelaxNGPopErrors(ctxt, 0);
}
if (ctxt->errNr > 0)
xmlRelaxNGPopErrors(ctxt, 0);
break;
}
case XML_RELAXNG_EXCEPT:{
@@ -9234,21 +9272,56 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
} else if (ctxt->states != NULL) {
int j;
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++) {
cur = ctxt->states->tabState[j]->seq;
cur = xmlRelaxNGSkipIgnored(ctxt, cur);
if (cur == NULL) {
if (found == 0) {
lowattr = ctxt->states->tabState[j]->nbAttrLeft;
best = j;
}
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) {
xmlRelaxNGFreeValidState(ctxt, oldstate);
oldstate =
ctxt->states->tabState[ctxt->states->nbState - 1];
if (best != -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]);
}
xmlRelaxNGFreeStates(ctxt, ctxt->states);
@@ -10021,6 +10094,11 @@ xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
if (states == NULL) {
xmlRelaxNGNewStates(ctxt,
res->nbState - base);
states = ctxt->states;
if (states == NULL) {
progress = 0;
break;
}
}
states->nbState = 0;
for (i = base; i < res->nbState; i++)
@@ -10581,7 +10659,8 @@ xmlRelaxNGNewValidCtxt(xmlRelaxNGPtr schema)
ret->errMax = 0;
ret->err = NULL;
ret->errTab = NULL;
ret->idref = schema->idref;
if (schema != NULL)
ret->idref = schema->idref;
ret->states = NULL;
ret->freeState = NULL;
ret->freeStates = NULL;
@@ -10650,6 +10729,27 @@ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
ctxt->error = err;
ctxt->warning = warn;
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;
}
/**

View File

@@ -46,6 +46,46 @@
/* #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
* to avoid some crazyness since xmlMalloc/xmlFree may actually
@@ -140,7 +180,8 @@ xmlNewMutex(void)
if ((tok = malloc(sizeof(xmlMutex))) == NULL)
return (NULL);
#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
tok->mutex = CreateMutex(NULL, FALSE, NULL);
#elif defined HAVE_BEOS_THREADS
@@ -166,7 +207,8 @@ xmlFreeMutex(xmlMutexPtr tok)
if (tok == NULL) return;
#ifdef HAVE_PTHREAD_H
pthread_mutex_destroy(&tok->lock);
if (libxml_is_threaded != 0)
pthread_mutex_destroy(&tok->lock);
#elif defined HAVE_WIN32_THREADS
CloseHandle(tok->mutex);
#elif defined HAVE_BEOS_THREADS
@@ -187,7 +229,8 @@ xmlMutexLock(xmlMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_PTHREAD_H
pthread_mutex_lock(&tok->lock);
if (libxml_is_threaded != 0)
pthread_mutex_lock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
WaitForSingleObject(tok->mutex, INFINITE);
#elif defined HAVE_BEOS_THREADS
@@ -214,7 +257,8 @@ xmlMutexUnlock(xmlMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&tok->lock);
if (libxml_is_threaded != 0)
pthread_mutex_unlock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
ReleaseMutex(tok->mutex);
#elif defined HAVE_BEOS_THREADS
@@ -243,10 +287,12 @@ xmlNewRMutex(void)
if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
return (NULL);
#ifdef HAVE_PTHREAD_H
pthread_mutex_init(&tok->lock, NULL);
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, NULL);
if (libxml_is_threaded != 0) {
pthread_mutex_init(&tok->lock, NULL);
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, NULL);
}
#elif defined HAVE_WIN32_THREADS
InitializeCriticalSection(&tok->cs);
tok->count = 0;
@@ -270,8 +316,11 @@ xmlNewRMutex(void)
void
xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
{
if (tok == NULL)
return;
#ifdef HAVE_PTHREAD_H
pthread_mutex_destroy(&tok->lock);
if (libxml_is_threaded != 0)
pthread_mutex_destroy(&tok->lock);
#elif defined HAVE_WIN32_THREADS
DeleteCriticalSection(&tok->cs);
#elif defined HAVE_BEOS_THREADS
@@ -292,6 +341,9 @@ xmlRMutexLock(xmlRMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_PTHREAD_H
if (libxml_is_threaded == 0)
return;
pthread_mutex_lock(&tok->lock);
if (tok->held) {
if (pthread_equal(tok->tid, pthread_self())) {
@@ -334,6 +386,9 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
if (tok == NULL)
return;
#ifdef HAVE_PTHREAD_H
if (libxml_is_threaded == 0)
return;
pthread_mutex_lock(&tok->lock);
tok->held--;
if (tok->held == 0) {
@@ -417,7 +472,7 @@ typedef struct _xmlGlobalStateCleanupHelperParams
void *memory;
} xmlGlobalStateCleanupHelperParams;
static void xmlGlobalStateCleanupHelper (void *p)
static void XMLCDECL xmlGlobalStateCleanupHelper (void *p)
{
xmlGlobalStateCleanupHelperParams *params = (xmlGlobalStateCleanupHelperParams *) p;
WaitForSingleObject(params->thread, INFINITE);
@@ -470,6 +525,9 @@ xmlGetGlobalState(void)
#ifdef HAVE_PTHREAD_H
xmlGlobalState *globalval;
if (libxml_is_threaded == 0)
return(NULL);
pthread_once(&once_control, xmlOnceInit);
if ((globalval = (xmlGlobalState *)
@@ -559,6 +617,8 @@ int
xmlGetThreadId(void)
{
#ifdef HAVE_PTHREAD_H
if (libxml_is_threaded == 0)
return(0);
return((int) pthread_self());
#elif defined HAVE_WIN32_THREADS
return GetCurrentThreadId();
@@ -580,6 +640,10 @@ int
xmlIsMainThread(void)
{
#ifdef HAVE_PTHREAD_H
if (libxml_is_threaded == -1)
xmlInitThreads();
if (libxml_is_threaded == 0)
return(1);
pthread_once(&once_control, xmlOnceInit);
#elif defined HAVE_WIN32_THREADS
xmlOnceInit ();
@@ -646,6 +710,29 @@ xmlInitThreads(void)
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
InitializeCriticalSection(&cleanup_helpers_cs);
#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
}
/**

File diff suppressed because it is too large Load Diff

View File

@@ -185,6 +185,8 @@
* path = [ abs_path | opaque_part ]
*/
#define STRNDUP(s, n) (char *) xmlStrndup((const xmlChar *)(s), (n))
/************************************************************************
* *
* Generic URI structure functions *
@@ -224,8 +226,8 @@ xmlChar *
xmlSaveUri(xmlURIPtr uri) {
xmlChar *ret = NULL;
const char *p;
intptr_t len;
intptr_t max;
int len;
int max;
if (uri == NULL) return(NULL);
@@ -809,7 +811,7 @@ static int is_hex(char c) {
* Returns an copy of the string, but unescaped
*/
char *
xmlURIUnescapeString(const char *str, intptr_t len, char *target) {
xmlURIUnescapeString(const char *str, int len, char *target) {
char *ret, *out;
const char *in;
@@ -872,7 +874,7 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
xmlChar *ret, ch;
const xmlChar *in;
size_t len, out;
unsigned int len, out;
if (str == NULL)
return(NULL);
@@ -1076,17 +1078,22 @@ xmlURIEscape(const xmlChar * str)
static int
xmlParseURIFragment(xmlURIPtr uri, const char **str)
{
const char *cur = *str;
const char *cur;
if (str == NULL)
return (-1);
cur = *str;
while (IS_URIC(cur) || IS_UNWISE(cur))
NEXT(cur);
if (uri != NULL) {
if (uri->fragment != NULL)
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;
return (0);
@@ -1106,17 +1113,23 @@ xmlParseURIFragment(xmlURIPtr uri, const char **str)
static int
xmlParseURIQuery(xmlURIPtr uri, const char **str)
{
const char *cur = *str;
const char *cur;
if (str == NULL)
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);
if (uri != NULL) {
if (uri->query != NULL)
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;
return (0);
@@ -1147,8 +1160,7 @@ xmlParseURIScheme(xmlURIPtr uri, const char **str) {
while (IS_SCHEME(*cur)) cur++;
if (uri != NULL) {
if (uri->scheme != NULL) xmlFree(uri->scheme);
/* !!! strndup */
uri->scheme = xmlURIUnescapeString(*str, cur - *str, NULL);
uri->scheme = STRNDUP(*str, cur - *str);
}
*str = cur;
return(0);
@@ -1174,16 +1186,21 @@ xmlParseURIOpaquePart(xmlURIPtr uri, const char **str)
return (-1);
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);
}
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);
if (uri != NULL) {
if (uri->opaque != NULL)
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;
return (0);
@@ -1235,7 +1252,10 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) {
if (*cur == '@') {
if (uri != NULL) {
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++;
} else {
@@ -1349,7 +1369,10 @@ xmlParseURIServer(xmlURIPtr uri, const char **str) {
uri->authority = NULL;
if (host[0] != '[') { /* it's not an IPV6 addr */
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);
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);
}
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);
if (uri != NULL) {
if (uri->path != NULL)
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;
return (0);
@@ -1432,11 +1460,13 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
cur = *str;
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);
while (*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);
}
if (*cur != '/')
@@ -1444,7 +1474,7 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
cur++;
} while (1);
if (uri != NULL) {
intptr_t len, len2 = 0;
int len, len2 = 0;
char *path;
/*
@@ -1472,8 +1502,13 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash)
len2++;
}
path[len2] = 0;
if (cur - *str > 0)
xmlURIUnescapeString(*str, cur - *str, &path[len2]);
if (cur - *str > 0) {
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)
xmlFree(uri->path);
uri->path = path;
@@ -1538,7 +1573,10 @@ xmlParseURIAuthority(xmlURIPtr uri, const char **str) {
if (uri->user != NULL) xmlFree(uri->user);
uri->user = NULL;
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;
return(0);
@@ -1761,6 +1799,38 @@ xmlParseURI(const char *str) {
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 *
@@ -1785,7 +1855,7 @@ xmlParseURI(const char *str) {
xmlChar *
xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
xmlChar *val = NULL;
intptr_t ret, len, indx, cur, out;
int ret, len, indx, cur, out;
xmlURIPtr ref = NULL;
xmlURIPtr bas = NULL;
xmlURIPtr res = NULL;
@@ -2061,23 +2131,17 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
{
xmlChar *val = NULL;
int ret;
intptr_t ix;
intptr_t pos = 0;
intptr_t nbslash = 0;
int ix;
int pos = 0;
int nbslash = 0;
int len;
xmlURIPtr ref = NULL;
xmlURIPtr bas = NULL;
xmlChar *bptr, *uptr, *vptr;
int remove_path = 0;
if ((URI == NULL) || (*URI == 0))
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
@@ -2085,9 +2149,13 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
ref = xmlCreateURI ();
if (ref == NULL)
return NULL;
ret = xmlParseURIReference (ref, (const char *) URI);
if (ret != 0)
goto done; /* Error in URI, return NULL */
/* If URI not already in "relative" form */
if (URI[0] != '.') {
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
@@ -2099,72 +2167,113 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
bas = xmlCreateURI ();
if (bas == NULL)
goto done;
ret = xmlParseURIReference (bas, (const char *) base);
if (ret != 0)
goto done; /* Error in base, return NULL */
if (base[0] != '.') {
ret = xmlParseURIReference (bas, (const char *) base);
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,
* just return the URI
*/
if ((ref->scheme != NULL) &&
((bas->scheme == NULL) ||
xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme) ||
xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server))) {
((bas->scheme == NULL) ||
(xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) ||
(xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) {
val = xmlStrdup (URI);
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
*
* 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;
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 = 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 (ref->path == NULL) {
for (ix = 0; bptr[ix] != 0; ix++) {
if (bptr[ix] == '/')
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) {
val = xmlStrdup (uptr);
if (uptr != NULL)
val = xmlStrdup (uptr);
goto done;
}
@@ -2173,8 +2282,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
* length of the remainder of the URI, plus enough space
* for the "../" groups, plus one for the terminator
*/
ix = xmlStrlen (uptr) + 1;
val = (xmlChar *) xmlMalloc (ix + 3 * nbslash);
val = (xmlChar *) xmlMalloc (len + 3 * nbslash);
if (val == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlBuildRelativeURI: out of memory\n");
@@ -2192,12 +2300,25 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
/*
* 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
*/
if (remove_path != 0)
ref->path = NULL;
if (ref != NULL)
xmlFreeURI (ref);
if (bas != NULL)
@@ -2226,12 +2347,13 @@ xmlChar*
xmlCanonicPath(const xmlChar *path)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
intptr_t len = 0;
int len = 0;
int i = 0;
xmlChar *p = NULL;
#endif
xmlChar *ret;
xmlURIPtr uri;
xmlChar *ret;
const xmlChar *absuri;
if (path == NULL)
return(NULL);
@@ -2240,12 +2362,47 @@ xmlCanonicPath(const xmlChar *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();
if (uri == NULL) {
return(NULL);
}
#if defined(_WIN32) && !defined(__CYGWIN__)
len = xmlStrlen(path);
if ((len > 2) && IS_WINDOWS_PATH(path)) {
uri->scheme = xmlStrdup(BAD_CAST "file");
@@ -2262,15 +2419,21 @@ xmlCanonicPath(const xmlChar *path)
*p = '/';
p++;
}
#else
uri->path = (char *) xmlStrdup((const xmlChar *) path);
#endif
if (uri->path == NULL) {
xmlFreeURI(uri);
return(NULL);
}
ret = xmlSaveUri(uri);
if (uri->scheme == NULL) {
ret = xmlStrdup((const xmlChar *) path);
} else {
ret = xmlSaveUri(uri);
}
xmlFreeURI(uri);
#else
ret = xmlStrdup((const xmlChar *) path);
#endif
return(ret);
}

View File

@@ -453,14 +453,14 @@ nodeVPop(xmlValidCtxtPtr ctxt)
xmlNodePtr ret;
if (ctxt->nodeNr <= 0)
return (0);
return (NULL);
ctxt->nodeNr--;
if (ctxt->nodeNr > 0)
ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];
else
ctxt->node = NULL;
ret = ctxt->nodeTab[ctxt->nodeNr];
ctxt->nodeTab[ctxt->nodeNr] = 0;
ctxt->nodeTab[ctxt->nodeNr] = NULL;
return (ret);
}
@@ -1212,14 +1212,14 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
* xmlSprintfElementContent:
* @buf: an output buffer
* @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
*/
void
xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
xmlElementContentPtr content ATTRIBUTE_UNUSED,
int glob ATTRIBUTE_UNUSED) {
int englob ATTRIBUTE_UNUSED) {
}
#endif /* LIBXML_OUTPUT_ENABLED */
@@ -1228,14 +1228,14 @@ xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
* @buf: an output buffer
* @size: the buffer size
* @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
* Intended just for the debug routine
*/
void
xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content, int glob) {
size_t len;
xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int englob) {
int len;
if (content == NULL) return;
len = strlen(buf);
@@ -1244,21 +1244,21 @@ xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content,
strcat(buf, " ...");
return;
}
if (glob) strcat(buf, "(");
if (englob) strcat(buf, "(");
switch (content->type) {
case XML_ELEMENT_CONTENT_PCDATA:
strcat(buf, "#PCDATA");
break;
case XML_ELEMENT_CONTENT_ELEMENT:
if (content->prefix != NULL) {
if ((intptr_t)(size - len) < xmlStrlen(content->prefix) + 10) {
if (size - len < xmlStrlen(content->prefix) + 10) {
strcat(buf, " ...");
return;
}
strcat(buf, (char *) content->prefix);
strcat(buf, ":");
}
if ((intptr_t)(size - len) < xmlStrlen(content->name) + 10) {
if (size - len < xmlStrlen(content->name) + 10) {
strcat(buf, " ...");
return;
}
@@ -1306,7 +1306,7 @@ xmlSnprintfElementContent(char *buf, size_t size, xmlElementContentPtr content,
xmlSnprintfElementContent(buf, size, content->c2, 0);
break;
}
if (glob)
if (englob)
strcat(buf, ")");
switch (content->ocur) {
case XML_ELEMENT_CONTENT_ONCE:
@@ -1485,6 +1485,10 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
xmlFree(ns);
return(NULL);
}
if (ns != NULL) {
xmlFree(ns);
ns = NULL;
}
} else {
ret = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
if (ret == NULL) {
@@ -1864,6 +1868,7 @@ xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
* xmlScanIDAttributeDecl:
* @ctxt: the validation context
* @elem: the element name
* @err: whether to raise errors here
*
* Verify that the element don't have too many ID attributes
* declared.
@@ -1871,7 +1876,7 @@ xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) {
* Returns the number of ID attributes found.
*/
static int
xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem, int err) {
xmlAttributePtr cur;
int ret = 0;
@@ -1880,7 +1885,7 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
while (cur != NULL) {
if (cur->atype == XML_ATTRIBUTE_ID) {
ret ++;
if (ret > 1)
if ((ret > 1) && (err))
xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_MULTIPLE_ID,
"Element %s has too many ID attributes defined : %s\n",
elem->name, cur->name, NULL);
@@ -2058,6 +2063,12 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
* fill the structure.
*/
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) {
ret->name = xmlDictLookup(dict, name, -1);
ret->prefix = xmlDictLookup(dict, ns, -1);
@@ -2102,7 +2113,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
#ifdef LIBXML_VALID_ENABLED
if ((type == XML_ATTRIBUTE_ID) &&
(xmlScanIDAttributeDecl(NULL, elemDef) != 0)) {
(xmlScanIDAttributeDecl(NULL, elemDef, 1) != 0)) {
xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
"Element %s has too may ID attributes defined : %s\n",
elem, name, NULL);
@@ -2145,7 +2156,6 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
* Link it to the DTD
*/
ret->parent = dtd;
ret->doc = dtd->doc;
if (dtd->last == NULL) {
dtd->children = dtd->last = (xmlNodePtr) ret;
} else {
@@ -2693,42 +2703,49 @@ xmlFreeIDTable(xmlIDTablePtr table) {
*/
int
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 (attr == NULL) return(0);
if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
return(0);
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
if (((xmlStrEqual(BAD_CAST "id", attr->name)) ||
(xmlStrEqual(BAD_CAST "name", attr->name))) &&
((elem != NULL) && (!xmlStrEqual(elem->name, BAD_CAST "input"))))
if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
((xmlStrEqual(BAD_CAST "name", attr->name)) &&
((elem == NULL) || (!xmlStrEqual(elem->name, BAD_CAST "input")))))
return(1);
return(0);
} else if (elem == NULL) {
return(0);
} else {
xmlAttributePtr attrDecl;
xmlAttributePtr attrDecl = NULL;
if (elem == NULL) return(0);
if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
if (fullname == NULL)
return(0);
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname,
attr->name);
xmlChar felem[50], fattr[50];
xmlChar *fullelemname, *fullattrname;
fullelemname = (elem->ns != NULL && elem->ns->prefix != NULL) ?
xmlBuildQName(elem->name, elem->ns->prefix, felem, 50) :
(xmlChar *)elem->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))
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname,
attr->name);
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);
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullelemname,
fullattrname);
}
if ((fullattrname != fattr) && (fullattrname != attr->name))
xmlFree(fullattrname);
if ((fullelemname != felem) && (fullelemname != elem->name))
xmlFree(fullelemname);
if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_ID))
return(1);
}
@@ -2768,6 +2785,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
}
xmlHashRemoveEntry(table, ID, (xmlHashDeallocator) xmlFreeID);
xmlFree(ID);
attr->atype = 0;
return(0);
}
@@ -3855,7 +3873,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
if (fullname == NULL)
return(0);
return(NULL);
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
@@ -3940,7 +3958,7 @@ xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
if (fullname == NULL)
return(0);
return(NULL);
attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
if ((attrDecl == NULL) && (doc->extSubset != NULL))
attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
@@ -4037,7 +4055,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset,
attr->elem);
if (elem != NULL) {
nbId = xmlScanIDAttributeDecl(NULL, elem);
nbId = xmlScanIDAttributeDecl(NULL, elem, 0);
} else {
xmlAttributeTablePtr table;
@@ -4046,9 +4064,11 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
* element in the external subset.
*/
nbId = 0;
table = (xmlAttributeTablePtr) doc->intSubset->attributes;
xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
xmlValidateAttributeIdCallback, &nbId);
if (doc->intSubset != NULL) {
table = (xmlAttributeTablePtr) doc->intSubset->attributes;
xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
xmlValidateAttributeIdCallback, &nbId);
}
}
if (nbId > 1) {
@@ -4059,7 +4079,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
int extId = 0;
elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem);
if (elem != NULL) {
extId = xmlScanIDAttributeDecl(NULL, elem);
extId = xmlScanIDAttributeDecl(NULL, elem, 0);
}
if (extId > 1) {
xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
@@ -5846,24 +5866,12 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
NULL,NULL,NULL);
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) {
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
"Text element has namespace !\n",
NULL,NULL,NULL);
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) {
xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
"Text element has no content !\n",
@@ -6288,23 +6296,25 @@ xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
}
ret &= xmlValidateOneElement(ctxt, doc, elem);
attr = elem->properties;
while (attr != NULL) {
value = xmlNodeListGetString(doc, attr->children, 0);
ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
if (value != NULL)
xmlFree((char *)value);
attr= attr->next;
}
ns = elem->nsDef;
while (ns != NULL) {
if (elem->ns == NULL)
ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
ns, ns->href);
else
ret &= xmlValidateOneNamespace(ctxt, doc, elem, elem->ns->prefix,
ns, ns->href);
ns = ns->next;
if (elem->type == XML_ELEMENT_NODE) {
attr = elem->properties;
while (attr != NULL) {
value = xmlNodeListGetString(doc, attr->children, 0);
ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
if (value != NULL)
xmlFree((char *)value);
attr= attr->next;
}
ns = elem->nsDef;
while (ns != NULL) {
if (elem->ns == NULL)
ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
ns, ns->href);
else
ret &= xmlValidateOneNamespace(ctxt, doc, elem,
elem->ns->prefix, ns, ns->href);
ns = ns->next;
}
}
child = elem->children;
while (child != NULL) {
@@ -6752,7 +6762,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
/**
* xmlValidGetPotentialChildren:
* @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
* @max: the size of the array
*
@@ -6762,32 +6772,33 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
*/
int
xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **names,
int *len, int max) {
int i;
if ((ctree == NULL) || (list == NULL) || (len == NULL))
if ((ctree == NULL) || (names == NULL) || (len == NULL))
return(-1);
if (*len >= max) return(*len);
switch (ctree->type) {
case XML_ELEMENT_CONTENT_PCDATA:
for (i = 0; i < *len;i++)
if (xmlStrEqual(BAD_CAST "#PCDATA", list[i])) return(*len);
list[(*len)++] = BAD_CAST "#PCDATA";
if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len);
names[(*len)++] = BAD_CAST "#PCDATA";
break;
case XML_ELEMENT_CONTENT_ELEMENT:
for (i = 0; i < *len;i++)
if (xmlStrEqual(ctree->name, list[i])) return(*len);
list[(*len)++] = ctree->name;
if (xmlStrEqual(ctree->name, names[i])) return(*len);
names[(*len)++] = ctree->name;
break;
case XML_ELEMENT_CONTENT_SEQ:
xmlValidGetPotentialChildren(ctree->c1, list, len, max);
xmlValidGetPotentialChildren(ctree->c2, list, len, max);
xmlValidGetPotentialChildren(ctree->c1, names, len, max);
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
break;
case XML_ELEMENT_CONTENT_OR:
xmlValidGetPotentialChildren(ctree->c1, list, len, max);
xmlValidGetPotentialChildren(ctree->c2, list, len, max);
xmlValidGetPotentialChildren(ctree->c1, names, len, max);
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
break;
}
@@ -6797,7 +6808,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
/*
* 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, ...) {
return;
}

View File

@@ -237,7 +237,7 @@ xmlXIncludeNewRef(xmlXIncludeCtxtPtr ctxt, const xmlChar *URI,
ret->URI = xmlStrdup(URI);
ret->fragment = NULL;
ret->ref = ref;
ret->doc = 0;
ret->doc = NULL;
ret->count = 0;
ret->xml = 0;
ret->inc = NULL;
@@ -360,7 +360,7 @@ xmlXIncludeURLPop(xmlXIncludeCtxtPtr ctxt)
else
ctxt->url = NULL;
ret = ctxt->urlTab[ctxt->urlNr];
ctxt->urlTab[ctxt->urlNr] = 0;
ctxt->urlTab[ctxt->urlNr] = NULL;
if (ret != NULL)
xmlFree(ret);
}
@@ -388,9 +388,11 @@ xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
if (ctxt->incTab[i] != NULL)
xmlXIncludeFreeRef(ctxt->incTab[i]);
}
for (i = 0;i < ctxt->txtNr;i++) {
if (ctxt->txturlTab[i] != NULL)
xmlFree(ctxt->txturlTab[i]);
if (ctxt->txturlTab != NULL) {
for (i = 0;i < ctxt->txtNr;i++) {
if (ctxt->txturlTab[i] != NULL)
xmlFree(ctxt->txturlTab[i]);
}
}
if (ctxt->incTab != NULL)
xmlFree(ctxt->incTab);
@@ -609,7 +611,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
/*
* Check the URL against the stack for recursions
*/
if (!local) {
if ((!local) && (xml == 1)) {
for (i = 0;i < ctxt->urlNr;i++) {
if (xmlStrEqual(URL, ctxt->urlTab[i])) {
xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
@@ -1401,9 +1403,14 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
URL = xmlSaveUri(uri);
xmlFreeURI(uri);
if (URL == NULL) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI,
"invalid value URI %s\n", url);
if (ctxt->incTab != NULL)
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
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)
xmlFree(fragment);
return(-1);
@@ -1663,32 +1670,81 @@ loaded:
*/
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
xmlNodePtr node;
xmlChar *relURI;
xmlChar *base;
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);
if (relURI == NULL) { /* Error return */
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
base = xmlGetNsProp(ctxt->incTab[nr]->ref, BAD_CAST "base",
XML_XML_NAMESPACE);
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,
"trying to build relative URI from %s\n", URL);
} else {
if (xmlStrchr(relURI, (xmlChar) '/')) {
node = ctxt->incTab[nr]->inc;
while (node != NULL) {
if (node->type == XML_ELEMENT_NODE) {
curBase = xmlNodeGetBase(node->doc, node);
if ((curBase == NULL) || xmlStrEqual(curBase, node->doc->URL))
xmlNodeSetBase(node, relURI);
if (curBase != NULL)
xmlFree(curBase);
}
node = node->next;
}
} else {
/* If the URI doesn't contain a slash, it's not relative */
if (!xmlStrchr(curBase, (xmlChar) '/'))
xmlFree(curBase);
else
base = curBase;
}
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) &&
@@ -1719,7 +1775,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
xmlNodePtr node;
xmlURIPtr uri;
xmlChar *URL;
size_t i;
int i;
xmlChar *encoding = NULL;
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
*/
while (xmlParserInputBufferRead(buf, 128) > 0) {
size_t len;
int len;
const xmlChar *content;
content = xmlBufferContent(buf->buffer);
@@ -1903,7 +1959,7 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
static xmlNodePtr
xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
xmlXIncludeAddNode(ctxt, node);
return(0);
return(NULL);
}
/**
@@ -2254,7 +2310,7 @@ static int
xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
xmlNodePtr cur;
int ret = 0;
int i;
int i, start;
if ((doc == NULL) || (tree == NULL))
return(-1);
@@ -2266,6 +2322,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
if (ret < 0)
return(-1);
}
start = ctxt->incNr;
/*
* 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
*/
for (i = ctxt->incBase;i < ctxt->incNr; i++) {
for (i = start;i < ctxt->incNr; i++) {
xmlXIncludeLoadNode(ctxt, i);
ret++;
}

View File

@@ -36,6 +36,10 @@
#include <zlib.h>
#endif
#ifdef WIN32
#include <windows.h>
#endif
/* Figure a portable way to know if a file is a directory. */
#ifndef HAVE_STAT
# ifdef HAVE__STAT
@@ -189,6 +193,39 @@ static const char *IOerr[] = {
"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:
* @extra: extra informations
@@ -553,22 +590,44 @@ int
xmlCheckFilename (const char *path)
{
#ifdef HAVE_STAT
struct stat stat_buffer;
if (path == NULL)
return(0);
struct stat stat_buffer;
#endif
if (path == NULL)
return(0);
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
{
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)
return 0;
#ifdef S_ISDIR
if (S_ISDIR(stat_buffer.st_mode)) {
if (S_ISDIR(stat_buffer.st_mode))
return 2;
}
#endif
#endif
if (path == NULL)
return(0);
#endif /* S_ISDIR */
#endif /* HAVE_STAT */
#endif /* WIN32 */
return 1;
}
@@ -588,11 +647,11 @@ xmlNop(void) {
*
* Returns the number of bytes written
*/
static intptr_t
xmlFdRead (void * context, char * buffer, size_t len) {
intptr_t ret;
static int
xmlFdRead (void * context, char * buffer, int len) {
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()");
return(ret);
}
@@ -608,12 +667,14 @@ xmlFdRead (void * context, char * buffer, size_t len) {
*
* Returns the number of bytes written
*/
static intptr_t
xmlFdWrite (void * context, const char * buffer, size_t len) {
intptr_t ret;
static int
xmlFdWrite (void * context, const char * buffer, int len) {
int ret = 0;
ret = write((int) (size_t) context, &buffer[0], (unsigned int) len);
if (ret < 0) xmlIOErr(0, "write()");
if (len > 0) {
ret = write((int) (long) context, &buffer[0], len);
if (ret < 0) xmlIOErr(0, "write()");
}
return(ret);
}
#endif /* LIBXML_OUTPUT_ENABLED */
@@ -629,7 +690,7 @@ xmlFdWrite (void * context, const char * buffer, size_t len) {
static int
xmlFdClose (void * context) {
int ret;
ret = close((int) (size_t) context);
ret = close((int) (long) context);
if (ret < 0) xmlIOErr(0, "close()");
return(ret);
}
@@ -690,7 +751,18 @@ xmlFileOpen_real (const char *filename) {
return(NULL);
#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
fd = fopen(path, "r");
#endif /* WIN32 */
@@ -760,8 +832,24 @@ xmlFileOpenW (const char *filename) {
if (path == NULL)
return(NULL);
fd = fopen(path, "wb");
if (fd == NULL) xmlIOErr(0, path);
#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
{
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);
}
#endif /* LIBXML_OUTPUT_ENABLED */
@@ -776,9 +864,9 @@ xmlFileOpenW (const char *filename) {
*
* Returns the number of bytes written or < 0 in case of failure
*/
intptr_t
xmlFileRead (void * context, char * buffer, size_t len) {
intptr_t ret;
int
xmlFileRead (void * context, char * buffer, int len) {
int ret;
if ((context == NULL) || (buffer == NULL))
return(-1);
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
*/
static intptr_t
xmlFileWrite (void * context, const char * buffer, size_t len) {
size_t items;
static int
xmlFileWrite (void * context, const char * buffer, int len) {
int items;
if ((context == NULL) || (buffer == NULL))
return(-1);
@@ -860,6 +948,28 @@ xmlFileFlush (void * context) {
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
/************************************************************************
* *
@@ -1206,7 +1316,7 @@ xmlCreateZMemBuff( int compression ) {
}
/* 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,
"%c%c%c%c%c%c%c%c%c%c",
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.
*/
intptr_t
int
xmlOutputBufferClose(xmlOutputBufferPtr out)
{
intptr_t written;
intptr_t err_rc = 0;
int written;
int err_rc = 0;
if (out == NULL)
return (-1);
@@ -2250,9 +2360,9 @@ __xmlOutputBufferCreateFilename(const char *URI,
puri = xmlParseURI(URI);
if (puri != NULL) {
#ifdef HAVE_ZLIB_H
if ((puri->scheme != NULL) &&
(!xmlStrEqual(BAD_CAST puri->scheme, BAD_CAST "file")))
#ifdef HAVE_ZLIB_H
is_file_uri = 0;
#endif
/*
@@ -2436,6 +2546,31 @@ xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) {
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 */
/**
@@ -2456,7 +2591,7 @@ xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
ret = xmlAllocParserInputBuffer(enc);
if (ret != NULL) {
ret->context = (void *) (intptr_t) fd;
ret->context = (void *) (long) fd;
ret->readcallback = xmlFdRead;
ret->closecallback = xmlFdClose;
}
@@ -2476,7 +2611,7 @@ xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
* Returns the new parser input or NULL
*/
xmlParserInputBufferPtr
xmlParserInputBufferCreateMem(const char *mem, intptr_t size, xmlCharEncoding enc) {
xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
xmlParserInputBufferPtr ret;
int errcode;
@@ -2512,7 +2647,7 @@ xmlParserInputBufferCreateMem(const char *mem, intptr_t size, xmlCharEncoding en
* Returns the new parser input or NULL
*/
xmlParserInputBufferPtr
xmlParserInputBufferCreateStatic(const char *mem, intptr_t size,
xmlParserInputBufferCreateStatic(const char *mem, int size,
xmlCharEncoding enc) {
xmlParserInputBufferPtr ret;
@@ -2536,11 +2671,11 @@ xmlParserInputBufferCreateStatic(const char *mem, intptr_t size,
else
ret->raw = NULL;
ret->compressed = -1;
ret->context = (void*) mem;
ret->context = (void *) mem;
ret->readcallback = NULL;
ret->closecallback = NULL;
return ret;
return(ret);
}
#ifdef LIBXML_OUTPUT_ENABLED
@@ -2562,7 +2697,7 @@ xmlOutputBufferCreateFd(int fd, xmlCharEncodingHandlerPtr encoder) {
ret = xmlAllocOutputBuffer(encoder);
if (ret != NULL) {
ret->context = (void *) (intptr_t) fd;
ret->context = (void *) (long) fd;
ret->writecallback = xmlFdWrite;
ret->closecallback = NULL;
}
@@ -2686,16 +2821,16 @@ xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
* Returns the number of chars read and stored in the buffer, or -1
* in case of error.
*/
intptr_t
int
xmlParserInputBufferPush(xmlParserInputBufferPtr in,
intptr_t len, const char *buf) {
intptr_t nbchars = 0;
intptr_t ret;
int len, const char *buf) {
int nbchars = 0;
int ret;
if (len < 0) return(0);
if ((in == NULL) || (in->error)) return(-1);
if (in->encoder != NULL) {
size_t use;
unsigned int use;
/*
* 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
* don't reread from it again.
*/
static intptr_t
static int
endOfInput (void * context ATTRIBUTE_UNUSED,
char * buffer ATTRIBUTE_UNUSED,
size_t len ATTRIBUTE_UNUSED) {
int len ATTRIBUTE_UNUSED) {
return(0);
}
@@ -2760,13 +2895,13 @@ endOfInput (void * context ATTRIBUTE_UNUSED,
* Returns the number of chars read and stored in the buffer, or -1
* in case of error.
*/
intptr_t
xmlParserInputBufferGrow(xmlParserInputBufferPtr in, intptr_t len) {
int
xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
char *buffer = NULL;
intptr_t res = 0;
intptr_t nbchars = 0;
intptr_t buffree;
size_t needSize;
int res = 0;
int nbchars = 0;
int buffree;
unsigned int needSize;
if ((in == NULL) || (in->error)) return(-1);
if ((len <= MINLEN) && (len != 4))
@@ -2806,7 +2941,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, intptr_t len) {
}
len = res;
if (in->encoder != NULL) {
size_t use;
unsigned int use;
/*
* 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
* in case of error.
*/
intptr_t
xmlParserInputBufferRead(xmlParserInputBufferPtr in, intptr_t len) {
int
xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) {
if ((in == NULL) || (in->error)) return(-1);
if (in->readcallback != NULL)
return(xmlParserInputBufferGrow(in, len));
@@ -2881,12 +3016,12 @@ xmlParserInputBufferRead(xmlParserInputBufferPtr in, intptr_t len) {
* Returns the number of chars immediately written, or -1
* in case of error.
*/
intptr_t
xmlOutputBufferWrite(xmlOutputBufferPtr out, intptr_t len, const char *buf) {
intptr_t nbchars = 0; /* number of chars to output to I/O */
intptr_t ret; /* return from function call */
intptr_t written = 0; /* number of char written to I/O so far */
intptr_t chunk; /* number of byte curreent processed from buf */
int
xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
int nbchars = 0; /* number of chars to output to I/O */
int ret; /* return from function call */
int written = 0; /* number of char written to I/O so far */
int chunk; /* number of byte curreent processed from buf */
if ((out == NULL) || (out->error)) return(-1);
if (len < 0) return(0);
@@ -2982,9 +3117,9 @@ done:
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
static intptr_t
xmlEscapeContent(unsigned char* out, intptr_t* outlen,
const xmlChar* in, intptr_t* inlen) {
static int
xmlEscapeContent(unsigned char* out, int *outlen,
const xmlChar* in, int *inlen) {
unsigned char* outstart = out;
const unsigned char* base = in;
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
* in case of error.
*/
intptr_t
int
xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
xmlCharEncodingOutputFunc escaping) {
intptr_t nbchars = 0; /* number of chars to output to I/O */
intptr_t ret; /* return from function call */
intptr_t written = 0; /* number of char written to I/O so far */
intptr_t oldwritten=0;/* loop guard */
intptr_t chunk; /* number of byte currently processed from str */
intptr_t len; /* number of bytes in str */
intptr_t cons; /* byte from str consumed */
int nbchars = 0; /* number of chars to output to I/O */
int ret; /* return from function call */
int written = 0; /* number of char written to I/O so far */
int oldwritten=0;/* loop guard */
int chunk; /* number of byte currently processed from str */
int len; /* number of bytes in str */
int cons; /* byte from str consumed */
if ((out == NULL) || (out->error) || (str == NULL) ||
(out->buffer == NULL) ||
@@ -3165,9 +3300,9 @@ done:
* Returns the number of chars immediately written, or -1
* in case of error.
*/
intptr_t
int
xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) {
size_t len;
int len;
if ((out == NULL) || (out->error)) return(-1);
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.
*/
intptr_t
int
xmlOutputBufferFlush(xmlOutputBufferPtr out) {
intptr_t nbchars = 0, ret = 0;
int nbchars = 0, ret = 0;
if ((out == NULL) || (out->error)) return(-1);
/*
@@ -3279,7 +3414,7 @@ xmlParserGetDirectory(const char *filename) {
if (getcwd(dir, 1024) != NULL) {
dir[1023] = 0;
ret = xmlMemStrdup(dir);
}
}
}
return(ret);
}
@@ -3533,7 +3668,6 @@ xmlGetExternalEntityLoader(void) {
*
* Load an external entity, note that the use of this function for
* unparsed entities may generate problems
* TODO: a more generic External entity API must be designed
*
* Returns the xmlParserInputPtr or NULL
*/

View File

@@ -120,7 +120,10 @@ static void usershell(void) {
command[i++] = *cur++;
}
command[i] = 0;
if (i == 0) continue;
if (i == 0) {
free(cmdline);
continue;
}
nbargs++;
/*

View File

@@ -49,9 +49,9 @@
#include <libxml/threads.h>
static int xmlMemInitialized = 0;
static size_t debugMemSize = 0;
static size_t debugMemBlocks = 0;
static size_t debugMaxMemSize = 0;
static unsigned long debugMemSize = 0;
static unsigned long debugMemBlocks = 0;
static unsigned long debugMaxMemSize = 0;
static xmlMutexPtr xmlMemMutex = NULL;
void xmlMallocBreakpoint(void);
@@ -309,7 +309,7 @@ xmlMemMalloc(size_t size)
*/
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;
unsigned long number;
@@ -325,6 +325,7 @@ xmlReallocLoc(void *ptr, size_t size, const char * file, int line)
p = CLIENT_2_HDR(ptr);
number = p->mh_number;
if (xmlMemStopAtBlock == number) xmlMallocBreakpoint();
if (p->mh_tag != MEMTAG) {
Mem_Tag_Err(p);
goto error;
@@ -429,6 +430,7 @@ xmlMemFree(void *ptr)
Mem_Tag_Err(p);
goto error;
}
if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
p->mh_tag = ~MEMTAG;
memset(target, -1, p->mh_size);
xmlMutexLock(xmlMemMutex);
@@ -455,7 +457,7 @@ xmlMemFree(void *ptr)
error:
xmlGenericError(xmlGenericErrorContext,
"xmlMemFree(%lX) error\n", (unsigned long) (size_t) ptr);
"xmlMemFree(%lX) error\n", (unsigned long) ptr);
xmlMallocBreakpoint();
return;
}
@@ -545,7 +547,7 @@ xmlMemoryStrdup(const char *str) {
* Returns an int representing the amount of memory allocated.
*/
size_t
int
xmlMemUsed(void) {
return(debugMemSize);
}
@@ -558,7 +560,7 @@ xmlMemUsed(void) {
* Returns an int representing the number of blocks
*/
size_t
int
xmlMemBlocks(void) {
return(debugMemBlocks);
}
@@ -640,7 +642,18 @@ xmlMemDisplay(FILE *fp)
time_t currentTime;
char buf[500];
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);
tstruct = localtime(&currentTime);
strftime(buf, sizeof(buf) - 1, "%I:%M:%S %p", tstruct);
@@ -666,6 +679,8 @@ xmlMemDisplay(FILE *fp)
default:
fprintf(fp,"Unknown memory block, may be corrupted");
xmlMutexUnlock(xmlMemMutex);
if (old_fp == NULL)
fclose(fp);
return;
}
if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
@@ -684,6 +699,8 @@ xmlMemDisplay(FILE *fp)
#else
fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
#endif
if (old_fp == NULL)
fclose(fp);
}
#ifdef MEM_LIST

View File

@@ -85,7 +85,7 @@ xmlModuleOpen(const char *name, int options ATTRIBUTE_UNUSED)
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
name, NULL, 0, 0, "failed to open %s\n", name);
return 0;
return(NULL);
}
module->name = xmlStrdup((const xmlChar *) name);
@@ -179,7 +179,7 @@ xmlModuleFree(xmlModulePtr module)
{
if (NULL == 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");
return -1;
}
@@ -195,6 +195,10 @@ xmlModuleFree(xmlModulePtr module)
#include <dlfcn.h>
#endif
#ifndef RTLD_GLOBAL /* For Tru64 UNIX 4.0 */
#define RTLD_GLOBAL 0
#endif
/**
* xmlModulePlatformOpen:
* @name: path to the module
@@ -277,10 +281,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
int rc;
errno = 0;
rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol);
if ((-1 == rc) && (0 == errno)) {
rc = shl_findsym(handle, name, TYPE_DATA, symbol);
}
rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol);
return rc;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -84,8 +84,8 @@ struct _xmlSaveCtxt {
int level;
int format;
char indent[MAX_INDENT + 1]; /* array for indenting output */
intptr_t indent_nr;
intptr_t indent_size;
int indent_nr;
int indent_size;
xmlCharEncodingOutputFunc escape; /* used for element 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.
* The value of @outlen after return is the number of octets consumed.
*/
static intptr_t
xmlEscapeEntities(unsigned char* out, intptr_t* outlen,
const xmlChar* in, intptr_t* inlen) {
static int
xmlEscapeEntities(unsigned char* out, int *outlen,
const xmlChar* in, int *inlen) {
unsigned char* outstart = out;
const unsigned char* base = in;
unsigned char* outend = out + *outlen;
@@ -326,7 +326,8 @@ error:
static void
xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
{
intptr_t i, len;
int i;
int len;
if (ctxt == NULL) return;
if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
@@ -342,6 +343,10 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
ctxt->indent_size);
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));
/*
* Use the options
*/
ret->options = options;
if (options & XML_SAVE_FORMAT)
ret->format = 1;
if (encoding != NULL) {
ret->handler = xmlFindCharEncodingHandler(encoding);
if (ret->handler == NULL) {
@@ -398,6 +396,19 @@ xmlNewSaveCtxt(const char *encoding, int options)
}
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);
}
@@ -714,21 +725,26 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
return;
}
if (cur->type == XML_CDATA_SECTION_NODE) {
start = end = cur->content;
while (*end != '\0') {
if ((*end == ']') && (*(end + 1) == ']') && (*(end + 2) == '>')) {
end = end + 2;
xmlOutputBufferWrite(buf, 9, "<![CDATA[");
xmlOutputBufferWrite(buf, end - start, (const char *)start);
xmlOutputBufferWrite(buf, 3, "]]>");
start = end;
if (cur->content == NULL) {
xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
} else {
start = end = cur->content;
while (*end != '\0') {
if ((*end == ']') && (*(end + 1) == ']') &&
(*(end + 2) == '>')) {
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;
}
@@ -767,7 +783,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlAttrListDumpOutput(ctxt, cur->properties);
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, "/>");
ctxt->format = format;
return;
@@ -820,43 +836,41 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
cur->encoding = BAD_CAST ctxt->encoding;
buf = ctxt->buf;
xmlOutputBufferWrite(buf, 14, "<?xml version=");
if (cur->version != NULL)
xmlBufferWriteQuotedString(buf->buffer, cur->version);
else
xmlOutputBufferWrite(buf, 5, "\"1.0\"");
if (ctxt->encoding == NULL) {
if (cur->encoding != NULL)
encoding = cur->encoding;
else if (cur->charset != XML_CHAR_ENCODING_UTF8)
encoding = (const xmlChar *)
xmlGetCharEncodingName((xmlCharEncoding) cur->charset);
if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
xmlOutputBufferWrite(buf, 14, "<?xml version=");
if (cur->version != NULL)
xmlBufferWriteQuotedString(buf->buffer, cur->version);
else
xmlOutputBufferWrite(buf, 5, "\"1.0\"");
if (ctxt->encoding == NULL) {
if (cur->encoding != NULL)
encoding = cur->encoding;
else if (cur->charset != XML_CHAR_ENCODING_UTF8)
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
dtd = xmlGetIntSubset(cur);
if (dtd != NULL) {
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");
if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) {
dtd = xmlGetIntSubset(cur);
if (dtd != NULL) {
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
if (is_xhtml < 0) is_xhtml = 0;
}
}
#endif
if (cur->children != NULL) {
@@ -1078,12 +1092,17 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
*/
static void
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
int format;
int format, addmeta = 0;
xmlNodePtr tmp;
xmlChar *start, *end;
xmlOutputBufferPtr buf;
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)
return;
if (cur->type == XML_XINCLUDE_END)
@@ -1092,6 +1111,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
return;
}
if (cur->type == XML_DOCUMENT_FRAG_NODE) {
xhtmlNodeListDumpOutput(ctxt, cur->children);
return;
}
buf = ctxt->buf;
if (cur->type == XML_ELEMENT_DECL) {
xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
@@ -1202,18 +1225,66 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (cur->properties != NULL)
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->ns == NULL) || (cur->ns->prefix == NULL)) &&
(xhtmlIsEmpty(cur) == 1)) {
((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) {
/*
* C.2. Empty Elements
*/
xmlOutputBufferWrite(buf, 3, " />");
} 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
*/
xmlOutputBufferWrite(buf, 3, "></");
xmlOutputBufferWrite(buf, 2, "</");
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
xmlOutputBufferWrite(buf, 1, ":");
@@ -1224,6 +1295,23 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
return;
}
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)) {
xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
}
@@ -1239,25 +1327,26 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlNodePtr child = cur->children;
while (child != NULL) {
if ((child->type == XML_TEXT_NODE) ||
(child->type == XML_CDATA_SECTION_NODE)) {
/*
* Apparently CDATA escaping for style just break on IE,
* mozilla and galeon, so ...
*/
if (xmlStrEqual(cur->name, BAD_CAST "style") &&
(xmlStrchr(child->content, '<') == NULL) &&
(xmlStrchr(child->content, '>') == NULL) &&
(xmlStrchr(child->content, '&') == NULL)) {
if (child->type == XML_TEXT_NODE) {
if ((xmlStrchr(child->content, '<') == NULL) &&
(xmlStrchr(child->content, '&') == NULL) &&
(xmlStrstr(child->content, BAD_CAST "]]>") == NULL)) {
/* Nothing to escape, so just output as is... */
/* FIXME: Should we do something about "--" also? */
int level = ctxt->level;
int indent = ctxt->format;
ctxt->level = 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->format = indent;
} 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;
while (*end != '\0') {
if (*end == ']' &&
@@ -1388,13 +1477,36 @@ xmlSaveToFilename(const char *filename, const char *encoding, int options)
* with the encoding and the options given
*
* Returns a new serialization context or NULL in case of error.
*/
xmlSaveCtxtPtr
xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
{
TODO
return(NULL);
xmlSaveCtxtPtr ret;
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:
@@ -1477,7 +1589,7 @@ xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr node)
*
* Returns the number of byte written or -1 in case of error.
*/
intptr_t
int
xmlSaveFlush(xmlSaveCtxtPtr ctxt)
{
if (ctxt == NULL) return(-1);
@@ -1494,10 +1606,10 @@ xmlSaveFlush(xmlSaveCtxtPtr ctxt)
*
* Returns the number of byte written or -1 in case of error.
*/
intptr_t
int
xmlSaveClose(xmlSaveCtxtPtr ctxt)
{
intptr_t ret;
int ret;
if (ctxt == NULL) return(-1);
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
*/
intptr_t
int
xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
int format)
{
size_t use;
intptr_t ret;
unsigned int use;
int ret;
xmlOutputBufferPtr outbuf;
xmlInitParser();
@@ -1716,7 +1828,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
xmlSaveErrMemory("creating buffer");
return (-1);
}
memset(outbuf, 0, sizeof(xmlOutputBuffer));
memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
outbuf->buffer = buf;
outbuf->encoder = NULL;
outbuf->writecallback = NULL;
@@ -1728,7 +1840,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL);
xmlFree(outbuf);
ret = buf->use - use;
return ret;
return (ret);
}
/**
@@ -1821,18 +1933,9 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
#ifdef LIBXML_HTML_ENABLED
dtd = xmlGetIntSubset(doc);
if (dtd != NULL) {
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
if (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");
}
is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
if (is_xhtml < 0)
is_xhtml = 0;
}
if (is_xhtml)
@@ -1859,7 +1962,7 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
void
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) {
xmlSaveCtxt ctxt;
int dummy = 0;
@@ -1978,7 +2081,7 @@ xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
void
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,
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
* or xmlKeepBlanksDefault(0) was called
*/
intptr_t
int
xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
xmlSaveCtxt ctxt;
xmlOutputBufferPtr buf;
const char * encoding;
xmlCharEncodingHandlerPtr handler = NULL;
intptr_t ret;
int ret;
if (cur == NULL) {
#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.
*/
intptr_t
int
xmlDocDump(FILE *f, xmlDocPtr cur) {
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.
*/
intptr_t
int
xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
xmlSaveCtxt ctxt;
intptr_t ret;
int ret;
if (buf == NULL) return(-1);
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.
*/
intptr_t
int
xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
const char *encoding, int format)
{
xmlSaveCtxt ctxt;
intptr_t ret;
int ret;
if (buf == NULL) return(-1);
if ((cur == NULL) ||
@@ -2134,13 +2237,13 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
* or xmlKeepBlanksDefault(0) was called
*/
intptr_t
int
xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
const char * encoding, int format ) {
xmlSaveCtxt ctxt;
xmlOutputBufferPtr buf;
xmlCharEncodingHandlerPtr handler = NULL;
intptr_t ret;
int ret;
if (cur == NULL)
return(-1);
@@ -2188,7 +2291,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
*
* returns: the number of bytes written or -1 in case of failure.
*/
intptr_t
int
xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
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.
*/
intptr_t
int
xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) );
}
@@ -2222,7 +2325,7 @@ xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
* used.
* returns: the number of bytes written or -1 in case of failure.
*/
intptr_t
int
xmlSaveFile(const char *filename, xmlDocPtr cur) {
return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
}

View File

@@ -38,7 +38,7 @@
* Returns a new xmlChar * or NULL
*/
xmlChar *
xmlStrndup(const xmlChar *cur, intptr_t len) {
xmlStrndup(const xmlChar *cur, int len) {
xmlChar *ret;
if ((cur == NULL) || (len < 0)) return(NULL);
@@ -82,8 +82,8 @@ xmlStrdup(const xmlChar *cur) {
*/
xmlChar *
xmlCharStrndup(const char *cur, intptr_t len) {
intptr_t i;
xmlCharStrndup(const char *cur, int len) {
int i;
xmlChar *ret;
if ((cur == NULL) || (len < 0)) return(NULL);
@@ -128,9 +128,9 @@ xmlCharStrdup(const char *cur) {
* Returns the integer result of the comparison
*/
intptr_t
int
xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
register intptr_t tmp;
register int tmp;
if (str1 == str2) return(0);
if (str1 == NULL) return(-1);
@@ -147,13 +147,13 @@ xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
* @str1: the first xmlChar *
* @str2: the second xmlChar *
*
* Check if both string are equal of have same content
* Should be a bit more readable and faster than xmlStrEqual()
* Check if both strings are equal of have same content.
* Should be a bit more readable and faster than xmlStrcmp()
*
* Returns 1 if they are equal, 0 if they are different
*/
intptr_t
int
xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
if (str1 == str2) return(1);
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
*/
intptr_t
int
xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str) {
if (pref == NULL) return(xmlStrEqual(name, str));
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
*/
intptr_t
xmlStrncmp(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
register intptr_t tmp;
int
xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) {
register int tmp;
if (len <= 0) return(0);
if (str1 == str2) return(0);
@@ -267,9 +267,9 @@ static const xmlChar casemap[256] = {
* Returns the integer result of the comparison
*/
intptr_t
int
xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
register intptr_t tmp;
register int tmp;
if (str1 == str2) return(0);
if (str1 == NULL) return(-1);
@@ -292,9 +292,9 @@ xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
* Returns the integer result of the comparison
*/
intptr_t
xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
register intptr_t tmp;
int
xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len) {
register int tmp;
if (len <= 0) return(0);
if (str1 == str2) return(0);
@@ -339,7 +339,7 @@ xmlStrchr(const xmlChar *str, xmlChar val) {
const xmlChar *
xmlStrstr(const xmlChar *str, const xmlChar *val) {
intptr_t n;
int n;
if (str == NULL) return(NULL);
if (val == NULL) return(NULL);
@@ -367,7 +367,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) {
const xmlChar *
xmlStrcasestr(const xmlChar *str, xmlChar *val) {
intptr_t n;
int n;
if (str == NULL) return(NULL);
if (val == NULL) return(NULL);
@@ -394,8 +394,8 @@ xmlStrcasestr(const xmlChar *str, xmlChar *val) {
*/
xmlChar *
xmlStrsub(const xmlChar *str, intptr_t start, intptr_t len) {
intptr_t i;
xmlStrsub(const xmlChar *str, int start, int len) {
int i;
if (str == NULL) 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.
*/
intptr_t
int
xmlStrlen(const xmlChar *str) {
intptr_t len = 0;
int len = 0;
if (str == NULL) return(0);
while (*str != 0) { /* non input consuming */
@@ -437,19 +437,22 @@ xmlStrlen(const xmlChar *str) {
* @len: the length of @add
*
* 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
* and should not be freed
*/
xmlChar *
xmlStrncat(xmlChar *cur, const xmlChar *add, intptr_t len) {
intptr_t size;
xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
int size;
xmlChar *ret;
if ((add == NULL) || (len == 0))
return(cur);
if (len < 0)
return(NULL);
if (cur == NULL)
return(xmlStrndup(add, len));
@@ -468,16 +471,17 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, intptr_t len) {
* xmlStrncatNew:
* @str1: first 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
* 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
*/
xmlChar *
xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, intptr_t len) {
intptr_t size;
xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
int size;
xmlChar *ret;
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.
*/
intptr_t
xmlStrPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, ...) {
int XMLCDECL
xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
va_list args;
intptr_t ret;
int ret;
if((buf == NULL) || (msg == NULL)) {
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.
*/
intptr_t
xmlStrVPrintf(xmlChar *buf, intptr_t len, const xmlChar *msg, va_list ap) {
intptr_t ret;
int
xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) {
int ret;
if((buf == NULL) || (msg == NULL)) {
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
*/
intptr_t
int
xmlUTF8Size(const xmlChar *utf) {
xmlChar mask;
intptr_t len;
int len;
if (utf == NULL)
return -1;
@@ -630,7 +634,7 @@ xmlUTF8Size(const xmlChar *utf) {
*
* returns result of the compare as with xmlStrncmp
*/
intptr_t
int
xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) {
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
*/
intptr_t
int
xmlUTF8Strlen(const xmlChar *utf) {
intptr_t ret = 0;
int ret = 0;
if (utf == NULL)
return(-1);
@@ -694,11 +698,16 @@ xmlUTF8Strlen(const xmlChar *utf) {
* 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)
*/
intptr_t
xmlGetUTF8Char(const unsigned char* utf, intptr_t* len) {
size_t c;
int
xmlGetUTF8Char(const unsigned char *utf, int *len) {
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];
if (c & 0x80) {
@@ -760,10 +769,10 @@ error:
*
* Return value: true if @utf is valid.
**/
intptr_t
int
xmlCheckUTF8(const unsigned char *utf)
{
intptr_t ix;
int ix;
unsigned char c;
if (utf == NULL)
@@ -812,8 +821,8 @@ xmlCheckUTF8(const unsigned char *utf)
* the first 'len' characters of ARRAY
*/
intptr_t
xmlUTF8Strsize(const xmlChar *utf, intptr_t len) {
int
xmlUTF8Strsize(const xmlChar *utf, int len) {
const xmlChar *ptr=utf;
xmlChar ch;
@@ -846,9 +855,9 @@ xmlUTF8Strsize(const xmlChar *utf, intptr_t len) {
* Returns a new UTF8 * or NULL
*/
xmlChar *
xmlUTF8Strndup(const xmlChar *utf, intptr_t len) {
xmlUTF8Strndup(const xmlChar *utf, int len) {
xmlChar *ret;
intptr_t i;
int i;
if ((utf == NULL) || (len < 0)) return(NULL);
i = xmlUTF8Strsize(utf, len);
@@ -875,7 +884,7 @@ xmlUTF8Strndup(const xmlChar *utf, intptr_t len) {
* Returns a pointer to the UTF8 character or NULL
*/
const xmlChar *
xmlUTF8Strpos(const xmlChar *utf, intptr_t pos) {
xmlUTF8Strpos(const xmlChar *utf, int pos) {
xmlChar ch;
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
* or -1 if not found
*/
intptr_t
int
xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
intptr_t i, size;
int i, size;
xmlChar ch;
if (utf==NULL || utfchar==NULL) return -1;
@@ -944,8 +953,8 @@ xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
*/
xmlChar *
xmlUTF8Strsub(const xmlChar *utf, intptr_t start, intptr_t len) {
intptr_t i;
xmlUTF8Strsub(const xmlChar *utf, int start, int len) {
int i;
xmlChar ch;
if (utf == NULL) return(NULL);

View File

@@ -3,11 +3,11 @@
*
* This file is automatically generated from the
* 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.
*
* Generation date: Mon Nov 10 22:35:10 2003
* Sources: Blocks-4.0.1d1b.txt UnicodeData-4.0.1d1b.txt
* Generation date: Mon Mar 27 11:09:52 2006
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
* Daniel Veillard <veillard@redhat.com>
*/
@@ -204,95 +204,95 @@ static xmlUnicodeRange xmlUnicodeCats[] = {
{"Zp", xmlUCSIsCatZp},
{"Zs", xmlUCSIsCatZs}};
static xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f}, {0xad, 0xad},
{0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5},
{0x200c, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f},
{0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00}, {0xdfff, 0xe000},
{0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
static xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
static const xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f},
{0xad, 0xad}, {0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f},
{0x17b4, 0x17b5}, {0x200b, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063},
{0x206a, 0x206f}, {0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00},
{0xdfff, 0xe000}, {0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
static const xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
{0xe0020, 0xe007f}, {0xf0000, 0xf0000}, {0xffffd, 0xffffd},
{0x100000, 0x100000}, {0x10fffd, 0x10fffd} };
static xmlChRangeGroup xmlCG = {18,7,xmlCS,xmlCL};
static xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
{0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200c, 0x200f},
static const xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
{0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200b, 0x200f},
{0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f}, {0xfeff, 0xfeff},
{0xfff9, 0xfffb} };
static xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
static const xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
{0xe0020, 0xe007f} };
static xmlChRangeGroup xmlCfG = {11,3,xmlCfS,xmlCfL};
static xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a}, {0xaa, 0xaa},
{0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6}, {0xf8, 0x236},
{0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x2ee, 0x2ee},
{0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5}, {0x3f7, 0x3fb},
{0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5}, {0x4f8, 0x4f9},
{0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559}, {0x561, 0x587},
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x640, 0x64a},
{0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6},
{0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710},
{0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5}, {0x7b1, 0x7b1},
{0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950}, {0x958, 0x961},
{0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0},
{0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd}, {0x9dc, 0x9dd},
{0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10},
{0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36},
{0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74},
{0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0},
{0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0},
{0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28},
{0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3d, 0xb3d},
{0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83},
{0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a},
{0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa},
{0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10},
{0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61},
{0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3},
{0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde}, {0xce0, 0xce1},
{0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28}, {0xd2a, 0xd39},
{0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
{0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe33},
{0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe87, 0xe88},
{0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97}, {0xe99, 0xe9f},
{0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7}, {0xeaa, 0xeab},
{0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4},
{0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00}, {0xf40, 0xf47},
{0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021}, {0x1023, 0x1027},
{0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5}, {0x10d0, 0x10f8},
{0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9}, {0x1200, 0x1206},
{0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256},
{0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286}, {0x1288, 0x1288},
{0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0}, {0x12b2, 0x12b5},
{0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5}, {0x12c8, 0x12ce},
{0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e}, {0x1310, 0x1310},
{0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346}, {0x1348, 0x135a},
{0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676}, {0x1681, 0x169a},
{0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731},
{0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3},
{0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877}, {0x1880, 0x18a8},
{0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1d00, 0x1d6b},
{0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d},
{0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59},
{0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
{0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc},
{0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4},
{0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2102, 0x2102},
{0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115}, {0x2119, 0x211d},
{0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d},
{0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f}, {0x2145, 0x2149},
{0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c}, {0x3041, 0x3096},
{0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312c},
{0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff}, {0x3400, 0x3400},
{0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5}, {0xa000, 0xa48c},
{0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d}, {0xfa30, 0xfa6a},
{0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28},
{0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41},
{0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f},
{0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc},
{0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe}, {0xffc2, 0xffc7},
{0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
static xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
static const xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a},
{0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6},
{0xf8, 0x236}, {0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4},
{0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a},
{0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5},
{0x3f7, 0x3fb}, {0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5},
{0x4f8, 0x4f9}, {0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559},
{0x561, 0x587}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
{0x640, 0x64a}, {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5},
{0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff},
{0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5},
{0x7b1, 0x7b1}, {0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950},
{0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
{0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd},
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
{0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
{0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
{0xad0, 0xad0}, {0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39},
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71},
{0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95},
{0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4},
{0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c},
{0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39},
{0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8},
{0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde},
{0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
{0xd2a, 0xd39}, {0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1},
{0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30},
{0xe32, 0xe33}, {0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84},
{0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
{0xeaa, 0xeab}, {0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd},
{0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00},
{0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021},
{0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5},
{0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
{0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
{0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
{0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
{0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
{0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
{0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
{0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
{0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
{0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
{0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877},
{0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
{0x1d00, 0x1d6b}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15},
{0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
{0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d},
{0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4},
{0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
{0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f},
{0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115},
{0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128},
{0x212a, 0x212d}, {0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f},
{0x2145, 0x2149}, {0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c},
{0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff},
{0x3105, 0x312c}, {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff},
{0x3400, 0x3400}, {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5},
{0xa000, 0xa48c}, {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d},
{0xfa30, 0xfa6a}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d},
{0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e},
{0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d},
{0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74},
{0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe},
{0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
static const xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10400, 0x1049d},
@@ -311,8 +311,8 @@ static xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
static xmlChRangeGroup xmlLG = {279,50,xmlLS,xmlLL};
static xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa}, {0xb5, 0xb5},
{0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
static const xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa},
{0xb5, 0xb5}, {0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
{0x103, 0x103}, {0x105, 0x105}, {0x107, 0x107}, {0x109, 0x109},
{0x10b, 0x10b}, {0x10d, 0x10d}, {0x10f, 0x10f}, {0x111, 0x111},
{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},
{0x213d, 0x213d}, {0x2146, 0x2149}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
{0xff41, 0xff5a} };
static xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
static const xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
{0x1d44e, 0x1d454}, {0x1d456, 0x1d467}, {0x1d482, 0x1d49b},
{0x1d4b6, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
{0x1d4c5, 0x1d4cf}, {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537},
@@ -423,7 +423,7 @@ static xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
{0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9} };
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},
{0x640, 0x640}, {0x6e5, 0x6e6}, {0xe46, 0xe46}, {0xec6, 0xec6},
{0x17d7, 0x17d7}, {0x1843, 0x1843}, {0x1d2c, 0x1d61}, {0x3005, 0x3005},
@@ -431,7 +431,7 @@ static xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
{0xff70, 0xff70}, {0xff9e, 0xff9f} };
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},
{0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6ee, 0x6ef},
{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},
{0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
{0xffda, 0xffdc} };
static xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
static const xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
{0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
{0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10450, 0x1049d},
@@ -494,110 +494,110 @@ static xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
{0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
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},
{0x1fa8, 0x1faf}, {0x1fbc, 0x1fbc}, {0x1fcc, 0x1fcc}, {0x1ffc, 0x1ffc} };
static xmlChRangeGroup xmlLtG = {10,0,xmlLtS,NULL};
static xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6}, {0xd8, 0xde},
{0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104}, {0x106, 0x106},
{0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c}, {0x10e, 0x10e},
{0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114}, {0x116, 0x116},
{0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c}, {0x11e, 0x11e},
{0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124}, {0x126, 0x126},
{0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c}, {0x12e, 0x12e},
{0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134}, {0x136, 0x136},
{0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d}, {0x13f, 0x13f},
{0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145}, {0x147, 0x147},
{0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e}, {0x150, 0x150},
{0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156}, {0x158, 0x158},
{0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e}, {0x160, 0x160},
{0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166}, {0x168, 0x168},
{0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e}, {0x170, 0x170},
{0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176}, {0x178, 0x179},
{0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182}, {0x184, 0x184},
{0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191}, {0x193, 0x194},
{0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0}, {0x1a2, 0x1a2},
{0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9}, {0x1ac, 0x1ac},
{0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5}, {0x1b7, 0x1b8},
{0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7}, {0x1ca, 0x1ca},
{0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1}, {0x1d3, 0x1d3},
{0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9}, {0x1db, 0x1db},
{0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2}, {0x1e4, 0x1e4},
{0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea}, {0x1ec, 0x1ec},
{0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4}, {0x1f6, 0x1f8},
{0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe}, {0x200, 0x200},
{0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206}, {0x208, 0x208},
{0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e}, {0x210, 0x210},
{0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216}, {0x218, 0x218},
{0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e}, {0x220, 0x220},
{0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226}, {0x228, 0x228},
{0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e}, {0x230, 0x230},
{0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
{0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab}, {0x3d2, 0x3d4},
{0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc}, {0x3de, 0x3de},
{0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4}, {0x3e6, 0x3e6},
{0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec}, {0x3ee, 0x3ee},
{0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa}, {0x400, 0x42f},
{0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464}, {0x466, 0x466},
{0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c}, {0x46e, 0x46e},
{0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474}, {0x476, 0x476},
{0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c}, {0x47e, 0x47e},
{0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c}, {0x48e, 0x48e},
{0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494}, {0x496, 0x496},
{0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c}, {0x49e, 0x49e},
{0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4}, {0x4a6, 0x4a6},
{0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac}, {0x4ae, 0x4ae},
{0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4}, {0x4b6, 0x4b6},
{0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc}, {0x4be, 0x4be},
{0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5}, {0x4c7, 0x4c7},
{0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd}, {0x4d0, 0x4d0},
{0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6}, {0x4d8, 0x4d8},
{0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de}, {0x4e0, 0x4e0},
{0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6}, {0x4e8, 0x4e8},
{0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee}, {0x4f0, 0x4f0},
{0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8}, {0x500, 0x500},
{0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506}, {0x508, 0x508},
{0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e}, {0x531, 0x556},
{0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02}, {0x1e04, 0x1e04},
{0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a}, {0x1e0c, 0x1e0c},
{0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12}, {0x1e14, 0x1e14},
{0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a}, {0x1e1c, 0x1e1c},
{0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22}, {0x1e24, 0x1e24},
{0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a}, {0x1e2c, 0x1e2c},
{0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32}, {0x1e34, 0x1e34},
{0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a}, {0x1e3c, 0x1e3c},
{0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42}, {0x1e44, 0x1e44},
{0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a}, {0x1e4c, 0x1e4c},
{0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52}, {0x1e54, 0x1e54},
{0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a}, {0x1e5c, 0x1e5c},
{0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62}, {0x1e64, 0x1e64},
{0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a}, {0x1e6c, 0x1e6c},
{0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72}, {0x1e74, 0x1e74},
{0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a}, {0x1e7c, 0x1e7c},
{0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82}, {0x1e84, 0x1e84},
{0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a}, {0x1e8c, 0x1e8c},
{0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92}, {0x1e94, 0x1e94},
{0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4}, {0x1ea6, 0x1ea6},
{0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac}, {0x1eae, 0x1eae},
{0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4}, {0x1eb6, 0x1eb6},
{0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc}, {0x1ebe, 0x1ebe},
{0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4}, {0x1ec6, 0x1ec6},
{0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc}, {0x1ece, 0x1ece},
{0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4}, {0x1ed6, 0x1ed6},
{0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc}, {0x1ede, 0x1ede},
{0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4}, {0x1ee6, 0x1ee6},
{0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec}, {0x1eee, 0x1eee},
{0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4}, {0x1ef6, 0x1ef6},
{0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d}, {0x1f28, 0x1f2f},
{0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f}, {0x1fb8, 0x1fbb},
{0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb},
{0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d}, {0x2110, 0x2112},
{0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126},
{0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131}, {0x2133, 0x2133},
{0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
static xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
static const xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6},
{0xd8, 0xde}, {0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104},
{0x106, 0x106}, {0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c},
{0x10e, 0x10e}, {0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114},
{0x116, 0x116}, {0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c},
{0x11e, 0x11e}, {0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124},
{0x126, 0x126}, {0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c},
{0x12e, 0x12e}, {0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134},
{0x136, 0x136}, {0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d},
{0x13f, 0x13f}, {0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145},
{0x147, 0x147}, {0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e},
{0x150, 0x150}, {0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156},
{0x158, 0x158}, {0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e},
{0x160, 0x160}, {0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166},
{0x168, 0x168}, {0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e},
{0x170, 0x170}, {0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176},
{0x178, 0x179}, {0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182},
{0x184, 0x184}, {0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191},
{0x193, 0x194}, {0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0},
{0x1a2, 0x1a2}, {0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9},
{0x1ac, 0x1ac}, {0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5},
{0x1b7, 0x1b8}, {0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7},
{0x1ca, 0x1ca}, {0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1},
{0x1d3, 0x1d3}, {0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9},
{0x1db, 0x1db}, {0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2},
{0x1e4, 0x1e4}, {0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea},
{0x1ec, 0x1ec}, {0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4},
{0x1f6, 0x1f8}, {0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe},
{0x200, 0x200}, {0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206},
{0x208, 0x208}, {0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e},
{0x210, 0x210}, {0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216},
{0x218, 0x218}, {0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e},
{0x220, 0x220}, {0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226},
{0x228, 0x228}, {0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e},
{0x230, 0x230}, {0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a},
{0x38c, 0x38c}, {0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab},
{0x3d2, 0x3d4}, {0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
{0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4},
{0x3e6, 0x3e6}, {0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec},
{0x3ee, 0x3ee}, {0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa},
{0x400, 0x42f}, {0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464},
{0x466, 0x466}, {0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c},
{0x46e, 0x46e}, {0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474},
{0x476, 0x476}, {0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c},
{0x47e, 0x47e}, {0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c},
{0x48e, 0x48e}, {0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494},
{0x496, 0x496}, {0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c},
{0x49e, 0x49e}, {0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4},
{0x4a6, 0x4a6}, {0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac},
{0x4ae, 0x4ae}, {0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4},
{0x4b6, 0x4b6}, {0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc},
{0x4be, 0x4be}, {0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5},
{0x4c7, 0x4c7}, {0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd},
{0x4d0, 0x4d0}, {0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6},
{0x4d8, 0x4d8}, {0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de},
{0x4e0, 0x4e0}, {0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6},
{0x4e8, 0x4e8}, {0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee},
{0x4f0, 0x4f0}, {0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8},
{0x500, 0x500}, {0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506},
{0x508, 0x508}, {0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e},
{0x531, 0x556}, {0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02},
{0x1e04, 0x1e04}, {0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a},
{0x1e0c, 0x1e0c}, {0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12},
{0x1e14, 0x1e14}, {0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a},
{0x1e1c, 0x1e1c}, {0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22},
{0x1e24, 0x1e24}, {0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a},
{0x1e2c, 0x1e2c}, {0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32},
{0x1e34, 0x1e34}, {0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a},
{0x1e3c, 0x1e3c}, {0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42},
{0x1e44, 0x1e44}, {0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a},
{0x1e4c, 0x1e4c}, {0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52},
{0x1e54, 0x1e54}, {0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a},
{0x1e5c, 0x1e5c}, {0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62},
{0x1e64, 0x1e64}, {0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a},
{0x1e6c, 0x1e6c}, {0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72},
{0x1e74, 0x1e74}, {0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a},
{0x1e7c, 0x1e7c}, {0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82},
{0x1e84, 0x1e84}, {0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a},
{0x1e8c, 0x1e8c}, {0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92},
{0x1e94, 0x1e94}, {0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4},
{0x1ea6, 0x1ea6}, {0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac},
{0x1eae, 0x1eae}, {0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4},
{0x1eb6, 0x1eb6}, {0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc},
{0x1ebe, 0x1ebe}, {0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4},
{0x1ec6, 0x1ec6}, {0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc},
{0x1ece, 0x1ece}, {0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4},
{0x1ed6, 0x1ed6}, {0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc},
{0x1ede, 0x1ede}, {0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4},
{0x1ee6, 0x1ee6}, {0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec},
{0x1eee, 0x1eee}, {0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4},
{0x1ef6, 0x1ef6}, {0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d},
{0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59},
{0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f},
{0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec},
{0x1ff8, 0x1ffb}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d},
{0x2110, 0x2112}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124},
{0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131},
{0x2133, 0x2133}, {0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
static const xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
{0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c},
{0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6},
{0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9},
@@ -610,7 +610,7 @@ static xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
{0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8} };
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},
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
{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},
{0x1930, 0x193b}, {0x20d0, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a},
{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},
{0xe0100, 0xe01ef} };
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},
{0x9cb, 0x9cc}, {0x9d7, 0x9d7}, {0xa03, 0xa03}, {0xa3e, 0xa40},
{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},
{0x17c7, 0x17c8}, {0x1923, 0x1926}, {0x1929, 0x192b}, {0x1930, 0x1931},
{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 xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
static const xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
{0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, {0x5bb, 0x5bd},
{0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, {0x610, 0x615},
{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},
{0x20e5, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e},
{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} };
static xmlChRangeGroup xmlMnG = {108,5,xmlMnS,xmlMnL};
static xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3}, {0xb9, 0xb9},
{0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9}, {0x966, 0x96f},
{0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f}, {0xae6, 0xaef},
{0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f}, {0xce6, 0xcef},
{0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9}, {0xf20, 0xf33},
{0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0}, {0x17e0, 0x17e9},
{0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f}, {0x2070, 0x2070},
{0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183}, {0x2460, 0x249b},
{0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007}, {0x3021, 0x3029},
{0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
{0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
static xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
static const xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3},
{0xb9, 0xb9}, {0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9},
{0x966, 0x96f}, {0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f},
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f},
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
{0xf20, 0xf33}, {0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0},
{0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f},
{0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183},
{0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007},
{0x3021, 0x3029}, {0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229},
{0x3251, 0x325f}, {0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
static const xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
{0x1034a, 0x1034a}, {0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
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},
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
{0xf20, 0xf29}, {0x1040, 0x1049}, {0x1369, 0x1371}, {0x17e0, 0x17e9},
{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 xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9}, {0xbc, 0xbe},
{0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33}, {0x1372, 0x137c},
{0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089},
{0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793},
{0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f}, {0x3280, 0x3289},
{0x32b1, 0x32bf} };
static xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
static const xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9},
{0xbc, 0xbe}, {0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33},
{0x1372, 0x137c}, {0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079},
{0x2080, 0x2089}, {0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff},
{0x2776, 0x2793}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
{0x3280, 0x3289}, {0x32b1, 0x32bf} };
static const xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
static xmlChRangeGroup xmlNoG = {20,2,xmlNoS,xmlNoL};
static xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a}, {0x2c, 0x2f},
{0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f}, {0x7b, 0x7b},
{0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7}, {0xbb, 0xbb},
{0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387}, {0x55a, 0x55f},
{0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0}, {0x5c3, 0x5c3},
{0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b}, {0x61f, 0x61f},
{0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d}, {0x964, 0x965},
{0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f}, {0xe5a, 0xe5b},
{0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85}, {0x104a, 0x104f},
{0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e}, {0x169b, 0x169c},
{0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6}, {0x17d8, 0x17da},
{0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027}, {0x2030, 0x2043},
{0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057}, {0x207d, 0x207e},
{0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6}, {0x2768, 0x2775},
{0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db}, {0x29fc, 0x29fd},
{0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0x3030, 0x3030},
{0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb}, {0xfd3e, 0xfd3f},
{0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63}, {0xfe68, 0xfe68},
{0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a}, {0xff0c, 0xff0f},
{0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d}, {0xff3f, 0xff3f},
{0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
static xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
static const xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a},
{0x2c, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f},
{0x7b, 0x7b}, {0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7},
{0xbb, 0xbb}, {0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387},
{0x55a, 0x55f}, {0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0},
{0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b},
{0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d},
{0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f},
{0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85},
{0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
{0x169b, 0x169c}, {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6},
{0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027},
{0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057},
{0x207d, 0x207e}, {0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6},
{0x2768, 0x2775}, {0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db},
{0x29fc, 0x29fd}, {0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f},
{0x3030, 0x3030}, {0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb},
{0xfd3e, 0xfd3f}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63},
{0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a},
{0xff0c, 0xff0f}, {0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d},
{0xff3f, 0xff3f}, {0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
static const xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
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},
{0x30a0, 0x30a0}, {0xfe31, 0xfe32}, {0xfe58, 0xfe58}, {0xfe63, 0xfe63},
{0xff0d, 0xff0d} };
static xmlChRangeGroup xmlPdG = {11,0,xmlPdS,NULL};
static xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d}, {0x7d, 0x7d},
{0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c}, {0x2046, 0x2046},
{0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a}, {0x23b5, 0x23b5},
{0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d}, {0x276f, 0x276f},
{0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775}, {0x27e7, 0x27e7},
{0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984}, {0x2986, 0x2986},
{0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c}, {0x298e, 0x298e},
{0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994}, {0x2996, 0x2996},
{0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db}, {0x29fd, 0x29fd},
{0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d}, {0x300f, 0x300f},
{0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017}, {0x3019, 0x3019},
{0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f}, {0xfe36, 0xfe36},
{0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c}, {0xfe3e, 0xfe3e},
{0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44}, {0xfe48, 0xfe48},
{0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e}, {0xff09, 0xff09},
{0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60}, {0xff63, 0xff63} };
static const xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d},
{0x7d, 0x7d}, {0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c},
{0x2046, 0x2046}, {0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a},
{0x23b5, 0x23b5}, {0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d},
{0x276f, 0x276f}, {0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775},
{0x27e7, 0x27e7}, {0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984},
{0x2986, 0x2986}, {0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c},
{0x298e, 0x298e}, {0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994},
{0x2996, 0x2996}, {0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db},
{0x29fd, 0x29fd}, {0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d},
{0x300f, 0x300f}, {0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017},
{0x3019, 0x3019}, {0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f},
{0xfe36, 0xfe36}, {0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c},
{0xfe3e, 0xfe3e}, {0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44},
{0xfe48, 0xfe48}, {0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e},
{0xff09, 0xff09}, {0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60},
{0xff63, 0xff63} };
static xmlChRangeGroup xmlPeG = {63,0,xmlPeS,NULL};
static xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27}, {0x2a, 0x2a},
{0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5c, 0x5c},
{0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
static const xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27},
{0x2a, 0x2a}, {0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40},
{0x5c, 0x5c}, {0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
{0x387, 0x387}, {0x55a, 0x55f}, {0x589, 0x589}, {0x5be, 0x5be},
{0x5c0, 0x5c0}, {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d},
{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},
{0xff0a, 0xff0a}, {0xff0c, 0xff0c}, {0xff0e, 0xff0f}, {0xff1a, 0xff1b},
{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 xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b}, {0x7b, 0x7b},
{0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b}, {0x201a, 0x201a},
{0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d}, {0x208d, 0x208d},
{0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768}, {0x276a, 0x276a},
{0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770}, {0x2772, 0x2772},
{0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8}, {0x27ea, 0x27ea},
{0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987}, {0x2989, 0x2989},
{0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f}, {0x2991, 0x2991},
{0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997}, {0x29d8, 0x29d8},
{0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008}, {0x300a, 0x300a},
{0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010}, {0x3014, 0x3014},
{0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a}, {0x301d, 0x301d},
{0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37}, {0xfe39, 0xfe39},
{0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f}, {0xfe41, 0xfe41},
{0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59}, {0xfe5b, 0xfe5b},
{0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b}, {0xff5b, 0xff5b},
{0xff5f, 0xff5f}, {0xff62, 0xff62} };
static const xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b},
{0x7b, 0x7b}, {0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b},
{0x201a, 0x201a}, {0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d},
{0x208d, 0x208d}, {0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768},
{0x276a, 0x276a}, {0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770},
{0x2772, 0x2772}, {0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8},
{0x27ea, 0x27ea}, {0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987},
{0x2989, 0x2989}, {0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f},
{0x2991, 0x2991}, {0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997},
{0x29d8, 0x29d8}, {0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008},
{0x300a, 0x300a}, {0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010},
{0x3014, 0x3014}, {0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a},
{0x301d, 0x301d}, {0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37},
{0xfe39, 0xfe39}, {0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f},
{0xfe41, 0xfe41}, {0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59},
{0xfe5b, 0xfe5b}, {0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b},
{0xff5b, 0xff5b}, {0xff5f, 0xff5f}, {0xff62, 0xff62} };
static xmlChRangeGroup xmlPsG = {65,0,xmlPsS,NULL};
static xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b}, {0x3c, 0x3e},
{0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e}, {0xa2, 0xa9},
{0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6}, {0xb8, 0xb8},
{0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5}, {0x2d2, 0x2df},
{0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375}, {0x384, 0x385},
{0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f}, {0x6e9, 0x6e9},
{0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa}, {0xaf1, 0xaf1},
{0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f}, {0xf01, 0xf03},
{0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
{0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
{0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x1fbd, 0x1fbd},
{0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf}, {0x1fed, 0x1fef},
{0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052}, {0x207a, 0x207c},
{0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101}, {0x2103, 0x2106},
{0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
{0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
{0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144}, {0x214a, 0x214b},
{0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0}, {0x2400, 0x2426},
{0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617}, {0x2619, 0x267d},
{0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709},
{0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752},
{0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794},
{0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5}, {0x27f0, 0x2982},
{0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d}, {0x2e80, 0x2e99},
{0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
{0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
{0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e},
{0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f},
{0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff},
{0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd}, {0xfe62, 0xfe62},
{0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04}, {0xff0b, 0xff0b},
{0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xff5c, 0xff5c},
{0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee}, {0xfffc, 0xfffd} };
static xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
static const xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b},
{0x3c, 0x3e}, {0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e},
{0xa2, 0xa9}, {0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6},
{0xb8, 0xb8}, {0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5},
{0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
{0x384, 0x385}, {0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f},
{0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa},
{0xaf1, 0xaf1}, {0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f},
{0xf01, 0xf03}, {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34},
{0xf36, 0xf36}, {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc},
{0xfcf, 0xfcf}, {0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff},
{0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf},
{0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052},
{0x207a, 0x207c}, {0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101},
{0x2103, 0x2106}, {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118},
{0x211e, 0x2123}, {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129},
{0x212e, 0x212e}, {0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144},
{0x214a, 0x214b}, {0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0},
{0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617},
{0x2619, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704},
{0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d},
{0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767},
{0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5},
{0x27f0, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d},
{0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
{0x3004, 0x3004}, {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037},
{0x303e, 0x303f}, {0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f},
{0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d},
{0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff},
{0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd},
{0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
{0xff0b, 0xff0b}, {0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40},
{0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee},
{0xfffc, 0xfffd} };
static const xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356}, {0x1d6c1, 0x1d6c1},
@@ -857,77 +859,79 @@ static xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
{0x1d789, 0x1d789}, {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
static xmlChRangeGroup xmlSG = {133,20,xmlSS,xmlSL};
static xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5}, {0x9f2, 0x9f3},
{0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f}, {0x17db, 0x17db},
{0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
{0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
static const xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5},
{0x9f2, 0x9f3}, {0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f},
{0x17db, 0x17db}, {0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69},
{0xff04, 0xff04}, {0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
static xmlChRangeGroup xmlScG = {13,0,xmlScS,NULL};
static xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60}, {0xa8, 0xa8},
{0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
static const xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60},
{0xa8, 0xa8}, {0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
{0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
{0x384, 0x385}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf},
{0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x309b, 0x309c},
{0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xffe3, 0xffe3} };
static xmlChRangeGroup xmlSkG = {22,0,xmlSkS,NULL};
static xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e}, {0x7c, 0x7c},
{0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7}, {0xf7, 0xf7},
{0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052}, {0x207a, 0x207c},
{0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b}, {0x2190, 0x2194},
{0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3}, {0x21a6, 0x21a6},
{0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2}, {0x21d4, 0x21d4},
{0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321}, {0x237c, 0x237c},
{0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1}, {0x25f8, 0x25ff},
{0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff}, {0x2900, 0x2982},
{0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff}, {0xfb29, 0xfb29},
{0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b}, {0xff1c, 0xff1e},
{0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2}, {0xffe9, 0xffec} };
static xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
static const xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e},
{0x7c, 0x7c}, {0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7},
{0xf7, 0xf7}, {0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052},
{0x207a, 0x207c}, {0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b},
{0x2190, 0x2194}, {0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3},
{0x21a6, 0x21a6}, {0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2},
{0x21d4, 0x21d4}, {0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321},
{0x237c, 0x237c}, {0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1},
{0x25f8, 0x25ff}, {0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff},
{0x2900, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff},
{0xfb29, 0xfb29}, {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b},
{0xff1c, 0xff1e}, {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2},
{0xffe9, 0xffec} };
static const xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
{0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715}, {0x1d735, 0x1d735},
{0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f}, {0x1d789, 0x1d789},
{0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
static xmlChRangeGroup xmlSmG = {48,10,xmlSmS,xmlSmL};
static xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9}, {0xae, 0xae},
{0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482}, {0x60e, 0x60f},
{0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa}, {0xb70, 0xb70},
{0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03}, {0xf13, 0xf17},
{0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36}, {0xf38, 0xf38},
{0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf}, {0x1940, 0x1940},
{0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106}, {0x2108, 0x2109},
{0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123}, {0x2125, 0x2125},
{0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e}, {0x2132, 0x2132},
{0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199}, {0x219c, 0x219f},
{0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad}, {0x21af, 0x21cd},
{0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3}, {0x2300, 0x2307},
{0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b}, {0x237d, 0x239a},
{0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9},
{0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7}, {0x2600, 0x2617},
{0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1},
{0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b},
{0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e},
{0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be},
{0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3},
{0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004}, {0x3012, 0x3013},
{0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f}, {0x3190, 0x3191},
{0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250},
{0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe},
{0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfdfd, 0xfdfd},
{0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee}, {0xfffc, 0xfffd} };
static xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
static const xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9},
{0xae, 0xae}, {0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482},
{0x60e, 0x60f}, {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa},
{0xb70, 0xb70}, {0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03},
{0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
{0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
{0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106},
{0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
{0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
{0x2132, 0x2132}, {0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199},
{0x219c, 0x219f}, {0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad},
{0x21af, 0x21cd}, {0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3},
{0x2300, 0x2307}, {0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b},
{0x237d, 0x239a}, {0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a},
{0x249c, 0x24e9}, {0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7},
{0x2600, 0x2617}, {0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691},
{0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727},
{0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756},
{0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af},
{0x27b1, 0x27be}, {0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99},
{0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
{0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
{0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243},
{0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0},
{0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6},
{0xfdfd, 0xfdfd}, {0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee},
{0xfffc, 0xfffd} };
static const xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
{0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
{0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356} };
static xmlChRangeGroup xmlSoG = {103,10,xmlSoS,xmlSoL};
static xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0}, {0x1680, 0x1680},
{0x180e, 0x180e}, {0x2000, 0x200b}, {0x2028, 0x2029}, {0x202f, 0x202f},
{0x205f, 0x205f}, {0x3000, 0x3000} };
static const xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0},
{0x1680, 0x1680}, {0x180e, 0x180e}, {0x2000, 0x200a}, {0x2028, 0x2029},
{0x202f, 0x202f}, {0x205f, 0x205f}, {0x3000, 0x3000} };
static xmlChRangeGroup xmlZG = {9,0,xmlZS,NULL};
xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
static xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
/**
* xmlUnicodeLookup:
@@ -3145,7 +3149,7 @@ xmlUCSIsCatZs(int code) {
(code == 0xa0) ||
(code == 0x1680) ||
(code == 0x180e) ||
((code >= 0x2000) && (code <= 0x200b)) ||
((code >= 0x2000) && (code <= 0x200a)) ||
(code == 0x202f) ||
(code == 0x205f) ||
(code == 0x3000));
@@ -3170,7 +3174,6 @@ xmlUCSIsCat(int code, const char *cat) {
return (func(code));
}
#define bottom_xmlunicode
#include "elfgcchack.h"
#endif /* LIBXML_UNICODE_ENABLED */

File diff suppressed because it is too large Load Diff