summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2009-03-01 10:53:23 +0100
committerMike Hommey <glandium@debian.org>2009-03-01 10:53:23 +0100
commitd03a853bb0370d89552eceee59df1746da4a37f8 (patch)
tree441802d52ac5c0a2b6929e6dd5d8a58210b0fe3a /include
parent88f9c7ca80bfbc9a5429fc632b90d6c4a2a2787d (diff)
downloadlibxml2-d03a853bb0370d89552eceee59df1746da4a37f8.tar.gz
Import upstream version 2.7.0upstream/2.7.0.dfsg
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.in17
-rw-r--r--include/libxml/Makefile.in17
-rw-r--r--include/libxml/c14n.h46
-rw-r--r--include/libxml/entities.h40
-rw-r--r--include/libxml/globals.h46
-rw-r--r--include/libxml/parser.h7
-rw-r--r--include/libxml/parserInternals.h2
-rw-r--r--include/libxml/relaxng.h19
-rw-r--r--include/libxml/schematron.h19
-rw-r--r--include/libxml/tree.h29
-rw-r--r--include/libxml/uri.h36
-rw-r--r--include/libxml/xmlerror.h4
-rw-r--r--include/libxml/xmlmemory.h44
-rw-r--r--include/libxml/xmlreader.h188
-rw-r--r--include/libxml/xmlregexp.h42
-rw-r--r--include/libxml/xmlschemas.h48
-rw-r--r--include/libxml/xmlversion.h8
-rw-r--r--include/wsockcompat.h1
18 files changed, 386 insertions, 227 deletions
diff --git a/include/Makefile.in b/include/Makefile.in
index f2292f4..00844d1 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 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.
@@ -387,8 +387,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -413,8 +413,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -424,13 +424,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
diff --git a/include/libxml/Makefile.in b/include/libxml/Makefile.in
index 1d495a9..f6650ef 100644
--- a/include/libxml/Makefile.in
+++ b/include/libxml/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 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.
@@ -386,8 +386,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -399,8 +399,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -410,13 +410,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
diff --git a/include/libxml/c14n.h b/include/libxml/c14n.h
index 9f4c6c0..a8aa737 100644
--- a/include/libxml/c14n.h
+++ b/include/libxml/c14n.h
@@ -2,30 +2,30 @@
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
* Description: the c14n modules provides a
*
- * "Canonical XML" implementation
+ * "Canonical XML" implementation
* http://www.w3.org/TR/xml-c14n
- *
+ *
* and an
*
* "Exclusive XML Canonicalization" implementation
* http://www.w3.org/TR/xml-exc-c14n
-
+
* Copy: See Copyright for the status of this software.
- *
+ *
* Author: Aleksey Sanin <aleksey@aleksey.com>
*/
#ifndef __XML_C14N_H__
-#define __XML_C14N_H__
+#define __XML_C14N_H__
#ifdef LIBXML_C14N_ENABLED
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef __cplusplus
extern "C" {
-#endif /* __cplusplus */
+#endif /* __cplusplus */
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
-#include <libxml/xpath.h>
+#include <libxml/xpath.h>
/*
* XML Canonicazation
@@ -37,28 +37,28 @@ extern "C" {
* Canonical form of an XML document could be created if and only if
* a) default attributes (if any) are added to all nodes
* b) all character and parsed entity references are resolved
- * In order to achive this in libxml2 the document MUST be loaded with
+ * In order to achive this in libxml2 the document MUST be loaded with
* following global setings:
- *
+ *
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* xmlSubstituteEntitiesDefault(1);
*
* or corresponding parser context setting:
* xmlParserCtxtPtr ctxt;
- *
- * ...
+ *
+ * ...
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* ctxt->replaceEntities = 1;
* ...
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int exclusive,
xmlChar **inclusive_ns_prefixes,
- int with_comments,
+ int with_comments,
xmlOutputBufferPtr buf);
XMLPUBFUN int XMLCALL
@@ -66,7 +66,7 @@ XMLPUBFUN int XMLCALL
xmlNodeSetPtr nodes,
int exclusive,
xmlChar **inclusive_ns_prefixes,
- int with_comments,
+ int with_comments,
xmlChar **doc_txt_ptr);
XMLPUBFUN int XMLCALL
@@ -74,7 +74,7 @@ XMLPUBFUN int XMLCALL
xmlNodeSetPtr nodes,
int exclusive,
xmlChar **inclusive_ns_prefixes,
- int with_comments,
+ int with_comments,
const char* filename,
int compression);
@@ -82,17 +82,27 @@ XMLPUBFUN int XMLCALL
/**
* This is the core C14N function
*/
-typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
+/**
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the curent node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+ */
+typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
xmlNodePtr node,
xmlNodePtr parent);
XMLPUBFUN int XMLCALL
xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
- void* user_data,
+ void* user_data,
int exclusive,
xmlChar **inclusive_ns_prefixes,
- int with_comments,
+ int with_comments,
xmlOutputBufferPtr buf);
#ifdef __cplusplus
diff --git a/include/libxml/entities.h b/include/libxml/entities.h
index fdd7222..cefb97f 100644
--- a/include/libxml/entities.h
+++ b/include/libxml/entities.h
@@ -57,6 +57,8 @@ struct _xmlEntity {
const xmlChar *URI; /* the full URI as computed */
int owner; /* does the entity own the childrens */
int checked; /* was the entity content checked */
+ /* this is also used to count entites
+ * references done from that entity */
};
/*
@@ -72,9 +74,17 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
*/
#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
+
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlNewEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,
@@ -82,53 +92,53 @@ XMLPUBFUN xmlEntityPtr XMLCALL
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr XMLCALL
xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetPredefinedEntity (const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetDocEntity (xmlDocPtr doc,
const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlEncodeSpecialChars (xmlDocPtr doc,
const xmlChar *input);
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
xmlCreateEntitiesTable (void);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */
diff --git a/include/libxml/globals.h b/include/libxml/globals.h
index 1173a8f..57e25fa 100644
--- a/include/libxml/globals.h
+++ b/include/libxml/globals.h
@@ -28,8 +28,32 @@ extern "C" {
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
+/**
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
+
+/**
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
+
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
@@ -73,12 +97,24 @@ XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc
#undef xmlParserInputBufferCreateFilenameValue
#undef xmlOutputBufferCreateFilenameValue
+/**
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+ */
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
+/**
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+ */
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
typedef struct _xmlGlobalState xmlGlobalState;
typedef xmlGlobalState *xmlGlobalStatePtr;
-struct _xmlGlobalState
+struct _xmlGlobalState
{
const char *xmlParserVersion;
@@ -114,8 +150,8 @@ struct _xmlGlobalState
int xmlIndentTreeOutput;
const char *xmlTreeIndentString;
- xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
- xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+ xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+ xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
xmlMallocFunc xmlMallocAtomic;
xmlError xmlLastError;
@@ -143,9 +179,9 @@ XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNo
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
/** DOC_DISABLE */
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index fe63bda..24d5cf9 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -297,6 +297,8 @@ struct _xmlParserCtxt {
*/
xmlError lastError;
xmlParserMode parseMode; /* the parser mode */
+ unsigned long nbentities; /* number of entities references */
+ unsigned long sizeentities; /* size of parsed entities */
};
/**
@@ -1089,9 +1091,12 @@ typedef enum {
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_COMPACT = 1<<16 /* compact small text nodes; no modification of
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
the tree allowed afterwards (will possibly
crash if you try to modify the tree) */
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
+ XML_PARSE_HUGE = 1<<19 /* relax any hardcoded limit from the parser */
} xmlParserOption;
XMLPUBFUN void XMLCALL
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index 7ac0ce6..fddcd27 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -321,7 +321,7 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN int XMLCALL
xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
XMLPUBFUN xmlChar XMLCALL
diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h
index 6acd467..29c91c7 100644
--- a/include/libxml/relaxng.h
+++ b/include/libxml/relaxng.h
@@ -25,11 +25,28 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
/**
- * A schemas validation context
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
*/
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
+/**
+ * A schemas validation context
+ */
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
diff --git a/include/libxml/schematron.h b/include/libxml/schematron.h
index 9e36c0e..f442826 100644
--- a/include/libxml/schematron.h
+++ b/include/libxml/schematron.h
@@ -38,11 +38,28 @@ typedef struct _xmlSchematron xmlSchematron;
typedef xmlSchematron *xmlSchematronPtr;
/**
- * A schemas validation context
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
*/
typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+ */
typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
+/**
+ * A schemas validation context
+ */
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 0e1d47c..6a6a09d 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -71,9 +71,10 @@ typedef xmlEntity *xmlEntityPtr;
*/
typedef enum {
- XML_BUFFER_ALLOC_DOUBLEIT,
- XML_BUFFER_ALLOC_EXACT,
- XML_BUFFER_ALLOC_IMMUTABLE
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
} xmlBufferAllocationScheme;
/**
@@ -88,6 +89,7 @@ struct _xmlBuffer {
unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */
xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
};
/**
@@ -482,6 +484,23 @@ struct _xmlNode {
#define XML_GET_LINE(n) \
(xmlGetLineNo(n))
+/**
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similary named xmlParserOption
+ */
+typedef enum {
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
+ and not by parsing an instance */
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
+} xmlDocProperties;
/**
* xmlDoc:
@@ -521,6 +540,10 @@ struct _xmlDoc {
actually an xmlCharEncoding */
struct _xmlDict *dict; /* dict used to allocate names or NULL */
void *psvi; /* for type/PSVI informations */
+ int parseFlags; /* set of xmlParserOption used to parse the
+ document */
+ int properties; /* set of xmlDocProperties for this document
+ set at the end of parsing */
};
diff --git a/include/libxml/uri.h b/include/libxml/uri.h
index 49ed105..db48262 100644
--- a/include/libxml/uri.h
+++ b/include/libxml/uri.h
@@ -49,43 +49,43 @@ struct _xmlURI {
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
* xmlNodePtr cur);
*/
-XMLPUBFUN xmlURIPtr XMLCALL
+XMLPUBFUN xmlURIPtr XMLCALL
xmlCreateURI (void);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlBuildURI (const xmlChar *URI,
- const xmlChar *base);
-XMLPUBFUN xmlChar * XMLCALL
+ const xmlChar *base);
+XMLPUBFUN xmlChar * XMLCALL
xmlBuildRelativeURI (const xmlChar *URI,
- const xmlChar *base);
-XMLPUBFUN xmlURIPtr XMLCALL
+ const xmlChar *base);
+XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURI (const char *str);
-XMLPUBFUN xmlURIPtr XMLCALL
+XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURIRaw (const char *str,
int raw);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlParseURIReference (xmlURIPtr uri,
const char *str);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlSaveUri (xmlURIPtr uri);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlPrintURI (FILE *stream,
xmlURIPtr uri);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlURIEscapeStr (const xmlChar *str,
- const xmlChar *list);
-XMLPUBFUN char * XMLCALL
+ const xmlChar *list);
+XMLPUBFUN char * XMLCALL
xmlURIUnescapeString (const char *str,
int len,
char *target);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlNormalizeURIPath (char *path);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlURIEscape (const xmlChar *str);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlFreeURI (xmlURIPtr uri);
-XMLPUBFUN xmlChar* XMLCALL
+XMLPUBFUN xmlChar* XMLCALL
xmlCanonicPath (const xmlChar *path);
-XMLPUBFUN xmlChar* XMLCALL
+XMLPUBFUN xmlChar* XMLCALL
xmlPathToURI (const xmlChar *path);
#ifdef __cplusplus
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 8cbab5e..c9336b9 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -203,11 +203,14 @@ typedef enum {
XML_ERR_NOTATION_PROCESSING, /* 105 */
XML_WAR_NS_COLUMN, /* 106 */
XML_WAR_ENTITY_REDEFINED, /* 107 */
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
+ XML_ERR_VERSION_MISMATCH, /* 109 */
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_NS_ERR_COLON, /* 205 */
XML_DTD_ATTRIBUTE_DEFAULT = 500,
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
@@ -249,6 +252,7 @@ typedef enum {
XML_DTD_STANDALONE_DEFAULTED, /* 538 */
XML_DTD_XMLID_VALUE, /* 539 */
XML_DTD_XMLID_TYPE, /* 540 */
+ XML_DTD_DUP_TOKEN, /* 541 */
XML_HTML_STRUCURE_ERROR = 800,
XML_HTML_UNKNOWN_TAG, /* 801 */
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h
index 235721c..ee8328a 100644
--- a/include/libxml/xmlmemory.h
+++ b/include/libxml/xmlmemory.h
@@ -20,7 +20,7 @@
*
* DEBUG_MEMORY replaces the allocator with a collect and debug
* shell to the libc allocator.
- * DEBUG_MEMORY should only be activated when debugging
+ * DEBUG_MEMORY should only be activated when debugging
* libxml i.e. if libxml has been configured with --with-debug-mem too.
*/
/* #define DEBUG_MEMORY_FREED */
@@ -35,7 +35,7 @@
/**
* DEBUG_MEMORY_LOCATION:
*
- * DEBUG_MEMORY_LOCATION should be activated only when debugging
+ * DEBUG_MEMORY_LOCATION should be activated only when debugging
* libxml i.e. if libxml has been configured with --with-debug-mem too.
*/
#ifdef DEBUG_MEMORY_LOCATION
@@ -105,18 +105,18 @@ XMLPUBFUN int XMLCALL
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlReallocFunc *reallocFunc,
xmlStrdupFunc *strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlGcMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlMallocFunc *mallocAtomicFunc,
@@ -126,42 +126,44 @@ XMLPUBFUN int XMLCALL
/*
* Initialization of the memory layer.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlInitMemory (void);
-/*
+/*
* Cleanup of the memory layer.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlCleanupMemory (void);
/*
* These are specific to the XML debug memory wrapper.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlMemUsed (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlMemBlocks (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlMemDisplay (FILE *fp);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
+XMLPUBFUN void XMLCALL
xmlMemShow (FILE *fp, int nr);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlMemoryDump (void);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void * XMLCALL
xmlMemMalloc (size_t size);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void * XMLCALL
xmlMemRealloc (void *ptr,size_t size);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlMemFree (void *ptr);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char * XMLCALL
xmlMemoryStrdup (const char *str);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void * XMLCALL
xmlMallocLoc (size_t size, const char *file, int line);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void * XMLCALL
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void * XMLCALL
xmlMallocAtomicLoc (size_t size, const char *file, int line);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char * XMLCALL
xmlMemStrdupLoc (const char *str, const char *file, int line);
diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h
index dfe51a3..6964482 100644
--- a/include/libxml/xmlreader.h
+++ b/include/libxml/xmlreader.h
@@ -18,13 +18,26 @@
#include <libxml/xmlschemas.h>
#endif
-#ifdef LIBXML_READER_ENABLED
-
#ifdef __cplusplus
extern "C" {
#endif
/**
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+ */
+typedef enum {
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+ XML_PARSER_SEVERITY_WARNING = 3,
+ XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
* xmlTextReaderMode:
*
* Internal state values for the reader.
@@ -42,7 +55,7 @@ typedef enum {
* xmlParserProperties:
*
* Some common options to use with xmlTextReaderSetParserProp, but it
- * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
* xmlReaderForxxx APIs now.
*/
typedef enum {
@@ -53,19 +66,6 @@ typedef enum {
} xmlParserProperties;
/**
- * xmlParserSeverities:
- *
- * How severe an error callback is when the per-reader error callback API
- * is used.
- */
-typedef enum {
- XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
- XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
- XML_PARSER_SEVERITY_WARNING = 3,
- XML_PARSER_SEVERITY_ERROR = 4
-} xmlParserSeverities;
-
-/**
* xmlReaderTypes:
*
* Predefined constants for the different types of nodes.
@@ -111,13 +111,13 @@ typedef xmlTextReader *xmlTextReaderPtr;
XMLPUBFUN xmlTextReaderPtr XMLCALL
xmlNewTextReader (xmlParserInputBufferPtr input,
const char *URI);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr XMLCALL
xmlNewTextReaderFilename(const char *URI);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlFreeTextReader (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderSetup(xmlTextReaderPtr reader,
xmlParserInputBufferPtr input, const char *URL,
const char *encoding, int options);
@@ -125,120 +125,120 @@ XMLPUBFUN int XMLCALL
/*
* Iterators
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderRead (xmlTextReaderPtr reader);
#ifdef LIBXML_WRITER_ENABLED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
-
-XMLPUBFUN xmlChar * XMLCALL
+
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
#endif
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadString (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
/*
* Attributes of the node
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderDepth (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderHasValue(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderNodeType (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderReadState (xmlTextReaderPtr reader);
XMLPUBFUN int XMLCALL
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstName (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstString (xmlTextReaderPtr reader,
- const xmlChar *str);
-XMLPUBFUN const xmlChar * XMLCALL
+ const xmlChar *str);
+XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstValue (xmlTextReaderPtr reader);
/*
* use the Const version of the routine for
* better performance and simpler code
*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderLocalName (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderName (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderPrefix (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderValue (xmlTextReaderPtr reader);
/*
* Methods of the XmlTextReader
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderClose (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
int no);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
const xmlChar *prefix);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
int no);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
const xmlChar *name);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderNormalization (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
@@ -246,14 +246,14 @@ XMLPUBFUN const xmlChar * XMLCALL
/*
* Extensions
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
int prop,
int value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
int prop);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr XMLCALL
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
XMLPUBFUN int XMLCALL
@@ -262,41 +262,41 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr XMLCALL
xmlTextReaderPreserve (xmlTextReaderPtr reader);
#ifdef LIBXML_PATTERN_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
- const xmlChar *pattern,
+ const xmlChar *pattern,
const xmlChar **namespaces);
#endif /* LIBXML_PATTERN_ENABLED */
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr XMLCALL
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr XMLCALL
xmlTextReaderExpand (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderNext (xmlTextReaderPtr reader);
XMLPUBFUN int XMLCALL
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderIsValid (xmlTextReaderPtr reader);
#ifdef LIBXML_SCHEMAS_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
const char *rng);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
xmlRelaxNGPtr schema);
XMLPUBFUN int XMLCALL
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
- const char *xsd);
+ const char *xsd);
XMLPUBFUN int XMLCALL
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
xmlSchemaValidCtxtPtr ctxt,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
- xmlSchemaPtr schema);
+ xmlSchemaPtr schema);
#endif
XMLPUBFUN const xmlChar * XMLCALL
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
@@ -382,33 +382,43 @@ XMLPUBFUN int XMLCALL
* Error handling extensions
*/
typedef void * xmlTextReaderLocatorPtr;
-typedef void (XMLCALL *xmlTextReaderErrorFunc) (void *arg,
+
+/**
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occured
+ *
+ * Signature of an error callback from a reader parser
+ */
+typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
-XMLPUBFUN void XMLCALL
- xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
- xmlTextReaderErrorFunc f,
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f,
void *arg);
XMLPUBFUN void XMLCALL
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void *arg);
-XMLPUBFUN void XMLCALL
- xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
- xmlTextReaderErrorFunc *f,
+XMLPUBFUN void XMLCALL
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc *f,
void **arg);
+#endif /* LIBXML_READER_ENABLED */
+
#ifdef __cplusplus
}
#endif
-#endif /* LIBXML_READER_ENABLED */
-
#endif /* __XML_XMLREADER_H__ */
diff --git a/include/libxml/xmlregexp.h b/include/libxml/xmlregexp.h
index 022cd6a..7009645 100644
--- a/include/libxml/xmlregexp.h
+++ b/include/libxml/xmlregexp.h
@@ -38,7 +38,7 @@ typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
#ifdef __cplusplus
}
-#endif
+#endif
#include <libxml/tree.h>
#include <libxml/dict.h>
#ifdef __cplusplus
@@ -51,16 +51,22 @@ extern "C" {
XMLPUBFUN xmlRegexpPtr XMLCALL
xmlRegexpCompile (const xmlChar *regexp);
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar *value);
-XMLPUBFUN void XMLCALL
- xmlRegexpPrint (FILE *output,
+XMLPUBFUN void XMLCALL
+ xmlRegexpPrint (FILE *output,
xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
-/*
+/**
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
* Callback function when doing a transition in the automata
*/
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
@@ -71,17 +77,17 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
/*
* The progressive API
*/
-XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
- xmlRegNewExecCtxt (xmlRegexpPtr comp,
+XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
-XMLPUBFUN int XMLCALL
- xmlRegExecPushString(xmlRegExecCtxtPtr exec,
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
const xmlChar *value,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
const xmlChar *value,
const xmlChar *value2,
@@ -89,15 +95,15 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
- int *nbval,
- int *nbneg,
+ int *nbval,
+ int *nbneg,
xmlChar **values,
int *terminal);
XMLPUBFUN int XMLCALL
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
- const xmlChar **string,
+ const xmlChar **string,
int *nbval,
- int *nbneg,
+ int *nbneg,
xmlChar **values,
int *terminal);
#ifdef LIBXML_EXPR_ENABLED
@@ -135,7 +141,7 @@ typedef enum {
} xmlExpNodeType;
/*
- * 2 core expressions shared by all for the empty language set
+ * 2 core expressions shared by all for the empty language set
* and for the set with just the empty token
*/
XMLPUBVAR xmlExpNodePtr forbiddenExp;
@@ -209,7 +215,7 @@ XMLPUBFUN void XMLCALL
#endif /* LIBXML_EXPR_ENABLED */
#ifdef __cplusplus
}
-#endif
+#endif
#endif /* LIBXML_REGEXP_ENABLED */
diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h
index 15faef5..556ef89 100644
--- a/include/libxml/xmlschemas.h
+++ b/include/libxml/xmlschemas.h
@@ -56,7 +56,7 @@ typedef enum {
/*
* ATTENTION: Change xmlSchemaSetValidOptions's check
-* for invalid values, if adding to the validation
+* for invalid values, if adding to the validation
* options below.
*/
/**
@@ -85,11 +85,28 @@ typedef struct _xmlSchema xmlSchema;
typedef xmlSchema *xmlSchemaPtr;
/**
- * A schemas validation context
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
*/
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+ */
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
+/**
+ * A schemas validation context
+ */
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
@@ -99,16 +116,16 @@ typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
/*
* Interfaces for parsing.
*/
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewParserCtxt (const char *URL);
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewMemParserCtxt (const char *buffer,
int size);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
@@ -125,19 +142,19 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN xmlSchemaPtr XMLCALL
+XMLPUBFUN xmlSchemaPtr XMLCALL
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaFree (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaDump (FILE *output,
xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
@@ -157,11 +174,11 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void XMLCALL
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int XMLCALL
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance);
XMLPUBFUN int XMLCALL
@@ -178,8 +195,11 @@ XMLPUBFUN int XMLCALL
const char * filename,
int options);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
+
/*
- * Interface to insert Schemas SAX velidation in a SAX stream
+ * Interface to insert Schemas SAX validation in a SAX stream
*/
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
index 9fc51a2..e00a6e9 100644
--- a/include/libxml/xmlversion.h
+++ b/include/libxml/xmlversion.h
@@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
-#define LIBXML_DOTTED_VERSION "2.6.32"
+#define LIBXML_DOTTED_VERSION "2.7.0"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
-#define LIBXML_VERSION 20632
+#define LIBXML_VERSION 20700
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
-#define LIBXML_VERSION_STRING "20632"
+#define LIBXML_VERSION_STRING "20700"
/**
* LIBXML_VERSION_EXTRA:
@@ -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(20632);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20700);
#ifndef VMS
#if 0
diff --git a/include/wsockcompat.h b/include/wsockcompat.h
index 333b561..18fab37 100644
--- a/include/wsockcompat.h
+++ b/include/wsockcompat.h
@@ -21,6 +21,7 @@
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
#if defined(GetAddrInfo)
+#include <wspiapi.h>
#define HAVE_GETADDRINFO
#endif
#endif