xmlNodePtr faketext;/* fake xmlNs chld */
int preserve;/* preserve the resulting document */
xmlBufPtr buffer; /* used to return const xmlChar * */
- xmlDictPtr dict; /* the context dictionary */
+ xmlDictPtr dict; /* the context dictionnary */
/* entity stack when traversing entities content */
xmlNodePtr ent; /* Current Entity Ref Node */
* DICT_FREE:
* @str: a string
*
- * Free a string if it is not owned by the "dict" dictionary in the
+ * Free a string if it is not owned by the "dict" dictionnary in the
* current scope
*/
#define DICT_FREE(str) \
"xmlNewTextReader : malloc failed\n");
return(NULL);
}
- /* no operation on a reader should require a huge buffer */
- xmlBufSetAllocationScheme(ret->buffer,
- XML_BUFFER_ALLOC_BOUNDED);
ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
if (ret->sax == NULL) {
xmlBufFree(ret->buffer);
ret->ctxt->dictNames = 1;
ret->allocs = XML_TEXTREADER_CTXT;
/*
- * use the parser dictionary to allocate all elements and attributes names
+ * use the parser dictionnary to allocate all elements and attributes names
*/
ret->ctxt->docdict = 1;
ret->dict = ret->ctxt->dict;
return(((xmlNsPtr) node)->href);
case XML_ATTRIBUTE_NODE:{
xmlAttrPtr attr = (xmlAttrPtr) node;
- const xmlChar *ret;
if ((attr->children != NULL) &&
(attr->children->type == XML_TEXT_NODE) &&
"xmlTextReaderSetup : malloc failed\n");
return (NULL);
}
- xmlBufSetAllocationScheme(reader->buffer,
- XML_BUFFER_ALLOC_BOUNDED);
} else
xmlBufEmpty(reader->buffer);
xmlBufGetNodeContent(reader->buffer, node);
- ret = xmlBufContent(reader->buffer);
- if (ret == NULL) {
- /* error on the buffer best to reallocate */
- xmlBufFree(reader->buffer);
- reader->buffer = xmlBufCreateSize(100);
- xmlBufSetAllocationScheme(reader->buffer,
- XML_BUFFER_ALLOC_BOUNDED);
- ret = BAD_CAST "";
- }
- return(ret);
+ return(xmlBufContent(reader->buffer));
}
break;
}
}
#ifdef LIBXML_SCHEMAS_ENABLED
-static char *xmlTextReaderBuildMessage(const char *msg, va_list ap) LIBXML_ATTR_FORMAT(1,0);
-
-static void XMLCDECL
-xmlTextReaderValidityError(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+static char *xmlTextReaderBuildMessage(const char *msg, va_list ap);
static void XMLCDECL
-xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+xmlTextReaderValidityError(void *ctxt, const char *msg, ...);
static void XMLCDECL
-xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
-
-static void XMLCDECL
-xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...);
static void XMLCDECL
xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
}
}
-static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
+static void XMLCDECL
xmlTextReaderError(void *ctxt, const char *msg, ...)
{
va_list ap;
}
-static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
+static void XMLCDECL
xmlTextReaderWarning(void *ctxt, const char *msg, ...)
{
va_list ap;
"xmlTextReaderSetup : malloc failed\n");
return (-1);
}
- /* no operation on a reader should require a huge buffer */
- xmlBufSetAllocationScheme(reader->buffer,
- XML_BUFFER_ALLOC_BOUNDED);
if (reader->sax == NULL)
reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
if (reader->sax == NULL) {
reader->ctxt->linenumbers = 1;
reader->ctxt->dictNames = 1;
/*
- * use the parser dictionary to allocate all elements and attributes names
+ * use the parser dictionnary to allocate all elements and attributes names
*/
reader->ctxt->docdict = 1;
reader->ctxt->parseMode = XML_PARSE_READER;