| Current File : /home/mmdealscpanel/yummmdeals.com/ea-libxml2.tar |
include/libxml2/libxml/tree.h 0000644 00000113727 15033621455 0012156 0 ustar 00 /*
* Summary: interfaces for tree manipulation
* Description: this module describes the structures found in an tree resulting
* from an XML or HTML parsing, as well as the API provided for
* various processing on that tree
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef XML_TREE_INTERNALS
/*
* Emulate circular dependency for backward compatibility
*/
#include <libxml/parser.h>
#else /* XML_TREE_INTERNALS */
#ifndef __XML_TREE_H__
#define __XML_TREE_H__
#include <stdio.h>
#include <limits.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Some of the basic types pointer to structures:
*/
/* xmlIO.h */
typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
typedef struct _xmlOutputBuffer xmlOutputBuffer;
typedef xmlOutputBuffer *xmlOutputBufferPtr;
/* parser.h */
typedef struct _xmlParserInput xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr;
typedef struct _xmlParserCtxt xmlParserCtxt;
typedef xmlParserCtxt *xmlParserCtxtPtr;
typedef struct _xmlSAXLocator xmlSAXLocator;
typedef xmlSAXLocator *xmlSAXLocatorPtr;
typedef struct _xmlSAXHandler xmlSAXHandler;
typedef xmlSAXHandler *xmlSAXHandlerPtr;
/* entities.h */
typedef struct _xmlEntity xmlEntity;
typedef xmlEntity *xmlEntityPtr;
/**
* BASE_BUFFER_SIZE:
*
* default buffer size 4000.
*/
#define BASE_BUFFER_SIZE 4096
/**
* LIBXML_NAMESPACE_DICT:
*
* Defines experimental behaviour:
* 1) xmlNs gets an additional field @context (a xmlDoc)
* 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
*/
/* #define LIBXML_NAMESPACE_DICT */
/**
* 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, /* double each time one need to grow */
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
} xmlBufferAllocationScheme;
/**
* xmlBuffer:
*
* A buffer structure, this old construct is limited to 2GB and
* is being deprecated, use API with xmlBuf instead
*/
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 */
xmlChar *contentIO; /* in IO mode we may have a different base */
};
/**
* xmlBuf:
*
* A buffer structure, new one, the actual structure internals are not public
*/
typedef struct _xmlBuf xmlBuf;
/**
* xmlBufPtr:
*
* A pointer to a buffer structure, the actual structure internals are not
* public
*/
typedef xmlBuf *xmlBufPtr;
/*
* A few public routines for xmlBuf. As those are expected to be used
* mostly internally the bulk of the routines are internal in buf.h
*/
XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
/*
* LIBXML2_NEW_BUFFER:
*
* Macro used to express that the API use the new buffers for
* xmlParserInputBuffer and xmlOutputBuffer. The change was
* introduced in 2.9.0.
*/
#define LIBXML2_NEW_BUFFER
/**
* XML_XML_NAMESPACE:
*
* This is the namespace for the special xml: prefix predefined in the
* XML Namespace specification.
*/
#define XML_XML_NAMESPACE \
(const xmlChar *) "http://www.w3.org/XML/1998/namespace"
/**
* XML_XML_ID:
*
* This is the name for the special xml:id attribute
*/
#define XML_XML_ID (const xmlChar *) "xml:id"
/*
* The different element types carried by an XML tree.
*
* NOTE: This is synchronized with DOM Level1 values
* See http://www.w3.org/TR/REC-DOM-Level-1/
*
* Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
* be deprecated to use an XML_DTD_NODE.
*/
typedef enum {
XML_ELEMENT_NODE= 1,
XML_ATTRIBUTE_NODE= 2,
XML_TEXT_NODE= 3,
XML_CDATA_SECTION_NODE= 4,
XML_ENTITY_REF_NODE= 5,
XML_ENTITY_NODE= 6, /* unused */
XML_PI_NODE= 7,
XML_COMMENT_NODE= 8,
XML_DOCUMENT_NODE= 9,
XML_DOCUMENT_TYPE_NODE= 10, /* unused */
XML_DOCUMENT_FRAG_NODE= 11,
XML_NOTATION_NODE= 12, /* unused */
XML_HTML_DOCUMENT_NODE= 13,
XML_DTD_NODE= 14,
XML_ELEMENT_DECL= 15,
XML_ATTRIBUTE_DECL= 16,
XML_ENTITY_DECL= 17,
XML_NAMESPACE_DECL= 18,
XML_XINCLUDE_START= 19,
XML_XINCLUDE_END= 20
/* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
} xmlElementType;
/** DOC_DISABLE */
/* For backward compatibility */
#define XML_DOCB_DOCUMENT_NODE 21
/** DOC_ENABLE */
/**
* xmlNotation:
*
* A DTD Notation definition.
*/
typedef struct _xmlNotation xmlNotation;
typedef xmlNotation *xmlNotationPtr;
struct _xmlNotation {
const xmlChar *name; /* Notation name */
const xmlChar *PublicID; /* Public identifier, if any */
const xmlChar *SystemID; /* System identifier, if any */
};
/**
* xmlAttributeType:
*
* A DTD Attribute type definition.
*/
typedef enum {
XML_ATTRIBUTE_CDATA = 1,
XML_ATTRIBUTE_ID,
XML_ATTRIBUTE_IDREF ,
XML_ATTRIBUTE_IDREFS,
XML_ATTRIBUTE_ENTITY,
XML_ATTRIBUTE_ENTITIES,
XML_ATTRIBUTE_NMTOKEN,
XML_ATTRIBUTE_NMTOKENS,
XML_ATTRIBUTE_ENUMERATION,
XML_ATTRIBUTE_NOTATION
} xmlAttributeType;
/**
* xmlAttributeDefault:
*
* A DTD Attribute default definition.
*/
typedef enum {
XML_ATTRIBUTE_NONE = 1,
XML_ATTRIBUTE_REQUIRED,
XML_ATTRIBUTE_IMPLIED,
XML_ATTRIBUTE_FIXED
} xmlAttributeDefault;
/**
* xmlEnumeration:
*
* List structure used when there is an enumeration in DTDs.
*/
typedef struct _xmlEnumeration xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr;
struct _xmlEnumeration {
struct _xmlEnumeration *next; /* next one */
const xmlChar *name; /* Enumeration name */
};
/**
* xmlAttribute:
*
* An Attribute declaration in a DTD.
*/
typedef struct _xmlAttribute xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
struct _xmlAttribute {
void *_private; /* application data */
xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
const xmlChar *name; /* Attribute name */
struct _xmlNode *children; /* NULL */
struct _xmlNode *last; /* NULL */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
struct _xmlAttribute *nexth; /* next in hash table */
xmlAttributeType atype; /* The attribute type */
xmlAttributeDefault def; /* the default */
const xmlChar *defaultValue; /* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
const xmlChar *prefix; /* the namespace prefix if any */
const xmlChar *elem; /* Element holding the attribute */
};
/**
* xmlElementContentType:
*
* Possible definitions of element content types.
*/
typedef enum {
XML_ELEMENT_CONTENT_PCDATA = 1,
XML_ELEMENT_CONTENT_ELEMENT,
XML_ELEMENT_CONTENT_SEQ,
XML_ELEMENT_CONTENT_OR
} xmlElementContentType;
/**
* xmlElementContentOccur:
*
* Possible definitions of element content occurrences.
*/
typedef enum {
XML_ELEMENT_CONTENT_ONCE = 1,
XML_ELEMENT_CONTENT_OPT,
XML_ELEMENT_CONTENT_MULT,
XML_ELEMENT_CONTENT_PLUS
} xmlElementContentOccur;
/**
* xmlElementContent:
*
* An XML Element content as stored after parsing an element definition
* in a DTD.
*/
typedef struct _xmlElementContent xmlElementContent;
typedef xmlElementContent *xmlElementContentPtr;
struct _xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
const xmlChar *name; /* Element name */
struct _xmlElementContent *c1; /* first child */
struct _xmlElementContent *c2; /* second child */
struct _xmlElementContent *parent; /* parent */
const xmlChar *prefix; /* Namespace prefix */
};
/**
* xmlElementTypeVal:
*
* The different possibilities for an element content type.
*/
typedef enum {
XML_ELEMENT_TYPE_UNDEFINED = 0,
XML_ELEMENT_TYPE_EMPTY = 1,
XML_ELEMENT_TYPE_ANY,
XML_ELEMENT_TYPE_MIXED,
XML_ELEMENT_TYPE_ELEMENT
} xmlElementTypeVal;
/**
* xmlElement:
*
* An XML Element declaration from a DTD.
*/
typedef struct _xmlElement xmlElement;
typedef xmlElement *xmlElementPtr;
struct _xmlElement {
void *_private; /* application data */
xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
const xmlChar *name; /* Element name */
struct _xmlNode *children; /* NULL */
struct _xmlNode *last; /* NULL */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlElementTypeVal etype; /* The type */
xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */
const xmlChar *prefix; /* the namespace prefix if any */
#ifdef LIBXML_REGEXP_ENABLED
xmlRegexpPtr contModel; /* the validating regexp */
#else
void *contModel;
#endif
};
/**
* XML_LOCAL_NAMESPACE:
*
* A namespace declaration node.
*/
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
typedef xmlElementType xmlNsType;
/**
* xmlNs:
*
* An XML namespace.
* Note that prefix == NULL is valid, it defines the default namespace
* within the subtree (until overridden).
*
* xmlNsType is unified with xmlElementType.
*/
typedef struct _xmlNs xmlNs;
typedef xmlNs *xmlNsPtr;
struct _xmlNs {
struct _xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
const xmlChar *href; /* URL for the namespace */
const xmlChar *prefix; /* prefix for the namespace */
void *_private; /* application data */
struct _xmlDoc *context; /* normally an xmlDoc */
};
/**
* xmlDtd:
*
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for
* the internal subset and for the external subset.
*/
typedef struct _xmlDtd xmlDtd;
typedef xmlDtd *xmlDtdPtr;
struct _xmlDtd {
void *_private; /* application data */
xmlElementType type; /* XML_DTD_NODE, must be second ! */
const xmlChar *name; /* Name of the DTD */
struct _xmlNode *children; /* the value of the property link */
struct _xmlNode *last; /* last child link */
struct _xmlDoc *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
/* End of common part */
void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */
void *entities; /* Hash table for entities if any */
const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *pentities; /* Hash table for param entities if any */
};
/**
* xmlAttr:
*
* An attribute on an XML node.
*/
typedef struct _xmlAttr xmlAttr;
typedef xmlAttr *xmlAttrPtr;
struct _xmlAttr {
void *_private; /* application data */
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
const xmlChar *name; /* the name of the property */
struct _xmlNode *children; /* the value of the property */
struct _xmlNode *last; /* NULL */
struct _xmlNode *parent; /* child->parent link */
struct _xmlAttr *next; /* next sibling link */
struct _xmlAttr *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlNs *ns; /* pointer to the associated namespace */
xmlAttributeType atype; /* the attribute type if validating */
void *psvi; /* for type/PSVI information */
struct _xmlID *id; /* the ID struct */
};
/**
* xmlID:
*
* An XML ID instance.
*/
typedef struct _xmlID xmlID;
typedef xmlID *xmlIDPtr;
struct _xmlID {
struct _xmlID *next; /* next ID */
const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribute holding it */
const xmlChar *name; /* The attribute if attr is not available */
int lineno; /* The line number if attr is not available */
struct _xmlDoc *doc; /* The document holding the ID */
};
/**
* xmlRef:
*
* An XML IDREF instance.
*/
typedef struct _xmlRef xmlRef;
typedef xmlRef *xmlRefPtr;
struct _xmlRef {
struct _xmlRef *next; /* next Ref */
const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribute holding it */
const xmlChar *name; /* The attribute if attr is not available */
int lineno; /* The line number if attr is not available */
};
/**
* xmlNode:
*
* A node in an XML tree.
*/
typedef struct _xmlNode xmlNode;
typedef xmlNode *xmlNodePtr;
struct _xmlNode {
void *_private; /* application data */
xmlElementType type; /* type number, must be second ! */
const xmlChar *name; /* the name of the node, or the entity */
struct _xmlNode *children; /* parent->childs link */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
/* End of common part */
xmlNs *ns; /* pointer to the associated namespace */
xmlChar *content; /* the content */
struct _xmlAttr *properties;/* properties list */
xmlNs *nsDef; /* namespace definitions on this node */
void *psvi; /* for type/PSVI information */
unsigned short line; /* line number */
unsigned short extra; /* extra data for XPath/XSLT */
};
/**
* XML_GET_CONTENT:
*
* Macro to extract the content pointer of a node.
*/
#define XML_GET_CONTENT(n) \
((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
/**
* XML_GET_LINE:
*
* Macro to extract the line number of an element node.
*/
#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 similarly 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:
*
* An XML document.
*/
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc *xmlDocPtr;
struct _xmlDoc {
void *_private; /* application data */
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
struct _xmlNode *children; /* the document tree */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* autoreference to itself */
/* End of common part */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs)
1 if standalone="yes"
0 if standalone="no"
-1 if there is no XML declaration
-2 if there is an XML declaration, but no
standalone attribute was specified */
struct _xmlDtd *intSubset; /* the document internal subset */
struct _xmlDtd *extSubset; /* the document external subset */
struct _xmlNs *oldNs; /* Global namespace, the old way */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* actual encoding, if any */
void *ids; /* Hash table for ID attributes if any */
void *refs; /* Hash table for IDREFs attributes if any */
const xmlChar *URL; /* The URI for that document */
int charset; /* unused */
struct _xmlDict *dict; /* dict used to allocate names or NULL */
void *psvi; /* for type/PSVI information */
int parseFlags; /* set of xmlParserOption used to parse the
document */
int properties; /* set of xmlDocProperties for this document
set at the end of parsing */
};
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
/**
* xmlDOMWrapAcquireNsFunction:
* @ctxt: a DOM wrapper context
* @node: the context node (element or attribute)
* @nsName: the requested namespace name
* @nsPrefix: the requested namespace prefix
*
* A function called to acquire namespaces (xmlNs) from the wrapper.
*
* Returns an xmlNsPtr or NULL in case of an error.
*/
typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr node,
const xmlChar *nsName,
const xmlChar *nsPrefix);
/**
* xmlDOMWrapCtxt:
*
* Context for DOM wrapper-operations.
*/
struct _xmlDOMWrapCtxt {
void * _private;
/*
* The type of this context, just in case we need specialized
* contexts in the future.
*/
int type;
/*
* Internal namespace map used for various operations.
*/
void * namespaceMap;
/*
* Use this one to acquire an xmlNsPtr intended for node->ns.
* (Note that this is not intended for elem->nsDef).
*/
xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
};
/**
* 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);
/**
* xmlChildrenNode:
*
* Macro for compatibility naming layer with libxml1. Maps
* to "children."
*/
#ifndef xmlChildrenNode
#define xmlChildrenNode children
#endif
/**
* xmlRootNode:
*
* Macro for compatibility naming layer with libxml1. Maps
* to "children".
*/
#ifndef xmlRootNode
#define xmlRootNode children
#endif
/*
* Variables.
*/
/** DOC_DISABLE */
#define XML_GLOBALS_TREE \
XML_OP(xmlBufferAllocScheme, xmlBufferAllocationScheme, XML_DEPRECATED) \
XML_OP(xmlDefaultBufferSize, int, XML_DEPRECATED) \
XML_OP(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc, XML_DEPRECATED) \
XML_OP(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc, \
XML_DEPRECATED)
#define XML_OP XML_DECLARE_GLOBAL
XML_GLOBALS_TREE
#undef XML_OP
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
#define xmlBufferAllocScheme XML_GLOBAL_MACRO(xmlBufferAllocScheme)
#define xmlDefaultBufferSize XML_GLOBAL_MACRO(xmlDefaultBufferSize)
#define xmlRegisterNodeDefaultValue \
XML_GLOBAL_MACRO(xmlRegisterNodeDefaultValue)
#define xmlDeregisterNodeDefaultValue \
XML_GLOBAL_MACRO(xmlDeregisterNodeDefaultValue)
#endif
/** DOC_ENABLE */
/*
* Some helper functions
*/
XMLPUBFUN int
xmlValidateNCName (const xmlChar *value,
int space);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int
xmlValidateQName (const xmlChar *value,
int space);
XMLPUBFUN int
xmlValidateName (const xmlChar *value,
int space);
XMLPUBFUN int
xmlValidateNMToken (const xmlChar *value,
int space);
#endif
XMLPUBFUN xmlChar *
xmlBuildQName (const xmlChar *ncname,
const xmlChar *prefix,
xmlChar *memory,
int len);
XMLPUBFUN xmlChar *
xmlSplitQName2 (const xmlChar *name,
xmlChar **prefix);
XMLPUBFUN const xmlChar *
xmlSplitQName3 (const xmlChar *name,
int *len);
/*
* Handling Buffers, the old ones see @xmlBuf for the new ones.
*/
XMLPUBFUN void
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
XMLPUBFUN xmlBufferAllocationScheme
xmlGetBufferAllocationScheme(void);
XMLPUBFUN xmlBufferPtr
xmlBufferCreate (void);
XMLPUBFUN xmlBufferPtr
xmlBufferCreateSize (size_t size);
XMLPUBFUN xmlBufferPtr
xmlBufferCreateStatic (void *mem,
size_t size);
XMLPUBFUN int
xmlBufferResize (xmlBufferPtr buf,
unsigned int size);
XMLPUBFUN void
xmlBufferFree (xmlBufferPtr buf);
XMLPUBFUN int
xmlBufferDump (FILE *file,
xmlBufferPtr buf);
XMLPUBFUN int
xmlBufferAdd (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int
xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int
xmlBufferCat (xmlBufferPtr buf,
const xmlChar *str);
XMLPUBFUN int
xmlBufferCCat (xmlBufferPtr buf,
const char *str);
XMLPUBFUN int
xmlBufferShrink (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN int
xmlBufferGrow (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN void
xmlBufferEmpty (xmlBufferPtr buf);
XMLPUBFUN const xmlChar*
xmlBufferContent (const xmlBuffer *buf);
XMLPUBFUN xmlChar*
xmlBufferDetach (xmlBufferPtr buf);
XMLPUBFUN void
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme);
XMLPUBFUN int
xmlBufferLength (const xmlBuffer *buf);
/*
* Creating/freeing new structures.
*/
XMLPUBFUN xmlDtdPtr
xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr
xmlNewDtd (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr
xmlGetIntSubset (const xmlDoc *doc);
XMLPUBFUN void
xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
XMLPUBFUN xmlNsPtr
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
const xmlChar *prefix);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlNsPtr
xmlNewNs (xmlNodePtr node,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void
xmlFreeNs (xmlNsPtr cur);
XMLPUBFUN void
xmlFreeNsList (xmlNsPtr cur);
XMLPUBFUN xmlDocPtr
xmlNewDoc (const xmlChar *version);
XMLPUBFUN void
xmlFreeDoc (xmlDocPtr cur);
XMLPUBFUN xmlAttrPtr
xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *value);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlAttrPtr
xmlNewProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif
XMLPUBFUN xmlAttrPtr
xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr
xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *value);
XMLPUBFUN void
xmlFreePropList (xmlAttrPtr cur);
XMLPUBFUN void
xmlFreeProp (xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr
xmlCopyProp (xmlNodePtr target,
xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr
xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlDtdPtr
xmlCopyDtd (xmlDtdPtr dtd);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlDocPtr
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Creating new nodes.
*/
XMLPUBFUN xmlNodePtr
xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewDocNodeEatName (xmlDocPtr doc,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewNode (xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN xmlNodePtr
xmlNewNodeEatName (xmlNsPtr ns,
xmlChar *name);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr
xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
#endif
XMLPUBFUN xmlNodePtr
xmlNewDocText (const xmlDoc *doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewText (const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewDocPI (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewPI (const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr
xmlNewTextLen (const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr
xmlNewDocComment (xmlDocPtr doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewComment (const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr
xmlNewCharRef (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr
xmlNewReference (const xmlDoc *doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr
xmlCopyNode (xmlNodePtr node,
int recursive);
XMLPUBFUN xmlNodePtr
xmlDocCopyNode (xmlNodePtr node,
xmlDocPtr doc,
int recursive);
XMLPUBFUN xmlNodePtr
xmlDocCopyNodeList (xmlDocPtr doc,
xmlNodePtr node);
XMLPUBFUN xmlNodePtr
xmlCopyNodeList (xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */
/*
* Navigating.
*/
XMLPUBFUN long
xmlGetLineNo (const xmlNode *node);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
XMLPUBFUN xmlChar *
xmlGetNodePath (const xmlNode *node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
XMLPUBFUN xmlNodePtr
xmlDocGetRootElement (const xmlDoc *doc);
XMLPUBFUN xmlNodePtr
xmlGetLastChild (const xmlNode *parent);
XMLPUBFUN int
xmlNodeIsText (const xmlNode *node);
XMLPUBFUN int
xmlIsBlankNode (const xmlNode *node);
/*
* Changing the structure.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr
xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr
xmlAddChild (xmlNodePtr parent,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
XMLPUBFUN xmlNodePtr
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN xmlNodePtr
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN xmlNodePtr
xmlAddNextSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN void
xmlUnlinkNode (xmlNodePtr cur);
XMLPUBFUN xmlNodePtr
xmlTextMerge (xmlNodePtr first,
xmlNodePtr second);
XMLPUBFUN int
xmlTextConcat (xmlNodePtr node,
const xmlChar *content,
int len);
XMLPUBFUN void
xmlFreeNodeList (xmlNodePtr cur);
XMLPUBFUN void
xmlFreeNode (xmlNodePtr cur);
XMLPUBFUN int
xmlSetTreeDoc (xmlNodePtr tree,
xmlDocPtr doc);
XMLPUBFUN int
xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc);
/*
* Namespaces.
*/
XMLPUBFUN xmlNsPtr
xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *nameSpace);
XMLPUBFUN xmlNsPtr
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int
xmlGetNsListSafe (const xmlDoc *doc,
const xmlNode *node,
xmlNsPtr **out);
XMLPUBFUN xmlNsPtr *
xmlGetNsList (const xmlDoc *doc,
const xmlNode *node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
XMLPUBFUN void
xmlSetNs (xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN xmlNsPtr
xmlCopyNamespace (xmlNsPtr cur);
XMLPUBFUN xmlNsPtr
xmlCopyNamespaceList (xmlNsPtr cur);
/*
* Changing the content.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
XMLPUBFUN xmlAttrPtr
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
XMLPUBFUN int
xmlNodeGetAttrValue (const xmlNode *node,
const xmlChar *name,
const xmlChar *nsUri,
xmlChar **out);
XMLPUBFUN xmlChar *
xmlGetNoNsProp (const xmlNode *node,
const xmlChar *name);
XMLPUBFUN xmlChar *
xmlGetProp (const xmlNode *node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr
xmlHasProp (const xmlNode *node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr
xmlHasNsProp (const xmlNode *node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlChar *
xmlGetNsProp (const xmlNode *node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlNodePtr
xmlStringGetNodeList (const xmlDoc *doc,
const xmlChar *value);
XMLPUBFUN xmlNodePtr
xmlStringLenGetNodeList (const xmlDoc *doc,
const xmlChar *value,
int len);
XMLPUBFUN xmlChar *
xmlNodeListGetString (xmlDocPtr doc,
const xmlNode *list,
int inLine);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlChar *
xmlNodeListGetRawString (const xmlDoc *doc,
const xmlNode *list,
int inLine);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN int
xmlNodeSetContent (xmlNodePtr cur,
const xmlChar *content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN int
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN int
xmlNodeAddContent (xmlNodePtr cur,
const xmlChar *content);
XMLPUBFUN int
xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
XMLPUBFUN xmlChar *
xmlNodeGetContent (const xmlNode *cur);
XMLPUBFUN int
xmlNodeBufGetContent (xmlBufferPtr buffer,
const xmlNode *cur);
XMLPUBFUN int
xmlBufGetNodeContent (xmlBufPtr buf,
const xmlNode *cur);
XMLPUBFUN xmlChar *
xmlNodeGetLang (const xmlNode *cur);
XMLPUBFUN int
xmlNodeGetSpacePreserve (const xmlNode *cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN int
xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
XMLPUBFUN int
xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN int
xmlNodeGetBaseSafe (const xmlDoc *doc,
const xmlNode *cur,
xmlChar **baseOut);
XMLPUBFUN xmlChar *
xmlNodeGetBase (const xmlDoc *doc,
const xmlNode *cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
XMLPUBFUN int
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
#endif
/*
* Removing content.
*/
XMLPUBFUN int
xmlRemoveProp (xmlAttrPtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN int
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Internal, don't use.
*/
XMLPUBFUN void
xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar *string);
XMLPUBFUN void
xmlBufferWriteChar (xmlBufferPtr buf,
const char *string);
XMLPUBFUN void
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar *string);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_TREE_ENABLED
/*
* Namespace handling.
*/
XMLPUBFUN int
xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree);
#endif
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Saving.
*/
XMLPUBFUN void
xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN void
xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding);
XMLPUBFUN void
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding,
int format);
XMLPUBFUN int
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
XMLPUBFUN int
xmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN void
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int
xmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
XMLPUBFUN size_t
xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char *encoding);
XMLPUBFUN int
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN int
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* XHTML
*/
XMLPUBFUN int
xmlIsXHTML (const xmlChar *systemID,
const xmlChar *publicID);
/*
* Compression.
*/
XMLPUBFUN int
xmlGetDocCompressMode (const xmlDoc *doc);
XMLPUBFUN void
xmlSetDocCompressMode (xmlDocPtr doc,
int mode);
XML_DEPRECATED
XMLPUBFUN int
xmlGetCompressMode (void);
XML_DEPRECATED
XMLPUBFUN void
xmlSetCompressMode (int mode);
/*
* DOM-wrapper helper functions.
*/
XMLPUBFUN xmlDOMWrapCtxtPtr
xmlDOMWrapNewCtxt (void);
XMLPUBFUN void
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
XMLPUBFUN int
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr elem,
int options);
XMLPUBFUN int
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options);
XMLPUBFUN int
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr node,
int options);
XMLPUBFUN int
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlNodePtr *clonedNode,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int deep,
int options);
#ifdef LIBXML_TREE_ENABLED
/*
* 5 interfaces from DOM ElementTraversal, but different in entities
* traversal.
*/
XMLPUBFUN unsigned long
xmlChildElementCount (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr
xmlNextElementSibling (xmlNodePtr node);
XMLPUBFUN xmlNodePtr
xmlFirstElementChild (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr
xmlLastElementChild (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr
xmlPreviousElementSibling (xmlNodePtr node);
#endif
XML_DEPRECATED
XMLPUBFUN xmlRegisterNodeFunc
xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
XML_DEPRECATED
XMLPUBFUN xmlDeregisterNodeFunc
xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
XML_DEPRECATED
XMLPUBFUN xmlRegisterNodeFunc
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
XML_DEPRECATED
XMLPUBFUN xmlDeregisterNodeFunc
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefDefaultBufferSize (int v);
#ifdef __cplusplus
}
#endif
#endif /* __XML_TREE_H__ */
#endif /* XML_TREE_INTERNALS */
include/libxml2/libxml/list.h 0000644 00000006070 15033621455 0012162 0 ustar 00 /*
* Summary: lists interfaces
* Description: this module implement the list support used in
* various place in the library.
*
* Copy: See Copyright for the status of this software.
*
* Author: Gary Pennington <Gary.Pennington@uk.sun.com>
*/
#ifndef __XML_LINK_INCLUDE__
#define __XML_LINK_INCLUDE__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlLink xmlLink;
typedef xmlLink *xmlLinkPtr;
typedef struct _xmlList xmlList;
typedef xmlList *xmlListPtr;
/**
* xmlListDeallocator:
* @lk: the data to deallocate
*
* Callback function used to free data from a list.
*/
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
/**
* xmlListDataCompare:
* @data0: the first data
* @data1: the second data
*
* Callback function used to compare 2 data.
*
* Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
*/
typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
/**
* xmlListWalker:
* @data: the data found in the list
* @user: extra user provided data to the walker
*
* Callback function used when walking a list with xmlListWalk().
*
* Returns 0 to stop walking the list, 1 otherwise.
*/
typedef int (*xmlListWalker) (const void *data, void *user);
/* Creation/Deletion */
XMLPUBFUN xmlListPtr
xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare);
XMLPUBFUN void
xmlListDelete (xmlListPtr l);
/* Basic Operators */
XMLPUBFUN void *
xmlListSearch (xmlListPtr l,
void *data);
XMLPUBFUN void *
xmlListReverseSearch (xmlListPtr l,
void *data);
XMLPUBFUN int
xmlListInsert (xmlListPtr l,
void *data) ;
XMLPUBFUN int
xmlListAppend (xmlListPtr l,
void *data) ;
XMLPUBFUN int
xmlListRemoveFirst (xmlListPtr l,
void *data);
XMLPUBFUN int
xmlListRemoveLast (xmlListPtr l,
void *data);
XMLPUBFUN int
xmlListRemoveAll (xmlListPtr l,
void *data);
XMLPUBFUN void
xmlListClear (xmlListPtr l);
XMLPUBFUN int
xmlListEmpty (xmlListPtr l);
XMLPUBFUN xmlLinkPtr
xmlListFront (xmlListPtr l);
XMLPUBFUN xmlLinkPtr
xmlListEnd (xmlListPtr l);
XMLPUBFUN int
xmlListSize (xmlListPtr l);
XMLPUBFUN void
xmlListPopFront (xmlListPtr l);
XMLPUBFUN void
xmlListPopBack (xmlListPtr l);
XMLPUBFUN int
xmlListPushFront (xmlListPtr l,
void *data);
XMLPUBFUN int
xmlListPushBack (xmlListPtr l,
void *data);
/* Advanced Operators */
XMLPUBFUN void
xmlListReverse (xmlListPtr l);
XMLPUBFUN void
xmlListSort (xmlListPtr l);
XMLPUBFUN void
xmlListWalk (xmlListPtr l,
xmlListWalker walker,
void *user);
XMLPUBFUN void
xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker,
void *user);
XMLPUBFUN void
xmlListMerge (xmlListPtr l1,
xmlListPtr l2);
XMLPUBFUN xmlListPtr
xmlListDup (xmlListPtr old);
XMLPUBFUN int
xmlListCopy (xmlListPtr cur,
xmlListPtr old);
/* Link operators */
XMLPUBFUN void *
xmlLinkGetData (xmlLinkPtr lk);
/* xmlListUnique() */
/* xmlListSwap */
#ifdef __cplusplus
}
#endif
#endif /* __XML_LINK_INCLUDE__ */
include/libxml2/libxml/xmlstring.h 0000644 00000012227 15033621455 0013237 0 ustar 00 /*
* Summary: set of routines to process strings
* Description: type and interfaces needed for the internal string handling
* of the library, especially UTF8 processing.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_STRING_H__
#define __XML_STRING_H__
#include <stdarg.h>
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlChar:
*
* This is a basic byte in an UTF-8 encoded string.
* It's unsigned allowing to pinpoint case where char * are assigned
* to xmlChar * (possibly making serialization back impossible).
*/
typedef unsigned char xmlChar;
/**
* BAD_CAST:
*
* Macro to cast a string to an xmlChar * when one know its safe.
*/
#define BAD_CAST (xmlChar *)
/*
* xmlChar handling
*/
XMLPUBFUN xmlChar *
xmlStrdup (const xmlChar *cur);
XMLPUBFUN xmlChar *
xmlStrndup (const xmlChar *cur,
int len);
XMLPUBFUN xmlChar *
xmlCharStrndup (const char *cur,
int len);
XMLPUBFUN xmlChar *
xmlCharStrdup (const char *cur);
XMLPUBFUN xmlChar *
xmlStrsub (const xmlChar *str,
int start,
int len);
XMLPUBFUN const xmlChar *
xmlStrchr (const xmlChar *str,
xmlChar val);
XMLPUBFUN const xmlChar *
xmlStrstr (const xmlChar *str,
const xmlChar *val);
XMLPUBFUN const xmlChar *
xmlStrcasestr (const xmlChar *str,
const xmlChar *val);
XMLPUBFUN int
xmlStrcmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int
xmlStrncmp (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int
xmlStrcasecmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int
xmlStrncasecmp (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int
xmlStrEqual (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int
xmlStrQEqual (const xmlChar *pref,
const xmlChar *name,
const xmlChar *str);
XMLPUBFUN int
xmlStrlen (const xmlChar *str);
XMLPUBFUN xmlChar *
xmlStrcat (xmlChar *cur,
const xmlChar *add);
XMLPUBFUN xmlChar *
xmlStrncat (xmlChar *cur,
const xmlChar *add,
int len);
XMLPUBFUN xmlChar *
xmlStrncatNew (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int
xmlStrPrintf (xmlChar *buf,
int len,
const char *msg,
...) LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlStrVPrintf (xmlChar *buf,
int len,
const char *msg,
va_list ap) LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int
xmlGetUTF8Char (const unsigned char *utf,
int *len);
XMLPUBFUN int
xmlCheckUTF8 (const unsigned char *utf);
XMLPUBFUN int
xmlUTF8Strsize (const xmlChar *utf,
int len);
XMLPUBFUN xmlChar *
xmlUTF8Strndup (const xmlChar *utf,
int len);
XMLPUBFUN const xmlChar *
xmlUTF8Strpos (const xmlChar *utf,
int pos);
XMLPUBFUN int
xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar);
XMLPUBFUN xmlChar *
xmlUTF8Strsub (const xmlChar *utf,
int start,
int len);
XMLPUBFUN int
xmlUTF8Strlen (const xmlChar *utf);
XMLPUBFUN int
xmlUTF8Size (const xmlChar *utf);
XMLPUBFUN int
xmlUTF8Charcmp (const xmlChar *utf1,
const xmlChar *utf2);
#ifdef __cplusplus
}
#endif
#endif /* __XML_STRING_H__ */
include/libxml2/libxml/SAX2.h 0000644 00000010516 15033621455 0011724 0 ustar 00 /*
* Summary: SAX2 parser interface used to build the DOM tree
* Description: those are the default SAX2 interfaces used by
* the library when building DOM tree.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SAX2_H__
#define __XML_SAX2_H__
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN const xmlChar *
xmlSAX2GetPublicId (void *ctx);
XMLPUBFUN const xmlChar *
xmlSAX2GetSystemId (void *ctx);
XMLPUBFUN void
xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int
xmlSAX2GetLineNumber (void *ctx);
XMLPUBFUN int
xmlSAX2GetColumnNumber (void *ctx);
XMLPUBFUN int
xmlSAX2IsStandalone (void *ctx);
XMLPUBFUN int
xmlSAX2HasInternalSubset (void *ctx);
XMLPUBFUN int
xmlSAX2HasExternalSubset (void *ctx);
XMLPUBFUN void
xmlSAX2InternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void
xmlSAX2ExternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr
xmlSAX2GetEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlSAX2GetParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr
xmlSAX2ResolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void
xmlSAX2EntityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void
xmlSAX2AttributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void
xmlSAX2ElementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void
xmlSAX2NotationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void
xmlSAX2UnparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
XMLPUBFUN void
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void
xmlSAX2EndElement (void *ctx,
const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
XMLPUBFUN void
xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
XMLPUBFUN void
xmlSAX2EndElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
XMLPUBFUN void
xmlSAX2Reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void
xmlSAX2Characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void
xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void
xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void
xmlSAX2Comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void
xmlSAX2CDataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN int
xmlSAXDefaultVersion (int version);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int
xmlSAXVersion (xmlSAXHandler *hdlr,
int version);
XMLPUBFUN void
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
XML_DEPRECATED
XMLPUBFUN void
htmlDefaultSAXHandlerInit (void);
#endif
XML_DEPRECATED
XMLPUBFUN void
xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
}
#endif
#endif /* __XML_SAX2_H__ */
include/libxml2/libxml/xmlschemas.h 0000644 00000015366 15033621455 0013363 0 ustar 00 /*
* Summary: incomplete XML Schemas structure implementation
* Description: interface to the XML Schemas handling and schema validity
* checking, it is incomplete right now.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMA_H__
#define __XML_SCHEMA_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <stdio.h>
#include <libxml/encoding.h>
#include <libxml/tree.h>
#include <libxml/xmlerror.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* This error codes are obsolete; not used any more.
*/
typedef enum {
XML_SCHEMAS_ERR_OK = 0,
XML_SCHEMAS_ERR_NOROOT = 1,
XML_SCHEMAS_ERR_UNDECLAREDELEM,
XML_SCHEMAS_ERR_NOTTOPLEVEL,
XML_SCHEMAS_ERR_MISSING,
XML_SCHEMAS_ERR_WRONGELEM,
XML_SCHEMAS_ERR_NOTYPE,
XML_SCHEMAS_ERR_NOROLLBACK,
XML_SCHEMAS_ERR_ISABSTRACT,
XML_SCHEMAS_ERR_NOTEMPTY,
XML_SCHEMAS_ERR_ELEMCONT,
XML_SCHEMAS_ERR_HAVEDEFAULT,
XML_SCHEMAS_ERR_NOTNILLABLE,
XML_SCHEMAS_ERR_EXTRACONTENT,
XML_SCHEMAS_ERR_INVALIDATTR,
XML_SCHEMAS_ERR_INVALIDELEM,
XML_SCHEMAS_ERR_NOTDETERMINIST,
XML_SCHEMAS_ERR_CONSTRUCT,
XML_SCHEMAS_ERR_INTERNAL,
XML_SCHEMAS_ERR_NOTSIMPLE,
XML_SCHEMAS_ERR_ATTRUNKNOWN,
XML_SCHEMAS_ERR_ATTRINVALID,
XML_SCHEMAS_ERR_VALUE,
XML_SCHEMAS_ERR_FACET,
XML_SCHEMAS_ERR_,
XML_SCHEMAS_ERR_XXX
} xmlSchemaValidError;
/*
* ATTENTION: Change xmlSchemaSetValidOptions's check
* for invalid values, if adding to the validation
* options below.
*/
/**
* xmlSchemaValidOption:
*
* This is the set of XML Schema validation options.
*/
typedef enum {
XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
/* Default/fixed: create an attribute node
* or an element's text node on the instance.
*/
} xmlSchemaValidOption;
/*
XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
* assemble schemata using
* xsi:schemaLocation and
* xsi:noNamespaceSchemaLocation
*/
/**
* The schemas related types are kept internal
*/
typedef struct _xmlSchema xmlSchema;
typedef xmlSchema *xmlSchemaPtr;
/**
* xmlSchemaValidityErrorFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of an error callback from an XSD validation
*/
typedef void (*xmlSchemaValidityErrorFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlSchemaValidityWarningFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of a warning callback from an XSD validation
*/
typedef void (*xmlSchemaValidityWarningFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* A schemas validation context
*/
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
/**
* xmlSchemaValidityLocatorFunc:
* @ctx: user provided context
* @file: returned file information
* @line: returned line information
*
* A schemas validation locator, a callback called by the validator.
* This is used when file or node information are not available
* to find out what file and line number are affected
*
* Returns: 0 in case of success and -1 in case of error
*/
typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
const char **file, unsigned long *line);
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewMemParserCtxt (const char *buffer,
int size);
XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN void
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void **ctx);
XMLPUBFUN int
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaPtr
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void
xmlSchemaFree (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlSchemaDump (FILE *output,
xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
XMLPUBFUN void
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err,
xmlSchemaValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN int
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options);
XMLPUBFUN void
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
const char *filename);
XMLPUBFUN int
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaValidCtxtPtr
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
XMLPUBFUN void
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN int
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance);
XMLPUBFUN int
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem);
XMLPUBFUN int
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void *user_data);
XMLPUBFUN int
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename,
int options);
XMLPUBFUN xmlParserCtxtPtr
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
/*
* Interface to insert Schemas SAX validation in a SAX stream
*/
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
XMLPUBFUN xmlSchemaSAXPlugPtr
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr *sax,
void **user_data);
XMLPUBFUN int
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
XMLPUBFUN void
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f,
void *ctxt);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_H__ */
include/libxml2/libxml/xmlmodule.h 0000644 00000002162 15033621455 0013213 0 ustar 00 /*
* Summary: dynamic module loading
* Description: basic API for dynamic module loading, used by
* libexslt added in 2.6.17
*
* Copy: See Copyright for the status of this software.
*
* Author: Joel W. Reed
*/
#ifndef __XML_MODULE_H__
#define __XML_MODULE_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_MODULES_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlModulePtr:
*
* A handle to a dynamically loaded module
*/
typedef struct _xmlModule xmlModule;
typedef xmlModule *xmlModulePtr;
/**
* xmlModuleOption:
*
* enumeration of options that can be passed down to xmlModuleOpen()
*/
typedef enum {
XML_MODULE_LAZY = 1, /* lazy binding */
XML_MODULE_LOCAL= 2 /* local binding */
} xmlModuleOption;
XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
int options);
XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
const char* name,
void **result);
XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_MODULES_ENABLED */
#endif /*__XML_MODULE_H__ */
include/libxml2/libxml/xmlsave.h 0000644 00000005010 15033621455 0012657 0 ustar 00 /*
* Summary: the XML document serializer
* Description: API to save document or subtree of document
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XMLSAVE_H__
#define __XML_XMLSAVE_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/encoding.h>
#include <libxml/xmlIO.h>
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlSaveOption:
*
* This is the set of XML save options that can be passed down
* to the xmlSaveToFd() and similar calls.
*/
typedef enum {
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 */
XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
} xmlSaveOption;
typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFd (int fd,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFilename (const char *filename,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToBuffer (xmlBufferPtr buffer,
const char *encoding,
int options);
XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
const char *encoding,
int options);
XMLPUBFUN long
xmlSaveDoc (xmlSaveCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN long
xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node);
XMLPUBFUN int
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int
xmlSaveClose (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int
xmlSaveFinish (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
XMLPUBFUN int
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
XML_DEPRECATED
XMLPUBFUN int
xmlThrDefIndentTreeOutput(int v);
XML_DEPRECATED
XMLPUBFUN const char *
xmlThrDefTreeIndentString(const char * v);
XML_DEPRECATED
XMLPUBFUN int
xmlThrDefSaveNoEmptyTags(int v);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_OUTPUT_ENABLED */
#endif /* __XML_XMLSAVE_H__ */
include/libxml2/libxml/pattern.h 0000644 00000005120 15033621455 0012657 0 ustar 00 /*
* Summary: pattern expression handling
* Description: allows to compile and test pattern expressions for nodes
* either in a tree or based on a parser state.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_PATTERN_H__
#define __XML_PATTERN_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/dict.h>
#ifdef LIBXML_PATTERN_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlPattern:
*
* A compiled (XPath based) pattern to select nodes
*/
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
xmlFreePattern (xmlPatternPtr comp);
XMLPUBFUN void
xmlFreePatternList (xmlPatternPtr comp);
XMLPUBFUN xmlPatternPtr
xmlPatterncompile (const xmlChar *pattern,
xmlDict *dict,
int flags,
const xmlChar **namespaces);
XMLPUBFUN int
xmlPatternCompileSafe (const xmlChar *pattern,
xmlDict *dict,
int flags,
const xmlChar **namespaces,
xmlPatternPtr *patternOut);
XMLPUBFUN int
xmlPatternMatch (xmlPatternPtr comp,
xmlNodePtr node);
/* streaming interfaces */
typedef struct _xmlStreamCtxt xmlStreamCtxt;
typedef xmlStreamCtxt *xmlStreamCtxtPtr;
XMLPUBFUN int
xmlPatternStreamable (xmlPatternPtr comp);
XMLPUBFUN int
xmlPatternMaxDepth (xmlPatternPtr comp);
XMLPUBFUN int
xmlPatternMinDepth (xmlPatternPtr comp);
XMLPUBFUN int
xmlPatternFromRoot (xmlPatternPtr comp);
XMLPUBFUN xmlStreamCtxtPtr
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
XMLPUBFUN void
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
XMLPUBFUN int
xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns,
int nodeType);
XMLPUBFUN int
xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int
xmlStreamPushAttr (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int
xmlStreamPop (xmlStreamCtxtPtr stream);
XMLPUBFUN int
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_PATTERN_ENABLED */
#endif /* __XML_PATTERN_H__ */
include/libxml2/libxml/xpathInternals.h 0000644 00000043763 15033621455 0014225 0 ustar 00 /*
* Summary: internal interfaces for XML Path Language implementation
* Description: internal interfaces for XML Path Language implementation
* used to build new modules on top of XPath like XPointer and
* XSLT
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XPATH_INTERNALS_H__
#define __XML_XPATH_INTERNALS_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xpath.h>
#ifdef LIBXML_XPATH_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************
* *
* Helpers *
* *
************************************************************************/
/*
* Many of these macros may later turn into functions. They
* shouldn't be used in #ifdef's preprocessor instructions.
*/
/**
* xmlXPathSetError:
* @ctxt: an XPath parser context
* @err: an xmlXPathError code
*
* Raises an error.
*/
#define xmlXPathSetError(ctxt, err) \
{ xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
if ((ctxt) != NULL) (ctxt)->error = (err); }
/**
* xmlXPathSetArityError:
* @ctxt: an XPath parser context
*
* Raises an XPATH_INVALID_ARITY error.
*/
#define xmlXPathSetArityError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
/**
* xmlXPathSetTypeError:
* @ctxt: an XPath parser context
*
* Raises an XPATH_INVALID_TYPE error.
*/
#define xmlXPathSetTypeError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
/**
* xmlXPathGetError:
* @ctxt: an XPath parser context
*
* Get the error code of an XPath context.
*
* Returns the context error.
*/
#define xmlXPathGetError(ctxt) ((ctxt)->error)
/**
* xmlXPathCheckError:
* @ctxt: an XPath parser context
*
* Check if an XPath error was raised.
*
* Returns true if an error has been raised, false otherwise.
*/
#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
/**
* xmlXPathGetDocument:
* @ctxt: an XPath parser context
*
* Get the document of an XPath context.
*
* Returns the context document.
*/
#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
/**
* xmlXPathGetContextNode:
* @ctxt: an XPath parser context
*
* Get the context node of an XPath context.
*
* Returns the context node.
*/
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
XMLPUBFUN int
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
XMLPUBFUN double
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar *
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void *
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/**
* xmlXPathReturnBoolean:
* @ctxt: an XPath parser context
* @val: a boolean
*
* Pushes the boolean @val on the context stack.
*/
#define xmlXPathReturnBoolean(ctxt, val) \
valuePush((ctxt), xmlXPathNewBoolean(val))
/**
* xmlXPathReturnTrue:
* @ctxt: an XPath parser context
*
* Pushes true on the context stack.
*/
#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
/**
* xmlXPathReturnFalse:
* @ctxt: an XPath parser context
*
* Pushes false on the context stack.
*/
#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
/**
* xmlXPathReturnNumber:
* @ctxt: an XPath parser context
* @val: a double
*
* Pushes the double @val on the context stack.
*/
#define xmlXPathReturnNumber(ctxt, val) \
valuePush((ctxt), xmlXPathNewFloat(val))
/**
* xmlXPathReturnString:
* @ctxt: an XPath parser context
* @str: a string
*
* Pushes the string @str on the context stack.
*/
#define xmlXPathReturnString(ctxt, str) \
valuePush((ctxt), xmlXPathWrapString(str))
/**
* xmlXPathReturnEmptyString:
* @ctxt: an XPath parser context
*
* Pushes an empty string on the stack.
*/
#define xmlXPathReturnEmptyString(ctxt) \
valuePush((ctxt), xmlXPathNewCString(""))
/**
* xmlXPathReturnNodeSet:
* @ctxt: an XPath parser context
* @ns: a node-set
*
* Pushes the node-set @ns on the context stack.
*/
#define xmlXPathReturnNodeSet(ctxt, ns) \
valuePush((ctxt), xmlXPathWrapNodeSet(ns))
/**
* xmlXPathReturnEmptyNodeSet:
* @ctxt: an XPath parser context
*
* Pushes an empty node-set on the context stack.
*/
#define xmlXPathReturnEmptyNodeSet(ctxt) \
valuePush((ctxt), xmlXPathNewNodeSet(NULL))
/**
* xmlXPathReturnExternal:
* @ctxt: an XPath parser context
* @val: user data
*
* Pushes user data on the context stack.
*/
#define xmlXPathReturnExternal(ctxt, val) \
valuePush((ctxt), xmlXPathWrapExternal(val))
/**
* xmlXPathStackIsNodeSet:
* @ctxt: an XPath parser context
*
* Check if the current value on the XPath stack is a node set or
* an XSLT value tree.
*
* Returns true if the current object on the stack is a node-set.
*/
#define xmlXPathStackIsNodeSet(ctxt) \
(((ctxt)->value != NULL) \
&& (((ctxt)->value->type == XPATH_NODESET) \
|| ((ctxt)->value->type == XPATH_XSLT_TREE)))
/**
* xmlXPathStackIsExternal:
* @ctxt: an XPath parser context
*
* Checks if the current value on the XPath stack is an external
* object.
*
* Returns true if the current object on the stack is an external
* object.
*/
#define xmlXPathStackIsExternal(ctxt) \
((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
/**
* xmlXPathEmptyNodeSet:
* @ns: a node-set
*
* Empties a node-set.
*/
#define xmlXPathEmptyNodeSet(ns) \
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; }
/**
* CHECK_ERROR:
*
* Macro to return from the function if an XPath error was detected.
*/
#define CHECK_ERROR \
if (ctxt->error != XPATH_EXPRESSION_OK) return
/**
* CHECK_ERROR0:
*
* Macro to return 0 from the function if an XPath error was detected.
*/
#define CHECK_ERROR0 \
if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
/**
* XP_ERROR:
* @X: the error code
*
* Macro to raise an XPath error and return.
*/
#define XP_ERROR(X) \
{ xmlXPathErr(ctxt, X); return; }
/**
* XP_ERROR0:
* @X: the error code
*
* Macro to raise an XPath error and return 0.
*/
#define XP_ERROR0(X) \
{ xmlXPathErr(ctxt, X); return(0); }
/**
* CHECK_TYPE:
* @typeval: the XPath type
*
* Macro to check that the value on top of the XPath stack is of a given
* type.
*/
#define CHECK_TYPE(typeval) \
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
XP_ERROR(XPATH_INVALID_TYPE)
/**
* CHECK_TYPE0:
* @typeval: the XPath type
*
* Macro to check that the value on top of the XPath stack is of a given
* type. Return(0) in case of failure
*/
#define CHECK_TYPE0(typeval) \
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
XP_ERROR0(XPATH_INVALID_TYPE)
/**
* CHECK_ARITY:
* @x: the number of expected args
*
* Macro to check that the number of args passed to an XPath function matches.
*/
#define CHECK_ARITY(x) \
if (ctxt == NULL) return; \
if (nargs != (x)) \
XP_ERROR(XPATH_INVALID_ARITY); \
if (ctxt->valueNr < (x)) \
XP_ERROR(XPATH_STACK_ERROR);
/**
* CAST_TO_STRING:
*
* Macro to try to cast the value on the top of the XPath stack to a string.
*/
#define CAST_TO_STRING \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
xmlXPathStringFunction(ctxt, 1);
/**
* CAST_TO_NUMBER:
*
* Macro to try to cast the value on the top of the XPath stack to a number.
*/
#define CAST_TO_NUMBER \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
xmlXPathNumberFunction(ctxt, 1);
/**
* CAST_TO_BOOLEAN:
*
* Macro to try to cast the value on the top of the XPath stack to a boolean.
*/
#define CAST_TO_BOOLEAN \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
xmlXPathBooleanFunction(ctxt, 1);
/*
* Variable Lookup forwarding.
*/
XMLPUBFUN void
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f,
void *data);
/*
* Function Lookup forwarding.
*/
XMLPUBFUN void
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt);
/*
* Error reporting.
*/
XMLPUBFUN void
xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char *file,
int line,
int no);
XMLPUBFUN void
xmlXPathErr (xmlXPathParserContextPtr ctxt,
int error);
#ifdef LIBXML_DEBUG_ENABLED
XMLPUBFUN void
xmlXPathDebugDumpObject (FILE *output,
xmlXPathObjectPtr cur,
int depth);
XMLPUBFUN void
xmlXPathDebugDumpCompExpr(FILE *output,
xmlXPathCompExprPtr comp,
int depth);
#endif
/**
* NodeSet handling.
*/
XMLPUBFUN int
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN xmlNodeSetPtr
xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathIntersection (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
XMLPUBFUN xmlNodeSetPtr
xmlXPathDistinct (xmlNodeSetPtr nodes);
XMLPUBFUN int
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr
xmlXPathLeading (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr
xmlXPathTrailing (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
/**
* Extending a context.
*/
XMLPUBFUN int
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
const xmlChar *prefix,
const xmlChar *ns_uri);
XMLPUBFUN const xmlChar *
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
const xmlChar *prefix);
XMLPUBFUN void
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN int
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathFunction f);
XMLPUBFUN int
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathFunction f);
XMLPUBFUN int
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathObjectPtr value);
XMLPUBFUN int
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathFunction
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathFunction
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
/**
* Utilities to extend XPath.
*/
XMLPUBFUN xmlXPathParserContextPtr
xmlXPathNewParserContext (const xmlChar *str,
xmlXPathContextPtr ctxt);
XMLPUBFUN void
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
/* TODO: remap to xmlXPathValuePop and Push. */
XMLPUBFUN xmlXPathObjectPtr
valuePop (xmlXPathParserContextPtr ctxt);
XMLPUBFUN int
valuePush (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewString (const xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewCString (const char *val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapString (xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapCString (char * val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewFloat (double val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewBoolean (int val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewNodeSet (xmlNodePtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewValueTree (xmlNodePtr val);
XMLPUBFUN int
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN int
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN int
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN void
xmlXPathNodeSetSort (xmlNodeSetPtr set);
XMLPUBFUN void
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar *
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar *
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/*
* Existing functions.
*/
XMLPUBFUN double
xmlXPathStringEvalNumber (const xmlChar *str);
XMLPUBFUN int
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res);
XMLPUBFUN void
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
xmlNodeSetPtr val2);
XMLPUBFUN void
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
int val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapExternal (void *val);
XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name);
/*
* Some of the axis navigation routines.
*/
XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
/*
* The official core of XPath functions.
*/
XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
/**
* Really internal functions
*/
XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPATH_ENABLED */
#endif /* ! __XML_XPATH_INTERNALS_H__ */
include/libxml2/libxml/uri.h 0000644 00000005447 15033621455 0012015 0 ustar 00 /**
* Summary: library of generic URI related routines
* Description: library of generic URI related routines
* Implements RFC 2396
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_URI_H__
#define __XML_URI_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlURI:
*
* A parsed URI reference. This is a struct containing the various fields
* as described in RFC 2396 but separated for further processing.
*
* Note: query is a deprecated field which is incorrectly unescaped.
* query_raw takes precedence over query if the former is set.
* See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
*/
typedef struct _xmlURI xmlURI;
typedef xmlURI *xmlURIPtr;
struct _xmlURI {
char *scheme; /* the URI scheme */
char *opaque; /* opaque part */
char *authority; /* the authority part */
char *server; /* the server part */
char *user; /* the user part */
int port; /* the port number */
char *path; /* the path string */
char *query; /* the query string (deprecated - use with caution) */
char *fragment; /* the fragment identifier */
int cleanup; /* parsing potentially unclean URI */
char *query_raw; /* the query string (as it appears in the URI) */
};
/*
* This function is in tree.h:
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
* xmlNodePtr cur);
*/
XMLPUBFUN xmlURIPtr
xmlCreateURI (void);
XMLPUBFUN int
xmlBuildURISafe (const xmlChar *URI,
const xmlChar *base,
xmlChar **out);
XMLPUBFUN xmlChar *
xmlBuildURI (const xmlChar *URI,
const xmlChar *base);
XMLPUBFUN int
xmlBuildRelativeURISafe (const xmlChar *URI,
const xmlChar *base,
xmlChar **out);
XMLPUBFUN xmlChar *
xmlBuildRelativeURI (const xmlChar *URI,
const xmlChar *base);
XMLPUBFUN xmlURIPtr
xmlParseURI (const char *str);
XMLPUBFUN int
xmlParseURISafe (const char *str,
xmlURIPtr *uri);
XMLPUBFUN xmlURIPtr
xmlParseURIRaw (const char *str,
int raw);
XMLPUBFUN int
xmlParseURIReference (xmlURIPtr uri,
const char *str);
XMLPUBFUN xmlChar *
xmlSaveUri (xmlURIPtr uri);
XMLPUBFUN void
xmlPrintURI (FILE *stream,
xmlURIPtr uri);
XMLPUBFUN xmlChar *
xmlURIEscapeStr (const xmlChar *str,
const xmlChar *list);
XMLPUBFUN char *
xmlURIUnescapeString (const char *str,
int len,
char *target);
XMLPUBFUN int
xmlNormalizeURIPath (char *path);
XMLPUBFUN xmlChar *
xmlURIEscape (const xmlChar *str);
XMLPUBFUN void
xmlFreeURI (xmlURIPtr uri);
XMLPUBFUN xmlChar*
xmlCanonicPath (const xmlChar *path);
XMLPUBFUN xmlChar*
xmlPathToURI (const xmlChar *path);
#ifdef __cplusplus
}
#endif
#endif /* __XML_URI_H__ */
include/libxml2/libxml/xmlschemastypes.h 0000644 00000010747 15033621455 0014446 0 ustar 00 /*
* Summary: implementation of XML Schema Datatypes
* Description: module providing the XML Schema Datatypes implementation
* both definition and validity checking
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMA_TYPES_H__
#define __XML_SCHEMA_TYPES_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/schemasInternals.h>
#include <libxml/xmlschemas.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
XML_SCHEMA_WHITESPACE_PRESERVE = 1,
XML_SCHEMA_WHITESPACE_REPLACE = 2,
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
} xmlSchemaWhitespaceValueType;
XMLPUBFUN int
xmlSchemaInitTypes (void);
XML_DEPRECATED
XMLPUBFUN void
xmlSchemaCleanupTypes (void);
XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetPredefinedType (const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val);
XMLPUBFUN int
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlNodePtr node);
XMLPUBFUN int
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val);
XMLPUBFUN int
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN void
xmlSchemaFreeValue (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaFacetPtr
xmlSchemaNewFacet (void);
XMLPUBFUN int
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr ctxt,
const xmlChar *name);
XMLPUBFUN void
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
XMLPUBFUN int
xmlSchemaCompareValues (xmlSchemaValPtr x,
xmlSchemaValPtr y);
XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
XMLPUBFUN int
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
const xmlChar *value,
unsigned long actualLen,
unsigned long *expectedLen);
XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInType (xmlSchemaValType type);
XMLPUBFUN int
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
int facetType);
XMLPUBFUN xmlChar *
xmlSchemaCollapseString (const xmlChar *value);
XMLPUBFUN xmlChar *
xmlSchemaWhiteSpaceReplace (const xmlChar *value);
XMLPUBFUN unsigned long
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
XMLPUBFUN int
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val,
unsigned long *length);
XMLPUBFUN int
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
unsigned long *length,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlNodePtr node);
XMLPUBFUN int
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
const xmlChar **retValue);
XMLPUBFUN int
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
const xmlChar **retValue,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int
xmlSchemaValueAppend (xmlSchemaValPtr prev,
xmlSchemaValPtr cur);
XMLPUBFUN xmlSchemaValPtr
xmlSchemaValueGetNext (xmlSchemaValPtr cur);
XMLPUBFUN const xmlChar *
xmlSchemaValueGetAsString (xmlSchemaValPtr val);
XMLPUBFUN int
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewStringValue (xmlSchemaValType type,
const xmlChar *value);
XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewNOTATIONValue (const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
const xmlChar *localName);
XMLPUBFUN int
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
xmlSchemaWhitespaceValueType xws,
xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws);
XMLPUBFUN xmlSchemaValPtr
xmlSchemaCopyValue (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaValType
xmlSchemaGetValType (xmlSchemaValPtr val);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_TYPES_H__ */
include/libxml2/libxml/schematron.h 0000644 00000010237 15033621455 0013352 0 ustar 00 /*
* Summary: XML Schematron implementation
* Description: interface to the XML Schematron validity checking.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMATRON_H__
#define __XML_SCHEMATRON_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMATRON_ENABLED
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
} xmlSchematronValidOptions;
/**
* The schemas related types are kept internal
*/
typedef struct _xmlSchematron xmlSchematron;
typedef xmlSchematron *xmlSchematronPtr;
/**
* 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;
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewMemParserCtxt(const char *buffer,
int size);
XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
XMLPUBFUN void
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
/*****
XMLPUBFUN void
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc * err,
xmlSchematronValidityWarningFunc * warn,
void **ctx);
XMLPUBFUN int
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
*****/
XMLPUBFUN xmlSchematronPtr
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
XMLPUBFUN void
xmlSchematronFree (xmlSchematronPtr schema);
/*
* Interfaces for validating
*/
XMLPUBFUN void
xmlSchematronSetValidStructuredErrors(
xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
/******
XMLPUBFUN void
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc *err,
xmlSchematronValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN int
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
int options);
XMLPUBFUN int
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
XMLPUBFUN int
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr elem);
*******/
XMLPUBFUN xmlSchematronValidCtxtPtr
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
int options);
XMLPUBFUN void
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
XMLPUBFUN int
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr instance);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMATRON_ENABLED */
#endif /* __XML_SCHEMATRON_H__ */
include/libxml2/libxml/xmlautomata.h 0000644 00000007313 15033621455 0013544 0 ustar 00 /*
* Summary: API to build regexp automata
* Description: the API to build regexp automata
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_AUTOMATA_H__
#define __XML_AUTOMATA_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_REGEXP_ENABLED
#ifdef LIBXML_AUTOMATA_ENABLED
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlAutomataPtr:
*
* A libxml automata description, It can be compiled into a regexp
*/
typedef struct _xmlAutomata xmlAutomata;
typedef xmlAutomata *xmlAutomataPtr;
/**
* xmlAutomataStatePtr:
*
* A state int the automata description,
*/
typedef struct _xmlAutomataState xmlAutomataState;
typedef xmlAutomataState *xmlAutomataStatePtr;
/*
* Building API
*/
XMLPUBFUN xmlAutomataPtr
xmlNewAutomata (void);
XMLPUBFUN void
xmlFreeAutomata (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataGetInitState (xmlAutomataPtr am);
XMLPUBFUN int
xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewState (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN int
xmlAutomataNewCounter (xmlAutomataPtr am,
int min,
int max);
XMLPUBFUN struct _xmlRegexp *
xmlAutomataCompile (xmlAutomataPtr am);
XMLPUBFUN int
xmlAutomataIsDeterminist (xmlAutomataPtr am);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_AUTOMATA_ENABLED */
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* __XML_AUTOMATA_H__ */
include/libxml2/libxml/encoding.h 0000644 00000020261 15033621455 0012773 0 ustar 00 /*
* Summary: interface for the encoding conversion functions
* Description: interface for the encoding conversion functions needed for
* XML basic encoding and iconv() support.
*
* Related specs are
* rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
* [ISO-10646] UTF-8 and UTF-16 in Annexes
* [ISO-8859-1] ISO Latin-1 characters codes.
* [UNICODE] The Unicode Consortium, "The Unicode Standard --
* Worldwide Character Encoding -- Version 1.0", Addison-
* Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
* described in Unicode Technical Report #4.
* [US-ASCII] Coded Character Set--7-bit American Standard Code for
* Information Interchange, ANSI X3.4-1986.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_CHAR_ENCODING_H__
#define __XML_CHAR_ENCODING_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_ICONV_ENABLED
#include <iconv.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_ENC_ERR_SUCCESS = 0,
XML_ENC_ERR_SPACE = -1,
XML_ENC_ERR_INPUT = -2,
XML_ENC_ERR_PARTIAL = -3,
XML_ENC_ERR_INTERNAL = -4,
XML_ENC_ERR_MEMORY = -5
} xmlCharEncError;
/*
* xmlCharEncoding:
*
* Predefined values for some standard encodings.
* Libxml does not do beforehand translation on UTF8 and ISOLatinX.
* It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
*
* Anything else would have to be translated to UTF8 before being
* given to the parser itself. The BOM for UTF16 and the encoding
* declaration are looked at and a converter is looked for at that
* point. If not found the parser stops here as asked by the XML REC. A
* converter can be registered by the user using xmlRegisterCharEncodingHandler
* but the current form doesn't allow stateful transcoding (a serious
* problem agreed !). If iconv has been found it will be used
* automatically and allow stateful transcoding, the simplest is then
* to be sure to enable iconv and to provide iconv libs for the encoding
* support needed.
*
* Note that the generic "UTF-16" is not a predefined value. Instead, only
* the specific UTF-16LE and UTF-16BE are present.
*/
typedef enum {
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
} xmlCharEncoding;
/**
* xmlCharEncodingInputFunc:
* @out: a pointer to an array of bytes to store the UTF-8 result
* @outlen: the length of @out
* @in: a pointer to an array of chars in the original encoding
* @inlen: the length of @in
*
* Take a block of chars in the original encoding and try to convert
* it to an UTF-8 block of chars out.
*
* Returns the number of bytes written, -1 if lack of space, or -2
* if the transcoding failed.
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictiable.
* The value of @outlen after return is the number of octets consumed.
*/
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
const unsigned char *in, int *inlen);
/**
* xmlCharEncodingOutputFunc:
* @out: a pointer to an array of bytes to store the result
* @outlen: the length of @out
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
*
* Take a block of UTF-8 chars in and try to convert it to another
* encoding.
* Note: a first call designed to produce heading info is called with
* in = NULL. If stateful this should also initialize the encoder state.
*
* Returns the number of bytes written, -1 if lack of space, or -2
* if the transcoding failed.
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictiable.
* The value of @outlen after return is the number of octets produced.
*/
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
const unsigned char *in, int *inlen);
/*
* Block defining the handlers for non UTF-8 encodings.
* If iconv is supported, there are two extra fields.
*/
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
struct _xmlCharEncodingHandler {
char *name;
xmlCharEncodingInputFunc input;
xmlCharEncodingOutputFunc output;
#ifdef LIBXML_ICONV_ENABLED
iconv_t iconv_in;
iconv_t iconv_out;
#endif /* LIBXML_ICONV_ENABLED */
#ifdef LIBXML_ICU_ENABLED
struct _uconv_t *uconv_in;
struct _uconv_t *uconv_out;
#endif /* LIBXML_ICU_ENABLED */
};
/*
* Interfaces for encoding handlers.
*/
XML_DEPRECATED
XMLPUBFUN void
xmlInitCharEncodingHandlers (void);
XML_DEPRECATED
XMLPUBFUN void
xmlCleanupCharEncodingHandlers (void);
XMLPUBFUN void
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
XMLPUBFUN int
xmlLookupCharEncodingHandler (xmlCharEncoding enc,
xmlCharEncodingHandlerPtr *out);
XMLPUBFUN int
xmlOpenCharEncodingHandler (const char *name,
int output,
xmlCharEncodingHandlerPtr *out);
XMLPUBFUN xmlCharEncodingHandlerPtr
xmlGetCharEncodingHandler (xmlCharEncoding enc);
XMLPUBFUN xmlCharEncodingHandlerPtr
xmlFindCharEncodingHandler (const char *name);
XMLPUBFUN xmlCharEncodingHandlerPtr
xmlNewCharEncodingHandler (const char *name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output);
/*
* Interfaces for encoding names and aliases.
*/
XMLPUBFUN int
xmlAddEncodingAlias (const char *name,
const char *alias);
XMLPUBFUN int
xmlDelEncodingAlias (const char *alias);
XMLPUBFUN const char *
xmlGetEncodingAlias (const char *alias);
XMLPUBFUN void
xmlCleanupEncodingAliases (void);
XMLPUBFUN xmlCharEncoding
xmlParseCharEncoding (const char *name);
XMLPUBFUN const char *
xmlGetCharEncodingName (xmlCharEncoding enc);
/*
* Interfaces directly used by the parsers.
*/
XMLPUBFUN xmlCharEncoding
xmlDetectCharEncoding (const unsigned char *in,
int len);
/** DOC_DISABLE */
struct _xmlBuffer;
/** DOC_ENABLE */
XMLPUBFUN int
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
struct _xmlBuffer *out,
struct _xmlBuffer *in);
XMLPUBFUN int
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
struct _xmlBuffer *out,
struct _xmlBuffer *in);
XML_DEPRECATED
XMLPUBFUN int
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
struct _xmlBuffer *out,
struct _xmlBuffer *in);
XMLPUBFUN int
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
/*
* Export a few useful functions
*/
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int
UTF8Toisolat1 (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int
isolat1ToUTF8 (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
#ifdef __cplusplus
}
#endif
#endif /* __XML_CHAR_ENCODING_H__ */
include/libxml2/libxml/xmlIO.h 0000644 00000030247 15033621455 0012242 0 ustar 00 /*
* Summary: interface for the I/O interfaces used by the parser
* Description: interface for the I/O interfaces used by the parser
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_IO_H__
#define __XML_IO_H__
/** DOC_DISABLE */
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/encoding.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
/** DOC_ENABLE */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Those are the functions and datatypes for the parser input
* I/O structures.
*/
/**
* xmlInputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Input API to detect if the current handler
* can provide input functionality for this resource.
*
* Returns 1 if yes and 0 if another Input module should be used
*/
typedef int (*xmlInputMatchCallback) (char const *filename);
/**
* xmlInputOpenCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Input API to open the resource
*
* Returns an Input context or NULL in case or error
*/
typedef void * (*xmlInputOpenCallback) (char const *filename);
/**
* xmlInputReadCallback:
* @context: an Input context
* @buffer: the buffer to store data read
* @len: the length of the buffer in bytes
*
* Callback used in the I/O Input API to read the resource
*
* Returns the number of bytes read or -1 in case of error
*/
typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
/**
* xmlInputCloseCallback:
* @context: an Input context
*
* Callback used in the I/O Input API to close the resource
*
* Returns 0 or -1 in case of error
*/
typedef int (*xmlInputCloseCallback) (void * context);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Those are the functions and datatypes for the library output
* I/O structures.
*/
/**
* xmlOutputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to detect if the current handler
* can provide output functionality for this resource.
*
* Returns 1 if yes and 0 if another Output module should be used
*/
typedef int (*xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to open the resource
*
* Returns an Output context or NULL in case or error
*/
typedef void * (*xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @context: an Output context
* @buffer: the buffer of data to write
* @len: the length of the buffer in bytes
*
* Callback used in the I/O Output API to write to the resource
*
* Returns the number of bytes written or -1 in case of error
*/
typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
* @context: an Output context
*
* Callback used in the I/O Output API to close the resource
*
* Returns 0 or -1 in case of error
*/
typedef int (*xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
/**
* 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);
struct _xmlParserInputBuffer {
void* context;
xmlInputReadCallback readcallback;
xmlInputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
int error;
unsigned long rawconsumed;/* amount consumed from raw */
};
#ifdef LIBXML_OUTPUT_ENABLED
struct _xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBufPtr conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
int error;
};
#endif /* LIBXML_OUTPUT_ENABLED */
/** DOC_DISABLE */
#define XML_GLOBALS_IO \
XML_OP(xmlParserInputBufferCreateFilenameValue, \
xmlParserInputBufferCreateFilenameFunc, XML_DEPRECATED) \
XML_OP(xmlOutputBufferCreateFilenameValue, \
xmlOutputBufferCreateFilenameFunc, XML_DEPRECATED)
#define XML_OP XML_DECLARE_GLOBAL
XML_GLOBALS_IO
#undef XML_OP
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
#define xmlParserInputBufferCreateFilenameValue \
XML_GLOBAL_MACRO(xmlParserInputBufferCreateFilenameValue)
#define xmlOutputBufferCreateFilenameValue \
XML_GLOBAL_MACRO(xmlOutputBufferCreateFilenameValue)
#endif
/** DOC_ENABLE */
/*
* Interfaces for input
*/
XMLPUBFUN void
xmlCleanupInputCallbacks (void);
XMLPUBFUN int
xmlPopInputCallbacks (void);
XMLPUBFUN void
xmlRegisterDefaultInputCallbacks (void);
XMLPUBFUN xmlParserInputBufferPtr
xmlAllocParserInputBuffer (xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFilename (const char *URI,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFile (FILE *file,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFd (int fd,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateMem (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateStatic (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN int
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
int len,
const char *buf);
XMLPUBFUN void
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
XMLPUBFUN char *
xmlParserGetDirectory (const char *filename);
XMLPUBFUN int
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc);
xmlParserInputBufferPtr
__xmlParserInputBufferCreateFilename(const char *URI,
xmlCharEncoding enc);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Interfaces for output
*/
XMLPUBFUN void
xmlCleanupOutputCallbacks (void);
XMLPUBFUN int
xmlPopOutputCallbacks (void);
XMLPUBFUN void
xmlRegisterDefaultOutputCallbacks(void);
XMLPUBFUN xmlOutputBufferPtr
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFilename (const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFile (FILE *file,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
/* Couple of APIs to get the output without digging into the buffers */
XMLPUBFUN const xmlChar *
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
XMLPUBFUN size_t
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
XMLPUBFUN int
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char *buf);
XMLPUBFUN int
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
XMLPUBFUN int
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
XMLPUBFUN int
xmlOutputBufferFlush (xmlOutputBufferPtr out);
XMLPUBFUN int
xmlOutputBufferClose (xmlOutputBufferPtr out);
XMLPUBFUN int
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc);
xmlOutputBufferPtr
__xmlOutputBufferCreateFilename(const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
#ifdef LIBXML_HTTP_ENABLED
/* This function only exists if HTTP support built into the library */
XML_DEPRECATED
XMLPUBFUN void
xmlRegisterHTTPPostCallbacks (void );
#endif /* LIBXML_HTTP_ENABLED */
#endif /* LIBXML_OUTPUT_ENABLED */
XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr ret);
/*
* A predefined entity loader disabling network accesses
*/
XMLPUBFUN xmlParserInputPtr
xmlNoNetExternalEntityLoader (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlNormalizeWindowsPath (const xmlChar *path);
XML_DEPRECATED
XMLPUBFUN int
xmlCheckFilename (const char *path);
/**
* Default 'file://' protocol callbacks
*/
XML_DEPRECATED
XMLPUBFUN int
xmlFileMatch (const char *filename);
XML_DEPRECATED
XMLPUBFUN void *
xmlFileOpen (const char *filename);
XML_DEPRECATED
XMLPUBFUN int
xmlFileRead (void * context,
char * buffer,
int len);
XML_DEPRECATED
XMLPUBFUN int
xmlFileClose (void * context);
/**
* Default 'http://' protocol callbacks
*/
#ifdef LIBXML_HTTP_ENABLED
XML_DEPRECATED
XMLPUBFUN int
xmlIOHTTPMatch (const char *filename);
XML_DEPRECATED
XMLPUBFUN void *
xmlIOHTTPOpen (const char *filename);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN void *
xmlIOHTTPOpenW (const char * post_uri,
int compression );
#endif /* LIBXML_OUTPUT_ENABLED */
XML_DEPRECATED
XMLPUBFUN int
xmlIOHTTPRead (void * context,
char * buffer,
int len);
XML_DEPRECATED
XMLPUBFUN int
xmlIOHTTPClose (void * context);
#endif /* LIBXML_HTTP_ENABLED */
/**
* Default 'ftp://' protocol callbacks
*/
#if defined(LIBXML_FTP_ENABLED)
XML_DEPRECATED
XMLPUBFUN int
xmlIOFTPMatch (const char *filename);
XML_DEPRECATED
XMLPUBFUN void *
xmlIOFTPOpen (const char *filename);
XML_DEPRECATED
XMLPUBFUN int
xmlIOFTPRead (void * context,
char * buffer,
int len);
XML_DEPRECATED
XMLPUBFUN int
xmlIOFTPClose (void * context);
#endif /* defined(LIBXML_FTP_ENABLED) */
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
xmlParserInputBufferCreateFilenameDefault(
xmlParserInputBufferCreateFilenameFunc func);
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
xmlOutputBufferCreateFilenameDefault(
xmlOutputBufferCreateFilenameFunc func);
XML_DEPRECATED
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
xmlThrDefOutputBufferCreateFilenameDefault(
xmlOutputBufferCreateFilenameFunc func);
XML_DEPRECATED
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
xmlThrDefParserInputBufferCreateFilenameDefault(
xmlParserInputBufferCreateFilenameFunc func);
#ifdef __cplusplus
}
#endif
#endif /* __XML_IO_H__ */
include/libxml2/libxml/hash.h 0000644 00000015551 15033621455 0012136 0 ustar 00 /*
* Summary: Chained hash tables
* Description: This module implements the hash table support used in
* various places in the library.
*
* Copy: See Copyright for the status of this software.
*
* Author: Bjorn Reese <bjorn.reese@systematic.dk>
*/
#ifndef __XML_HASH_H__
#define __XML_HASH_H__
#include <libxml/xmlversion.h>
#include <libxml/dict.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The hash table.
*/
typedef struct _xmlHashTable xmlHashTable;
typedef xmlHashTable *xmlHashTablePtr;
/*
* Recent version of gcc produce a warning when a function pointer is assigned
* to an object pointer, or vice versa. The following macro is a dirty hack
* to allow suppression of the warning. If your architecture has function
* pointers which are a different size than a void pointer, there may be some
* serious trouble within the library.
*/
/**
* XML_CAST_FPTR:
* @fptr: pointer to a function
*
* Macro to do a casting from an object pointer to a
* function pointer without encountering a warning from
* gcc
*
* #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
* This macro violated ISO C aliasing rules (gcc4 on s390 broke)
* so it is disabled now
*/
#define XML_CAST_FPTR(fptr) fptr
/*
* function types:
*/
/**
* xmlHashDeallocator:
* @payload: the data in the hash
* @name: the name associated
*
* Callback to free data from a hash.
*/
typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name);
/**
* xmlHashCopier:
* @payload: the data in the hash
* @name: the name associated
*
* Callback to copy data from a hash.
*
* Returns a copy of the data or NULL in case of error.
*/
typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name);
/**
* xmlHashScanner:
* @payload: the data in the hash
* @data: extra scanner data
* @name: the name associated
*
* Callback when scanning data in a hash with the simple scanner.
*/
typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name);
/**
* xmlHashScannerFull:
* @payload: the data in the hash
* @data: extra scanner data
* @name: the name associated
* @name2: the second name associated
* @name3: the third name associated
*
* Callback when scanning data in a hash with the full scanner.
*/
typedef void (*xmlHashScannerFull)(void *payload, void *data,
const xmlChar *name, const xmlChar *name2,
const xmlChar *name3);
/*
* Constructor and destructor.
*/
XMLPUBFUN xmlHashTablePtr
xmlHashCreate (int size);
XMLPUBFUN xmlHashTablePtr
xmlHashCreateDict (int size,
xmlDictPtr dict);
XMLPUBFUN void
xmlHashFree (xmlHashTablePtr hash,
xmlHashDeallocator dealloc);
XMLPUBFUN void
xmlHashDefaultDeallocator(void *entry,
const xmlChar *name);
/*
* Add a new entry to the hash table.
*/
XMLPUBFUN int
xmlHashAdd (xmlHashTablePtr hash,
const xmlChar *name,
void *userdata);
XMLPUBFUN int
xmlHashAddEntry (xmlHashTablePtr hash,
const xmlChar *name,
void *userdata);
XMLPUBFUN int
xmlHashUpdateEntry (xmlHashTablePtr hash,
const xmlChar *name,
void *userdata,
xmlHashDeallocator dealloc);
XMLPUBFUN int
xmlHashAdd2 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
void *userdata);
XMLPUBFUN int
xmlHashAddEntry2 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
void *userdata);
XMLPUBFUN int
xmlHashUpdateEntry2 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
void *userdata,
xmlHashDeallocator dealloc);
XMLPUBFUN int
xmlHashAdd3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
void *userdata);
XMLPUBFUN int
xmlHashAddEntry3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
void *userdata);
XMLPUBFUN int
xmlHashUpdateEntry3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
void *userdata,
xmlHashDeallocator dealloc);
/*
* Remove an entry from the hash table.
*/
XMLPUBFUN int
xmlHashRemoveEntry (xmlHashTablePtr hash,
const xmlChar *name,
xmlHashDeallocator dealloc);
XMLPUBFUN int
xmlHashRemoveEntry2 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
xmlHashDeallocator dealloc);
XMLPUBFUN int
xmlHashRemoveEntry3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
xmlHashDeallocator dealloc);
/*
* Retrieve the payload.
*/
XMLPUBFUN void *
xmlHashLookup (xmlHashTablePtr hash,
const xmlChar *name);
XMLPUBFUN void *
xmlHashLookup2 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2);
XMLPUBFUN void *
xmlHashLookup3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3);
XMLPUBFUN void *
xmlHashQLookup (xmlHashTablePtr hash,
const xmlChar *prefix,
const xmlChar *name);
XMLPUBFUN void *
xmlHashQLookup2 (xmlHashTablePtr hash,
const xmlChar *prefix,
const xmlChar *name,
const xmlChar *prefix2,
const xmlChar *name2);
XMLPUBFUN void *
xmlHashQLookup3 (xmlHashTablePtr hash,
const xmlChar *prefix,
const xmlChar *name,
const xmlChar *prefix2,
const xmlChar *name2,
const xmlChar *prefix3,
const xmlChar *name3);
/*
* Helpers.
*/
XMLPUBFUN xmlHashTablePtr
xmlHashCopySafe (xmlHashTablePtr hash,
xmlHashCopier copy,
xmlHashDeallocator dealloc);
XMLPUBFUN xmlHashTablePtr
xmlHashCopy (xmlHashTablePtr hash,
xmlHashCopier copy);
XMLPUBFUN int
xmlHashSize (xmlHashTablePtr hash);
XMLPUBFUN void
xmlHashScan (xmlHashTablePtr hash,
xmlHashScanner scan,
void *data);
XMLPUBFUN void
xmlHashScan3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
xmlHashScanner scan,
void *data);
XMLPUBFUN void
xmlHashScanFull (xmlHashTablePtr hash,
xmlHashScannerFull scan,
void *data);
XMLPUBFUN void
xmlHashScanFull3 (xmlHashTablePtr hash,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
xmlHashScannerFull scan,
void *data);
#ifdef __cplusplus
}
#endif
#endif /* ! __XML_HASH_H__ */
include/libxml2/libxml/threads.h 0000644 00000003302 15033621455 0012634 0 ustar 00 /**
* Summary: interfaces for thread handling
* Description: set of generic threading related routines
* should work with pthreads, Windows native or TLS threads
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_THREADS_H__
#define __XML_THREADS_H__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* xmlMutex are a simple mutual exception locks.
*/
typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr;
/*
* xmlRMutex are reentrant mutual exception locks.
*/
typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr;
XMLPUBFUN int
xmlCheckThreadLocalStorage(void);
XMLPUBFUN xmlMutexPtr
xmlNewMutex (void);
XMLPUBFUN void
xmlMutexLock (xmlMutexPtr tok);
XMLPUBFUN void
xmlMutexUnlock (xmlMutexPtr tok);
XMLPUBFUN void
xmlFreeMutex (xmlMutexPtr tok);
XMLPUBFUN xmlRMutexPtr
xmlNewRMutex (void);
XMLPUBFUN void
xmlRMutexLock (xmlRMutexPtr tok);
XMLPUBFUN void
xmlRMutexUnlock (xmlRMutexPtr tok);
XMLPUBFUN void
xmlFreeRMutex (xmlRMutexPtr tok);
/*
* Library wide APIs.
*/
XML_DEPRECATED
XMLPUBFUN void
xmlInitThreads (void);
XMLPUBFUN void
xmlLockLibrary (void);
XMLPUBFUN void
xmlUnlockLibrary(void);
XML_DEPRECATED
XMLPUBFUN int
xmlGetThreadId (void);
XML_DEPRECATED
XMLPUBFUN int
xmlIsMainThread (void);
XML_DEPRECATED
XMLPUBFUN void
xmlCleanupThreads(void);
/** DOC_DISABLE */
#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
defined(LIBXML_STATIC_FOR_DLL)
int
xmlDllMain(void *hinstDLL, unsigned long fdwReason,
void *lpvReserved);
#endif
/** DOC_ENABLE */
#ifdef __cplusplus
}
#endif
#endif /* __XML_THREADS_H__ */
include/libxml2/libxml/HTMLparser.h 0000644 00000023171 15033621455 0013171 0 ustar 00 /*
* Summary: interface for an HTML 4.0 non-verifying parser
* Description: this module implements an HTML 4.0 non-verifying parser
* with API compatible with the XML parser ones. It should
* be able to parse "real world" HTML, even if severely
* broken from a specification point of view.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __HTML_PARSER_H__
#define __HTML_PARSER_H__
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#ifdef LIBXML_HTML_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and HTML are shared.
*/
typedef xmlParserCtxt htmlParserCtxt;
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
typedef xmlParserNodeInfo htmlParserNodeInfo;
typedef xmlSAXHandler htmlSAXHandler;
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
typedef xmlParserInput htmlParserInput;
typedef xmlParserInputPtr htmlParserInputPtr;
typedef xmlDocPtr htmlDocPtr;
typedef xmlNodePtr htmlNodePtr;
/*
* Internal description of an HTML element, representing HTML 4.01
* and XHTML 1.0 (which share the same structure).
*/
typedef struct _htmlElemDesc htmlElemDesc;
typedef htmlElemDesc *htmlElemDescPtr;
struct _htmlElemDesc {
const char *name; /* The tag name */
char startTag; /* Whether the start tag can be implied */
char endTag; /* Whether the end tag can be implied */
char saveEndTag; /* Whether the end tag should be saved */
char empty; /* Is this an empty element ? */
char depr; /* Is this a deprecated element ? */
char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
char isinline; /* is this a block 0 or inline 1 element */
const char *desc; /* the description */
/* NRK Jan.2003
* New fields encapsulating HTML structure
*
* Bugs:
* This is a very limited representation. It fails to tell us when
* an element *requires* subelements (we only have whether they're
* allowed or not), and it doesn't tell us where CDATA and PCDATA
* are allowed. Some element relationships are not fully represented:
* these are flagged with the word MODIFIER
*/
const char** subelts; /* allowed sub-elements of this element */
const char* defaultsubelt; /* subelement for suggested auto-repair
if necessary or NULL */
const char** attrs_opt; /* Optional Attributes */
const char** attrs_depr; /* Additional deprecated attributes */
const char** attrs_req; /* Required attributes */
};
/*
* Internal description of an HTML entity.
*/
typedef struct _htmlEntityDesc htmlEntityDesc;
typedef htmlEntityDesc *htmlEntityDescPtr;
struct _htmlEntityDesc {
unsigned int value; /* the UNICODE value for the character */
const char *name; /* The entity name */
const char *desc; /* the description */
};
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
#ifdef LIBXML_THREAD_ENABLED
XML_DEPRECATED
XMLPUBFUN const xmlSAXHandlerV1 *__htmlDefaultSAXHandler(void);
#endif
#endif /* LIBXML_SAX1_ENABLED */
/*
* There is only few public functions.
*/
XML_DEPRECATED
XMLPUBFUN void
htmlInitAutoClose (void);
XMLPUBFUN const htmlElemDesc *
htmlTagLookup (const xmlChar *tag);
XMLPUBFUN const htmlEntityDesc *
htmlEntityLookup(const xmlChar *name);
XMLPUBFUN const htmlEntityDesc *
htmlEntityValueLookup(unsigned int value);
XMLPUBFUN int
htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem);
XMLPUBFUN int
htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name,
htmlNodePtr elem);
XML_DEPRECATED
XMLPUBFUN const htmlEntityDesc *
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
const xmlChar **str);
XML_DEPRECATED
XMLPUBFUN int
htmlParseCharRef(htmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
htmlParseElement(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlParserCtxtPtr
htmlNewParserCtxt(void);
XMLPUBFUN htmlParserCtxtPtr
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
void *userData);
XMLPUBFUN htmlParserCtxtPtr
htmlCreateMemoryParserCtxt(const char *buffer,
int size);
XMLPUBFUN int
htmlParseDocument(htmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN htmlDocPtr
htmlSAXParseDoc (const xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr
htmlParseDoc (const xmlChar *cur,
const char *encoding);
XMLPUBFUN htmlParserCtxtPtr
htmlCreateFileParserCtxt(const char *filename,
const char *encoding);
XML_DEPRECATED
XMLPUBFUN htmlDocPtr
htmlSAXParseFile(const char *filename,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr
htmlParseFile (const char *filename,
const char *encoding);
XMLPUBFUN int
UTF8ToHtml (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
XMLPUBFUN int
htmlEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN int
htmlIsScriptAttribute(const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN int
htmlHandleOmittedElem(int val);
#ifdef LIBXML_PUSH_ENABLED
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN htmlParserCtxtPtr
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int
htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
XMLPUBFUN void
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
/*
* New set of simpler/more flexible APIs
*/
/**
* xmlParserOption:
*
* This is the set of XML parser options that can be passed down
* to the xmlReadDoc() and similar calls.
*/
typedef enum {
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
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_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
} htmlParserOption;
XMLPUBFUN void
htmlCtxtReset (htmlParserCtxtPtr ctxt);
XMLPUBFUN int
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN htmlDocPtr
htmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlReadFile (const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
XMLPUBFUN htmlDocPtr
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
/* NRK/Jan2003: further knowledge of HTML structure
*/
typedef enum {
HTML_NA = 0 , /* something we don't check at all */
HTML_INVALID = 0x1 ,
HTML_DEPRECATED = 0x2 ,
HTML_VALID = 0x4 ,
HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
} htmlStatus ;
/* Using htmlElemDesc rather than name here, to emphasise the fact
that otherwise there's a lookup overhead
*/
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
/**
* htmlDefaultSubelement:
* @elt: HTML element
*
* Returns the default subelement for this element
*/
#define htmlDefaultSubelement(elt) elt->defaultsubelt
/**
* htmlElementAllowedHereDesc:
* @parent: HTML parent element
* @elt: HTML element
*
* Checks whether an HTML element description may be a
* direct child of the specified element.
*
* Returns 1 if allowed; 0 otherwise.
*/
#define htmlElementAllowedHereDesc(parent,elt) \
htmlElementAllowedHere((parent), (elt)->name)
/**
* htmlRequiredAttrs:
* @elt: HTML element
*
* Returns the attributes required for the specified element.
*/
#define htmlRequiredAttrs(elt) (elt)->attrs_req
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTML_ENABLED */
#endif /* __HTML_PARSER_H__ */
include/libxml2/libxml/nanoftp.h 0000644 00000007655 15033621455 0012666 0 ustar 00 /*
* Summary: minimal FTP implementation
* Description: minimal FTP implementation allowing to fetch resources
* like external subset. This module is DEPRECATED, do not
* use any of its functions.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __NANO_FTP_H__
#define __NANO_FTP_H__
#include <libxml/xmlversion.h>
#if defined(LIBXML_FTP_ENABLED)
/* Needed for portability to Windows 64 bits */
#if defined(_WIN32)
#include <winsock2.h>
#else
/**
* SOCKET:
*
* macro used to provide portability of code to windows sockets
*/
#define SOCKET int
/**
* INVALID_SOCKET:
*
* macro used to provide portability of code to windows sockets
* the value to be used when the socket is not valid
*/
#undef INVALID_SOCKET
#define INVALID_SOCKET (-1)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* ftpListCallback:
* @userData: user provided data for the callback
* @filename: the file name (including "->" when links are shown)
* @attrib: the attribute string
* @owner: the owner string
* @group: the group string
* @size: the file size
* @links: the link count
* @year: the year
* @month: the month
* @day: the day
* @hour: the hour
* @minute: the minute
*
* A callback for the xmlNanoFTPList command.
* Note that only one of year and day:minute are specified.
*/
typedef void (*ftpListCallback) (void *userData,
const char *filename, const char *attrib,
const char *owner, const char *group,
unsigned long size, int links, int year,
const char *month, int day, int hour,
int minute);
/**
* ftpDataCallback:
* @userData: the user provided context
* @data: the data received
* @len: its size in bytes
*
* A callback for the xmlNanoFTPGet command.
*/
typedef void (*ftpDataCallback) (void *userData,
const char *data,
int len);
/*
* Init
*/
XML_DEPRECATED
XMLPUBFUN void
xmlNanoFTPInit (void);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoFTPCleanup (void);
/*
* Creating/freeing contexts.
*/
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoFTPNewCtxt (const char *URL);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoFTPFreeCtxt (void * ctx);
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoFTPConnectTo (const char *server,
int port);
/*
* Opening/closing session connections.
*/
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoFTPOpen (const char *URL);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPConnect (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPClose (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPQuit (void *ctx);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoFTPScanProxy (const char *URL);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoFTPProxy (const char *host,
int port,
const char *user,
const char *passwd,
int type);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPUpdateURL (void *ctx,
const char *URL);
/*
* Rather internal commands.
*/
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPGetResponse (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPCheckResponse (void *ctx);
/*
* CD/DIR/GET handlers.
*/
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPCwd (void *ctx,
const char *directory);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPDele (void *ctx,
const char *file);
XML_DEPRECATED
XMLPUBFUN SOCKET
xmlNanoFTPGetConnection (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPCloseConnection(void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPList (void *ctx,
ftpListCallback callback,
void *userData,
const char *filename);
XML_DEPRECATED
XMLPUBFUN SOCKET
xmlNanoFTPGetSocket (void *ctx,
const char *filename);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPGet (void *ctx,
ftpDataCallback callback,
void *userData,
const char *filename);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoFTPRead (void *ctx,
void *dest,
int len);
#ifdef __cplusplus
}
#endif
#endif /* defined(LIBXML_FTP_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
#endif /* __NANO_FTP_H__ */
include/libxml2/libxml/relaxng.h 0000644 00000013306 15033621455 0012647 0 ustar 00 /*
* Summary: implementation of the Relax-NG validation
* Description: implementation of the Relax-NG validation
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_RELAX_NG__
#define __XML_RELAX_NG__
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlstring.h>
#include <libxml/tree.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlRelaxNG xmlRelaxNG;
typedef xmlRelaxNG *xmlRelaxNGPtr;
/**
* xmlRelaxNGValidityErrorFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of an error callback from a Relax-NG validation
*/
typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlRelaxNGValidityWarningFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of a warning callback from a Relax-NG validation
*/
typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* A schemas validation context
*/
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
/*
* xmlRelaxNGValidErr:
*
* List of possible Relax NG validation errors
*/
typedef enum {
XML_RELAXNG_OK = 0,
XML_RELAXNG_ERR_MEMORY,
XML_RELAXNG_ERR_TYPE,
XML_RELAXNG_ERR_TYPEVAL,
XML_RELAXNG_ERR_DUPID,
XML_RELAXNG_ERR_TYPECMP,
XML_RELAXNG_ERR_NOSTATE,
XML_RELAXNG_ERR_NODEFINE,
XML_RELAXNG_ERR_LISTEXTRA,
XML_RELAXNG_ERR_LISTEMPTY,
XML_RELAXNG_ERR_INTERNODATA,
XML_RELAXNG_ERR_INTERSEQ,
XML_RELAXNG_ERR_INTEREXTRA,
XML_RELAXNG_ERR_ELEMNAME,
XML_RELAXNG_ERR_ATTRNAME,
XML_RELAXNG_ERR_ELEMNONS,
XML_RELAXNG_ERR_ATTRNONS,
XML_RELAXNG_ERR_ELEMWRONGNS,
XML_RELAXNG_ERR_ATTRWRONGNS,
XML_RELAXNG_ERR_ELEMEXTRANS,
XML_RELAXNG_ERR_ATTREXTRANS,
XML_RELAXNG_ERR_ELEMNOTEMPTY,
XML_RELAXNG_ERR_NOELEM,
XML_RELAXNG_ERR_NOTELEM,
XML_RELAXNG_ERR_ATTRVALID,
XML_RELAXNG_ERR_CONTENTVALID,
XML_RELAXNG_ERR_EXTRACONTENT,
XML_RELAXNG_ERR_INVALIDATTR,
XML_RELAXNG_ERR_DATAELEM,
XML_RELAXNG_ERR_VALELEM,
XML_RELAXNG_ERR_LISTELEM,
XML_RELAXNG_ERR_DATATYPE,
XML_RELAXNG_ERR_VALUE,
XML_RELAXNG_ERR_LIST,
XML_RELAXNG_ERR_NOGRAMMAR,
XML_RELAXNG_ERR_EXTRADATA,
XML_RELAXNG_ERR_LACKDATA,
XML_RELAXNG_ERR_INTERNAL,
XML_RELAXNG_ERR_ELEMWRONG,
XML_RELAXNG_ERR_TEXTWRONG
} xmlRelaxNGValidErr;
/*
* xmlRelaxNGParserFlags:
*
* List of possible Relax NG Parser flags
*/
typedef enum {
XML_RELAXNGP_NONE = 0,
XML_RELAXNGP_FREE_DOC = 1,
XML_RELAXNGP_CRNG = 2
} xmlRelaxNGParserFlag;
XMLPUBFUN int
xmlRelaxNGInitTypes (void);
XML_DEPRECATED
XMLPUBFUN void
xmlRelaxNGCleanupTypes (void);
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewParserCtxt (const char *URL);
XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewMemParserCtxt (const char *buffer,
int size);
XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN int
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
int flag);
XMLPUBFUN void
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void
xmlRelaxNGSetParserStructuredErrors(
xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN xmlRelaxNGPtr
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void
xmlRelaxNGFree (xmlRelaxNGPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlRelaxNGDump (FILE *output,
xmlRelaxNGPtr schema);
XMLPUBFUN void
xmlRelaxNGDumpTree (FILE * output,
xmlRelaxNGPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
XMLPUBFUN void
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN xmlRelaxNGValidCtxtPtr
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
XMLPUBFUN void
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
XMLPUBFUN int
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc);
/*
* Interfaces for progressive validation when possible
*/
XMLPUBFUN int
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar *data,
int len);
XMLPUBFUN int
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_RELAX_NG__ */
include/libxml2/libxml/dict.h 0000644 00000003352 15033621455 0012132 0 ustar 00 /*
* Summary: string dictionary
* Description: dictionary of reusable strings, just used to avoid allocation
* and freeing operations.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_DICT_H__
#define __XML_DICT_H__
#include <stddef.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The dictionary.
*/
typedef struct _xmlDict xmlDict;
typedef xmlDict *xmlDictPtr;
/*
* Initializer
*/
XML_DEPRECATED
XMLPUBFUN int xmlInitializeDict(void);
/*
* Constructor and destructor.
*/
XMLPUBFUN xmlDictPtr
xmlDictCreate (void);
XMLPUBFUN size_t
xmlDictSetLimit (xmlDictPtr dict,
size_t limit);
XMLPUBFUN size_t
xmlDictGetUsage (xmlDictPtr dict);
XMLPUBFUN xmlDictPtr
xmlDictCreateSub(xmlDictPtr sub);
XMLPUBFUN int
xmlDictReference(xmlDictPtr dict);
XMLPUBFUN void
xmlDictFree (xmlDictPtr dict);
/*
* Lookup of entry in the dictionary.
*/
XMLPUBFUN const xmlChar *
xmlDictLookup (xmlDictPtr dict,
const xmlChar *name,
int len);
XMLPUBFUN const xmlChar *
xmlDictExists (xmlDictPtr dict,
const xmlChar *name,
int len);
XMLPUBFUN const xmlChar *
xmlDictQLookup (xmlDictPtr dict,
const xmlChar *prefix,
const xmlChar *name);
XMLPUBFUN int
xmlDictOwns (xmlDictPtr dict,
const xmlChar *str);
XMLPUBFUN int
xmlDictSize (xmlDictPtr dict);
/*
* Cleanup function
*/
XML_DEPRECATED
XMLPUBFUN void
xmlDictCleanup (void);
#ifdef __cplusplus
}
#endif
#endif /* ! __XML_DICT_H__ */
include/libxml2/libxml/valid.h 0000644 00000031771 15033621455 0012314 0 ustar 00 /*
* Summary: The DTD validation
* Description: API for the DTD handling and the validity checking
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_VALID_H__
#define __XML_VALID_H__
/** DOC_DISABLE */
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#include <libxml/list.h>
#include <libxml/xmlautomata.h>
#include <libxml/xmlregexp.h>
/** DOC_ENABLE */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Validation state added for non-determinist content model.
*/
typedef struct _xmlValidState xmlValidState;
typedef xmlValidState *xmlValidStatePtr;
/**
* xmlValidityErrorFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (*xmlValidityErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlValidityWarningFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (*xmlValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/*
* xmlValidCtxt:
* An xmlValidCtxt is used for error reporting when validating.
*/
typedef struct _xmlValidCtxt xmlValidCtxt;
typedef xmlValidCtxt *xmlValidCtxtPtr;
struct _xmlValidCtxt {
void *userData; /* user specific data block */
xmlValidityErrorFunc error; /* the callback in case of errors */
xmlValidityWarningFunc warning; /* the callback in case of warning */
/* Node analysis stack used when validating within entities */
xmlNodePtr node; /* Current parsed Node */
int nodeNr; /* Depth of the parsing stack */
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
unsigned int flags; /* internal flags */
xmlDocPtr doc; /* the document */
int valid; /* temporary validity check result */
/* state state used for non-determinist content validation */
xmlValidState *vstate; /* current state */
int vstateNr; /* Depth of the validation stack */
int vstateMax; /* Max depth of the validation stack */
xmlValidState *vstateTab; /* array of validation states */
#ifdef LIBXML_REGEXP_ENABLED
xmlAutomataPtr am; /* the automata */
xmlAutomataStatePtr state; /* used to build the automata */
#else
void *am;
void *state;
#endif
};
/*
* ALL notation declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlNotationTable;
typedef xmlNotationTable *xmlNotationTablePtr;
/*
* ALL element declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlElementTable;
typedef xmlElementTable *xmlElementTablePtr;
/*
* ALL attribute declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlAttributeTable;
typedef xmlAttributeTable *xmlAttributeTablePtr;
/*
* ALL IDs attributes are stored in a table.
* There is one table per document.
*/
typedef struct _xmlHashTable xmlIDTable;
typedef xmlIDTable *xmlIDTablePtr;
/*
* ALL Refs attributes are stored in a table.
* There is one table per document.
*/
typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;
/* Notation */
XMLPUBFUN xmlNotationPtr
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *PublicID,
const xmlChar *SystemID);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNotationTablePtr
xmlCopyNotationTable (xmlNotationTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void
xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota);
/* XML_DEPRECATED, still used in lxml */
XMLPUBFUN void
xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
XMLPUBFUN xmlElementContentPtr
xmlNewElementContent (const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr
xmlCopyElementContent (xmlElementContentPtr content);
XMLPUBFUN void
xmlFreeElementContent (xmlElementContentPtr cur);
/* the new versions with doc argument */
XMLPUBFUN xmlElementContentPtr
xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr
xmlCopyDocElementContent(xmlDocPtr doc,
xmlElementContentPtr content);
XMLPUBFUN void
xmlFreeDocElementContent(xmlDocPtr doc,
xmlElementContentPtr cur);
XMLPUBFUN void
xmlSnprintfElementContent(char *buf,
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int englob);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element */
XMLPUBFUN xmlElementPtr
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
xmlElementTypeVal type,
xmlElementContentPtr content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlElementTablePtr
xmlCopyElementTable (xmlElementTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void
xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table);
XML_DEPRECATED
XMLPUBFUN void
xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
XMLPUBFUN xmlEnumerationPtr
xmlCreateEnumeration (const xmlChar *name);
XMLPUBFUN void
xmlFreeEnumeration (xmlEnumerationPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEnumerationPtr
xmlCopyEnumeration (xmlEnumerationPtr cur);
#endif /* LIBXML_TREE_ENABLED */
/* Attribute */
XMLPUBFUN xmlAttributePtr
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *ns,
xmlAttributeType type,
xmlAttributeDefault def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttributeTablePtr
xmlCopyAttributeTable (xmlAttributeTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void
xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table);
XML_DEPRECATED
XMLPUBFUN void
xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr);
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
XMLPUBFUN int
xmlAddIDSafe (xmlAttrPtr attr,
const xmlChar *value);
XMLPUBFUN xmlIDPtr
xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XMLPUBFUN void
xmlFreeIDTable (xmlIDTablePtr table);
XMLPUBFUN xmlAttrPtr
xmlGetID (xmlDocPtr doc,
const xmlChar *ID);
XMLPUBFUN int
xmlIsID (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XMLPUBFUN int
xmlRemoveID (xmlDocPtr doc,
xmlAttrPtr attr);
/* IDREFs */
XML_DEPRECATED
XMLPUBFUN xmlRefPtr
xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XML_DEPRECATED
XMLPUBFUN void
xmlFreeRefTable (xmlRefTablePtr table);
XML_DEPRECATED
XMLPUBFUN int
xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XML_DEPRECATED
XMLPUBFUN int
xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr);
XML_DEPRECATED
XMLPUBFUN xmlListPtr
xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID);
/**
* The public function calls related to validity checking.
*/
#ifdef LIBXML_VALID_ENABLED
/* Allocate/Release Validation Contexts */
XMLPUBFUN xmlValidCtxtPtr
xmlNewValidCtxt(void);
XMLPUBFUN void
xmlFreeValidCtxt(xmlValidCtxtPtr);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateRoot (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlElementPtr elem);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlAttributePtr attr);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateAttributeValue(xmlAttributeType type,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNotationPtr nota);
XMLPUBFUN int
xmlValidateDtd (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlDtdPtr dtd);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int
xmlValidateDocument (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int
xmlValidateElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *prefix,
xmlNsPtr ns,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN int
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
#endif /* LIBXML_VALID_ENABLED */
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XML_DEPRECATED
XMLPUBFUN int
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *notationName);
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN int
xmlIsMixedElement (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlNotationPtr
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const xmlChar *name);
XMLPUBFUN xmlElementPtr
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlElementPtr
xmlGetDtdElementDesc (xmlDtdPtr dtd,
const xmlChar *name);
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **names,
int *len,
int max);
XMLPUBFUN int
xmlValidGetValidElements(xmlNode *prev,
xmlNode *next,
const xmlChar **names,
int max);
XMLPUBFUN int
xmlValidateNameValue (const xmlChar *value);
XMLPUBFUN int
xmlValidateNamesValue (const xmlChar *value);
XMLPUBFUN int
xmlValidateNmtokenValue (const xmlChar *value);
XMLPUBFUN int
xmlValidateNmtokensValue(const xmlChar *value);
#ifdef LIBXML_REGEXP_ENABLED
/*
* Validation based on the regexp support
*/
XML_DEPRECATED
XMLPUBFUN int
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
xmlElementPtr elem);
XML_DEPRECATED
XMLPUBFUN int
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
XML_DEPRECATED
XMLPUBFUN int
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
const xmlChar *data,
int len);
XML_DEPRECATED
XMLPUBFUN int
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* LIBXML_VALID_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_VALID_H__ */
include/libxml2/libxml/xmlwriter.h 0000644 00000050320 15033621455 0013241 0 ustar 00 /*
* Summary: text writing API for XML
* Description: text writing API for XML
*
* Copy: See Copyright for the status of this software.
*
* Author: Alfred Mickautsch <alfred@mickautsch.de>
*/
#ifndef __XML_XMLWRITER_H__
#define __XML_XMLWRITER_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_WRITER_ENABLED
#include <stdarg.h>
#include <libxml/xmlIO.h>
#include <libxml/list.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlTextWriter xmlTextWriter;
typedef xmlTextWriter *xmlTextWriterPtr;
/*
* Constructors & Destructor
*/
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriter(xmlOutputBufferPtr out);
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterFilename(const char *uri, int compression);
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
int compression);
XMLPUBFUN void xmlFreeTextWriter(xmlTextWriterPtr writer);
/*
* Functions
*/
/*
* Document
*/
XMLPUBFUN int
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
const char *version,
const char *encoding,
const char *standalone);
XMLPUBFUN int xmlTextWriterEndDocument(xmlTextWriterPtr
writer);
/*
* Comments
*/
XMLPUBFUN int xmlTextWriterStartComment(xmlTextWriterPtr
writer);
XMLPUBFUN int xmlTextWriterEndComment(xmlTextWriterPtr writer);
XMLPUBFUN int
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int xmlTextWriterWriteComment(xmlTextWriterPtr
writer,
const xmlChar *
content);
/*
* Elements
*/
XMLPUBFUN int
xmlTextWriterStartElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int xmlTextWriterStartElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI);
XMLPUBFUN int xmlTextWriterEndElement(xmlTextWriterPtr writer);
XMLPUBFUN int xmlTextWriterFullEndElement(xmlTextWriterPtr
writer);
/*
* Elements conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int xmlTextWriterWriteElement(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN int
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int xmlTextWriterWriteElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI,
const xmlChar *
content);
/*
* Text
*/
XMLPUBFUN int
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
const xmlChar * content, int len);
XMLPUBFUN int
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
const xmlChar * content);
XMLPUBFUN int xmlTextWriterWriteFormatString(xmlTextWriterPtr
writer,
const char
*format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int xmlTextWriterWriteVFormatString(xmlTextWriterPtr
writer,
const char
*format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int xmlTextWriterWriteString(xmlTextWriterPtr writer,
const xmlChar *
content);
XMLPUBFUN int xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
const char *data,
int start, int len);
XMLPUBFUN int xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
const char *data,
int start, int len);
/*
* Attributes
*/
XMLPUBFUN int
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int xmlTextWriterStartAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar *
name,
const xmlChar *
namespaceURI);
XMLPUBFUN int xmlTextWriterEndAttribute(xmlTextWriterPtr
writer);
/*
* Attributes conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int xmlTextWriterWriteAttribute(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN int
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar *
name,
const xmlChar *
namespaceURI,
const xmlChar *
content);
/*
* PI's
*/
XMLPUBFUN int
xmlTextWriterStartPI(xmlTextWriterPtr writer,
const xmlChar * target);
XMLPUBFUN int xmlTextWriterEndPI(xmlTextWriterPtr writer);
/*
* PI conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int
xmlTextWriterWritePI(xmlTextWriterPtr writer,
const xmlChar * target,
const xmlChar * content);
/**
* xmlTextWriterWriteProcessingInstruction:
*
* This macro maps to xmlTextWriterWritePI
*/
#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
/*
* CDATA
*/
XMLPUBFUN int xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
XMLPUBFUN int xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
/*
* CDATA conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
const xmlChar * content);
/*
* DTD
*/
XMLPUBFUN int
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
XMLPUBFUN int xmlTextWriterEndDTD(xmlTextWriterPtr writer);
/*
* DTD conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * subset);
/**
* xmlTextWriterWriteDocType:
*
* this macro maps to xmlTextWriterWriteDTD
*/
#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
/*
* DTD element definition
*/
XMLPUBFUN int
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int xmlTextWriterEndDTDElement(xmlTextWriterPtr
writer);
/*
* DTD element definition conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int xmlTextWriterWriteDTDElement(xmlTextWriterPtr
writer,
const xmlChar *
name,
const xmlChar *
content);
/*
* DTD attribute list definition
*/
XMLPUBFUN int
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
writer);
/*
* DTD attribute list definition conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
writer,
const xmlChar *
name,
const xmlChar *
content);
/*
* DTD entity definition
*/
XMLPUBFUN int
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
int pe, const xmlChar * name);
XMLPUBFUN int xmlTextWriterEndDTDEntity(xmlTextWriterPtr
writer);
/*
* DTD entity definition conveniency functions
*/
XMLPUBFUN int
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(4,5);
XMLPUBFUN int
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(4,0);
XMLPUBFUN int
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * content);
XMLPUBFUN int
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid);
XMLPUBFUN int
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar *
ndataid);
XMLPUBFUN int xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
writer, int pe,
const xmlChar * name,
const xmlChar *
pubid,
const xmlChar *
sysid,
const xmlChar *
ndataid,
const xmlChar *
content);
/*
* DTD notation definition
*/
XMLPUBFUN int
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
/*
* Indentation
*/
XMLPUBFUN int
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
XMLPUBFUN int
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
const xmlChar * str);
XMLPUBFUN int
xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
/*
* misc
*/
XMLPUBFUN int xmlTextWriterFlush(xmlTextWriterPtr writer);
XMLPUBFUN int xmlTextWriterClose(xmlTextWriterPtr writer);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_WRITER_ENABLED */
#endif /* __XML_XMLWRITER_H__ */
include/libxml2/libxml/parserInternals.h 0000644 00000040652 15033621455 0014367 0 ustar 00 /*
* Summary: internals routines and limits exported by the parser.
* Description: this module exports a number of internal parsing routines
* they are not really all intended for applications but
* can prove useful doing low level processing.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_PARSER_INTERNALS_H__
#define __XML_PARSER_INTERNALS_H__
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
#include <libxml/chvalid.h>
#include <libxml/SAX2.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlParserMaxDepth:
*
* DEPRECATED: has no effect
*
* arbitrary depth limit for the XML documents that we allow to
* process. This is not a limitation of the parser but a safety
* boundary feature, use XML_PARSE_HUGE option to override it.
*/
XML_DEPRECATED
XMLPUBVAR const unsigned int xmlParserMaxDepth;
/**
* XML_MAX_TEXT_LENGTH:
*
* Maximum size allowed for a single text node when building a tree.
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Introduced in 2.9.0
*/
#define XML_MAX_TEXT_LENGTH 10000000
/**
* XML_MAX_HUGE_LENGTH:
*
* Maximum size allowed when XML_PARSE_HUGE is set.
*/
#define XML_MAX_HUGE_LENGTH 1000000000
/**
* XML_MAX_NAME_LENGTH:
*
* Maximum size allowed for a markup identifier.
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Note that with the use of parsing dictionaries overriding the limit
* may result in more runtime memory usage in face of "unfriendly' content
* Introduced in 2.9.0
*/
#define XML_MAX_NAME_LENGTH 50000
/**
* XML_MAX_DICTIONARY_LIMIT:
*
* Maximum size allowed by the parser for a dictionary by default
* This is not a limitation of the parser but a safety boundary feature,
* use XML_PARSE_HUGE option to override it.
* Introduced in 2.9.0
*/
#define XML_MAX_DICTIONARY_LIMIT 10000000
/**
* XML_MAX_LOOKUP_LIMIT:
*
* Maximum size allowed by the parser for ahead lookup
* This is an upper boundary enforced by the parser to avoid bad
* behaviour on "unfriendly' content
* Introduced in 2.9.0
*/
#define XML_MAX_LOOKUP_LIMIT 10000000
/**
* XML_MAX_NAMELEN:
*
* Identifiers can be longer, but this will be more costly
* at runtime.
*/
#define XML_MAX_NAMELEN 100
/**
* INPUT_CHUNK:
*
* The parser tries to always have that amount of input ready.
* One of the point is providing context when reporting errors.
*/
#define INPUT_CHUNK 250
/************************************************************************
* *
* UNICODE version of the macros. *
* *
************************************************************************/
/**
* IS_BYTE_CHAR:
* @c: an byte value (int)
*
* Macro to check the following production in the XML spec:
*
* [2] Char ::= #x9 | #xA | #xD | [#x20...]
* any byte character in the accepted range
*/
#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
/**
* IS_CHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
* [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
* | [#x10000-#x10FFFF]
* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
*/
#define IS_CHAR(c) xmlIsCharQ(c)
/**
* IS_CHAR_CH:
* @c: an xmlChar (usually an unsigned char)
*
* Behaves like IS_CHAR on single-byte value
*/
#define IS_CHAR_CH(c) xmlIsChar_ch(c)
/**
* IS_BLANK:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
* [3] S ::= (#x20 | #x9 | #xD | #xA)+
*/
#define IS_BLANK(c) xmlIsBlankQ(c)
/**
* IS_BLANK_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Behaviour same as IS_BLANK
*/
#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
/**
* IS_BASECHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
* [85] BaseChar ::= ... long list see REC ...
*/
#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
/**
* IS_DIGIT:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
* [88] Digit ::= ... long list see REC ...
*/
#define IS_DIGIT(c) xmlIsDigitQ(c)
/**
* IS_DIGIT_CH:
* @c: an xmlChar value (usually an unsigned char)
*
* Behaves like IS_DIGIT but with a single byte argument
*/
#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
/**
* IS_COMBINING:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
* [87] CombiningChar ::= ... long list see REC ...
*/
#define IS_COMBINING(c) xmlIsCombiningQ(c)
/**
* IS_COMBINING_CH:
* @c: an xmlChar (usually an unsigned char)
*
* Always false (all combining chars > 0xff)
*/
#define IS_COMBINING_CH(c) 0
/**
* IS_EXTENDER:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
* [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
* #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
* [#x309D-#x309E] | [#x30FC-#x30FE]
*/
#define IS_EXTENDER(c) xmlIsExtenderQ(c)
/**
* IS_EXTENDER_CH:
* @c: an xmlChar value (usually an unsigned char)
*
* Behaves like IS_EXTENDER but with a single-byte argument
*/
#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
/**
* IS_IDEOGRAPHIC:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
* [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
*/
#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
/**
* IS_LETTER:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
* [84] Letter ::= BaseChar | Ideographic
*/
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
/**
* IS_LETTER_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Macro behaves like IS_LETTER, but only check base chars
*
*/
#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
/**
* IS_ASCII_LETTER:
* @c: an xmlChar value
*
* Macro to check [a-zA-Z]
*
*/
#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
((0x61 <= (c)) && ((c) <= 0x7a)))
/**
* IS_ASCII_DIGIT:
* @c: an xmlChar value
*
* Macro to check [0-9]
*
*/
#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
/**
* IS_PUBIDCHAR:
* @c: an UNICODE value (int)
*
* Macro to check the following production in the XML spec:
*
*
* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
*/
#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
/**
* IS_PUBIDCHAR_CH:
* @c: an xmlChar value (normally unsigned char)
*
* Same as IS_PUBIDCHAR but for single-byte value
*/
#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
/**
* Global variables used for predefined strings.
*/
XMLPUBVAR const xmlChar xmlStringText[];
XMLPUBVAR const xmlChar xmlStringTextNoenc[];
XMLPUBVAR const xmlChar xmlStringComment[];
/*
* Function to finish the work of the macros where needed.
*/
XMLPUBFUN int xmlIsLetter (int c);
/**
* Parser context.
*/
XMLPUBFUN xmlParserCtxtPtr
xmlCreateFileParserCtxt (const char *filename);
XMLPUBFUN xmlParserCtxtPtr
xmlCreateURLParserCtxt (const char *filename,
int options);
XMLPUBFUN xmlParserCtxtPtr
xmlCreateMemoryParserCtxt(const char *buffer,
int size);
XMLPUBFUN xmlParserCtxtPtr
xmlCreateEntityParserCtxt(const xmlChar *URL,
const xmlChar *ID,
const xmlChar *base);
XMLPUBFUN void
xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
XMLPUBFUN int
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc);
XMLPUBFUN int
xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
const char *encoding);
XMLPUBFUN int
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
XML_DEPRECATED
XMLPUBFUN int
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler);
/**
* Input Streams.
*/
XMLPUBFUN xmlParserInputPtr
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer);
XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
XMLPUBFUN int
xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
XMLPUBFUN xmlChar
xmlPopInput (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
xmlFreeInputStream (xmlParserInputPtr input);
XMLPUBFUN xmlParserInputPtr
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename);
XMLPUBFUN xmlParserInputPtr
xmlNewInputStream (xmlParserCtxtPtr ctxt);
/**
* Namespaces.
*/
XMLPUBFUN xmlChar *
xmlSplitQName (xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlChar **prefix);
/**
* Generic production rules.
*/
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlParseName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
xmlChar **orig);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseAttValue (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseExternalID (xmlParserCtxtPtr ctxt,
xmlChar **publicID,
int strict);
XML_DEPRECATED
XMLPUBFUN void
xmlParseComment (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlParsePITarget (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParsePI (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
xmlChar **value);
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr
xmlParseNotationType (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlEnumerationPtr
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XML_DEPRECATED
XMLPUBFUN int
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XML_DEPRECATED
XMLPUBFUN void
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr
xmlParseElementMixedContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XML_DEPRECATED
XMLPUBFUN xmlElementContentPtr
xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XML_DEPRECATED
XMLPUBFUN int
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlElementContentPtr *result);
XML_DEPRECATED
XMLPUBFUN int
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int
xmlParseCharRef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlEntityPtr
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseReference (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParsePEReference (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlParseAttribute (xmlParserCtxtPtr ctxt,
xmlChar **value);
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlParseStartTag (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseEndTag (xmlParserCtxtPtr ctxt);
#endif /* LIBXML_SAX1_ENABLED */
XML_DEPRECATED
XMLPUBFUN void
xmlParseCDSect (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
xmlParseContent (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseElement (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseEncName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseMisc (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* XML_SUBSTITUTE_NONE:
*
* If no entities need to be substituted.
*/
#define XML_SUBSTITUTE_NONE 0
/**
* XML_SUBSTITUTE_REF:
*
* Whether general entities need to be substituted.
*/
#define XML_SUBSTITUTE_REF 1
/**
* XML_SUBSTITUTE_PEREF:
*
* Whether parameter entities need to be substituted.
*/
#define XML_SUBSTITUTE_PEREF 2
/**
* XML_SUBSTITUTE_BOTH:
*
* Both general and parameter entities need to be substituted.
*/
#define XML_SUBSTITUTE_BOTH 3
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
/*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
*/
XML_DEPRECATED
XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
xmlNodePtr value);
XML_DEPRECATED
XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value);
XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
const xmlChar *value);
/*
* other commodities shared between parser.c and parserInternals.
*/
XML_DEPRECATED
XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
int *len);
XML_DEPRECATED
XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
/*
* Really core function shared with HTML parser.
*/
XML_DEPRECATED
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len);
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
int val);
XMLPUBFUN int xmlCopyChar (int len,
xmlChar *out,
int val);
XML_DEPRECATED
XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
/*
* Specific function to keep track of entities references
* and used by the XSLT debugger.
*/
#ifdef LIBXML_LEGACY_ENABLED
/**
* xmlEntityReferenceFunc:
* @ent: the entity
* @firstNode: the fist node in the chunk
* @lastNode: the last nod in the chunk
*
* Callback function used when one needs to be able to track back the
* provenance of a chunk of nodes inherited from an entity replacement.
*/
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode);
XML_DEPRECATED
XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void
xmlParseNamespace (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlScanName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
* Entities
*/
XML_DEPRECATED
XMLPUBFUN xmlChar *
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
XML_DEPRECATED
XMLPUBFUN void
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_PARSER_INTERNALS_H__ */
include/libxml2/libxml/xmlreader.h 0000644 00000027655 15033621455 0013206 0 ustar 00 /*
* Summary: the XMLReader implementation
* Description: API of the XML streaming API based on C# interfaces.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XMLREADER_H__
#define __XML_XMLREADER_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlIO.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/relaxng.h>
#include <libxml/xmlschemas.h>
#endif
/* for compatibility */
#include <libxml/parser.h>
#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.
*/
typedef enum {
XML_TEXTREADER_MODE_INITIAL = 0,
XML_TEXTREADER_MODE_INTERACTIVE = 1,
XML_TEXTREADER_MODE_ERROR = 2,
XML_TEXTREADER_MODE_EOF =3,
XML_TEXTREADER_MODE_CLOSED = 4,
XML_TEXTREADER_MODE_READING = 5
} xmlTextReaderMode;
/**
* xmlParserProperties:
*
* Some common options to use with xmlTextReaderSetParserProp, but it
* is better to use xmlParserOption and the xmlReaderNewxxx and
* xmlReaderForxxx APIs now.
*/
typedef enum {
XML_PARSER_LOADDTD = 1,
XML_PARSER_DEFAULTATTRS = 2,
XML_PARSER_VALIDATE = 3,
XML_PARSER_SUBST_ENTITIES = 4
} xmlParserProperties;
/**
* xmlReaderTypes:
*
* Predefined constants for the different types of nodes.
*/
typedef enum {
XML_READER_TYPE_NONE = 0,
XML_READER_TYPE_ELEMENT = 1,
XML_READER_TYPE_ATTRIBUTE = 2,
XML_READER_TYPE_TEXT = 3,
XML_READER_TYPE_CDATA = 4,
XML_READER_TYPE_ENTITY_REFERENCE = 5,
XML_READER_TYPE_ENTITY = 6,
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
XML_READER_TYPE_COMMENT = 8,
XML_READER_TYPE_DOCUMENT = 9,
XML_READER_TYPE_DOCUMENT_TYPE = 10,
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
XML_READER_TYPE_NOTATION = 12,
XML_READER_TYPE_WHITESPACE = 13,
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
XML_READER_TYPE_END_ELEMENT = 15,
XML_READER_TYPE_END_ENTITY = 16,
XML_READER_TYPE_XML_DECLARATION = 17
} xmlReaderTypes;
/**
* xmlTextReader:
*
* Structure for an xmlReader context.
*/
typedef struct _xmlTextReader xmlTextReader;
/**
* xmlTextReaderPtr:
*
* Pointer to an xmlReader context.
*/
typedef xmlTextReader *xmlTextReaderPtr;
/*
* Constructors & Destructor
*/
XMLPUBFUN xmlTextReaderPtr
xmlNewTextReader (xmlParserInputBufferPtr input,
const char *URI);
XMLPUBFUN xmlTextReaderPtr
xmlNewTextReaderFilename(const char *URI);
XMLPUBFUN void
xmlFreeTextReader (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderSetup(xmlTextReaderPtr reader,
xmlParserInputBufferPtr input, const char *URL,
const char *encoding, int options);
XMLPUBFUN void
xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
unsigned maxAmpl);
XMLPUBFUN const xmlError *
xmlTextReaderGetLastError(xmlTextReaderPtr reader);
/*
* Iterators
*/
XMLPUBFUN int
xmlTextReaderRead (xmlTextReaderPtr reader);
#ifdef LIBXML_WRITER_ENABLED
XMLPUBFUN xmlChar *
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
#endif
XMLPUBFUN xmlChar *
xmlTextReaderReadString (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
/*
* Attributes of the node
*/
XMLPUBFUN int
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderDepth (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderHasValue(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderNodeType (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderReadState (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstName (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstString (xmlTextReaderPtr reader,
const xmlChar *str);
XMLPUBFUN const xmlChar *
xmlTextReaderConstValue (xmlTextReaderPtr reader);
/*
* use the Const version of the routine for
* better performance and simpler code
*/
XMLPUBFUN xmlChar *
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderLocalName (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderName (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderPrefix (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderValue (xmlTextReaderPtr reader);
/*
* Methods of the XmlTextReader
*/
XMLPUBFUN int
xmlTextReaderClose (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
int no);
XMLPUBFUN xmlChar *
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
const xmlChar *name);
XMLPUBFUN xmlChar *
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
XMLPUBFUN xmlParserInputBufferPtr
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
XMLPUBFUN xmlChar *
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
const xmlChar *prefix);
XMLPUBFUN int
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
int no);
XMLPUBFUN int
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
const xmlChar *name);
XMLPUBFUN int
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
XMLPUBFUN int
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderNormalization (xmlTextReaderPtr reader);
XMLPUBFUN const xmlChar *
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
/*
* Extensions
*/
XMLPUBFUN int
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
int prop,
int value);
XMLPUBFUN int
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
int prop);
XMLPUBFUN xmlNodePtr
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
XMLPUBFUN xmlNodePtr
xmlTextReaderPreserve (xmlTextReaderPtr reader);
#ifdef LIBXML_PATTERN_ENABLED
XMLPUBFUN int
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
const xmlChar *pattern,
const xmlChar **namespaces);
#endif /* LIBXML_PATTERN_ENABLED */
XMLPUBFUN xmlDocPtr
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
XMLPUBFUN xmlNodePtr
xmlTextReaderExpand (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderNext (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderIsValid (xmlTextReaderPtr reader);
#ifdef LIBXML_SCHEMAS_ENABLED
XMLPUBFUN int
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
const char *rng);
XMLPUBFUN int
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
xmlRelaxNGValidCtxtPtr ctxt,
int options);
XMLPUBFUN int
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
xmlRelaxNGPtr schema);
XMLPUBFUN int
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
const char *xsd);
XMLPUBFUN int
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
xmlSchemaValidCtxtPtr ctxt,
int options);
XMLPUBFUN int
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
xmlSchemaPtr schema);
#endif
XMLPUBFUN const xmlChar *
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
XMLPUBFUN int
xmlTextReaderStandalone (xmlTextReaderPtr reader);
/*
* Index lookup
*/
XMLPUBFUN long
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
/*
* New more complete APIs for simpler creation and reuse of readers
*/
XMLPUBFUN xmlTextReaderPtr
xmlReaderWalker (xmlDocPtr doc);
XMLPUBFUN xmlTextReaderPtr
xmlReaderForDoc (const xmlChar * cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlTextReaderPtr
xmlReaderForFile (const char *filename,
const char *encoding,
int options);
XMLPUBFUN xmlTextReaderPtr
xmlReaderForMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlTextReaderPtr
xmlReaderForFd (int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlTextReaderPtr
xmlReaderForIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN int
xmlReaderNewWalker (xmlTextReaderPtr reader,
xmlDocPtr doc);
XMLPUBFUN int
xmlReaderNewDoc (xmlTextReaderPtr reader,
const xmlChar * cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN int
xmlReaderNewFile (xmlTextReaderPtr reader,
const char *filename,
const char *encoding,
int options);
XMLPUBFUN int
xmlReaderNewMemory (xmlTextReaderPtr reader,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN int
xmlReaderNewFd (xmlTextReaderPtr reader,
int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN int
xmlReaderNewIO (xmlTextReaderPtr reader,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
/*
* Error handling extensions
*/
typedef void * xmlTextReaderLocatorPtr;
/**
* xmlTextReaderErrorFunc:
* @arg: the user argument
* @msg: the message
* @severity: the severity of the error
* @locator: a locator indicating where the error occurred
*
* Signature of an error callback from a reader parser
*/
typedef void (*xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
XMLPUBFUN int
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
XMLPUBFUN xmlChar *
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
XMLPUBFUN void
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void *arg);
XMLPUBFUN void
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void *arg);
XMLPUBFUN void
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg);
#endif /* LIBXML_READER_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_XMLREADER_H__ */
include/libxml2/libxml/xmlexports.h 0000644 00000006320 15033621455 0013432 0 ustar 00 /*
* Summary: macros for marking symbols as exportable/importable.
* Description: macros for marking symbols as exportable/importable.
*
* Copy: See Copyright for the status of this software.
*/
#ifndef __XML_EXPORTS_H__
#define __XML_EXPORTS_H__
/** DOC_DISABLE */
/*
* Symbol visibility
*/
#if defined(_WIN32) || defined(__CYGWIN__)
#ifdef LIBXML_STATIC
#define XMLPUBLIC
#elif defined(IN_LIBXML)
#define XMLPUBLIC __declspec(dllexport)
#else
#define XMLPUBLIC __declspec(dllimport)
#endif
#else /* not Windows */
#define XMLPUBLIC
#endif /* platform switch */
#define XMLPUBFUN XMLPUBLIC
#define XMLPUBVAR XMLPUBLIC extern
/* Compatibility */
#define XMLCALL
#define XMLCDECL
#ifndef LIBXML_DLL_IMPORT
#define LIBXML_DLL_IMPORT XMLPUBVAR
#endif
/*
* Attributes
*/
#ifndef ATTRIBUTE_UNUSED
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 207 || defined(__clang__)
#define ATTRIBUTE_UNUSED __attribute__((unused))
#else
#define ATTRIBUTE_UNUSED
#endif
#endif
#if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
#define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
#else
#define LIBXML_ATTR_ALLOC_SIZE(x)
#endif
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 303
#define LIBXML_ATTR_FORMAT(fmt,args) \
__attribute__((__format__(__printf__,fmt,args)))
#else
#define LIBXML_ATTR_FORMAT(fmt,args)
#endif
#ifndef XML_DEPRECATED
#if defined(IN_LIBXML)
#define XML_DEPRECATED
#elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
#define XML_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER) && _MSC_VER >= 1400
/* Available since Visual Studio 2005 */
#define XML_DEPRECATED __declspec(deprecated)
#else
#define XML_DEPRECATED
#endif
#endif
/*
* Warnings pragmas, should be moved from public headers
*/
#if defined(__LCC__)
#define XML_IGNORE_FPTR_CAST_WARNINGS
#define XML_POP_WARNINGS \
_Pragma("diag_default 1215")
#elif defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800)
#define XML_IGNORE_FPTR_CAST_WARNINGS \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"") \
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#else
#define XML_IGNORE_FPTR_CAST_WARNINGS \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wpedantic\"")
#endif
#define XML_POP_WARNINGS \
_Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
#define XML_POP_WARNINGS __pragma(warning(pop))
#else
#define XML_IGNORE_FPTR_CAST_WARNINGS
#define XML_POP_WARNINGS
#endif
/*
* Accessors for globals
*/
#define XML_NO_ATTR
#ifdef LIBXML_THREAD_ENABLED
#define XML_DECLARE_GLOBAL(name, type, attrs) \
attrs XMLPUBFUN type *__##name(void);
#define XML_GLOBAL_MACRO(name) (*__##name())
#else
#define XML_DECLARE_GLOBAL(name, type, attrs) \
attrs XMLPUBVAR type name;
#endif
/*
* Originally declared in xmlversion.h which is generated
*/
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN void xmlCheckVersion(int version);
#ifdef __cplusplus
}
#endif
#endif /* __XML_EXPORTS_H__ */
include/libxml2/libxml/chvalid.h 0000644 00000011737 15033621455 0012627 0 ustar 00 /*
* Summary: Unicode character range checking
* Description: this module exports interfaces for the character
* range validation APIs
*
* This file is automatically generated from the cvs source
* definition files using the genChRanges.py Python script
*
* Generation date: Mon Mar 27 11:09:48 2006
* Sources: chvalid.def
* Author: William Brack <wbrack@mmm.com.hk>
*/
#ifndef __XML_CHVALID_H__
#define __XML_CHVALID_H__
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define our typedefs and structures
*
*/
typedef struct _xmlChSRange xmlChSRange;
typedef xmlChSRange *xmlChSRangePtr;
struct _xmlChSRange {
unsigned short low;
unsigned short high;
};
typedef struct _xmlChLRange xmlChLRange;
typedef xmlChLRange *xmlChLRangePtr;
struct _xmlChLRange {
unsigned int low;
unsigned int high;
};
typedef struct _xmlChRangeGroup xmlChRangeGroup;
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
struct _xmlChRangeGroup {
int nbShortRange;
int nbLongRange;
const xmlChSRange *shortRange; /* points to an array of ranges */
const xmlChLRange *longRange;
};
/**
* Range checking routine
*/
XMLPUBFUN int
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
/**
* xmlIsBaseChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
((0x61 <= (c)) && ((c) <= 0x7a)) || \
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
(0xf8 <= (c)))
/**
* xmlIsBaseCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
xmlIsBaseChar_ch((c)) : \
xmlCharInRange((c), &xmlIsBaseCharGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
/**
* xmlIsBlank_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd))
/**
* xmlIsBlankQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
xmlIsBlank_ch((c)) : 0)
/**
* xmlIsChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd) || \
(0x20 <= (c)))
/**
* xmlIsCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsCharQ(c) (((c) < 0x100) ? \
xmlIsChar_ch((c)) :\
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
/**
* xmlIsCombiningQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
0 : \
xmlCharInRange((c), &xmlIsCombiningGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
/**
* xmlIsDigit_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
/**
* xmlIsDigitQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
xmlIsDigit_ch((c)) : \
xmlCharInRange((c), &xmlIsDigitGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
/**
* xmlIsExtender_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsExtender_ch(c) (((c) == 0xb7))
/**
* xmlIsExtenderQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
xmlIsExtender_ch((c)) : \
xmlCharInRange((c), &xmlIsExtenderGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
/**
* xmlIsIdeographicQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
0 :\
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
((c) == 0x3007) || \
((0x3021 <= (c)) && ((c) <= 0x3029))))
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
/**
* xmlIsPubidChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
/**
* xmlIsPubidCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0)
XMLPUBFUN int
xmlIsBaseChar(unsigned int ch);
XMLPUBFUN int
xmlIsBlank(unsigned int ch);
XMLPUBFUN int
xmlIsChar(unsigned int ch);
XMLPUBFUN int
xmlIsCombining(unsigned int ch);
XMLPUBFUN int
xmlIsDigit(unsigned int ch);
XMLPUBFUN int
xmlIsExtender(unsigned int ch);
XMLPUBFUN int
xmlIsIdeographic(unsigned int ch);
XMLPUBFUN int
xmlIsPubidChar(unsigned int ch);
#ifdef __cplusplus
}
#endif
#endif /* __XML_CHVALID_H__ */
include/libxml2/libxml/nanohttp.h 0000644 00000004114 15033621455 0013037 0 ustar 00 /*
* Summary: minimal HTTP implementation
* Description: minimal HTTP implementation allowing to fetch resources
* like external subset.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __NANO_HTTP_H__
#define __NANO_HTTP_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_HTTP_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XML_DEPRECATED
XMLPUBFUN void
xmlNanoHTTPInit (void);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoHTTPCleanup (void);
XML_DEPRECATED
XMLPUBFUN void
xmlNanoHTTPScanProxy (const char *URL);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoHTTPFetch (const char *URL,
const char *filename,
char **contentType);
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoHTTPMethod (const char *URL,
const char *method,
const char *input,
char **contentType,
const char *headers,
int ilen);
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoHTTPMethodRedir (const char *URL,
const char *method,
const char *input,
char **contentType,
char **redir,
const char *headers,
int ilen);
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoHTTPOpen (const char *URL,
char **contentType);
XML_DEPRECATED
XMLPUBFUN void *
xmlNanoHTTPOpenRedir (const char *URL,
char **contentType,
char **redir);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoHTTPReturnCode (void *ctx);
XML_DEPRECATED
XMLPUBFUN const char *
xmlNanoHTTPAuthHeader (void *ctx);
XML_DEPRECATED
XMLPUBFUN const char *
xmlNanoHTTPRedir (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoHTTPContentLength( void * ctx );
XML_DEPRECATED
XMLPUBFUN const char *
xmlNanoHTTPEncoding (void *ctx);
XML_DEPRECATED
XMLPUBFUN const char *
xmlNanoHTTPMimeType (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
xmlNanoHTTPRead (void *ctx,
void *dest,
int len);
#ifdef LIBXML_OUTPUT_ENABLED
XML_DEPRECATED
XMLPUBFUN int
xmlNanoHTTPSave (void *ctxt,
const char *filename);
#endif /* LIBXML_OUTPUT_ENABLED */
XML_DEPRECATED
XMLPUBFUN void
xmlNanoHTTPClose (void *ctx);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTTP_ENABLED */
#endif /* __NANO_HTTP_H__ */
include/libxml2/libxml/xinclude.h 0000644 00000006045 15033621455 0013024 0 ustar 00 /*
* Summary: implementation of XInclude
* Description: API to handle XInclude processing,
* implements the
* World Wide Web Consortium Last Call Working Draft 10 November 2003
* http://www.w3.org/TR/2003/WD-xinclude-20031110
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XINCLUDE_H__
#define __XML_XINCLUDE_H__
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#ifdef LIBXML_XINCLUDE_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* XINCLUDE_NS:
*
* Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
*/
#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
/**
* XINCLUDE_OLD_NS:
*
* Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
*/
#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
/**
* XINCLUDE_NODE:
*
* Macro defining "include"
*/
#define XINCLUDE_NODE (const xmlChar *) "include"
/**
* XINCLUDE_FALLBACK:
*
* Macro defining "fallback"
*/
#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
/**
* XINCLUDE_HREF:
*
* Macro defining "href"
*/
#define XINCLUDE_HREF (const xmlChar *) "href"
/**
* XINCLUDE_PARSE:
*
* Macro defining "parse"
*/
#define XINCLUDE_PARSE (const xmlChar *) "parse"
/**
* XINCLUDE_PARSE_XML:
*
* Macro defining "xml"
*/
#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
/**
* XINCLUDE_PARSE_TEXT:
*
* Macro defining "text"
*/
#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
/**
* XINCLUDE_PARSE_ENCODING:
*
* Macro defining "encoding"
*/
#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
/**
* XINCLUDE_PARSE_XPOINTER:
*
* Macro defining "xpointer"
*/
#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
/*
* standalone processing
*/
XMLPUBFUN int
xmlXIncludeProcess (xmlDocPtr doc);
XMLPUBFUN int
xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags);
XMLPUBFUN int
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
int flags,
void *data);
XMLPUBFUN int
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
int flags,
void *data);
XMLPUBFUN int
xmlXIncludeProcessTree (xmlNodePtr tree);
XMLPUBFUN int
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
int flags);
/*
* contextual processing
*/
XMLPUBFUN xmlXIncludeCtxtPtr
xmlXIncludeNewContext (xmlDocPtr doc);
XMLPUBFUN int
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags);
XMLPUBFUN void
xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
xmlStructuredErrorFunc handler,
void *data);
XMLPUBFUN int
xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
XMLPUBFUN void
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
XMLPUBFUN int
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr tree);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XINCLUDE_ENABLED */
#endif /* __XML_XINCLUDE_H__ */
include/libxml2/libxml/xlink.h 0000644 00000011612 15033621455 0012332 0 ustar 00 /*
* Summary: unfinished XLink detection module
* Description: unfinished XLink detection module
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XLINK_H__
#define __XML_XLINK_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_XPTR_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* Various defines for the various Link properties.
*
* NOTE: the link detection layer will try to resolve QName expansion
* of namespaces. If "foo" is the prefix for "http://foo.com/"
* then the link detection layer will expand role="foo:myrole"
* to "http://foo.com/:myrole".
* NOTE: the link detection layer will expand URI-References found on
* href attributes by using the base mechanism if found.
*/
typedef xmlChar *xlinkHRef;
typedef xmlChar *xlinkRole;
typedef xmlChar *xlinkTitle;
typedef enum {
XLINK_TYPE_NONE = 0,
XLINK_TYPE_SIMPLE,
XLINK_TYPE_EXTENDED,
XLINK_TYPE_EXTENDED_SET
} xlinkType;
typedef enum {
XLINK_SHOW_NONE = 0,
XLINK_SHOW_NEW,
XLINK_SHOW_EMBED,
XLINK_SHOW_REPLACE
} xlinkShow;
typedef enum {
XLINK_ACTUATE_NONE = 0,
XLINK_ACTUATE_AUTO,
XLINK_ACTUATE_ONREQUEST
} xlinkActuate;
/**
* xlinkNodeDetectFunc:
* @ctx: user data pointer
* @node: the node to check
*
* This is the prototype for the link detection routine.
* It calls the default link detection callbacks upon link detection.
*/
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
/*
* The link detection module interact with the upper layers using
* a set of callback registered at parsing time.
*/
/**
* xlinkSimpleLinkFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @href: the target of the link
* @role: the role string
* @title: the link title
*
* This is the prototype for a simple link detection callback.
*/
typedef void
(*xlinkSimpleLinkFunk) (void *ctx,
xmlNodePtr node,
const xlinkHRef href,
const xlinkRole role,
const xlinkTitle title);
/**
* xlinkExtendedLinkFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @nbLocators: the number of locators detected on the link
* @hrefs: pointer to the array of locator hrefs
* @roles: pointer to the array of locator roles
* @nbArcs: the number of arcs detected on the link
* @from: pointer to the array of source roles found on the arcs
* @to: pointer to the array of target roles found on the arcs
* @show: array of values for the show attributes found on the arcs
* @actuate: array of values for the actuate attributes found on the arcs
* @nbTitles: the number of titles detected on the link
* @title: array of titles detected on the link
* @langs: array of xml:lang values for the titles
*
* This is the prototype for a extended link detection callback.
*/
typedef void
(*xlinkExtendedLinkFunk)(void *ctx,
xmlNodePtr node,
int nbLocators,
const xlinkHRef *hrefs,
const xlinkRole *roles,
int nbArcs,
const xlinkRole *from,
const xlinkRole *to,
xlinkShow *show,
xlinkActuate *actuate,
int nbTitles,
const xlinkTitle *titles,
const xmlChar **langs);
/**
* xlinkExtendedLinkSetFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @nbLocators: the number of locators detected on the link
* @hrefs: pointer to the array of locator hrefs
* @roles: pointer to the array of locator roles
* @nbTitles: the number of titles detected on the link
* @title: array of titles detected on the link
* @langs: array of xml:lang values for the titles
*
* This is the prototype for a extended link set detection callback.
*/
typedef void
(*xlinkExtendedLinkSetFunk) (void *ctx,
xmlNodePtr node,
int nbLocators,
const xlinkHRef *hrefs,
const xlinkRole *roles,
int nbTitles,
const xlinkTitle *titles,
const xmlChar **langs);
/**
* This is the structure containing a set of Links detection callbacks.
*
* There is no default xlink callbacks, if one want to get link
* recognition activated, those call backs must be provided before parsing.
*/
typedef struct _xlinkHandler xlinkHandler;
typedef xlinkHandler *xlinkHandlerPtr;
struct _xlinkHandler {
xlinkSimpleLinkFunk simple;
xlinkExtendedLinkFunk extended;
xlinkExtendedLinkSetFunk set;
};
/*
* The default detection routine, can be overridden, they call the default
* detection callbacks.
*/
XMLPUBFUN xlinkNodeDetectFunc
xlinkGetDefaultDetect (void);
XMLPUBFUN void
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
/*
* Routines to set/get the default handlers.
*/
XMLPUBFUN xlinkHandlerPtr
xlinkGetDefaultHandler (void);
XMLPUBFUN void
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
/*
* Link detection module itself.
*/
XMLPUBFUN xlinkType
xlinkIsLink (xmlDocPtr doc,
xmlNodePtr node);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPTR_ENABLED */
#endif /* __XML_XLINK_H__ */
include/libxml2/libxml/xmlregexp.h 0000644 00000012035 15033621455 0013220 0 ustar 00 /*
* Summary: regular expressions handling
* Description: basic API for libxml regular expressions handling used
* for XML Schemas and validation.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_REGEXP_H__
#define __XML_REGEXP_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef LIBXML_REGEXP_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlRegexpPtr:
*
* A libxml regular expression, they can actually be far more complex
* thank the POSIX regex expressions.
*/
typedef struct _xmlRegexp xmlRegexp;
typedef xmlRegexp *xmlRegexpPtr;
/**
* xmlRegExecCtxtPtr:
*
* A libxml progressive regular expression evaluation context
*/
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
/*
* The POSIX like API
*/
XMLPUBFUN xmlRegexpPtr
xmlRegexpCompile (const xmlChar *regexp);
XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
XMLPUBFUN int
xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar *value);
XMLPUBFUN void
xmlRegexpPrint (FILE *output,
xmlRegexpPtr regexp);
XMLPUBFUN int
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,
const xmlChar *token,
void *transdata,
void *inputdata);
/*
* The progressive API
*/
XMLPUBFUN xmlRegExecCtxtPtr
xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback,
void *data);
XMLPUBFUN void
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
XMLPUBFUN int
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
const xmlChar *value,
void *data);
XMLPUBFUN int
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
const xmlChar *value,
const xmlChar *value2,
void *data);
XMLPUBFUN int
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
int *nbval,
int *nbneg,
xmlChar **values,
int *terminal);
XMLPUBFUN int
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
const xmlChar **string,
int *nbval,
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
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
XMLPUBFUN xmlExpCtxtPtr
xmlExpNewCtxt (int maxNodes,
xmlDictPtr dict);
XMLPUBFUN int
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
XMLPUBFUN int
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
xmlExpFree (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr);
XMLPUBFUN void
xmlExpRef (xmlExpNodePtr expr);
/*
* constructors can be either manual or from a string
*/
XMLPUBFUN xmlExpNodePtr
xmlExpParse (xmlExpCtxtPtr ctxt,
const char *expr);
XMLPUBFUN xmlExpNodePtr
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
const xmlChar *name,
int len);
XMLPUBFUN xmlExpNodePtr
xmlExpNewOr (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr
xmlExpNewRange (xmlExpCtxtPtr ctxt,
xmlExpNodePtr subset,
int min,
int max);
/*
* The really interesting APIs
*/
XMLPUBFUN int
xmlExpIsNillable(xmlExpNodePtr expr);
XMLPUBFUN int
xmlExpMaxToken (xmlExpNodePtr expr);
XMLPUBFUN int
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**langList,
int len);
XMLPUBFUN int
xmlExpGetStart (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**tokList,
int len);
XMLPUBFUN xmlExpNodePtr
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar *str,
int len);
XMLPUBFUN xmlExpNodePtr
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
XMLPUBFUN int
xmlExpSubsume (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
XMLPUBFUN void
xmlExpDump (xmlBufferPtr buf,
xmlExpNodePtr expr);
#endif /* LIBXML_EXPR_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_REGEXP_ENABLED */
#endif /*__XML_REGEXP_H__ */
include/libxml2/libxml/catalog.h 0000644 00000011012 15033621455 0012611 0 ustar 00 /**
* Summary: interfaces to the Catalog handling system
* Description: the catalog module implements the support for
* XML Catalogs and SGML catalogs
*
* SGML Open Technical Resolution TR9401:1997.
* http://www.jclark.com/sp/catalog.htm
*
* XML Catalogs Working Draft 06 August 2001
* http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_CATALOG_H__
#define __XML_CATALOG_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#include <libxml/tree.h>
#ifdef LIBXML_CATALOG_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* XML_CATALOGS_NAMESPACE:
*
* The namespace for the XML Catalogs elements.
*/
#define XML_CATALOGS_NAMESPACE \
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
/**
* XML_CATALOG_PI:
*
* The specific XML Catalog Processing Instruction name.
*/
#define XML_CATALOG_PI \
(const xmlChar *) "oasis-xml-catalog"
/*
* The API is voluntarily limited to general cataloging.
*/
typedef enum {
XML_CATA_PREFER_NONE = 0,
XML_CATA_PREFER_PUBLIC = 1,
XML_CATA_PREFER_SYSTEM
} xmlCatalogPrefer;
typedef enum {
XML_CATA_ALLOW_NONE = 0,
XML_CATA_ALLOW_GLOBAL = 1,
XML_CATA_ALLOW_DOCUMENT = 2,
XML_CATA_ALLOW_ALL = 3
} xmlCatalogAllow;
typedef struct _xmlCatalog xmlCatalog;
typedef xmlCatalog *xmlCatalogPtr;
/*
* Operations on a given catalog.
*/
XMLPUBFUN xmlCatalogPtr
xmlNewCatalog (int sgml);
XMLPUBFUN xmlCatalogPtr
xmlLoadACatalog (const char *filename);
XMLPUBFUN xmlCatalogPtr
xmlLoadSGMLSuperCatalog (const char *filename);
XMLPUBFUN int
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
XMLPUBFUN int
xmlACatalogAdd (xmlCatalogPtr catal,
const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int
xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar *value);
XMLPUBFUN xmlChar *
xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar *
xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID);
XMLPUBFUN xmlChar *
xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID);
XMLPUBFUN xmlChar *
xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar *URI);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlACatalogDump (xmlCatalogPtr catal,
FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void
xmlFreeCatalog (xmlCatalogPtr catal);
XMLPUBFUN int
xmlCatalogIsEmpty (xmlCatalogPtr catal);
/*
* Global operations.
*/
XMLPUBFUN void
xmlInitializeCatalog (void);
XMLPUBFUN int
xmlLoadCatalog (const char *filename);
XMLPUBFUN void
xmlLoadCatalogs (const char *paths);
XMLPUBFUN void
xmlCatalogCleanup (void);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlCatalogDump (FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlChar *
xmlCatalogResolve (const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar *
xmlCatalogResolveSystem (const xmlChar *sysID);
XMLPUBFUN xmlChar *
xmlCatalogResolvePublic (const xmlChar *pubID);
XMLPUBFUN xmlChar *
xmlCatalogResolveURI (const xmlChar *URI);
XMLPUBFUN int
xmlCatalogAdd (const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int
xmlCatalogRemove (const xmlChar *value);
XMLPUBFUN xmlDocPtr
xmlParseCatalogFile (const char *filename);
XMLPUBFUN int
xmlCatalogConvert (void);
/*
* Strictly minimal interfaces for per-document catalogs used
* by the parser.
*/
XMLPUBFUN void
xmlCatalogFreeLocal (void *catalogs);
XMLPUBFUN void *
xmlCatalogAddLocal (void *catalogs,
const xmlChar *URL);
XMLPUBFUN xmlChar *
xmlCatalogLocalResolve (void *catalogs,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar *
xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI);
/*
* Preference settings.
*/
XMLPUBFUN int
xmlCatalogSetDebug (int level);
XMLPUBFUN xmlCatalogPrefer
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
XMLPUBFUN void
xmlCatalogSetDefaults (xmlCatalogAllow allow);
XMLPUBFUN xmlCatalogAllow
xmlCatalogGetDefaults (void);
/* DEPRECATED interfaces */
XMLPUBFUN const xmlChar *
xmlCatalogGetSystem (const xmlChar *sysID);
XMLPUBFUN const xmlChar *
xmlCatalogGetPublic (const xmlChar *pubID);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_CATALOG_ENABLED */
#endif /* __XML_CATALOG_H__ */
include/libxml2/libxml/HTMLtree.h 0000644 00000006656 15033621455 0012645 0 ustar 00 /*
* Summary: specific APIs to process HTML tree, especially serialization
* Description: this module implements a few function needed to process
* tree in an HTML specific way.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __HTML_TREE_H__
#define __HTML_TREE_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/HTMLparser.h>
#ifdef LIBXML_HTML_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* HTML_TEXT_NODE:
*
* Macro. A text node in a HTML document is really implemented
* the same way as a text node in an XML document.
*/
#define HTML_TEXT_NODE XML_TEXT_NODE
/**
* HTML_ENTITY_REF_NODE:
*
* Macro. An entity reference in a HTML document is really implemented
* the same way as an entity reference in an XML document.
*/
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
/**
* HTML_COMMENT_NODE:
*
* Macro. A comment in a HTML document is really implemented
* the same way as a comment in an XML document.
*/
#define HTML_COMMENT_NODE XML_COMMENT_NODE
/**
* HTML_PRESERVE_NODE:
*
* Macro. A preserved node in a HTML document is really implemented
* the same way as a CDATA section in an XML document.
*/
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
/**
* HTML_PI_NODE:
*
* Macro. A processing instruction in a HTML document is really implemented
* the same way as a processing instruction in an XML document.
*/
#define HTML_PI_NODE XML_PI_NODE
XMLPUBFUN htmlDocPtr
htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN htmlDocPtr
htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN const xmlChar *
htmlGetMetaEncoding (htmlDocPtr doc);
XMLPUBFUN int
htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void
htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN int
htmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN int
htmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int
htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN void
htmlNodeDumpFile (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int
htmlNodeDumpFileFormat (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN int
htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int
htmlSaveFileFormat (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN void
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN void
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int
htmlIsBooleanAttr (const xmlChar *name);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTML_ENABLED */
#endif /* __HTML_TREE_H__ */
include/libxml2/libxml/debugXML.h 0000644 00000011506 15033621455 0012656 0 ustar 00 /*
* Summary: Tree debugging APIs
* Description: Interfaces to a set of routines used for debugging the tree
* produced by the XML parser.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __DEBUG_XML__
#define __DEBUG_XML__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_DEBUG_ENABLED
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The standard Dump routines.
*/
XMLPUBFUN void
xmlDebugDumpString (FILE *output,
const xmlChar *str);
XMLPUBFUN void
xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void
xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void
xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void
xmlDebugDumpNode (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void
xmlDebugDumpNodeList (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void
xmlDebugDumpDocumentHead(FILE *output,
xmlDocPtr doc);
XMLPUBFUN void
xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc);
XMLPUBFUN void
xmlDebugDumpDTD (FILE *output,
xmlDtdPtr dtd);
XMLPUBFUN void
xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc);
/****************************************************************
* *
* Checking routines *
* *
****************************************************************/
XMLPUBFUN int
xmlDebugCheckDocument (FILE * output,
xmlDocPtr doc);
/****************************************************************
* *
* XML shell helpers *
* *
****************************************************************/
XMLPUBFUN void
xmlLsOneNode (FILE *output, xmlNodePtr node);
XMLPUBFUN int
xmlLsCountNode (xmlNodePtr node);
XMLPUBFUN const char *
xmlBoolToText (int boolval);
/****************************************************************
* *
* The XML shell related structures and functions *
* *
****************************************************************/
#ifdef LIBXML_XPATH_ENABLED
/**
* xmlShellReadlineFunc:
* @prompt: a string prompt
*
* This is a generic signature for the XML shell input function.
*
* Returns a string which will be freed by the Shell.
*/
typedef char * (* xmlShellReadlineFunc)(char *prompt);
/**
* xmlShellCtxt:
*
* A debugging shell context.
* TODO: add the defined function tables.
*/
typedef struct _xmlShellCtxt xmlShellCtxt;
typedef xmlShellCtxt *xmlShellCtxtPtr;
struct _xmlShellCtxt {
char *filename;
xmlDocPtr doc;
xmlNodePtr node;
xmlXPathContextPtr pctxt;
int loaded;
FILE *output;
xmlShellReadlineFunc input;
};
/**
* xmlShellCmd:
* @ctxt: a shell context
* @arg: a string argument
* @node: a first node
* @node2: a second node
*
* This is a generic signature for the XML shell functions.
*
* Returns an int, negative returns indicating errors.
*/
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN void
xmlShellPrintXPathError (int errorType,
const char *arg);
XMLPUBFUN void
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
XMLPUBFUN int
xmlShellList (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellBase (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellDir (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellLoad (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlShellPrintNode (xmlNodePtr node);
XMLPUBFUN int
xmlShellCat (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellWrite (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellSave (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int
xmlShellValidate (xmlShellCtxtPtr ctxt,
char *dtd,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_VALID_ENABLED */
XMLPUBFUN int
xmlShellDu (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr tree,
xmlNodePtr node2);
XMLPUBFUN int
xmlShellPwd (xmlShellCtxtPtr ctxt,
char *buffer,
xmlNodePtr node,
xmlNodePtr node2);
/*
* The Shell interface.
*/
XMLPUBFUN void
xmlShell (xmlDocPtr doc,
const char *filename,
xmlShellReadlineFunc input,
FILE *output);
#endif /* LIBXML_XPATH_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_DEBUG_ENABLED */
#endif /* __DEBUG_XML__ */
include/libxml2/libxml/xmlunicode.h 0000644 00000025565 15033621455 0013370 0 ustar 00 /*
* Summary: Unicode character APIs
* Description: API for the Unicode character APIs
*
* 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.1.html
* using the genUnicode.py Python script.
*
* Generation date: Tue Apr 30 17:30:38 2024
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
* Author: Daniel Veillard
*/
#ifndef __XML_UNICODE_H__
#define __XML_UNICODE_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_UNICODE_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsAegeanNumbers (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsArabic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsArmenian (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsArrows (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBasicLatin (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBengali (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBlockElements (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBopomofo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBopomofoExtended (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBoxDrawing (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBraillePatterns (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsBuhid (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKCompatibility (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCherokee (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsControlPictures (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCurrencySymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCyrillic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsDeseret (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsDevanagari (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsDingbats (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsEthiopic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGeometricShapes (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGeorgian (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGothic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGreek (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGreekExtended (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGreekandCoptic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGujarati (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsGurmukhi (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHangulJamo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHangulSyllables (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHanunoo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHebrew (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHighSurrogates (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsHiragana (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsIPAExtensions (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKanbun (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKangxiRadicals (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKannada (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKatakana (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKhmer (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsKhmerSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLao (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLatin1Supplement (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLatinExtendedA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLatinExtendedB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLimbu (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsLowSurrogates (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMalayalam (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMathematicalOperators (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMongolian (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMusicalSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsMyanmar (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsNumberForms (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsOgham (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsOldItalic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsOriya (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsOsmanya (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsPrivateUse (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsPrivateUseArea (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsRunic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsShavian (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSinhala (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSmallFormVariants (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSpecials (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsSyriac (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTagalog (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTagbanwa (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTags (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTaiLe (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTamil (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTelugu (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsThaana (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsThai (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsTibetan (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsUgaritic (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsVariationSelectors (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsYiRadicals (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsYiSyllables (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code);
XMLPUBFUN int xmlUCSIsBlock (int code, const char *block);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatC (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatCc (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatCf (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatCo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatCs (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatL (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatLl (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatLm (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatLo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatLt (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatLu (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatM (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatMc (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatMe (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatMn (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatN (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatNd (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatNl (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatNo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatP (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPc (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPd (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPe (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPf (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPi (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatPs (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatS (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatSc (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatSk (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatSm (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatSo (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatZ (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatZl (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatZp (int code);
XML_DEPRECATED
XMLPUBFUN int xmlUCSIsCatZs (int code);
XMLPUBFUN int xmlUCSIsCat (int code, const char *cat);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_UNICODE_ENABLED */
#endif /* __XML_UNICODE_H__ */
include/libxml2/libxml/globals.h 0000644 00000001572 15033621455 0012634 0 ustar 00 /*
* Summary: interface for all global variables of the library
* Description: Deprecated, don't use
*
* Copy: See Copyright for the status of this software.
*/
#ifndef __XML_GLOBALS_H
#define __XML_GLOBALS_H
#include <libxml/xmlversion.h>
/*
* This file was required to access global variables until version v2.12.0.
*
* These includes are for backward compatibility.
*/
#include <libxml/HTMLparser.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlIO.h>
#include <libxml/xmlsave.h>
#include <libxml/threads.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlGlobalState xmlGlobalState;
typedef xmlGlobalState *xmlGlobalStatePtr;
XML_DEPRECATED XMLPUBFUN void
xmlInitializeGlobalState(xmlGlobalStatePtr gs);
XML_DEPRECATED XMLPUBFUN
xmlGlobalStatePtr xmlGetGlobalState(void);
#ifdef __cplusplus
}
#endif
#endif /* __XML_GLOBALS_H */
include/libxml2/libxml/entities.h 0000644 00000011453 15033621455 0013034 0 ustar 00 /*
* Summary: interface for the XML entities handling
* Description: this module provides some of the entity API needed
* for the parser and applications.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_ENTITIES_H__
#define __XML_ENTITIES_H__
/** DOC_DISABLE */
#include <libxml/xmlversion.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
/** DOC_ENABLE */
#ifdef __cplusplus
extern "C" {
#endif
/*
* The different valid entity types.
*/
typedef enum {
XML_INTERNAL_GENERAL_ENTITY = 1,
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
XML_INTERNAL_PARAMETER_ENTITY = 4,
XML_EXTERNAL_PARAMETER_ENTITY = 5,
XML_INTERNAL_PREDEFINED_ENTITY = 6
} xmlEntityType;
/*
* An unit of storage for an entity, contains the string, the value
* and the linkind data needed for the linking in the hash table.
*/
struct _xmlEntity {
void *_private; /* application data */
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
const xmlChar *name; /* Entity name */
struct _xmlNode *children; /* First child link */
struct _xmlNode *last; /* Last child link */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlChar *orig; /* content without ref substitution */
xmlChar *content; /* content or ndata if unparsed */
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 */
struct _xmlEntity *nexte; /* unused */
const xmlChar *URI; /* the full URI as computed */
int owner; /* unused */
int flags; /* various flags */
unsigned long expandedSize; /* expanded size */
};
/*
* All entities are stored in an hash table.
* There is 2 separate hash tables for global and parameter entities.
*/
typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
/*
* External functions:
*/
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlEntityPtr
xmlNewEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN void
xmlFreeEntity (xmlEntityPtr entity);
XMLPUBFUN int
xmlAddEntity (xmlDocPtr doc,
int extSubset,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content,
xmlEntityPtr *out);
XMLPUBFUN xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr
xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr
xmlGetPredefinedEntity (const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetDocEntity (const xmlDoc *doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
XMLPUBFUN const xmlChar *
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlChar *
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input);
XMLPUBFUN xmlChar *
xmlEncodeSpecialChars (const xmlDoc *doc,
const xmlChar *input);
XMLPUBFUN xmlEntitiesTablePtr
xmlCreateEntitiesTable (void);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEntitiesTablePtr
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
XMLPUBFUN void
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void
xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef __cplusplus
}
#endif
# endif /* __XML_ENTITIES_H__ */
include/libxml2/libxml/parser.h 0000644 00000126171 15033621455 0012510 0 ustar 00 /*
* Summary: the core parser module
* Description: Interfaces, constants and types related to the XML parser
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_PARSER_H__
#define __XML_PARSER_H__
/** DOC_DISABLE */
#include <libxml/xmlversion.h>
#define XML_TREE_INTERNALS
#include <libxml/tree.h>
#undef XML_TREE_INTERNALS
#include <libxml/dict.h>
#include <libxml/hash.h>
#include <libxml/valid.h>
#include <libxml/entities.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlstring.h>
#include <libxml/xmlmemory.h>
#include <libxml/encoding.h>
#include <libxml/xmlIO.h>
/* for compatibility */
#include <libxml/SAX2.h>
#include <libxml/threads.h>
/** DOC_ENABLE */
#ifdef __cplusplus
extern "C" {
#endif
/**
* XML_DEFAULT_VERSION:
*
* The default version of XML used: 1.0
*/
#define XML_DEFAULT_VERSION "1.0"
/**
* xmlParserInput:
*
* An xmlParserInput is an input flow for the XML processor.
* Each entity parsed is associated an xmlParserInput (except the
* few predefined ones). This is the case both for internal entities
* - in which case the flow is already completely in memory - or
* external entities - in which case we use the buf structure for
* progressive reading and I18N conversions to the internal UTF-8 format.
*/
/**
* xmlParserInputDeallocate:
* @str: the string to deallocate
*
* Callback for freeing some parser input allocations.
*/
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
struct _xmlParserInput {
/* Input buffer */
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
const char *filename; /* The file analyzed, if any */
const char *directory; /* unused */
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 */
int length; /* unused */
int line; /* Current line */
int col; /* Current column */
unsigned long consumed; /* How many xmlChars already consumed */
xmlParserInputDeallocate free; /* function to deallocate the base */
const xmlChar *encoding; /* unused */
const xmlChar *version; /* the version string for entity */
int flags; /* Flags */
int id; /* an unique identifier for the entity */
unsigned long parentConsumed; /* unused */
xmlEntityPtr entity; /* entity, if any */
};
/**
* xmlParserNodeInfo:
*
* The parser can be asked to collect Node information, i.e. at what
* place in the file they were detected.
* NOTE: This is off by default and not very well tested.
*/
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
struct _xmlParserNodeInfo {
const struct _xmlNode* node;
/* Position & line # that text that created the node begins & ends on */
unsigned long begin_pos;
unsigned long begin_line;
unsigned long end_pos;
unsigned long end_line;
};
typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
struct _xmlParserNodeInfoSeq {
unsigned long maximum;
unsigned long length;
xmlParserNodeInfo* buffer;
};
/**
* xmlParserInputState:
*
* The parser is now working also as a state based parser.
* The recursive one use the state info for entities processing.
*/
typedef enum {
XML_PARSER_EOF = -1, /* nothing is to be parsed */
XML_PARSER_START = 0, /* nothing has been parsed */
XML_PARSER_MISC, /* Misc* before int subset */
XML_PARSER_PI, /* Within a processing instruction */
XML_PARSER_DTD, /* within some DTD content */
XML_PARSER_PROLOG, /* Misc* after internal subset */
XML_PARSER_COMMENT, /* within a comment */
XML_PARSER_START_TAG, /* within a start tag */
XML_PARSER_CONTENT, /* within the content */
XML_PARSER_CDATA_SECTION, /* within a CDATA section */
XML_PARSER_END_TAG, /* within a closing tag */
XML_PARSER_ENTITY_DECL, /* within an entity declaration */
XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
XML_PARSER_IGNORE, /* within an IGNORED section */
XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
} xmlParserInputState;
/** DOC_DISABLE */
/*
* Internal bits in the 'loadsubset' context member
*/
#define XML_DETECT_IDS 2
#define XML_COMPLETE_ATTRS 4
#define XML_SKIP_IDS 8
/** DOC_ENABLE */
/**
* xmlParserMode:
*
* A parser can operate in various modes
*/
typedef enum {
XML_PARSE_UNKNOWN = 0,
XML_PARSE_DOM = 1,
XML_PARSE_SAX = 2,
XML_PARSE_PUSH_DOM = 3,
XML_PARSE_PUSH_SAX = 4,
XML_PARSE_READER = 5
} xmlParserMode;
typedef struct _xmlStartTag xmlStartTag;
typedef struct _xmlParserNsData xmlParserNsData;
typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
/**
* xmlParserCtxt:
*
* The parser context.
* NOTE This doesn't completely define the parser state, the (current ?)
* design of the parser uses recursive function calls since this allow
* and easy mapping from the production rules of the specification
* to the actual code. The drawback is that the actual function call
* also reflect the parser state. However most of the parsing routines
* takes as the only argument the parser context pointer, so migrating
* to a state based parser for progressive parsing shouldn't be too hard.
*/
struct _xmlParserCtxt {
struct _xmlSAXHandler *sax; /* The SAX handler */
void *userData; /* For SAX interface only, used by DOM build */
xmlDocPtr myDoc; /* the document being built */
int wellFormed; /* is the document well formed */
int replaceEntities; /* shall we replace entities ? */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* the declared encoding, if any */
int standalone; /* standalone document */
int html; /* an HTML(1) document
* 3 is HTML after <head>
* 10 is HTML after <body>
*/
/* Input stream stack */
xmlParserInputPtr input; /* Current input stream */
int inputNr; /* Number of current input streams */
int inputMax; /* Max number of input streams */
xmlParserInputPtr *inputTab; /* stack of inputs */
/* Node analysis stack only used for DOM building */
xmlNodePtr node; /* Current parsed Node */
int nodeNr; /* Depth of the parsing stack */
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
int record_info; /* Whether node info should be kept */
xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
int errNo; /* error code */
int hasExternalSubset; /* reference and external subset */
int hasPErefs; /* the internal subset has PE refs */
int external; /* unused */
int valid; /* is the document valid */
int validate; /* shall we try to validate ? */
xmlValidCtxt vctxt; /* The validity context */
xmlParserInputState instate; /* push parser state */
int token; /* unused */
char *directory; /* unused */
/* Node name stack */
const xmlChar *name; /* Current parsed Node */
int nameNr; /* Depth of the parsing stack */
int nameMax; /* Max depth of the parsing stack */
const xmlChar * *nameTab; /* array of nodes */
long nbChars; /* unused */
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 */
const xmlChar * intSubName; /* name of subset */
xmlChar * extSubURI; /* URI of external subset */
xmlChar * extSubSystem; /* SYSTEM ID of external subset */
/* xml:space values */
int * space; /* Should the parser preserve spaces */
int spaceNr; /* Depth of the parsing stack */
int spaceMax; /* Max depth of the parsing stack */
int * spaceTab; /* array of space infos */
int depth; /* to prevent entity substitution loops */
xmlParserInputPtr entity; /* unused */
int charset; /* unused */
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 */
int loadsubset; /* should the external subset be loaded */
int linenumbers; /* set line number in element content */
void *catalogs; /* document's own catalog */
int recovery; /* run in recovery mode */
int progressive; /* unused */
xmlDictPtr dict; /* dictionary for the parser */
const xmlChar * *atts; /* array for the attributes callbacks */
int maxatts; /* the size of the array */
int docdict; /* unused */
/*
* pre-interned strings
*/
const xmlChar *str_xml;
const xmlChar *str_xmlns;
const xmlChar *str_xml_ns;
/*
* Everything below is used only by the new SAX mode
*/
int sax2; /* operating in the new SAX mode */
int nsNr; /* the number of inherited namespaces */
int nsMax; /* the size of the arrays */
const xmlChar * *nsTab; /* the array of prefix/namespace name */
unsigned *attallocs; /* which attribute were allocated */
xmlStartTag *pushTab; /* array of data for push */
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
int nsWellFormed; /* is the document XML Namespace okay */
int options; /* Extra options */
/*
* Those fields are needed only for streaming parsing so far
*/
int dictNames; /* Use dictionary names for the tree */
int freeElemsNr; /* number of freed element nodes */
xmlNodePtr freeElems; /* List of freed element nodes */
int freeAttrsNr; /* number of freed attributes nodes */
xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
/*
* the complete error information for the last error.
*/
xmlError lastError;
xmlParserMode parseMode; /* the parser mode */
unsigned long nbentities; /* unused */
unsigned long sizeentities; /* size of external entities */
/* for use by HTML non-recursive parser */
xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
int nodeInfoNr; /* Depth of the parsing stack */
int nodeInfoMax; /* Max depth of the parsing stack */
xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
int input_id; /* we need to label inputs */
unsigned long sizeentcopy; /* volume of entity copy */
int endCheckState; /* quote state for push parser */
unsigned short nbErrors; /* number of errors */
unsigned short nbWarnings; /* number of warnings */
unsigned maxAmpl; /* maximum amplification factor */
xmlParserNsData *nsdb; /* namespace database */
unsigned attrHashMax; /* allocated size */
xmlAttrHashBucket *attrHash; /* atttribute hash table */
xmlStructuredErrorFunc errorHandler;
void *errorCtxt;
};
/**
* xmlSAXLocator:
*
* A SAX Locator.
*/
struct _xmlSAXLocator {
const xmlChar *(*getPublicId)(void *ctx);
const xmlChar *(*getSystemId)(void *ctx);
int (*getLineNumber)(void *ctx);
int (*getColumnNumber)(void *ctx);
};
/**
* xmlSAXHandler:
*
* A SAX handler is bunch of callbacks called by the parser when processing
* of the input generate data or structure information.
*/
/**
* resolveEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* Callback:
* The entity loader, to control the loading of external entities,
* the application can either:
* - override this resolveEntity() callback in the SAX block
* - or better use the xmlSetExternalEntityLoader() function to
* set up it's own entity resolution routine
*
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
/**
* internalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on internal subset declaration.
*/
typedef void (*internalSubsetSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* externalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on external subset declaration.
*/
typedef void (*externalSubsetSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* getEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get an entity by name.
*
* Returns the xmlEntityPtr if found.
*/
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
const xmlChar *name);
/**
* getParameterEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get a parameter entity by name.
*
* Returns the xmlEntityPtr if found.
*/
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
const xmlChar *name);
/**
* entityDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
*
* An entity definition has been parsed.
*/
typedef void (*entityDeclSAXFunc) (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
/**
* notationDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The name of the notation
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* What to do when a notation declaration has been parsed.
*/
typedef void (*notationDeclSAXFunc)(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
/**
* attributeDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
*
* An attribute definition has been parsed.
*/
typedef void (*attributeDeclSAXFunc)(void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
/**
* elementDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed.
*/
typedef void (*elementDeclSAXFunc)(void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
/**
* unparsedEntityDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The name of the entity
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @notationName: the name of the notation
*
* What to do when an unparsed entity declaration is parsed.
*/
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
/**
* setDocumentLocatorSAXFunc:
* @ctx: the user data (XML parser context)
* @loc: A SAX Locator
*
* Receive the document locator at startup, actually xmlDefaultSAXLocator.
* Everything is available on the context, so this is useless in our case.
*/
typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
xmlSAXLocatorPtr loc);
/**
* startDocumentSAXFunc:
* @ctx: the user data (XML parser context)
*
* Called when the document start being processed.
*/
typedef void (*startDocumentSAXFunc) (void *ctx);
/**
* endDocumentSAXFunc:
* @ctx: the user data (XML parser context)
*
* Called when the document end has been detected.
*/
typedef void (*endDocumentSAXFunc) (void *ctx);
/**
* startElementSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The element name, including namespace prefix
* @atts: An array of name/value attributes pairs, NULL terminated
*
* Called when an opening tag has been processed.
*/
typedef void (*startElementSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar **atts);
/**
* endElementSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The element name
*
* Called when the end of an element has been detected.
*/
typedef void (*endElementSAXFunc) (void *ctx,
const xmlChar *name);
/**
* attributeSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The attribute name, including namespace prefix
* @value: The attribute value
*
* Handle an attribute that has been read by the parser.
* The default handling is to convert the attribute into an
* DOM subtree and past it in a new xmlAttr element added to
* the element.
*/
typedef void (*attributeSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *value);
/**
* referenceSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Called when an entity reference is detected.
*/
typedef void (*referenceSAXFunc) (void *ctx,
const xmlChar *name);
/**
* charactersSAXFunc:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* Receiving some chars from the parser.
*/
typedef void (*charactersSAXFunc) (void *ctx,
const xmlChar *ch,
int len);
/**
* ignorableWhitespaceSAXFunc:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* Receiving some ignorable whitespaces from the parser.
* UNUSED: by default the DOM building will use characters.
*/
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const xmlChar *ch,
int len);
/**
* processingInstructionSAXFunc:
* @ctx: the user data (XML parser context)
* @target: the target name
* @data: the PI data's
*
* A processing instruction has been parsed.
*/
typedef void (*processingInstructionSAXFunc) (void *ctx,
const xmlChar *target,
const xmlChar *data);
/**
* commentSAXFunc:
* @ctx: the user data (XML parser context)
* @value: the comment content
*
* A comment has been parsed.
*/
typedef void (*commentSAXFunc) (void *ctx,
const xmlChar *value);
/**
* cdataBlockSAXFunc:
* @ctx: the user data (XML parser context)
* @value: The pcdata content
* @len: the block length
*
* Called when a pcdata block has been parsed.
*/
typedef void (*cdataBlockSAXFunc) (
void *ctx,
const xmlChar *value,
int len);
/**
* warningSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format a warning messages, callback.
*/
typedef void (*warningSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* errorSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format an error messages, callback.
*/
typedef void (*errorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* fatalErrorSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format fatal error messages, callback.
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
*/
typedef void (*fatalErrorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* isStandaloneSAXFunc:
* @ctx: the user data (XML parser context)
*
* Is this document tagged standalone?
*
* Returns 1 if true
*/
typedef int (*isStandaloneSAXFunc) (void *ctx);
/**
* hasInternalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
*
* Does this document has an internal subset.
*
* Returns 1 if true
*/
typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
/**
* hasExternalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
*
* Does this document has an external subset?
*
* Returns 1 if true
*/
typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
/************************************************************************
* *
* The SAX version 2 API extensions *
* *
************************************************************************/
/**
* XML_SAX2_MAGIC:
*
* Special constant found in SAX2 blocks initialized fields
*/
#define XML_SAX2_MAGIC 0xDEEDBEAF
/**
* startElementNsSAX2Func:
* @ctx: the user data (XML parser context)
* @localname: the local name of the element
* @prefix: the element namespace prefix if available
* @URI: the element namespace name if available
* @nb_namespaces: number of namespace definitions on that node
* @namespaces: pointer to the array of prefix/URI pairs namespace definitions
* @nb_attributes: the number of attributes on that node
* @nb_defaulted: the number of defaulted attributes. The defaulted
* ones are at the end of the array
* @attributes: pointer to the array of (localname/prefix/URI/value/end)
* attribute values.
*
* SAX2 callback when an element start has been detected by the parser.
* It provides the namespace information for the element, as well as
* the new namespace declarations on the element.
*/
typedef void (*startElementNsSAX2Func) (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
/**
* endElementNsSAX2Func:
* @ctx: the user data (XML parser context)
* @localname: the local name of the element
* @prefix: the element namespace prefix if available
* @URI: the element namespace name if available
*
* SAX2 callback when an element end has been detected by the parser.
* It provides the namespace information for the element.
*/
typedef void (*endElementNsSAX2Func) (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
struct _xmlSAXHandler {
internalSubsetSAXFunc internalSubset;
isStandaloneSAXFunc isStandalone;
hasInternalSubsetSAXFunc hasInternalSubset;
hasExternalSubsetSAXFunc hasExternalSubset;
resolveEntitySAXFunc resolveEntity;
getEntitySAXFunc getEntity;
entityDeclSAXFunc entityDecl;
notationDeclSAXFunc notationDecl;
attributeDeclSAXFunc attributeDecl;
elementDeclSAXFunc elementDecl;
unparsedEntityDeclSAXFunc unparsedEntityDecl;
setDocumentLocatorSAXFunc setDocumentLocator;
startDocumentSAXFunc startDocument;
endDocumentSAXFunc endDocument;
/*
* `startElement` and `endElement` are only used by the legacy SAX1
* interface and should not be used in new software. If you really
* have to enable SAX1, the preferred way is set the `initialized`
* member to 1 instead of XML_SAX2_MAGIC.
*
* For backward compatibility, it's also possible to set the
* `startElementNs` and `endElementNs` handlers to NULL.
*
* You can also set the XML_PARSE_SAX1 parser option, but versions
* older than 2.12.0 will probably crash if this option is provided
* together with custom SAX callbacks.
*/
startElementSAXFunc startElement;
endElementSAXFunc endElement;
referenceSAXFunc reference;
charactersSAXFunc characters;
ignorableWhitespaceSAXFunc ignorableWhitespace;
processingInstructionSAXFunc processingInstruction;
commentSAXFunc comment;
warningSAXFunc warning;
errorSAXFunc error;
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
getParameterEntitySAXFunc getParameterEntity;
cdataBlockSAXFunc cdataBlock;
externalSubsetSAXFunc externalSubset;
/*
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
* modern SAX2 interface.
*/
unsigned int initialized;
/*
* The following members are only used by the SAX2 interface.
*/
void *_private;
startElementNsSAX2Func startElementNs;
endElementNsSAX2Func endElementNs;
xmlStructuredErrorFunc serror;
};
/*
* SAX Version 1
*/
typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
struct _xmlSAXHandlerV1 {
internalSubsetSAXFunc internalSubset;
isStandaloneSAXFunc isStandalone;
hasInternalSubsetSAXFunc hasInternalSubset;
hasExternalSubsetSAXFunc hasExternalSubset;
resolveEntitySAXFunc resolveEntity;
getEntitySAXFunc getEntity;
entityDeclSAXFunc entityDecl;
notationDeclSAXFunc notationDecl;
attributeDeclSAXFunc attributeDecl;
elementDeclSAXFunc elementDecl;
unparsedEntityDeclSAXFunc unparsedEntityDecl;
setDocumentLocatorSAXFunc setDocumentLocator;
startDocumentSAXFunc startDocument;
endDocumentSAXFunc endDocument;
startElementSAXFunc startElement;
endElementSAXFunc endElement;
referenceSAXFunc reference;
charactersSAXFunc characters;
ignorableWhitespaceSAXFunc ignorableWhitespace;
processingInstructionSAXFunc processingInstruction;
commentSAXFunc comment;
warningSAXFunc warning;
errorSAXFunc error;
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
getParameterEntitySAXFunc getParameterEntity;
cdataBlockSAXFunc cdataBlock;
externalSubsetSAXFunc externalSubset;
unsigned int initialized;
};
/**
* xmlExternalEntityLoader:
* @URL: The System ID of the resource requested
* @ID: The Public ID of the resource requested
* @context: the XML parser context
*
* External entity loaders types.
*
* Returns the entity input parser.
*/
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
const char *ID,
xmlParserCtxtPtr context);
/*
* Variables
*/
XMLPUBVAR const char *const xmlParserVersion;
XML_DEPRECATED
XMLPUBVAR const int oldXMLWDcompatibility;
XML_DEPRECATED
XMLPUBVAR const int xmlParserDebugEntities;
XML_DEPRECATED
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
#endif
#ifdef LIBXML_THREAD_ENABLED
/* backward compatibility */
XMLPUBFUN const char *const *__xmlParserVersion(void);
XML_DEPRECATED
XMLPUBFUN const int *__oldXMLWDcompatibility(void);
XML_DEPRECATED
XMLPUBFUN const int *__xmlParserDebugEntities(void);
XML_DEPRECATED
XMLPUBFUN const xmlSAXLocator *__xmlDefaultSAXLocator(void);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN const xmlSAXHandlerV1 *__xmlDefaultSAXHandler(void);
#endif
#endif
/** DOC_DISABLE */
#define XML_GLOBALS_PARSER_CORE \
XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
#ifdef LIBXML_OUTPUT_ENABLED
#define XML_GLOBALS_PARSER_OUTPUT \
XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \
XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \
XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR)
#else
#define XML_GLOBALS_PARSER_OUTPUT
#endif
#define XML_GLOBALS_PARSER \
XML_GLOBALS_PARSER_CORE \
XML_GLOBALS_PARSER_OUTPUT
#define XML_OP XML_DECLARE_GLOBAL
XML_GLOBALS_PARSER
#undef XML_OP
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
#define xmlDoValidityCheckingDefaultValue \
XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue)
#define xmlGetWarningsDefaultValue \
XML_GLOBAL_MACRO(xmlGetWarningsDefaultValue)
#define xmlKeepBlanksDefaultValue XML_GLOBAL_MACRO(xmlKeepBlanksDefaultValue)
#define xmlLineNumbersDefaultValue \
XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
#define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
#define xmlPedanticParserDefaultValue \
XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
#define xmlSubstituteEntitiesDefaultValue \
XML_GLOBAL_MACRO(xmlSubstituteEntitiesDefaultValue)
#ifdef LIBXML_OUTPUT_ENABLED
#define xmlIndentTreeOutput XML_GLOBAL_MACRO(xmlIndentTreeOutput)
#define xmlTreeIndentString XML_GLOBAL_MACRO(xmlTreeIndentString)
#define xmlSaveNoEmptyTags XML_GLOBAL_MACRO(xmlSaveNoEmptyTags)
#endif
#endif
/** DOC_ENABLE */
/*
* Init/Cleanup
*/
XMLPUBFUN void
xmlInitParser (void);
XMLPUBFUN void
xmlCleanupParser (void);
XML_DEPRECATED
XMLPUBFUN void
xmlInitGlobals (void);
XML_DEPRECATED
XMLPUBFUN void
xmlCleanupGlobals (void);
/*
* Input functions
*/
XML_DEPRECATED
XMLPUBFUN int
xmlParserInputRead (xmlParserInputPtr in,
int len);
XML_DEPRECATED
XMLPUBFUN int
xmlParserInputGrow (xmlParserInputPtr in,
int len);
/*
* Basic parsing Interfaces
*/
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN xmlDocPtr
xmlParseDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr
xmlParseFile (const char *filename);
XMLPUBFUN xmlDocPtr
xmlParseMemory (const char *buffer,
int size);
#endif /* LIBXML_SAX1_ENABLED */
XML_DEPRECATED XMLPUBFUN int
xmlSubstituteEntitiesDefault(int val);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefSubstituteEntitiesDefaultValue(int v);
XMLPUBFUN int
xmlKeepBlanksDefault (int val);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefKeepBlanksDefaultValue(int v);
XMLPUBFUN void
xmlStopParser (xmlParserCtxtPtr ctxt);
XML_DEPRECATED XMLPUBFUN int
xmlPedanticParserDefault(int val);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefPedanticParserDefaultValue(int v);
XML_DEPRECATED XMLPUBFUN int
xmlLineNumbersDefault (int val);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefLineNumbersDefaultValue(int v);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefDoValidityCheckingDefaultValue(int v);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefGetWarningsDefaultValue(int v);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefLoadExtDtdDefaultValue(int v);
XML_DEPRECATED XMLPUBFUN int
xmlThrDefParserDebugEntities(int v);
#ifdef LIBXML_SAX1_ENABLED
/*
* Recovery mode
*/
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlRecoverDoc (const xmlChar *cur);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlRecoverMemory (const char *buffer,
int size);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlRecoverFile (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
/*
* Less common routines and SAX interfaces
*/
XMLPUBFUN int
xmlParseDocument (xmlParserCtxtPtr ctxt);
XMLPUBFUN int
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN int
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void *user_data,
const char *filename);
XML_DEPRECATED
XMLPUBFUN int
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void *user_data,
const char *buffer,
int size);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery,
void *data);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename,
int recovery);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char *filename,
int recovery,
void *data);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char *filename);
XML_DEPRECATED
XMLPUBFUN xmlDocPtr
xmlParseEntity (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XML_DEPRECATED
XMLPUBFUN xmlDtdPtr
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr
xmlParseDTD (const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr
xmlIOParseDTD (xmlSAXHandlerPtr sax,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
#endif /* LIBXML_VALID_ENABLE */
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int
xmlParseBalancedChunkMemory(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserErrors
xmlParseInNodeContext (xmlNodePtr node,
const char *data,
int datalen,
int options,
xmlNodePtr *lst);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst,
int recover);
XML_DEPRECATED
XMLPUBFUN int
xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *URL,
const xmlChar *ID,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
const xmlChar *URL,
const xmlChar *ID,
xmlNodePtr *lst);
/*
* Parser contexts handling.
*/
XMLPUBFUN xmlParserCtxtPtr
xmlNewParserCtxt (void);
XMLPUBFUN xmlParserCtxtPtr
xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
void *userData);
XMLPUBFUN int
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN void
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar* buffer,
const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserCtxtPtr
xmlCreateDocParserCtxt (const xmlChar *cur);
#ifdef LIBXML_LEGACY_ENABLED
/*
* Reading/setting optional parsing features.
*/
XML_DEPRECATED
XMLPUBFUN int
xmlGetFeaturesList (int *len,
const char **result);
XML_DEPRECATED
XMLPUBFUN int
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
XML_DEPRECATED
XMLPUBFUN int
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *value);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef LIBXML_PUSH_ENABLED
/*
* Interfaces for the Push mode.
*/
XMLPUBFUN xmlParserCtxtPtr
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename);
XMLPUBFUN int
xmlParseChunk (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
/*
* Special I/O mode.
*/
XMLPUBFUN xmlParserCtxtPtr
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
void *user_data,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputPtr
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
/*
* Node infos.
*/
XMLPUBFUN const xmlParserNodeInfo*
xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
xmlNodePtr node);
XMLPUBFUN void
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN void
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN unsigned long
xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
xmlNodePtr node);
XMLPUBFUN void
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
xmlParserNodeInfoPtr info);
/*
* External entities handling actually implemented in xmlIO.
*/
XMLPUBFUN void
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
XMLPUBFUN xmlExternalEntityLoader
xmlGetExternalEntityLoader(void);
XMLPUBFUN xmlParserInputPtr
xmlLoadExternalEntity (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
/*
* Index lookup, actually implemented in the encoding module
*/
XMLPUBFUN long
xmlByteConsumed (xmlParserCtxtPtr ctxt);
/*
* New set of simpler/more flexible APIs
*/
/**
* xmlParserOption:
*
* This is the set of XML parser options that can be passed down
* to the xmlReadDoc() and similar calls.
*/
typedef enum {
XML_PARSE_RECOVER = 1<<0, /* recover on errors */
XML_PARSE_NOENT = 1<<1, /* substitute entities */
XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
XML_PARSE_NONET = 1<<11,/* Forbid network access */
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
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
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 */
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
XML_PARSE_NO_XXE = 1<<23 /* disable loading of external content */
} xmlParserOption;
XMLPUBFUN void
xmlCtxtReset (xmlParserCtxtPtr ctxt);
XMLPUBFUN int
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
const char *filename,
const char *encoding);
XMLPUBFUN int
xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN int
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN void
xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
xmlStructuredErrorFunc handler,
void *data);
XMLPUBFUN void
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
unsigned maxAmpl);
XMLPUBFUN xmlDocPtr
xmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlReadFile (const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
XMLPUBFUN xmlDocPtr
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
/*
* Library wide options
*/
/**
* xmlFeature:
*
* Used to examine the existence 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, /* unused */
XML_WITH_ZLIB = 31,
XML_WITH_ICU = 32,
XML_WITH_LZMA = 33,
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
} xmlFeature;
XMLPUBFUN int
xmlHasFeature (xmlFeature feature);
#ifdef __cplusplus
}
#endif
#endif /* __XML_PARSER_H__ */
include/libxml2/libxml/xmlmemory.h 0000644 00000011450 15033621455 0013236 0 ustar 00 /*
* Summary: interface for the memory allocator
* Description: provides interfaces for the memory allocator,
* including debugging capabilities.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __DEBUG_MEMORY_ALLOC__
#define __DEBUG_MEMORY_ALLOC__
#include <stdio.h>
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The XML memory wrapper support 4 basic overloadable functions.
*/
/**
* xmlFreeFunc:
* @mem: an already allocated block of memory
*
* Signature for a free() implementation.
*/
typedef void (*xmlFreeFunc)(void *mem);
/**
* xmlMallocFunc:
* @size: the size requested in bytes
*
* Signature for a malloc() implementation.
*
* Returns a pointer to the newly allocated block or NULL in case of error.
*/
typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
/**
* xmlReallocFunc:
* @mem: an already allocated block of memory
* @size: the new size requested in bytes
*
* Signature for a realloc() implementation.
*
* Returns a pointer to the newly reallocated block or NULL in case of error.
*/
typedef void *(*xmlReallocFunc)(void *mem, size_t size);
/**
* xmlStrdupFunc:
* @str: a zero terminated string
*
* Signature for an strdup() implementation.
*
* Returns the copy of the string or NULL in case of error.
*/
typedef char *(*xmlStrdupFunc)(const char *str);
/*
* In general the memory allocation entry points are not kept
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
* - xmlMalloc
* - xmlMallocAtomic
* - xmlRealloc
* - xmlMemStrdup
* - xmlFree
*/
/** DOC_DISABLE */
#ifdef LIBXML_THREAD_ALLOC_ENABLED
#define XML_GLOBALS_ALLOC \
XML_OP(xmlMalloc, xmlMallocFunc, XML_NO_ATTR) \
XML_OP(xmlMallocAtomic, xmlMallocFunc, XML_NO_ATTR) \
XML_OP(xmlRealloc, xmlReallocFunc, XML_NO_ATTR) \
XML_OP(xmlFree, xmlFreeFunc, XML_NO_ATTR) \
XML_OP(xmlMemStrdup, xmlStrdupFunc, XML_NO_ATTR)
#define XML_OP XML_DECLARE_GLOBAL
XML_GLOBALS_ALLOC
#undef XML_OP
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
#define xmlMalloc XML_GLOBAL_MACRO(xmlMalloc)
#define xmlMallocAtomic XML_GLOBAL_MACRO(xmlMallocAtomic)
#define xmlRealloc XML_GLOBAL_MACRO(xmlRealloc)
#define xmlFree XML_GLOBAL_MACRO(xmlFree)
#define xmlMemStrdup XML_GLOBAL_MACRO(xmlMemStrdup)
#endif
#else
#define XML_GLOBALS_ALLOC
/** DOC_ENABLE */
XMLPUBVAR xmlMallocFunc xmlMalloc;
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
XMLPUBVAR xmlReallocFunc xmlRealloc;
XMLPUBVAR xmlFreeFunc xmlFree;
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
#endif
/*
* The way to overload the existing functions.
* The xmlGc function have an extra entry for atomic block
* allocations useful for garbage collected memory allocators
*/
XMLPUBFUN int
xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
XMLPUBFUN int
xmlMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlReallocFunc *reallocFunc,
xmlStrdupFunc *strdupFunc);
XMLPUBFUN int
xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
XMLPUBFUN int
xmlGcMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlMallocFunc *mallocAtomicFunc,
xmlReallocFunc *reallocFunc,
xmlStrdupFunc *strdupFunc);
/*
* Initialization of the memory layer.
*/
XML_DEPRECATED
XMLPUBFUN int
xmlInitMemory (void);
/*
* Cleanup of the memory layer.
*/
XML_DEPRECATED
XMLPUBFUN void
xmlCleanupMemory (void);
/*
* These are specific to the XML debug memory wrapper.
*/
XMLPUBFUN size_t
xmlMemSize (void *ptr);
XMLPUBFUN int
xmlMemUsed (void);
XMLPUBFUN int
xmlMemBlocks (void);
XML_DEPRECATED
XMLPUBFUN void
xmlMemDisplay (FILE *fp);
XML_DEPRECATED
XMLPUBFUN void
xmlMemDisplayLast(FILE *fp, long nbBytes);
XML_DEPRECATED
XMLPUBFUN void
xmlMemShow (FILE *fp, int nr);
XML_DEPRECATED
XMLPUBFUN void
xmlMemoryDump (void);
XMLPUBFUN void *
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
XMLPUBFUN void *
xmlMemRealloc (void *ptr,size_t size);
XMLPUBFUN void
xmlMemFree (void *ptr);
XMLPUBFUN char *
xmlMemoryStrdup (const char *str);
XML_DEPRECATED
XMLPUBFUN void *
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
XML_DEPRECATED
XMLPUBFUN void *
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
XML_DEPRECATED
XMLPUBFUN void *
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
XML_DEPRECATED
XMLPUBFUN char *
xmlMemStrdupLoc (const char *str, const char *file, int line);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __DEBUG_MEMORY_ALLOC__ */
include/libxml2/libxml/SAX.h 0000644 00000010502 15033621455 0011635 0 ustar 00 /*
* Summary: Old SAX version 1 handler, deprecated
* Description: DEPRECATED set of SAX version 1 interfaces used to
* build the DOM tree.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SAX_H__
#define __XML_SAX_H__
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#ifdef LIBXML_LEGACY_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XML_DEPRECATED
XMLPUBFUN const xmlChar *
getPublicId (void *ctx);
XML_DEPRECATED
XMLPUBFUN const xmlChar *
getSystemId (void *ctx);
XML_DEPRECATED
XMLPUBFUN void
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XML_DEPRECATED
XMLPUBFUN int
getLineNumber (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
getColumnNumber (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
isStandalone (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
hasInternalSubset (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
hasExternalSubset (void *ctx);
XML_DEPRECATED
XMLPUBFUN void
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XML_DEPRECATED
XMLPUBFUN void
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XML_DEPRECATED
XMLPUBFUN xmlEntityPtr
getEntity (void *ctx,
const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN xmlEntityPtr
getParameterEntity (void *ctx,
const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XML_DEPRECATED
XMLPUBFUN void
entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XML_DEPRECATED
XMLPUBFUN void
attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XML_DEPRECATED
XMLPUBFUN void
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XML_DEPRECATED
XMLPUBFUN void
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XML_DEPRECATED
XMLPUBFUN void
unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XML_DEPRECATED
XMLPUBFUN void
startDocument (void *ctx);
XML_DEPRECATED
XMLPUBFUN void
endDocument (void *ctx);
XML_DEPRECATED
XMLPUBFUN void
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN void
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XML_DEPRECATED
XMLPUBFUN void
endElement (void *ctx,
const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN void
reference (void *ctx,
const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN void
characters (void *ctx,
const xmlChar *ch,
int len);
XML_DEPRECATED
XMLPUBFUN void
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XML_DEPRECATED
XMLPUBFUN void
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XML_DEPRECATED
XMLPUBFUN void
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XML_DEPRECATED
XMLPUBFUN void
setNamespace (void *ctx,
const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN xmlNsPtr
getNamespace (void *ctx);
XML_DEPRECATED
XMLPUBFUN int
checkNamespace (void *ctx,
xmlChar *nameSpace);
XML_DEPRECATED
XMLPUBFUN void
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XML_DEPRECATED
XMLPUBFUN void
comment (void *ctx,
const xmlChar *value);
XML_DEPRECATED
XMLPUBFUN void
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
XMLPUBFUN void
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XML_DEPRECATED
XMLPUBFUN void
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#endif /* LIBXML_SAX1_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_LEGACY_ENABLED */
#endif /* __XML_SAX_H__ */
include/libxml2/libxml/schemasInternals.h 0000644 00000063171 15033621455 0014517 0 ustar 00 /*
* 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 guaranteed to be API or ABI stable !
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMA_INTERNALS_H__
#define __XML_SCHEMA_INTERNALS_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/xmlregexp.h>
#include <libxml/hash.h>
#include <libxml/dict.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_SCHEMAS_UNKNOWN = 0,
XML_SCHEMAS_STRING = 1,
XML_SCHEMAS_NORMSTRING = 2,
XML_SCHEMAS_DECIMAL = 3,
XML_SCHEMAS_TIME = 4,
XML_SCHEMAS_GDAY = 5,
XML_SCHEMAS_GMONTH = 6,
XML_SCHEMAS_GMONTHDAY = 7,
XML_SCHEMAS_GYEAR = 8,
XML_SCHEMAS_GYEARMONTH = 9,
XML_SCHEMAS_DATE = 10,
XML_SCHEMAS_DATETIME = 11,
XML_SCHEMAS_DURATION = 12,
XML_SCHEMAS_FLOAT = 13,
XML_SCHEMAS_DOUBLE = 14,
XML_SCHEMAS_BOOLEAN = 15,
XML_SCHEMAS_TOKEN = 16,
XML_SCHEMAS_LANGUAGE = 17,
XML_SCHEMAS_NMTOKEN = 18,
XML_SCHEMAS_NMTOKENS = 19,
XML_SCHEMAS_NAME = 20,
XML_SCHEMAS_QNAME = 21,
XML_SCHEMAS_NCNAME = 22,
XML_SCHEMAS_ID = 23,
XML_SCHEMAS_IDREF = 24,
XML_SCHEMAS_IDREFS = 25,
XML_SCHEMAS_ENTITY = 26,
XML_SCHEMAS_ENTITIES = 27,
XML_SCHEMAS_NOTATION = 28,
XML_SCHEMAS_ANYURI = 29,
XML_SCHEMAS_INTEGER = 30,
XML_SCHEMAS_NPINTEGER = 31,
XML_SCHEMAS_NINTEGER = 32,
XML_SCHEMAS_NNINTEGER = 33,
XML_SCHEMAS_PINTEGER = 34,
XML_SCHEMAS_INT = 35,
XML_SCHEMAS_UINT = 36,
XML_SCHEMAS_LONG = 37,
XML_SCHEMAS_ULONG = 38,
XML_SCHEMAS_SHORT = 39,
XML_SCHEMAS_USHORT = 40,
XML_SCHEMAS_BYTE = 41,
XML_SCHEMAS_UBYTE = 42,
XML_SCHEMAS_HEXBINARY = 43,
XML_SCHEMAS_BASE64BINARY = 44,
XML_SCHEMAS_ANYTYPE = 45,
XML_SCHEMAS_ANYSIMPLETYPE = 46
} xmlSchemaValType;
/*
* XML Schemas defines multiple type of types.
*/
typedef enum {
XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
XML_SCHEMA_TYPE_ANY,
XML_SCHEMA_TYPE_FACET,
XML_SCHEMA_TYPE_SIMPLE,
XML_SCHEMA_TYPE_COMPLEX,
XML_SCHEMA_TYPE_SEQUENCE = 6,
XML_SCHEMA_TYPE_CHOICE,
XML_SCHEMA_TYPE_ALL,
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
XML_SCHEMA_TYPE_COMPLEX_CONTENT,
XML_SCHEMA_TYPE_UR,
XML_SCHEMA_TYPE_RESTRICTION,
XML_SCHEMA_TYPE_EXTENSION,
XML_SCHEMA_TYPE_ELEMENT,
XML_SCHEMA_TYPE_ATTRIBUTE,
XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
XML_SCHEMA_TYPE_GROUP,
XML_SCHEMA_TYPE_NOTATION,
XML_SCHEMA_TYPE_LIST,
XML_SCHEMA_TYPE_UNION,
XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
XML_SCHEMA_TYPE_IDC_UNIQUE,
XML_SCHEMA_TYPE_IDC_KEY,
XML_SCHEMA_TYPE_IDC_KEYREF,
XML_SCHEMA_TYPE_PARTICLE = 25,
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
XML_SCHEMA_FACET_MINEXCLUSIVE,
XML_SCHEMA_FACET_MAXINCLUSIVE,
XML_SCHEMA_FACET_MAXEXCLUSIVE,
XML_SCHEMA_FACET_TOTALDIGITS,
XML_SCHEMA_FACET_FRACTIONDIGITS,
XML_SCHEMA_FACET_PATTERN,
XML_SCHEMA_FACET_ENUMERATION,
XML_SCHEMA_FACET_WHITESPACE,
XML_SCHEMA_FACET_LENGTH,
XML_SCHEMA_FACET_MAXLENGTH,
XML_SCHEMA_FACET_MINLENGTH,
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
} xmlSchemaTypeType;
typedef enum {
XML_SCHEMA_CONTENT_UNKNOWN = 0,
XML_SCHEMA_CONTENT_EMPTY = 1,
XML_SCHEMA_CONTENT_ELEMENTS,
XML_SCHEMA_CONTENT_MIXED,
XML_SCHEMA_CONTENT_SIMPLE,
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
XML_SCHEMA_CONTENT_BASIC,
XML_SCHEMA_CONTENT_ANY
} xmlSchemaContentType;
typedef struct _xmlSchemaVal xmlSchemaVal;
typedef xmlSchemaVal *xmlSchemaValPtr;
typedef struct _xmlSchemaType xmlSchemaType;
typedef xmlSchemaType *xmlSchemaTypePtr;
typedef struct _xmlSchemaFacet xmlSchemaFacet;
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
/**
* Annotation
*/
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
struct _xmlSchemaAnnot {
struct _xmlSchemaAnnot *next;
xmlNodePtr content; /* the annotation */
};
/**
* XML_SCHEMAS_ANYATTR_SKIP:
*
* Skip unknown attribute from validation
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_SKIP 1
/**
* XML_SCHEMAS_ANYATTR_LAX:
*
* Ignore validation non definition on attributes
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_LAX 2
/**
* XML_SCHEMAS_ANYATTR_STRICT:
*
* Apply strict validation rules on attributes
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_STRICT 3
/**
* XML_SCHEMAS_ANY_SKIP:
*
* Skip unknown attribute from validation
*/
#define XML_SCHEMAS_ANY_SKIP 1
/**
* XML_SCHEMAS_ANY_LAX:
*
* Used by wildcards.
* Validate if type found, don't worry if not found
*/
#define XML_SCHEMAS_ANY_LAX 2
/**
* XML_SCHEMAS_ANY_STRICT:
*
* Used by wildcards.
* Apply strict validation rules
*/
#define XML_SCHEMAS_ANY_STRICT 3
/**
* XML_SCHEMAS_ATTR_USE_PROHIBITED:
*
* Used by wildcards.
* The attribute is prohibited.
*/
#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
/**
* XML_SCHEMAS_ATTR_USE_REQUIRED:
*
* The attribute is required.
*/
#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
/**
* XML_SCHEMAS_ATTR_USE_OPTIONAL:
*
* The attribute is optional.
*/
#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
/**
* XML_SCHEMAS_ATTR_GLOBAL:
*
* allow elements in no namespace
*/
#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
/**
* XML_SCHEMAS_ATTR_NSDEFAULT:
*
* allow elements in no namespace
*/
#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
/**
* XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
*
* this is set when the "type" and "ref" references
* have been resolved.
*/
#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
/**
* XML_SCHEMAS_ATTR_FIXED:
*
* the attribute has a fixed value
*/
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
/**
* xmlSchemaAttribute:
* An attribute definition.
*/
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
struct _xmlSchemaAttribute {
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; /* 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; /* 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;
struct _xmlSchemaAttributeLink {
struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
struct _xmlSchemaAttribute *attr;/* the linked attribute */
};
/**
* XML_SCHEMAS_WILDCARD_COMPLETE:
*
* If the wildcard is complete.
*/
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
/**
* xmlSchemaCharValueLink:
* Used to build a list of namespaces on wildcards.
*/
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
struct _xmlSchemaWildcardNs {
struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
const xmlChar *value;/* the value */
};
/**
* xmlSchemaWildcard.
* A wildcard.
*/
typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
struct _xmlSchemaWildcard {
xmlSchemaTypeType type; /* The kind of type */
const xmlChar *id; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
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 */
xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
int flags;
};
/**
* XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
*
* The attribute wildcard has been built.
*/
#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
/**
* XML_SCHEMAS_ATTRGROUP_GLOBAL:
*
* The attribute group has been defined.
*/
#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
/**
* XML_SCHEMAS_ATTRGROUP_MARKED:
*
* Marks the attr group as marked; used for circular checks.
*/
#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.
*
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
* must be kept similar
*/
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
struct _xmlSchemaAttributeGroup {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
const xmlChar *name;
const xmlChar *id;
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int flags;
xmlSchemaWildcardPtr attributeWildcard;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
const xmlChar *targetNamespace;
void *attrUses;
};
/**
* xmlSchemaTypeLink:
* Used to build a list of types (e.g. member types of
* simpleType with variety "union").
*/
typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
struct _xmlSchemaTypeLink {
struct _xmlSchemaTypeLink *next;/* the next type link ... */
xmlSchemaTypePtr type;/* the linked type */
};
/**
* xmlSchemaFacetLink:
* Used to build a list of facets.
*/
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
struct _xmlSchemaFacetLink {
struct _xmlSchemaFacetLink *next;/* the next facet link ... */
xmlSchemaFacetPtr facet;/* the linked facet */
};
/**
* XML_SCHEMAS_TYPE_MIXED:
*
* the element content type is mixed
*/
#define XML_SCHEMAS_TYPE_MIXED 1 << 0
/**
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
*
* the simple or complex type has a derivation method of "extension".
*/
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
/**
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
*
* the simple or complex type has a derivation method of "restriction".
*/
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
/**
* XML_SCHEMAS_TYPE_GLOBAL:
*
* the type is global
*/
#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
/**
* XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
*
* the complexType owns an attribute wildcard, i.e.
* it can be freed by the complexType
*/
#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
/**
* 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
/**
* XML_SCHEMAS_TYPE_VARIETY_LIST:
*
* the simpleType has a variety of "list".
*/
#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
/**
* XML_SCHEMAS_TYPE_VARIETY_UNION:
*
* the simpleType has a variety of "union".
*/
#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
/**
* XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
*
* the simpleType has a variety of "union".
*/
#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
/**
* XML_SCHEMAS_TYPE_FINAL_EXTENSION:
*
* the complexType has a final of "extension".
*/
#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
/**
* XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
*
* the simpleType/complexType has a final of "restriction".
*/
#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
/**
* XML_SCHEMAS_TYPE_FINAL_LIST:
*
* the simpleType has a final of "list".
*/
#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
/**
* XML_SCHEMAS_TYPE_FINAL_UNION:
*
* the simpleType has a final of "union".
*/
#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
/**
* XML_SCHEMAS_TYPE_FINAL_DEFAULT:
*
* the simpleType has a final of "default".
*/
#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
/**
* XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
*
* Marks the item as a builtin primitive.
*/
#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
/**
* XML_SCHEMAS_TYPE_MARKED:
*
* Marks the item as marked; used for circular checks.
*/
#define XML_SCHEMAS_TYPE_MARKED 1 << 16
/**
* XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
*
* the complexType did not specify 'block' so use the default of the
* <schema> item.
*/
#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
/**
* XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
*
* the complexType has a 'block' of "extension".
*/
#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
/**
* XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
*
* the complexType has a 'block' of "restriction".
*/
#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
/**
* XML_SCHEMAS_TYPE_ABSTRACT:
*
* the simple/complexType is abstract.
*/
#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
/**
* XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
*
* indicates if the facets need a computed value
*/
#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
/**
* XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
*
* indicates that the type was typefixed
*/
#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
/**
* XML_SCHEMAS_TYPE_INTERNAL_INVALID:
*
* 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:
*
* Schemas type definition.
*/
struct _xmlSchemaType {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
const xmlChar *name;
const xmlChar *id ; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
xmlSchemaContentType contentType;
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; /* 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;
};
/*
* xmlSchemaElement:
* An element definition.
*
* xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
* structures must be kept similar
*/
/**
* XML_SCHEMAS_ELEM_NILLABLE:
*
* the element is nillable
*/
#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
/**
* XML_SCHEMAS_ELEM_GLOBAL:
*
* the element is global
*/
#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
/**
* XML_SCHEMAS_ELEM_DEFAULT:
*
* the element has a default value
*/
#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
/**
* XML_SCHEMAS_ELEM_FIXED:
*
* the element has a fixed value
*/
#define XML_SCHEMAS_ELEM_FIXED 1 << 3
/**
* XML_SCHEMAS_ELEM_ABSTRACT:
*
* the element is abstract
*/
#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
/**
* XML_SCHEMAS_ELEM_TOPLEVEL:
*
* the element is top level
* obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
*/
#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
/**
* XML_SCHEMAS_ELEM_REF:
*
* the element is a reference to a type
*/
#define XML_SCHEMAS_ELEM_REF 1 << 6
/**
* XML_SCHEMAS_ELEM_NSDEFAULT:
*
* allow elements in no namespace
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
/**
* XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
*
* this is set when "type", "ref", "substitutionGroup"
* references have been resolved.
*/
#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
/**
* XML_SCHEMAS_ELEM_CIRCULAR:
*
* a helper flag for the search of circular references.
*/
#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
/**
* XML_SCHEMAS_ELEM_BLOCK_ABSENT:
*
* the "block" attribute is absent
*/
#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
/**
* XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
*
* disallowed substitutions are absent
*/
#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
/**
* XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
*
* disallowed substitutions: "restriction"
*/
#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
/**
* XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
*
* disallowed substitutions: "substitution"
*/
#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
/**
* XML_SCHEMAS_ELEM_FINAL_ABSENT:
*
* substitution group exclusions are absent
*/
#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
/**
* XML_SCHEMAS_ELEM_FINAL_EXTENSION:
*
* substitution group exclusions: "extension"
*/
#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
/**
* XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
*
* 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; /* Not used? */
const xmlChar *name;
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; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
const xmlChar *targetNamespace;
const xmlChar *namedType;
const xmlChar *namedTypeNs;
const xmlChar *substGroup;
const xmlChar *substGroupNs;
const xmlChar *scope;
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; /* Deprecated; not used */
xmlSchemaValPtr defVal; /* The compiled value constraint. */
void *idcs; /* The identity-constraint defs */
};
/*
* XML_SCHEMAS_FACET_UNKNOWN:
*
* unknown facet handling
*/
#define XML_SCHEMAS_FACET_UNKNOWN 0
/*
* XML_SCHEMAS_FACET_PRESERVE:
*
* preserve the type of the facet
*/
#define XML_SCHEMAS_FACET_PRESERVE 1
/*
* XML_SCHEMAS_FACET_REPLACE:
*
* replace the type of the facet
*/
#define XML_SCHEMAS_FACET_REPLACE 2
/*
* XML_SCHEMAS_FACET_COLLAPSE:
*
* collapse the types of the facet
*/
#define XML_SCHEMAS_FACET_COLLAPSE 3
/**
* A facet definition.
*/
struct _xmlSchemaFacet {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
const xmlChar *value; /* The original value */
const xmlChar *id; /* Obsolete */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
int whitespace;
xmlSchemaValPtr val; /* The compiled value */
xmlRegexpPtr regexp; /* The regex for patterns */
};
/**
* A notation definition.
*/
typedef struct _xmlSchemaNotation xmlSchemaNotation;
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
struct _xmlSchemaNotation {
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:
*
* Reflects elementFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
/**
* XML_SCHEMAS_QUALIF_ATTR:
*
* Reflects attributeFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
/**
* XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
*
* the schema has "extension" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
/**
* XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
*
* the schema has "restriction" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
/**
* XML_SCHEMAS_FINAL_DEFAULT_LIST:
*
* the schema has "list" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
/**
* XML_SCHEMAS_FINAL_DEFAULT_UNION:
*
* the schema has "union" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
/**
* XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
*
* the schema has "extension" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
/**
* XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
*
* the schema has "restriction" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
/**
* XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
*
* the schema has "substitution" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
/**
* XML_SCHEMAS_INCLUDING_CONVERT_NS:
*
* the schema is currently including an other schema with
* no target namespace.
*/
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
/**
* _xmlSchema:
*
* A Schemas definition
*/
struct _xmlSchema {
const xmlChar *name; /* schema name */
const xmlChar *targetNamespace; /* the target namespace */
const xmlChar *version;
const xmlChar *id; /* Obsolete */
xmlDocPtr doc;
xmlSchemaAnnotPtr annot;
int flags;
xmlHashTablePtr typeDecl;
xmlHashTablePtr attrDecl;
xmlHashTablePtr attrgrpDecl;
xmlHashTablePtr elemDecl;
xmlHashTablePtr notaDecl;
xmlHashTablePtr schemasImports;
void *_private; /* unused by the library for users or bindings */
xmlHashTablePtr groupDecl;
xmlDictPtr dict;
void *includes; /* the includes, this is opaque for now */
int preserve; /* whether to free the document */
int counter; /* used to give anonymous components unique names */
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
void *volatiles; /* Obsolete */
};
XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_INTERNALS_H__ */
include/libxml2/libxml/xpointer.h 0000644 00000007077 15033621455 0013067 0 ustar 00 /*
* Summary: API to handle XML Pointers
* Description: API to handle XML Pointers
* Base implementation was made accordingly to
* W3C Candidate Recommendation 7 June 2000
* http://www.w3.org/TR/2000/CR-xptr-20000607
*
* Added support for the element() scheme described in:
* W3C Proposed Recommendation 13 November 2002
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XPTR_H__
#define __XML_XPTR_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_XPTR_ENABLED
#include <libxml/tree.h>
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(LIBXML_XPTR_LOCS_ENABLED)
/*
* A Location Set
*/
typedef struct _xmlLocationSet xmlLocationSet;
typedef xmlLocationSet *xmlLocationSetPtr;
struct _xmlLocationSet {
int locNr; /* number of locations in the set */
int locMax; /* size of the array as allocated */
xmlXPathObjectPtr *locTab;/* array of locations */
};
/*
* Handling of location sets.
*/
XML_DEPRECATED
XMLPUBFUN xmlLocationSetPtr
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
XML_DEPRECATED
XMLPUBFUN xmlLocationSetPtr
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewCollapsedRange (xmlNodePtr start);
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val);
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
/*
* Functions.
*/
XMLPUBFUN xmlXPathContextPtr
xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here,
xmlNodePtr origin);
XMLPUBFUN xmlXPathObjectPtr
xmlXPtrEval (const xmlChar *str,
xmlXPathContextPtr ctx);
#if defined(LIBXML_XPTR_LOCS_ENABLED)
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs);
XML_DEPRECATED
XMLPUBFUN xmlNodePtr
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
XML_DEPRECATED
XMLPUBFUN void
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
#endif /* defined(LIBXML_XPTR_LOCS_ENABLED) */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPTR_ENABLED */
#endif /* __XML_XPTR_H__ */
include/libxml2/libxml/xpath.h 0000644 00000040302 15033621455 0012327 0 ustar 00 /*
* Summary: XML Path Language implementation
* Description: API for the XML Path Language implementation
*
* XML Path Language implementation
* XPath is a language for addressing parts of an XML document,
* designed to be used by both XSLT and XPointer
* http://www.w3.org/TR/xpath
*
* Implements
* W3C Recommendation 16 November 1999
* http://www.w3.org/TR/1999/REC-xpath-19991116
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XPATH_H__
#define __XML_XPATH_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_XPATH_ENABLED
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#include <libxml/hash.h>
#endif /* LIBXML_XPATH_ENABLED */
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
#ifdef __cplusplus
extern "C" {
#endif
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
#ifdef LIBXML_XPATH_ENABLED
typedef struct _xmlXPathContext xmlXPathContext;
typedef xmlXPathContext *xmlXPathContextPtr;
typedef struct _xmlXPathParserContext xmlXPathParserContext;
typedef xmlXPathParserContext *xmlXPathParserContextPtr;
/**
* The set of XPath error codes.
*/
typedef enum {
XPATH_EXPRESSION_OK = 0,
XPATH_NUMBER_ERROR,
XPATH_UNFINISHED_LITERAL_ERROR,
XPATH_START_LITERAL_ERROR,
XPATH_VARIABLE_REF_ERROR,
XPATH_UNDEF_VARIABLE_ERROR,
XPATH_INVALID_PREDICATE_ERROR,
XPATH_EXPR_ERROR,
XPATH_UNCLOSED_ERROR,
XPATH_UNKNOWN_FUNC_ERROR,
XPATH_INVALID_OPERAND,
XPATH_INVALID_TYPE,
XPATH_INVALID_ARITY,
XPATH_INVALID_CTXT_SIZE,
XPATH_INVALID_CTXT_POSITION,
XPATH_MEMORY_ERROR,
XPTR_SYNTAX_ERROR,
XPTR_RESOURCE_ERROR,
XPTR_SUB_RESOURCE_ERROR,
XPATH_UNDEF_PREFIX_ERROR,
XPATH_ENCODING_ERROR,
XPATH_INVALID_CHAR_ERROR,
XPATH_INVALID_CTXT,
XPATH_STACK_ERROR,
XPATH_FORBID_VARIABLE_ERROR,
XPATH_OP_LIMIT_EXCEEDED,
XPATH_RECURSION_LIMIT_EXCEEDED
} xmlXPathError;
/*
* A node-set (an unordered collection of nodes without duplicates).
*/
typedef struct _xmlNodeSet xmlNodeSet;
typedef xmlNodeSet *xmlNodeSetPtr;
struct _xmlNodeSet {
int nodeNr; /* number of nodes in the set */
int nodeMax; /* size of the array as allocated */
xmlNodePtr *nodeTab; /* array of nodes in no particular order */
/* @@ with_ns to check whether namespace nodes should be looked at @@ */
};
/*
* An expression is evaluated to yield an object, which
* has one of the following four basic types:
* - node-set
* - boolean
* - number
* - string
*
* @@ XPointer will add more types !
*/
typedef enum {
XPATH_UNDEFINED = 0,
XPATH_NODESET = 1,
XPATH_BOOLEAN = 2,
XPATH_NUMBER = 3,
XPATH_STRING = 4,
#ifdef LIBXML_XPTR_LOCS_ENABLED
XPATH_POINT = 5,
XPATH_RANGE = 6,
XPATH_LOCATIONSET = 7,
#endif
XPATH_USERS = 8,
XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
} xmlXPathObjectType;
#ifndef LIBXML_XPTR_LOCS_ENABLED
/** DOC_DISABLE */
#define XPATH_POINT 5
#define XPATH_RANGE 6
#define XPATH_LOCATIONSET 7
/** DOC_ENABLE */
#endif
typedef struct _xmlXPathObject xmlXPathObject;
typedef xmlXPathObject *xmlXPathObjectPtr;
struct _xmlXPathObject {
xmlXPathObjectType type;
xmlNodeSetPtr nodesetval;
int boolval;
double floatval;
xmlChar *stringval;
void *user;
int index;
void *user2;
int index2;
};
/**
* xmlXPathConvertFunc:
* @obj: an XPath object
* @type: the number of the target type
*
* A conversion function is associated to a type and used to cast
* the new type to primitive values.
*
* Returns -1 in case of error, 0 otherwise
*/
typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
/*
* Extra type: a name and a conversion function.
*/
typedef struct _xmlXPathType xmlXPathType;
typedef xmlXPathType *xmlXPathTypePtr;
struct _xmlXPathType {
const xmlChar *name; /* the type name */
xmlXPathConvertFunc func; /* the conversion function */
};
/*
* Extra variable: a name and a value.
*/
typedef struct _xmlXPathVariable xmlXPathVariable;
typedef xmlXPathVariable *xmlXPathVariablePtr;
struct _xmlXPathVariable {
const xmlChar *name; /* the variable name */
xmlXPathObjectPtr value; /* the value */
};
/**
* xmlXPathEvalFunc:
* @ctxt: an XPath parser context
* @nargs: the number of arguments passed to the function
*
* An XPath evaluation function, the parameters are on the XPath context stack.
*/
typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
int nargs);
/*
* Extra function: a name and a evaluation function.
*/
typedef struct _xmlXPathFunct xmlXPathFunct;
typedef xmlXPathFunct *xmlXPathFuncPtr;
struct _xmlXPathFunct {
const xmlChar *name; /* the function name */
xmlXPathEvalFunc func; /* the evaluation function */
};
/**
* xmlXPathAxisFunc:
* @ctxt: the XPath interpreter context
* @cur: the previous node being explored on that axis
*
* An axis traversal function. To traverse an axis, the engine calls
* the first time with cur == NULL and repeat until the function returns
* NULL indicating the end of the axis traversal.
*
* Returns the next node in that axis or NULL if at the end of the axis.
*/
typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr cur);
/*
* Extra axis: a name and an axis function.
*/
typedef struct _xmlXPathAxis xmlXPathAxis;
typedef xmlXPathAxis *xmlXPathAxisPtr;
struct _xmlXPathAxis {
const xmlChar *name; /* the axis name */
xmlXPathAxisFunc func; /* the search function */
};
/**
* xmlXPathFunction:
* @ctxt: the XPath interprestation context
* @nargs: the number of arguments
*
* An XPath function.
* The arguments (if any) are popped out from the context stack
* and the result is pushed on the stack.
*/
typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
/*
* Function and Variable Lookup.
*/
/**
* xmlXPathVariableLookupFunc:
* @ctxt: an XPath context
* @name: name of the variable
* @ns_uri: the namespace name hosting this variable
*
* Prototype for callbacks used to plug variable lookup in the XPath
* engine.
*
* Returns the XPath object value or NULL if not found.
*/
typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
/**
* xmlXPathFuncLookupFunc:
* @ctxt: an XPath context
* @name: name of the function
* @ns_uri: the namespace name hosting this function
*
* Prototype for callbacks used to plug function lookup in the XPath
* engine.
*
* Returns the XPath function or NULL if not found.
*/
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:
*
* Expression evaluation occurs with respect to a context.
* he context consists of:
* - a node (the context node)
* - a node list (the context node list)
* - a set of variable bindings
* - a function library
* - the set of namespace declarations in scope for the expression
* Following the switch to hash tables, this need to be trimmed up at
* the next binary incompatible release.
* The node may be modified when the context is passed to libxml2
* for an XPath evaluation so you may need to initialize it again
* before the next call.
*/
struct _xmlXPathContext {
xmlDocPtr doc; /* The current document */
xmlNodePtr node; /* The current node */
int nb_variables_unused; /* unused (hash table) */
int max_variables_unused; /* unused (hash table) */
xmlHashTablePtr varHash; /* Hash table of defined variables */
int nb_types; /* number of defined types */
int max_types; /* max number of types */
xmlXPathTypePtr types; /* Array of defined types */
int nb_funcs_unused; /* unused (hash table) */
int max_funcs_unused; /* unused (hash table) */
xmlHashTablePtr funcHash; /* Hash table of defined funcs */
int nb_axis; /* number of defined axis */
int max_axis; /* max number of axis */
xmlXPathAxisPtr axis; /* Array of defined axis */
/* the namespace nodes of the context node */
xmlNsPtr *namespaces; /* Array of namespaces */
int nsNr; /* number of namespace in scope */
void *user; /* function to free */
/* extra variables */
int contextSize; /* the context size */
int proximityPosition; /* the proximity position */
/* extra stuff for XPointer */
int xptr; /* is this an XPointer context? */
xmlNodePtr here; /* for here() */
xmlNodePtr origin; /* for origin() */
/* the set of namespace declarations in scope for the expression */
xmlHashTablePtr nsHash; /* The namespaces hash table */
xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
void *varLookupData; /* variable lookup data */
/* Possibility to link in an extra item */
void *extra; /* needed for XSLT */
/* The function name and URI when calling a function */
const xmlChar *function;
const xmlChar *functionURI;
/* function lookup function and data */
xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
void *funcLookupData; /* function lookup data */
/* temporary namespace lists kept for walking the namespace axis */
xmlNsPtr *tmpNsList; /* Array of namespaces */
int tmpNsNr; /* number of namespaces in scope */
/* error reporting mechanism */
void *userData; /* user specific data block */
xmlStructuredErrorFunc error; /* the callback in case of errors */
xmlError lastError; /* the last error */
xmlNodePtr debugNode; /* the source node XSLT */
/* dictionary */
xmlDictPtr dict; /* dictionary if any */
int flags; /* flags to control compilation */
/* Cache for reusal of XPath objects */
void *cache;
/* Resource limits */
unsigned long opLimit;
unsigned long opCount;
int depth;
};
/*
* The structure of a compiled expression form is not public.
*/
typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
/**
* xmlXPathParserContext:
*
* An XPath parser context. It contains pure parsing information,
* an xmlXPathContext, and the stack of objects.
*/
struct _xmlXPathParserContext {
const xmlChar *cur; /* the current char being parsed */
const xmlChar *base; /* the full expression */
int error; /* error code */
xmlXPathContextPtr context; /* the evaluation context */
xmlXPathObjectPtr value; /* the current value */
int valueNr; /* number of values stacked */
int valueMax; /* max number of values stacked */
xmlXPathObjectPtr *valueTab; /* stack of values */
xmlXPathCompExprPtr comp; /* the precompiled expression */
int xptr; /* it this an XPointer expression */
xmlNodePtr ancestor; /* used for walking preceding axis */
int valueFrame; /* always zero for compatibility */
};
/************************************************************************
* *
* Public API *
* *
************************************************************************/
/**
* Objects and Nodesets handling
*/
XMLPUBVAR double xmlXPathNAN;
XMLPUBVAR double xmlXPathPINF;
XMLPUBVAR double xmlXPathNINF;
/* These macros may later turn into functions */
/**
* xmlXPathNodeSetGetLength:
* @ns: a node-set
*
* Implement a functionality similar to the DOM NodeList.length.
*
* Returns the number of nodes in the node-set.
*/
#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
/**
* xmlXPathNodeSetItem:
* @ns: a node-set
* @index: index of a node in the set
*
* Implements a functionality similar to the DOM NodeList.item().
*
* Returns the xmlNodePtr at the given @index in @ns or NULL if
* @index is out of range (0 to length-1)
*/
#define xmlXPathNodeSetItem(ns, index) \
((((ns) != NULL) && \
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
(ns)->nodeTab[(index)] \
: NULL)
/**
* xmlXPathNodeSetIsEmpty:
* @ns: a node-set
*
* Checks whether @ns is empty or not.
*
* Returns %TRUE if @ns is an empty node-set.
*/
#define xmlXPathNodeSetIsEmpty(ns) \
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
XMLPUBFUN void
xmlXPathFreeObject (xmlXPathObjectPtr obj);
XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeSetCreate (xmlNodePtr val);
XMLPUBFUN void
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
XMLPUBFUN void
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathObjectCopy (xmlXPathObjectPtr val);
XMLPUBFUN int
xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2);
/**
* Conversion functions to basic types.
*/
XMLPUBFUN int
xmlXPathCastNumberToBoolean (double val);
XMLPUBFUN int
xmlXPathCastStringToBoolean (const xmlChar * val);
XMLPUBFUN int
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
XMLPUBFUN int
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
XMLPUBFUN double
xmlXPathCastBooleanToNumber (int val);
XMLPUBFUN double
xmlXPathCastStringToNumber (const xmlChar * val);
XMLPUBFUN double
xmlXPathCastNodeToNumber (xmlNodePtr node);
XMLPUBFUN double
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
XMLPUBFUN double
xmlXPathCastToNumber (xmlXPathObjectPtr val);
XMLPUBFUN xmlChar *
xmlXPathCastBooleanToString (int val);
XMLPUBFUN xmlChar *
xmlXPathCastNumberToString (double val);
XMLPUBFUN xmlChar *
xmlXPathCastNodeToString (xmlNodePtr node);
XMLPUBFUN xmlChar *
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
XMLPUBFUN xmlChar *
xmlXPathCastToString (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertNumber (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertString (xmlXPathObjectPtr val);
/**
* Context handling.
*/
XMLPUBFUN xmlXPathContextPtr
xmlXPathNewContext (xmlDocPtr doc);
XMLPUBFUN void
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
XMLPUBFUN void
xmlXPathSetErrorHandler(xmlXPathContextPtr ctxt,
xmlStructuredErrorFunc handler,
void *context);
XMLPUBFUN int
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,
int value,
int options);
/**
* Evaluation functions.
*/
XMLPUBFUN long
xmlXPathOrderDocElems (xmlDocPtr doc);
XMLPUBFUN int
xmlXPathSetContextNode (xmlNodePtr node,
xmlXPathContextPtr ctx);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathNodeEval (xmlNodePtr node,
const xmlChar *str,
xmlXPathContextPtr ctx);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathEval (const xmlChar *str,
xmlXPathContextPtr ctx);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt);
XMLPUBFUN int
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res);
/**
* Separate compilation/evaluation entry points.
*/
XMLPUBFUN xmlXPathCompExprPtr
xmlXPathCompile (const xmlChar *str);
XMLPUBFUN xmlXPathCompExprPtr
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
const xmlChar *str);
XMLPUBFUN xmlXPathObjectPtr
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctx);
XMLPUBFUN int
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt);
XMLPUBFUN void
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
#endif /* LIBXML_XPATH_ENABLED */
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XML_DEPRECATED
XMLPUBFUN void
xmlXPathInit (void);
XMLPUBFUN int
xmlXPathIsNaN (double val);
XMLPUBFUN int
xmlXPathIsInf (double val);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
#endif /* ! __XML_XPATH_H__ */
include/libxml2/libxml/xmlversion.h 0000644 00000012427 15033621455 0013420 0 ustar 00 /*
* Summary: compile-time version information
* Description: compile-time version information for the XML library
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_VERSION_H__
#define __XML_VERSION_H__
/**
* LIBXML_DOTTED_VERSION:
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.13.8"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 21308
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "21308"
/**
* LIBXML_VERSION_EXTRA:
*
* extra version information, used to show a git commit description
*/
#define LIBXML_VERSION_EXTRA ""
/**
* LIBXML_TEST_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(21308);
/**
* LIBXML_THREAD_ENABLED:
*
* Whether the thread support is configured in
*/
#if 1
#define LIBXML_THREAD_ENABLED
#endif
/**
* LIBXML_THREAD_ALLOC_ENABLED:
*
* Whether the allocation hooks are per-thread
*/
#if 0
#define LIBXML_THREAD_ALLOC_ENABLED
#endif
/**
* LIBXML_TREE_ENABLED:
*
* Whether the DOM like tree manipulation API support is configured in
*/
#if 1
#define LIBXML_TREE_ENABLED
#endif
/**
* LIBXML_OUTPUT_ENABLED:
*
* Whether the serialization/saving support is configured in
*/
#if 1
#define LIBXML_OUTPUT_ENABLED
#endif
/**
* LIBXML_PUSH_ENABLED:
*
* Whether the push parsing interfaces are configured in
*/
#if 1
#define LIBXML_PUSH_ENABLED
#endif
/**
* LIBXML_READER_ENABLED:
*
* Whether the xmlReader parsing interface is configured in
*/
#if 1
#define LIBXML_READER_ENABLED
#endif
/**
* LIBXML_PATTERN_ENABLED:
*
* Whether the xmlPattern node selection interface is configured in
*/
#if 1
#define LIBXML_PATTERN_ENABLED
#endif
/**
* LIBXML_WRITER_ENABLED:
*
* Whether the xmlWriter saving interface is configured in
*/
#if 1
#define LIBXML_WRITER_ENABLED
#endif
/**
* LIBXML_SAX1_ENABLED:
*
* Whether the older SAX1 interface is configured in
*/
#if 1
#define LIBXML_SAX1_ENABLED
#endif
/**
* LIBXML_FTP_ENABLED:
*
* Whether the FTP support is configured in
*/
#if 0
#define LIBXML_FTP_ENABLED
#endif
/**
* LIBXML_HTTP_ENABLED:
*
* Whether the HTTP support is configured in
*/
#if 0
#define LIBXML_HTTP_ENABLED
#endif
/**
* LIBXML_VALID_ENABLED:
*
* Whether the DTD validation support is configured in
*/
#if 1
#define LIBXML_VALID_ENABLED
#endif
/**
* LIBXML_HTML_ENABLED:
*
* Whether the HTML support is configured in
*/
#if 1
#define LIBXML_HTML_ENABLED
#endif
/**
* LIBXML_LEGACY_ENABLED:
*
* Whether the deprecated APIs are compiled in for compatibility
*/
#if 0
#define LIBXML_LEGACY_ENABLED
#endif
/**
* LIBXML_C14N_ENABLED:
*
* Whether the Canonicalization support is configured in
*/
#if 1
#define LIBXML_C14N_ENABLED
#endif
/**
* LIBXML_CATALOG_ENABLED:
*
* Whether the Catalog support is configured in
*/
#if 1
#define LIBXML_CATALOG_ENABLED
#endif
/**
* LIBXML_XPATH_ENABLED:
*
* Whether XPath is configured in
*/
#if 1
#define LIBXML_XPATH_ENABLED
#endif
/**
* LIBXML_XPTR_ENABLED:
*
* Whether XPointer is configured in
*/
#if 1
#define LIBXML_XPTR_ENABLED
#endif
/**
* LIBXML_XPTR_LOCS_ENABLED:
*
* Whether support for XPointer locations is configured in
*/
#if 0
#define LIBXML_XPTR_LOCS_ENABLED
#endif
/**
* LIBXML_XINCLUDE_ENABLED:
*
* Whether XInclude is configured in
*/
#if 1
#define LIBXML_XINCLUDE_ENABLED
#endif
/**
* LIBXML_ICONV_ENABLED:
*
* Whether iconv support is available
*/
#if 1
#define LIBXML_ICONV_ENABLED
#endif
/**
* LIBXML_ICU_ENABLED:
*
* Whether icu support is available
*/
#if 0
#define LIBXML_ICU_ENABLED
#endif
/**
* LIBXML_ISO8859X_ENABLED:
*
* Whether ISO-8859-* support is made available in case iconv is not
*/
#if 1
#define LIBXML_ISO8859X_ENABLED
#endif
/**
* LIBXML_DEBUG_ENABLED:
*
* Whether Debugging module is configured in
*/
#if 1
#define LIBXML_DEBUG_ENABLED
#endif
/**
* LIBXML_UNICODE_ENABLED:
*
* Whether the Unicode related interfaces are compiled in
*/
#if 1
#define LIBXML_UNICODE_ENABLED
#endif
/**
* LIBXML_REGEXP_ENABLED:
*
* Whether the regular expressions interfaces are compiled in
*/
#if 1
#define LIBXML_REGEXP_ENABLED
#endif
/**
* LIBXML_AUTOMATA_ENABLED:
*
* Whether the automata interfaces are compiled in
*/
#if 1
#define LIBXML_AUTOMATA_ENABLED
#endif
/**
* LIBXML_SCHEMAS_ENABLED:
*
* Whether the Schemas validation interfaces are compiled in
*/
#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 1
#define LIBXML_MODULES_ENABLED
/**
* LIBXML_MODULE_EXTENSION:
*
* the string suffix used by dynamic modules (usually shared libraries)
*/
#define LIBXML_MODULE_EXTENSION ".so"
#endif
/**
* LIBXML_ZLIB_ENABLED:
*
* Whether the Zlib support is compiled in
*/
#if 0
#define LIBXML_ZLIB_ENABLED
#endif
/**
* LIBXML_LZMA_ENABLED:
*
* Whether the Lzma support is compiled in
*/
#if 0
#define LIBXML_LZMA_ENABLED
#endif
#include <libxml/xmlexports.h>
#endif
include/libxml2/libxml/xmlerror.h 0000644 00000111507 15033621455 0013063 0 ustar 00 /*
* Summary: error handling
* Description: the API used to report errors
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_ERROR_H__
#define __XML_ERROR_H__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlErrorLevel:
*
* Indicates the level of an error
*/
typedef enum {
XML_ERR_NONE = 0,
XML_ERR_WARNING = 1, /* A simple warning */
XML_ERR_ERROR = 2, /* A recoverable error */
XML_ERR_FATAL = 3 /* A fatal error */
} xmlErrorLevel;
/**
* xmlErrorDomain:
*
* Indicates where an error may have come from
*/
typedef enum {
XML_FROM_NONE = 0,
XML_FROM_PARSER, /* The XML parser */
XML_FROM_TREE, /* The tree module */
XML_FROM_NAMESPACE, /* The XML Namespace module */
XML_FROM_DTD, /* The XML DTD validation with parser context*/
XML_FROM_HTML, /* The HTML parser */
XML_FROM_MEMORY, /* The memory allocator */
XML_FROM_OUTPUT, /* The serialization code */
XML_FROM_IO, /* The Input/Output stack */
XML_FROM_FTP, /* The FTP module */
XML_FROM_HTTP, /* The HTTP module */
XML_FROM_XINCLUDE, /* The XInclude processing */
XML_FROM_XPATH, /* The XPath module */
XML_FROM_XPOINTER, /* The XPointer module */
XML_FROM_REGEXP, /* The regular expressions module */
XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
XML_FROM_RELAXNGP, /* The Relax-NG parser module */
XML_FROM_RELAXNGV, /* The Relax-NG validator module */
XML_FROM_CATALOG, /* The Catalog module */
XML_FROM_C14N, /* The Canonicalization module */
XML_FROM_XSLT, /* The XSLT engine from libxslt */
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_I18N, /* The module handling character conversion */
XML_FROM_SCHEMATRONV,/* The Schematron validator module */
XML_FROM_BUFFER, /* The buffers module */
XML_FROM_URI /* The URI module */
} xmlErrorDomain;
/**
* xmlError:
*
* An XML Error instance.
*/
typedef struct _xmlError xmlError;
typedef xmlError *xmlErrorPtr;
struct _xmlError {
int domain; /* What part of the library raised this error */
int code; /* The error code, e.g. an xmlParserError */
char *message;/* human-readable informative error message */
xmlErrorLevel level;/* how consequent is the error */
char *file; /* the filename */
int line; /* the line number if available */
char *str1; /* extra string information */
char *str2; /* extra string information */
char *str3; /* extra string information */
int int1; /* extra number information */
int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
void *ctxt; /* the parser context if available */
void *node; /* the node in the tree */
};
/**
* xmlParserError:
*
* This is an error that the XML (or HTML) parser can generate
*/
typedef enum {
XML_ERR_OK = 0,
XML_ERR_INTERNAL_ERROR, /* 1 */
XML_ERR_NO_MEMORY, /* 2 */
XML_ERR_DOCUMENT_START, /* 3 */
XML_ERR_DOCUMENT_EMPTY, /* 4 */
XML_ERR_DOCUMENT_END, /* 5 */
XML_ERR_INVALID_HEX_CHARREF, /* 6 */
XML_ERR_INVALID_DEC_CHARREF, /* 7 */
XML_ERR_INVALID_CHARREF, /* 8 */
XML_ERR_INVALID_CHAR, /* 9 */
XML_ERR_CHARREF_AT_EOF, /* 10 */
XML_ERR_CHARREF_IN_PROLOG, /* 11 */
XML_ERR_CHARREF_IN_EPILOG, /* 12 */
XML_ERR_CHARREF_IN_DTD, /* 13 */
XML_ERR_ENTITYREF_AT_EOF, /* 14 */
XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
XML_ERR_ENTITYREF_IN_DTD, /* 17 */
XML_ERR_PEREF_AT_EOF, /* 18 */
XML_ERR_PEREF_IN_PROLOG, /* 19 */
XML_ERR_PEREF_IN_EPILOG, /* 20 */
XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
XML_ERR_ENTITYREF_NO_NAME, /* 22 */
XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
XML_ERR_PEREF_NO_NAME, /* 24 */
XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
XML_ERR_UNDECLARED_ENTITY, /* 26 */
XML_WAR_UNDECLARED_ENTITY, /* 27 */
XML_ERR_UNPARSED_ENTITY, /* 28 */
XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
XML_ERR_UNKNOWN_ENCODING, /* 31 */
XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
XML_ERR_STRING_NOT_STARTED, /* 33 */
XML_ERR_STRING_NOT_CLOSED, /* 34 */
XML_ERR_NS_DECL_ERROR, /* 35 */
XML_ERR_ENTITY_NOT_STARTED, /* 36 */
XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
XML_ERR_LITERAL_NOT_STARTED, /* 43 */
XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
XML_ERR_PI_NOT_STARTED, /* 46 */
XML_ERR_PI_NOT_FINISHED, /* 47 */
XML_ERR_NOTATION_NOT_STARTED, /* 48 */
XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
XML_ERR_MIXED_NOT_STARTED, /* 52 */
XML_ERR_MIXED_NOT_FINISHED, /* 53 */
XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
XML_ERR_MISPLACED_CDATA_END, /* 62 */
XML_ERR_CDATA_NOT_FINISHED, /* 63 */
XML_ERR_RESERVED_XML_NAME, /* 64 */
XML_ERR_SPACE_REQUIRED, /* 65 */
XML_ERR_SEPARATOR_REQUIRED, /* 66 */
XML_ERR_NMTOKEN_REQUIRED, /* 67 */
XML_ERR_NAME_REQUIRED, /* 68 */
XML_ERR_PCDATA_REQUIRED, /* 69 */
XML_ERR_URI_REQUIRED, /* 70 */
XML_ERR_PUBID_REQUIRED, /* 71 */
XML_ERR_LT_REQUIRED, /* 72 */
XML_ERR_GT_REQUIRED, /* 73 */
XML_ERR_LTSLASH_REQUIRED, /* 74 */
XML_ERR_EQUAL_REQUIRED, /* 75 */
XML_ERR_TAG_NAME_MISMATCH, /* 76 */
XML_ERR_TAG_NOT_FINISHED, /* 77 */
XML_ERR_STANDALONE_VALUE, /* 78 */
XML_ERR_ENCODING_NAME, /* 79 */
XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
XML_ERR_INVALID_ENCODING, /* 81 */
XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
XML_ERR_CONDSEC_INVALID, /* 83 */
XML_ERR_VALUE_REQUIRED, /* 84 */
XML_ERR_NOT_WELL_BALANCED, /* 85 */
XML_ERR_EXTRA_CONTENT, /* 86 */
XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
XML_ERR_ENTITY_LOOP, /* 89 */
XML_ERR_ENTITY_BOUNDARY, /* 90 */
XML_ERR_INVALID_URI, /* 91 */
XML_ERR_URI_FRAGMENT, /* 92 */
XML_WAR_CATALOG_PI, /* 93 */
XML_ERR_NO_DTD, /* 94 */
XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
XML_ERR_VERSION_MISSING, /* 96 */
XML_WAR_UNKNOWN_VERSION, /* 97 */
XML_WAR_LANG_VALUE, /* 98 */
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_ERR_UNKNOWN_VERSION, /* 108 */
XML_ERR_VERSION_MISMATCH, /* 109 */
XML_ERR_NAME_TOO_LONG, /* 110 */
XML_ERR_USER_STOP, /* 111 */
XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
XML_WAR_ENCODING_MISMATCH, /* 113 */
XML_ERR_RESOURCE_LIMIT, /* 114 */
XML_ERR_ARGUMENT, /* 115 */
XML_ERR_SYSTEM, /* 116 */
XML_ERR_REDECL_PREDEF_ENTITY, /* 117 */
XML_ERR_INT_SUBSET_NOT_FINISHED, /* 118 */
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 */
XML_DTD_CONTENT_ERROR, /* 503 */
XML_DTD_CONTENT_MODEL, /* 504 */
XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
XML_DTD_DIFFERENT_PREFIX, /* 506 */
XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
XML_DTD_ELEM_NAMESPACE, /* 508 */
XML_DTD_ELEM_REDEFINED, /* 509 */
XML_DTD_EMPTY_NOTATION, /* 510 */
XML_DTD_ENTITY_TYPE, /* 511 */
XML_DTD_ID_FIXED, /* 512 */
XML_DTD_ID_REDEFINED, /* 513 */
XML_DTD_ID_SUBSET, /* 514 */
XML_DTD_INVALID_CHILD, /* 515 */
XML_DTD_INVALID_DEFAULT, /* 516 */
XML_DTD_LOAD_ERROR, /* 517 */
XML_DTD_MISSING_ATTRIBUTE, /* 518 */
XML_DTD_MIXED_CORRUPT, /* 519 */
XML_DTD_MULTIPLE_ID, /* 520 */
XML_DTD_NO_DOC, /* 521 */
XML_DTD_NO_DTD, /* 522 */
XML_DTD_NO_ELEM_NAME, /* 523 */
XML_DTD_NO_PREFIX, /* 524 */
XML_DTD_NO_ROOT, /* 525 */
XML_DTD_NOTATION_REDEFINED, /* 526 */
XML_DTD_NOTATION_VALUE, /* 527 */
XML_DTD_NOT_EMPTY, /* 528 */
XML_DTD_NOT_PCDATA, /* 529 */
XML_DTD_NOT_STANDALONE, /* 530 */
XML_DTD_ROOT_NAME, /* 531 */
XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
XML_DTD_UNKNOWN_ELEM, /* 534 */
XML_DTD_UNKNOWN_ENTITY, /* 535 */
XML_DTD_UNKNOWN_ID, /* 536 */
XML_DTD_UNKNOWN_NOTATION, /* 537 */
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_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
XML_RNGP_ATTR_CONFLICT, /* 1001 */
XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
XML_RNGP_CHOICE_CONTENT, /* 1006 */
XML_RNGP_CHOICE_EMPTY, /* 1007 */
XML_RNGP_CREATE_FAILURE, /* 1008 */
XML_RNGP_DATA_CONTENT, /* 1009 */
XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
XML_RNGP_DEFINE_EMPTY, /* 1012 */
XML_RNGP_DEFINE_MISSING, /* 1013 */
XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
XML_RNGP_ELEMENT_EMPTY, /* 1017 */
XML_RNGP_ELEMENT_CONTENT, /* 1018 */
XML_RNGP_ELEMENT_NAME, /* 1019 */
XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
XML_RNGP_EMPTY, /* 1022 */
XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
XML_RNGP_EMPTY_CONTENT, /* 1024 */
XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
XML_RNGP_EXCEPT_EMPTY, /* 1027 */
XML_RNGP_EXCEPT_MISSING, /* 1028 */
XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
XML_RNGP_GRAMMAR_MISSING, /* 1038 */
XML_RNGP_GRAMMAR_NO_START, /* 1039 */
XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
XML_RNGP_HREF_ERROR, /* 1041 */
XML_RNGP_INCLUDE_EMPTY, /* 1042 */
XML_RNGP_INCLUDE_FAILURE, /* 1043 */
XML_RNGP_INCLUDE_RECURSE, /* 1044 */
XML_RNGP_INTERLEAVE_ADD, /* 1045 */
XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
XML_RNGP_INVALID_URI, /* 1050 */
XML_RNGP_INVALID_VALUE, /* 1051 */
XML_RNGP_MISSING_HREF, /* 1052 */
XML_RNGP_NAME_MISSING, /* 1053 */
XML_RNGP_NEED_COMBINE, /* 1054 */
XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
XML_RNGP_NSNAME_NO_NS, /* 1057 */
XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
XML_RNGP_PARSE_ERROR, /* 1065 */
XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
XML_RNGP_PAT_LIST_ATTR, /* 1078 */
XML_RNGP_PAT_LIST_ELEM, /* 1079 */
XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
XML_RNGP_PAT_LIST_LIST, /* 1081 */
XML_RNGP_PAT_LIST_REF, /* 1082 */
XML_RNGP_PAT_LIST_TEXT, /* 1083 */
XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
XML_RNGP_PAT_START_ATTR, /* 1088 */
XML_RNGP_PAT_START_DATA, /* 1089 */
XML_RNGP_PAT_START_EMPTY, /* 1090 */
XML_RNGP_PAT_START_GROUP, /* 1091 */
XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
XML_RNGP_PAT_START_LIST, /* 1093 */
XML_RNGP_PAT_START_ONEMORE, /* 1094 */
XML_RNGP_PAT_START_TEXT, /* 1095 */
XML_RNGP_PAT_START_VALUE, /* 1096 */
XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
XML_RNGP_REF_CREATE_FAILED, /* 1098 */
XML_RNGP_REF_CYCLE, /* 1099 */
XML_RNGP_REF_NAME_INVALID, /* 1100 */
XML_RNGP_REF_NO_DEF, /* 1101 */
XML_RNGP_REF_NO_NAME, /* 1102 */
XML_RNGP_REF_NOT_EMPTY, /* 1103 */
XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
XML_RNGP_START_CONTENT, /* 1105 */
XML_RNGP_START_EMPTY, /* 1106 */
XML_RNGP_START_MISSING, /* 1107 */
XML_RNGP_TEXT_EXPECTED, /* 1108 */
XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
XML_RNGP_TYPE_MISSING, /* 1110 */
XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
XML_RNGP_TYPE_VALUE, /* 1112 */
XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
XML_RNGP_URI_FRAGMENT, /* 1117 */
XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
XML_RNGP_VALUE_EMPTY, /* 1119 */
XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
XML_RNGP_XMLNS_NAME, /* 1121 */
XML_RNGP_XML_NS, /* 1122 */
XML_XPATH_EXPRESSION_OK = 1200,
XML_XPATH_NUMBER_ERROR, /* 1201 */
XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
XML_XPATH_START_LITERAL_ERROR, /* 1203 */
XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
XML_XPATH_EXPR_ERROR, /* 1207 */
XML_XPATH_UNCLOSED_ERROR, /* 1208 */
XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
XML_XPATH_INVALID_OPERAND, /* 1210 */
XML_XPATH_INVALID_TYPE, /* 1211 */
XML_XPATH_INVALID_ARITY, /* 1212 */
XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
XML_XPATH_MEMORY_ERROR, /* 1215 */
XML_XPTR_SYNTAX_ERROR, /* 1216 */
XML_XPTR_RESOURCE_ERROR, /* 1217 */
XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
XML_XPATH_ENCODING_ERROR, /* 1220 */
XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
XML_TREE_INVALID_HEX = 1300,
XML_TREE_INVALID_DEC, /* 1301 */
XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
XML_TREE_NOT_UTF8, /* 1303 */
XML_SAVE_NOT_UTF8 = 1400,
XML_SAVE_CHAR_INVALID, /* 1401 */
XML_SAVE_NO_DOCTYPE, /* 1402 */
XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
XML_REGEXP_COMPILE_ERROR = 1450,
XML_IO_UNKNOWN = 1500,
XML_IO_EACCES, /* 1501 */
XML_IO_EAGAIN, /* 1502 */
XML_IO_EBADF, /* 1503 */
XML_IO_EBADMSG, /* 1504 */
XML_IO_EBUSY, /* 1505 */
XML_IO_ECANCELED, /* 1506 */
XML_IO_ECHILD, /* 1507 */
XML_IO_EDEADLK, /* 1508 */
XML_IO_EDOM, /* 1509 */
XML_IO_EEXIST, /* 1510 */
XML_IO_EFAULT, /* 1511 */
XML_IO_EFBIG, /* 1512 */
XML_IO_EINPROGRESS, /* 1513 */
XML_IO_EINTR, /* 1514 */
XML_IO_EINVAL, /* 1515 */
XML_IO_EIO, /* 1516 */
XML_IO_EISDIR, /* 1517 */
XML_IO_EMFILE, /* 1518 */
XML_IO_EMLINK, /* 1519 */
XML_IO_EMSGSIZE, /* 1520 */
XML_IO_ENAMETOOLONG, /* 1521 */
XML_IO_ENFILE, /* 1522 */
XML_IO_ENODEV, /* 1523 */
XML_IO_ENOENT, /* 1524 */
XML_IO_ENOEXEC, /* 1525 */
XML_IO_ENOLCK, /* 1526 */
XML_IO_ENOMEM, /* 1527 */
XML_IO_ENOSPC, /* 1528 */
XML_IO_ENOSYS, /* 1529 */
XML_IO_ENOTDIR, /* 1530 */
XML_IO_ENOTEMPTY, /* 1531 */
XML_IO_ENOTSUP, /* 1532 */
XML_IO_ENOTTY, /* 1533 */
XML_IO_ENXIO, /* 1534 */
XML_IO_EPERM, /* 1535 */
XML_IO_EPIPE, /* 1536 */
XML_IO_ERANGE, /* 1537 */
XML_IO_EROFS, /* 1538 */
XML_IO_ESPIPE, /* 1539 */
XML_IO_ESRCH, /* 1540 */
XML_IO_ETIMEDOUT, /* 1541 */
XML_IO_EXDEV, /* 1542 */
XML_IO_NETWORK_ATTEMPT, /* 1543 */
XML_IO_ENCODER, /* 1544 */
XML_IO_FLUSH, /* 1545 */
XML_IO_WRITE, /* 1546 */
XML_IO_NO_INPUT, /* 1547 */
XML_IO_BUFFER_FULL, /* 1548 */
XML_IO_LOAD_ERROR, /* 1549 */
XML_IO_ENOTSOCK, /* 1550 */
XML_IO_EISCONN, /* 1551 */
XML_IO_ECONNREFUSED, /* 1552 */
XML_IO_ENETUNREACH, /* 1553 */
XML_IO_EADDRINUSE, /* 1554 */
XML_IO_EALREADY, /* 1555 */
XML_IO_EAFNOSUPPORT, /* 1556 */
XML_IO_UNSUPPORTED_PROTOCOL, /* 1557 */
XML_XINCLUDE_RECURSION=1600,
XML_XINCLUDE_PARSE_VALUE, /* 1601 */
XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
XML_XINCLUDE_NO_HREF, /* 1603 */
XML_XINCLUDE_NO_FALLBACK, /* 1604 */
XML_XINCLUDE_HREF_URI, /* 1605 */
XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
XML_XINCLUDE_INVALID_CHAR, /* 1608 */
XML_XINCLUDE_BUILD_FAILED, /* 1609 */
XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
XML_XINCLUDE_XPTR_FAILED, /* 1612 */
XML_XINCLUDE_XPTR_RESULT, /* 1613 */
XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
XML_CATALOG_MISSING_ATTR = 1650,
XML_CATALOG_ENTRY_BROKEN, /* 1651 */
XML_CATALOG_PREFER_VALUE, /* 1652 */
XML_CATALOG_NOT_CATALOG, /* 1653 */
XML_CATALOG_RECURSION, /* 1654 */
XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
XML_SCHEMAP_INVALID_ENUM, /* 1715 */
XML_SCHEMAP_INVALID_FACET, /* 1716 */
XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
XML_SCHEMAP_FAILED_LOAD, /* 1757 */
XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
XML_SCHEMAP_NOROOT, /* 1759 */
XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
XML_SCHEMAP_FAILED_PARSE, /* 1766 */
XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
XML_SCHEMAP_RECURSIVE, /* 1775 */
XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
XML_SCHEMAV_NOROOT = 1801,
XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
XML_SCHEMAV_MISSING, /* 1804 */
XML_SCHEMAV_WRONGELEM, /* 1805 */
XML_SCHEMAV_NOTYPE, /* 1806 */
XML_SCHEMAV_NOROLLBACK, /* 1807 */
XML_SCHEMAV_ISABSTRACT, /* 1808 */
XML_SCHEMAV_NOTEMPTY, /* 1809 */
XML_SCHEMAV_ELEMCONT, /* 1810 */
XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
XML_SCHEMAV_NOTNILLABLE, /* 1812 */
XML_SCHEMAV_EXTRACONTENT, /* 1813 */
XML_SCHEMAV_INVALIDATTR, /* 1814 */
XML_SCHEMAV_INVALIDELEM, /* 1815 */
XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
XML_SCHEMAV_CONSTRUCT, /* 1817 */
XML_SCHEMAV_INTERNAL, /* 1818 */
XML_SCHEMAV_NOTSIMPLE, /* 1819 */
XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
XML_SCHEMAV_ATTRINVALID, /* 1821 */
XML_SCHEMAV_VALUE, /* 1822 */
XML_SCHEMAV_FACET, /* 1823 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
XML_SCHEMAV_CVC_ELT_1, /* 1845 */
XML_SCHEMAV_CVC_ELT_2, /* 1846 */
XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
XML_SCHEMAV_CVC_ELT_6, /* 1859 */
XML_SCHEMAV_CVC_ELT_7, /* 1860 */
XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
XML_SCHEMAV_CVC_AU, /* 1874 */
XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
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 */
XML_XPTR_EXTRA_OBJECTS, /* 1903 */
XML_C14N_CREATE_CTXT = 1950,
XML_C14N_REQUIRES_UTF8, /* 1951 */
XML_C14N_CREATE_STACK, /* 1952 */
XML_C14N_INVALID_NODE, /* 1953 */
XML_C14N_UNKNOW_NODE, /* 1954 */
XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
XML_FTP_PASV_ANSWER = 2000,
XML_FTP_EPSV_ANSWER, /* 2001 */
XML_FTP_ACCNT, /* 2002 */
XML_FTP_URL_SYNTAX, /* 2003 */
XML_HTTP_URL_SYNTAX = 2020,
XML_HTTP_USE_IP, /* 2021 */
XML_HTTP_UNKNOWN_HOST, /* 2022 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
XML_SCHEMAP_NO_XMLNS, /* 3056 */
XML_SCHEMAP_NO_XSI, /* 3057 */
XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
XML_SCHEMAP_SRC_CT_1, /* 3076 */
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_SCHEMATRONV_ASSERT = 4000, /* 4000 */
XML_SCHEMATRONV_REPORT,
XML_MODULE_OPEN = 4900, /* 4900 */
XML_MODULE_CLOSE, /* 4901 */
XML_CHECK_FOUND_ELEMENT = 5000,
XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
XML_CHECK_FOUND_TEXT, /* 5002 */
XML_CHECK_FOUND_CDATA, /* 5003 */
XML_CHECK_FOUND_ENTITYREF, /* 5004 */
XML_CHECK_FOUND_ENTITY, /* 5005 */
XML_CHECK_FOUND_PI, /* 5006 */
XML_CHECK_FOUND_COMMENT, /* 5007 */
XML_CHECK_FOUND_DOCTYPE, /* 5008 */
XML_CHECK_FOUND_FRAGMENT, /* 5009 */
XML_CHECK_FOUND_NOTATION, /* 5010 */
XML_CHECK_UNKNOWN_NODE, /* 5011 */
XML_CHECK_ENTITY_TYPE, /* 5012 */
XML_CHECK_NO_PARENT, /* 5013 */
XML_CHECK_NO_DOC, /* 5014 */
XML_CHECK_NO_NAME, /* 5015 */
XML_CHECK_NO_ELEM, /* 5016 */
XML_CHECK_WRONG_DOC, /* 5017 */
XML_CHECK_NO_PREV, /* 5018 */
XML_CHECK_WRONG_PREV, /* 5019 */
XML_CHECK_NO_NEXT, /* 5020 */
XML_CHECK_WRONG_NEXT, /* 5021 */
XML_CHECK_NOT_DTD, /* 5022 */
XML_CHECK_NOT_ATTR, /* 5023 */
XML_CHECK_NOT_ATTR_DECL, /* 5024 */
XML_CHECK_NOT_ELEM_DECL, /* 5025 */
XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
XML_CHECK_NOT_NS_DECL, /* 5027 */
XML_CHECK_NO_HREF, /* 5028 */
XML_CHECK_WRONG_PARENT,/* 5029 */
XML_CHECK_NS_SCOPE, /* 5030 */
XML_CHECK_NS_ANCESTOR, /* 5031 */
XML_CHECK_NOT_UTF8, /* 5032 */
XML_CHECK_NO_DICT, /* 5033 */
XML_CHECK_NOT_NCNAME, /* 5034 */
XML_CHECK_OUTSIDE_DICT, /* 5035 */
XML_CHECK_WRONG_NAME, /* 5036 */
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 */
XML_BUF_OVERFLOW = 7000
} xmlParserErrors;
/**
* xmlGenericErrorFunc:
* @ctx: a parsing context
* @msg: the message
* @...: the extra arguments of the varargs to format the message
*
* Signature of the function to use when there is an error and
* no parsing or validity context available .
*/
typedef void (*xmlGenericErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlStructuredErrorFunc:
* @userData: user provided data for the error callback
* @error: the error being raised.
*
* 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, const xmlError *error);
/** DOC_DISABLE */
#define XML_GLOBALS_ERROR \
XML_OP(xmlLastError, xmlError, XML_DEPRECATED) \
XML_OP(xmlGenericError, xmlGenericErrorFunc, XML_NO_ATTR) \
XML_OP(xmlGenericErrorContext, void *, XML_NO_ATTR) \
XML_OP(xmlStructuredError, xmlStructuredErrorFunc, XML_NO_ATTR) \
XML_OP(xmlStructuredErrorContext, void *, XML_NO_ATTR)
#define XML_OP XML_DECLARE_GLOBAL
XML_GLOBALS_ERROR
#undef XML_OP
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
#define xmlLastError XML_GLOBAL_MACRO(xmlLastError)
#define xmlGenericError XML_GLOBAL_MACRO(xmlGenericError)
#define xmlGenericErrorContext XML_GLOBAL_MACRO(xmlGenericErrorContext)
#define xmlStructuredError XML_GLOBAL_MACRO(xmlStructuredError)
#define xmlStructuredErrorContext XML_GLOBAL_MACRO(xmlStructuredErrorContext)
#endif
/** DOC_ENABLE */
/*
* Use the following function to reset the two global variables
* xmlGenericError and xmlGenericErrorContext.
*/
XMLPUBFUN void
xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
XML_DEPRECATED
XMLPUBFUN void
xmlThrDefSetGenericErrorFunc(void *ctx,
xmlGenericErrorFunc handler);
XML_DEPRECATED
XMLPUBFUN void
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
XMLPUBFUN void
xmlSetStructuredErrorFunc (void *ctx,
xmlStructuredErrorFunc handler);
XML_DEPRECATED
XMLPUBFUN void
xmlThrDefSetStructuredErrorFunc(void *ctx,
xmlStructuredErrorFunc handler);
/*
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
XMLPUBFUN void
xmlParserError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void
xmlParserWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void
xmlParserValidityError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void
xmlParserValidityWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/** DOC_DISABLE */
struct _xmlParserInput;
/** DOC_ENABLE */
XMLPUBFUN void
xmlParserPrintFileInfo (struct _xmlParserInput *input);
XMLPUBFUN void
xmlParserPrintFileContext (struct _xmlParserInput *input);
XMLPUBFUN void
xmlFormatError (const xmlError *err,
xmlGenericErrorFunc channel,
void *data);
/*
* Extended error information routines
*/
XMLPUBFUN const xmlError *
xmlGetLastError (void);
XMLPUBFUN void
xmlResetLastError (void);
XMLPUBFUN const xmlError *
xmlCtxtGetLastError (void *ctx);
XMLPUBFUN void
xmlCtxtResetLastError (void *ctx);
XMLPUBFUN void
xmlResetError (xmlErrorPtr err);
XMLPUBFUN int
xmlCopyError (const xmlError *from,
xmlErrorPtr to);
#ifdef __cplusplus
}
#endif
#endif /* __XML_ERROR_H__ */
include/libxml2/libxml/c14n.h 0000644 00000005266 15033621455 0011762 0 ustar 00 /*
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
* Description: the c14n modules provides a
*
* "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__
#include <libxml/xmlversion.h>
#ifdef LIBXML_C14N_ENABLED
#include <libxml/tree.h>
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* XML Canonicalization
* http://www.w3.org/TR/xml-c14n
*
* Exclusive XML Canonicalization
* http://www.w3.org/TR/xml-exc-c14n
*
* 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 achieve this in libxml2 the document MUST be loaded with
* following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
*/
/*
* xmlC14NMode:
*
* Predefined values for C14N modes
*
*/
typedef enum {
XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
} xmlC14NMode;
XMLPUBFUN int
xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
XMLPUBFUN int
xmlC14NDocDumpMemory (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlChar **doc_txt_ptr);
XMLPUBFUN int
xmlC14NDocSave (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
const char* filename,
int compression);
/**
* This is the core C14N function
*/
/**
* xmlC14NIsVisibleCallback:
* @user_data: user data
* @node: the current 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
xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
void* user_data,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBXML_C14N_ENABLED */
#endif /* __XML_C14N_H__ */
ea-libxml2/README.md 0000644 00000013174 15033621455 0007771 0 ustar 00 # libxml2
libxml2 is an XML toolkit implemented in C, originally developed for
the GNOME Project.
Official releases can be downloaded from
<https://download.gnome.org/sources/libxml2/>
The git repository is hosted on GNOME's GitLab server:
<https://gitlab.gnome.org/GNOME/libxml2>
Bugs should be reported at
<https://gitlab.gnome.org/GNOME/libxml2/-/issues>
Documentation is available at
<https://gitlab.gnome.org/GNOME/libxml2/-/wikis>
## License
This code is released under the MIT License, see the Copyright file.
## Build instructions
libxml2 can be built with GNU Autotools, CMake, meson or several other
build systems in platform-specific subdirectories.
### Autotools (for POSIX systems like Linux, BSD, macOS)
If you build from a Git tree, you have to install Autotools and start
by generating the configuration files with:
./autogen.sh [configuration options]
If you build from a source tarball, extract the archive with:
tar xf libxml2-xxx.tar.gz
cd libxml2-xxx
Then you can configure and build the library:
./configure [configuration options]
make
The following options disable or enable code modules and relevant symbols:
--with-c14n Canonical XML 1.0 support (on)
--with-catalog XML Catalogs support (on)
--with-debug debugging module and shell (on)
--with-history history support for shell (off)
--with-readline[=DIR] use readline in DIR (for shell history)
--with-html HTML parser (on)
--with-http HTTP support (off)
--with-iconv[=DIR] iconv support (on)
--with-icu ICU support (off)
--with-iso8859x ISO-8859-X support if no iconv (on)
--with-lzma[=DIR] use liblzma in DIR (off)
--with-modules dynamic modules support (on)
--with-output serialization support (on)
--with-pattern xmlPattern selection interface (on)
--with-push push parser interfaces (on)
--with-python Python bindings (on)
--with-reader xmlReader parsing interface (on)
--with-regexps regular expressions support (on)
--with-sax1 older SAX1 interface (on)
--with-schemas XML Schemas 1.0 and RELAX NG support (on)
--with-schematron Schematron support (on)
--with-threads multithreading support (on)
--with-thread-alloc per-thread malloc hooks (off)
--with-tree DOM like tree manipulation APIs (on)
--with-valid DTD validation support (on)
--with-writer xmlWriter serialization interface (on)
--with-xinclude XInclude 1.0 support (on)
--with-xpath XPath 1.0 support (on)
--with-xptr XPointer support (on)
--with-zlib[=DIR] use libz in DIR (off)
Other options:
--with-minimum build a minimally sized library (off)
--with-legacy maximum ABI compatibility (off)
Note that by default, no optimization options are used. You have to
enable them manually, for example with:
CFLAGS='-O2 -fno-semantic-interposition' ./configure
Now you can run the test suite with:
make check
Please report test failures to the bug tracker.
Then you can install the library:
make install
At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.
### CMake (mainly for Windows)
Another option for compiling libxml is using CMake:
cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build [possible options]
cmake --build libxml2-xxx-build
cmake --install libxml2-xxx-build
Common CMake options include:
-D BUILD_SHARED_LIBS=OFF # build static libraries
-D CMAKE_BUILD_TYPE=Release # specify build type
-D CMAKE_INSTALL_PREFIX=/usr/local # specify the install path
-D LIBXML2_WITH_ICONV=OFF # disable iconv
-D LIBXML2_WITH_LZMA=OFF # disable liblzma
-D LIBXML2_WITH_PYTHON=OFF # disable Python
-D LIBXML2_WITH_ZLIB=OFF # disable libz
You can also open the libxml source directory with its CMakeLists.txt
directly in various IDEs such as CLion, QtCreator, or Visual Studio.
### Meson
Libxml can also be built with meson. Without option, simply call
meson setup builddir
ninja -C builddir
To add options, see the meson_options.txt file. For example:
meson setup -Dprefix=$prefix -Dftp=true -Dhistory=true -Dicu=true -Dhttp=true builddir
To install libxml:
ninja -C builddir install
To launch tests:
meson test -C builddir
## Dependencies
Libxml does not require any other libraries. A platform with somewhat
recent POSIX support should be sufficient (please report any violation
to this rule you may find).
The iconv function is required for conversion of character encodings.
This function is part of POSIX.1-2001. If your platform doesn't provide
iconv, you need an external libiconv library, for example
[GNU libiconv](https://www.gnu.org/software/libiconv/). Alternatively,
you can use [ICU](https://icu.unicode.org/).
If enabled, libxml uses [libz](https://zlib.net/) or
[liblzma](https://tukaani.org/xz/) to support reading compressed files.
Use of this feature is discouraged.
## Contributing
The current version of the code can be found in GNOME's GitLab at
at <https://gitlab.gnome.org/GNOME/libxml2>. The best way to get involved
is by creating issues and merge requests on GitLab.
All code must conform to C89 and pass the GitLab CI tests. Add regression
tests if possible.
## Authors
- Daniel Veillard
- Bjorn Reese
- William Brack
- Igor Zlatkovic for the Windows port
- Aleksey Sanin
- Nick Wellnhofer
ea-libxml2/NEWS 0000644 00000712357 15033621455 0007222 0 ustar 00 NEWS file for libxml2
v2.13.8: Apr 17 2025
### Security
- [CVE-2025-32415] schemas: Fix heap buffer overflow in
xmlSchemaIDCFillNodeTables
- [CVE-2025-32414] python: Read at most len/4 characters. (Maks Verver)
v2.13.7: Mar 27 2025
### Regressions
- tree: Fix xmlTextMerge with NULL args
- io: Fix `compressed` flag for uncompressed stdin
- parser: Fix parsing of DTD content
v2.13.6: Feb 18 2025
### Security
- [CVE-2025-24928] Fix stack-buffer-overflow in xmlSnprintfElements
- [CVE-2024-56171] Fix use-after-free after xmlSchemaItemListAdd
- pattern: Fix compilation of explicit child axis
### Regressions
- xmllint: Support compressed input from stdin
- uri: Fix handling of Windows drive letters
- reader: Fix return value of xmlTextReaderReadString again
- SAX2: Fix xmlSAX2ResolveEntity if systemId is NULL
### Portability
- dict: Handle ENOSYS from getentropy gracefully
- Fix compilation with uclibc (Dario Binacchi)
- python: Declare init func with PyMODINIT_FUNC
- tests: Fix sanitizer version check on old Apple clang
- cmake: Work around broken sys/random.h in old macOS SDKs
### Build
- autotools: Set AC_CONFIG_AUX_DIR
- cmake: Always build Python module as shared library
- cmake: add missing `Bcrypt` link on Windows (Saleem Abdulrasool)
- cmake: Fix compatibility in package version file
v2.13.5: Nov 12 2024
### Regressions
- xmlIO: Fix reading from non-regular files like pipes
- xmlreader: Fix return value of xmlTextReaderReadString
- parser: Fix loading of parameter entities in external DTDs
- parser: Fix downstream code that swaps DTDs
- parser: Fix detection of duplicate attributes
- string: Fix va_copy fallback
### Bug fixes
- xpath: Fix parsing of non-ASCII names
v2.13.4: Sep 18 2024
### Regressions
- parser: Make unsupported encodings an error in declarations
- io: don't set the executable bit when creating files (triallax)
- xmlcatalog: Improved fix for #699
- Revert "catalog: Fetch XML catalog before dumping"
- io: Add missing calls to xmlInitParser
- tree: Restore return value of xmlNodeListGetString with NULL list
- parser: Fix error handling after reaching limit
- parser: Make xmlParseChunk return an error if parser was stopped
### Bug fixes
- python: Fix SAX driver with character streams
### Improvements
- xpath: Make recursion check work with xmlXPathCompile
- parser: Report at least one fatal error
### Portability
- include: Check whether _MSC_VER is defined
v2.13.3: Jul 24 2024
### Security
- [CVE-2024-40896] Fix XXE protection in downstream code
### Regressions
- autotools: Use AC_CHECK_DECL to check for getentropy
- xinclude: Fix fallback for text includes
- io: Don't call getcwd in xmlParserGetDirectory
- io: Fix return value of xmlFileRead
- parser: Fix error return of xmlParseBalancedChunkMemory
### Improvements
- xinclude: Set error handler when parsing text
- Undeprecate xmlKeepBlanksDefault
v2.13.2: Jul 4 2024
### Regressions
- tree: Fix handling of empty strings in xmlNodeParseContent
- valid: Restore ID lookup
- parser: Reenable ctxt->directory
- uri: Handle filesystem paths in xmlBuildRelativeURISafe
- encoding: Make xmlFindCharEncodingHandler return UTF-8 handler
- encoding: Fix encoding lookup with xmlOpenCharEncodingHandler
- include: Define ATTRIBUTE_UNUSED for clang
- uri: Fix xmlBuildURI with NULL base
### Improvements
- uri: Enable Windows paths on Cygwin
- tests: Clarify licence of test/intsubset2.xml
v2.13.1: Jun 19 2024
### Regressions
- parser: Selectively reenable reading from "-"
- reader: Fix xmlTextReaderReadString
- xinclude: Set XPath context doc
- xinclude: Load included documents with XML_PARSE_DTDLOAD
- include: Don't redefine ATTRIBUTE_UNUSED
- include: Readd circular dependency between tree.h and parser.h
- xinclude: Add missing include (Jan Alexander Steffens (heftig))
- win32, msvc: fix missing linking against Bcrypt.lib (Miklos Vajna)
- xinclude: Don't raise error on empty nodeset
- parser: Make failure to load main document a warning
- tree: Fix freeing entities via xmlFreeNode
- parser: Pass global object to sax->setDocumentLocator
### Improvements
- io: Fix resetting xmlParserInputBufferCreateFilename hook
### Documentation
- Fix typo in NEWS (--with-html -> --with-http) (Ryan Carsten Schmidt)
- doc: Don't mention xmlNewInputURL
v2.13.0: Jun 12 2024
### Major changes
Most of the core code should now report malloc failures reliably. Some
API functions were extended with versions that report malloc failures.
New API functions for error handling were added:
- xmlCtxtSetErrorHandler
- xmlXPathSetErrorHandler
- xmlXIncludeSetErrorHandler
This makes it possible to register per-context error handlers without
resorting to global handlers.
A few error messages were improved and consolidated. Please update
downstream test suites accordingly.
A new parser option XML_PARSE_NO_XXE can be used to disable loading
of external entities or DTDs. This is most useful in connection with
XML_PARSE_NOENT.
Support for HTTP POST was removed.
Support for zlib, liblzma and HTTP is now disabled by default and has
to be enabled by passing --with-zlib, --with-lzma or --with-http to
configure. In legacy mode (--with-legacy) these options are enabled
by default as before.
Support for FTP will be removed in the next release.
Support for the range and point extensions of the xpointer() scheme
will be removed in the next release. The rest of the XPointer
implementation won't be affected. The xpointer() scheme will behave
like the xpath1() scheme.
Several more legacy symbols were deprecated. Users of the old "SAX1"
API functions are encouraged to upgrade to the new "SAX2" API,
available since version 2.6.0 from 2003.
Some deprecated global variables were made const:
- htmlDefaultSAXHandler
- oldXMLWDcompatibility
- xmlDefaultSAXHandler
- xmlDefaultSAXLocator
- xmlParserDebugEntities
### Deprecations and removals
- threads: Deprecate remaining ThrDef functions
- unicode: Deprecate most xmlUCSIs* functions
- memory: Remove memory debugging
- tree: Deprecate xmlRegisterNodeDefault
- tree: Deprecate xmlSetCompressMode
- html: Deprecate htmlHandleOmittedElem
- valid: Deprecate internal validation functions
- valid: Deprecate old DTD serialization API
- nanohttp: Deprecate public API
- Remove VMS support
- Remove Trio
### Bug fixes
- parser: Fix base URI of internal parameter entities
- tree: Handle predefined entities in xmlBufGetEntityRefContent
- schemas: Allow unlimited length decimals, integers etc. (Tomáš Ženčák)
- reader: Fix preservation of attributes
- parser: Always decode entities in namespace URIs
- relaxng: Fix tree corruption in xmlRelaxNGParseNameClass (Seiya Nakata)
- schemas: Fix ADD_ANNOTATION
- tree: Fix tree iteration in xmlDOMWrapRemoveNode
- tree: Declare namespace on clone in xmlDOMWrapCloneNode
- tree: Fix xmlAddSibling with last sibling
- tree: Fix xmlDocSetRootElement with multiple top-level elements
- catalog: Fetch XML catalog before dumping
- html: Don't close fd in htmlCtxtReadFd
### Improvements
- parser: Fix "Truncated multi-byte sequence" error
- Add missing _cplusplus processing clause (Sadaf Ebrahimi)
- parser: Rework handling of undeclared entities
- SAX2: Warn if URI resolution failed
- parser: Don't report error on invalid URI
- xmllint: Clean up option handling
- xmllint: Rework parsing
- parser: Don't create undeclared entity refs in substitution mode
- Make some globals const
- reader: Make xmlTextReaderReadString non-recursive
- reader: Rework xmlTextReaderRead{Inner,Outer}Xml
- Remove redundant size check (Niels Dossche)
- Remove redundant NULL check on cur (Niels Dossche)
- Remove always-false check old == cur (Niels Dossche)
- Remove redundant NULL check on cur (Niels Dossche)
- tree: Don't return empty localname in xmlSplitQName{2,3}
- xinclude: Don't try to fix base of non-elements
- tree: Don't coalesce text nodes in xmlAdd{Prev,Next}Sibling
- SAX2: Optimize appending children
- tree: Align xmlAddChild with other node insertion functions
- html: Use binary search in htmlEntityValueLookup
- io: Allocate output buffer with XML_BUFFER_ALLOC_IO
- encoding: Don't shrink input too early in xmlCharEncOutput
- tree: Tighten source doc check in xmlDOMWrapAdoptNode
- tree: Check destParent->doc in xmlDOMWrapCloneNode
- tree: Refactor text node updates
- tree: Refactor node insertion
- tree: Refactor element creation and parsing of attribute values
- tree: Simplify xmlNodeGetContent, xmlBufGetNodeContent
- buf: Don't use default buffer size for small strings
- string: Fix xmlStrncatNew(NULL, "")
- entities: Don't allow null name in xmlNewEntity
- html: Fix quadratic behavior in htmlNodeDump
- tree: Rewrite xmlSetTreeDoc
- valid: Rework xmlAddID
- tree: Remove unused node types
- tree: Make namespace comparison more consistent
- tree: Don't allow NULL name in xmlSetNsProp
- tree: Rework xmlNodeListGetString
- tree: Rework xmlTextMerge
- tree: Rework xmlNodeSetName
- tree: Simplify xmlAddChild with text parent
- tree: Disallow setting content of entity reference nodes
- tree: Rework xmlReconciliateNs
- schemas: fix spurious warning about truncated snprintf output
(Benjamin Gilbert)
- xmlschemastypes: Remove unreachable if statement (Maks Mishin)
- relaxng: Remove useless if statement (Maks Mishin)
- tree: Check for integer overflow in xmlStringGetNodeList
- http: Improve error message for HTTPS redirects
- catalog: Remove Windows hack
- save: Move DTD serialization code to xmlsave.c
- parser: Report fatal error if document entity couldn't be loaded
- xpath: Fix return of empty node-set in xmlXPathNodeCollectAndTest
- SAX2: Limit entity URI length to 2000 bytes
- parser: Account for full size of non-well-formed entities
- parser: Pop inputs if parsing DTD failed
- parser: Fix quadratic behavior when copying entities
- writer: Implement xmlTextWriterClose
- parser: Avoid duplicate namespace errors
- parser: Add XML_PARSE_NO_XXE parser option
- parser: Make xmlParseContent more useful
- error: Make xmlFormatError public
- encoding: Check whether encoding handlers support input/output
- SAX2: Enforce size limit in xmlSAX2Text with XML_PARSE_HUGE
- parser: Lower maximum entity nesting depth
- parser: Set depth limit to 2048 with XML_PARSE_HUGE
- parser: Implement xmlCtxtSetOptions
- parser: Always prefer option members over bitmask
- parser: Don't modify SAX2 handler if XML_PARSE_SAX1 is set
- parser: Rework parsing of attribute and entity values
- save: Output U+FFFD replacement characters
- parser: Simplify entity size accounting
- parser: Avoid unwanted expansion of parameter entities
- parser: Always copy content from entity to target
- parser: Simplify control flow in xmlParseReference
- parser: Remove xmlSetEntityReferenceFunc feature
- parser: Push general entity input streams on the stack
- parser: Move progressive flag into input struct
- parser: Fix in-parameter-entity and in-external-dtd checks
- xpath: Rewrite substring-before and substring-after
- xinclude: Only set xml:base if necessary
- xinclude: Allow empty nodesets
- parser: Rework general entity parsing
- io: Fix close error handling
- io: Fix read/write error handling
- io: More refactoring and unescaping fixes
- io: Move some code from xmlIO.c to parserInternals.c
- uri: Clean up special parsing modes
- xinclude: Rework xml:base fixup
- parser: Also set document properties when push parsing
- include: Move non-generated parts from xmlversion.h.in
- io: Remove support for HTTP POST
- dict: Move local RNG state to global state
- dict: Get random seed from system PRNG
- io: Don't use "-" to read from stdin
- io: Rework initialization
- io: Consolidate error messages
- xzlib: Fix harmless unsigned integer overflow
- io: Always use unbuffered input
- io: Fix detection of compressed streams
- io: Pass error codes from xmlFileOpenReal to xmlNewInputFromFile
- io: Rework default callbacks
- error: Stop printing some errors by default
- xpath: Don't free nodes of XSLT result value trees
- valid: Fix handling of enumerations
- parser: Allow recovery in xmlParseInNodeContext
- encoding: Support ASCII in xmlLookupCharEncodingHandler
- include: Remove useless 'const' from function arguments
- Avoid EDG -Wignored-qualifiers warnings on wrong 'const *' to '* const'
conversions (makise-homura)
- Avoid EDG deprecation warnings for LCC compiler (makise-homura)
- Avoid EDG -Woverflow warnings on truncating conversions by manually
truncating operand (makise-homura)
- Avoid EDG -Wtype-limits warnings on unsigned comparisons with zero by
conversion from unsigned int to int (makise-homura)
- Avoid using no_sanitize attribute on EDG even if compiler shows as GCC
(makise-homura)
### Build systems
- meson: convert boolean options to feature option (Rosen Penev)
- meson: Pass LIBXML_STATIC in dependency (Andrew Potter)
- meson: fix compilation with local binaries (Rosen Penev)
- meson: don't use dl dependency on old meson (Rosen Penev)
- meson: fix usage as a subproject (Rosen Penev)
- autotools: Fix pthread detection on FreeBSD
- build: Remove --with-fexceptions configuration option
- autotools: Remove --with-coverage configuration option
- build: Disable HTTP support by default
- Stop defining _REENTRANT
- doc: Don't install example code
- meson: Initial commit (Vincent Torri)
- build: Disable support for compression libraries by default
- Set LIBXML2_FOUND if it has been properly configured (Michele Bianchi)
- Makefile.am: omit $(top_builddir) from DEPS and LDADDS (Mike Dalessio)
### Test suite
- runtest: Work around broken EUC-JP support in musl iconv
- runtest: Check for IBM-1141 encoding handler
- fuzz: Add xmllint fuzzer
- fuzz: Add fuzzer for XML reader API
- fuzz: New tree API fuzzer
- tests: Remove testOOM
- Don't let gentest.py cast types to 'const somethingPtr' to avoid
-Wignored-qualifiers (makise-homura)
v2.12.8: Jun 12 2024
### Regressions
- parser: Fix performance regression when parsing namespaces
v2.12.7: May 13 2024
### Security
- [CVE-2024-34459] Fix buffer overread with `xmllint --htmlout`
### Regressions
- xmllint: Fix --pedantic option
- save: Handle invalid parent pointers in xhtmlNodeDumpOutput
v2.12.6: Mar 15 2024
### Regressions
- parser: Fix detection of duplicate attributes in XML namespace
- xmlreader: Fix xmlTextReaderConstEncoding
- html: Fix htmlCreatePushParserCtxt with encoding
- xmllint: Return error code if XPath returns empty nodeset
v2.12.5: Feb 4 2024
### Security
- [CVE-2024-25062] xmlreader: Don't expand XIncludes when backtracking
### Regressions
- parser: Fix crash in xmlParseInNodeContext with HTML documents
v2.12.4: Jan 15 2024
### Regressions
- parser: Fix regression parsing standalone declarations
- autotools: Readd --with-xptr-locs configuration option
- parser: Fix build --without-output
- parser: Don't grow or shrink pull parser memory buffers
- io: Fix memory lifetime issue with input buffers
v2.12.3: Dec 12 2023
### Regressions
- parser: Fix namespaces redefined from default attributes
### Build fixes
- include: Rename XML_EMPTY helper macro
- include: Move declaration of xmlInitGlobals
- include: Add missing includes
- include: Move globals from xmlsave.h to parser.h
- include: Readd circular dependency between tree.h and parser.h
v2.12.2: Dec 5 2023
### Regressions
- parser: Fix invalid free in xmlParseBalancedChunkMemoryRecover
- globals: Disable TLS in static Windows builds
- html: Reenable buggy detection of XML declarations
- tree: Fix regression when copying DTDs
- parser: Make CRLF increment line number
### Build fixes
- build: Disable compiler TLS by default
- cmake: Update config.h.cmake.in
- tests: Fix tests --with-valid --without-xinclude
v2.12.1: Nov 23 2023
### Regressions
- hash: Fix deletion of entries during scan
- parser: Only enable SAX2 if there are SAX2 element handlers
### Build fixes
- autotools: Stop checking for snprintf
- dict: Fix '__thread' before 'static'
- fix: pthread weak references in globals.c (Mike Dalessio)
- tests: Fix build with older MSVC
v2.12.0: Nov 16 2023
### Major changes
Most of the known issues leading to quadratic behavior in the XML parser
were fixed. Internal hash tables were rewritten to reduce memory
consumption.
Starting with this release, it should be enough to add the --with-legacy
configuration option to provide maximum ABI compatibility. For example,
if a code module was removed from the default configuration, the option
will add stubs for the removed symbols.
libxml2 will now store global variables in thread-local storage if supported
by the compiler. This avoids allocating the data lazily which can result in
a fatal error condition. A new API function xmlCheckThreadLocalStorage
was added so the allocation can be checked earlier if compiler TLS is not
supported. To prepare for future improvements, some API functions now expect
or return a const xmlError struct.
Several cyclic dependencies in public header files were fixed. As a result,
certain headers won't include other headers as before.
Refactoring of the encoding code has been mostly completed. Calling
xmlSwitchEncoding from client code is now fully supported, for example to
override the encoding for the push parser.
When parsing data from memory, libxml2 will now stream data chunk by chunk
instead of copying the whole buffer (possibly twice with encodings),
reducing peak memory consumption considerably.
A new API function xmlCtxtSetMaxAmplification was added to allow parsing
of files that would otherwise trigger the billion laughs protection.
Several bugs in the regex determinism checks were fixed. Invalid XML
Schemas which previous versions erroneously accepted will now be
rejected.
### Deprecations
- globals: Deprecate xmlLastError
- parser: Deprecate global parser options
- win32: Deprecate old Windows build system
### Bug fixes
- parser: Stop switching to ISO-8859-1 on encoding errors
- parser: Support encoded external PEs in entity values
- string: Fix UTF-8 validation in xmlGetUTF8Char
- SAX2: Allow multiple top-level elements
- parser: Update line number after coalescing text nodes
- parser: Check for truncated multi-byte sequences
### Improvements
- error: Make more xmlError structs constant
- parser: Remove redundant IS_CHAR check in xmlCurrentChar
- parser: Fix stack handling in xmlParseTryOrFinish
- parser: Protect against quadratic default attribute expansion
- parser: Missing checks for disableSAX
- entities: Make xmlFreeEntity public
- examples: Don't use sprintf
- encoding: Suppress -Wcast-align warnings
- parser: Use hash tables to avoid quadratic behavior
- parser: Don't skip CR in xmlCurrentChar
- dict: Rewrite dictionary hash table code
- hash: Rewrite hash table code
- malloc-fail: Report malloc failure in xmlFARegExec
- malloc-fail: Report malloc failure in xmlRegEpxFromParse
- parser: Simplify xmlStringCurrentChar
- regexp: Fix status codes and handle invalid UTF-8
- error: Make xmlGetLastError return a const error
- html: Fix logic in htmlAutoClose
- globals: Move globals back to correct header files
- globals: Use thread-local storage if available
- globals: Rework global state destruction on Windows
- globals: Define globals using macros
- globals: Introduce xmlCheckThreadLocalStorage
- globals: Make xmlGlobalState private
- threads: Move library initialization code to threads.c
- debug: Remove debugging code
- globals: Move code from threads.c to globals.c
- parser: Avoid undefined behavior in xmlParseStartTag2
- schemas: Fix memory leak of annotations in notations
- dict: Update hash function
- dict: Use thread-local storage for PRNG state
- dict: Use xoroshiro64** as PRNG
- xmllint: Fix error messages
- parser: Fix detection of null bytes
- parser: Improve error handling in push parser
- parser: Don't check inputNr in xmlParseTryOrFinish
- parser: Remove push parser debugging code
- tree: Fix copying of DTDs
- legacy: Add stubs for disabled modules
- parser: Allow to set maximum amplification factor
- entities: Don't change doc when encoding entities
- parser: Never use UTF-8 encoding handler
- encoding: Remove debugging code
- malloc-fail: Fix unsigned integer overflow in xmlTextReaderPushData
- html: Remove encoding hack in htmlCreateFileParserCtxt
- parser: Decode all data in xmlCharEncInput
- parser: Stream data when reading from memory
- parser: Optimize xmlLoadEntityContent
- parser: Don't overwrite EOF parser state
- parser: Simplify input pointer updates
- parser: Don't reinitialize parser input members
- encoding: Move rawconsumed accounting to xmlCharEncInput
- parser: Rework encoding detection
- parser: Always create UTF-8 in xmlParseReference
- html: Remove some debugging code in htmlParseTryOrFinish
- malloc-fail: Fix memory leak in xmlCompileAttributeTest
- parser: Recover more input from encoding errors
- malloc-fail: Handle malloc failures in xmlAddEncodingAlias
- malloc-fail: Fix null-deref with xmllint --copy
- xpath: Ignore entity ref nodes when computing node hash
- malloc-fail: Fix null deref after xmlXIncludeNewRef
- SAX: Always validate xml:ids
- Stop using sprintf
- Fix compiler warning on GCC < 8
- regexp: Fix determinism checks
- regexp: Fix checks for eliminated transitions
- regexp: Simplify xmlFAReduceEpsilonTransitions
- regexp: Fix cycle check in xmlFAReduceEpsilonTransitions
- schemas: Fix filename in xmlSchemaValidateFile
- schemas: Fix line numbers in streaming validation
- writer: Add error check in xmlTextWriterEndDocument
- encoding: Stop calling xmlEncodingErr
- xmlIO: Remove some calls to xmlIOErr
- parser: Improve handling of encoding and IO errors
- parser: Move xmlFatalErr to parserInternals.c
- encoding: Rework error codes
- .gitignore: Split up and rearrange .gitignore files
- .gitignore: Add runsuite.log
- Stop calling xmlMemoryDump
- examples: Don't call xmlCleanupParser and xmlMemoryDump
- xpath: Remove remaining references to valueFrame
### Portability
- python: Make it compatible with python3.12 (Daniel Garcia Moreno)
### Build systems
- cmake: Check whether static linking dependencies found in config files
(James Le Cuirot)
- autotools: Make --with-minimum disable lzma support
- build: Remove some GCC warnings
- Handle NOCONFIG case when setting locations from CMake target properties
(Markus Rickert)
- cmake: Generate better pkg-config file for SYSROOT builds under CMake
(James Le Cuirot)
- autoconf: Include non-pkg-config dependency flags in the pkg-config file
(James Le Cuirot)
- autoconf: Don't bake build time CFLAGS into pkg-config file (James Le Cuirot)
- build: Generate better pkg-config files for static-only builds (James
Le Cuirot)
- build: Generate better pkg-config file for SYSROOT builds (James Le Cuirot)
- autoconf: Allow custom --with-icu configure option
### Tests
- tests: Also test xmlNextChar in testchar.c
- tests: Start with testparser.c for extra tests
- fuzz: Raise rss_limit_mb
- fuzz: Test xmlTextReaderRead after EOF or failure
- fuzz: Test XML_PARSE_XINCLUDE | XML_PARSE_VALID
- tests: Handle entities in SAX tests
- fuzz: Disable XML_PARSE_SAX1 option in xml fuzzer
- tests: Add more tests for redefined attributes
- hash: Add hash table tests
- tests: Add ATTRIBUTE_NO_SANITIZE_INTEGER macro
- fuzz: Allow to fuzz without push, reader or output modules
- gitlab-ci: Add a "medium" config build
- python: Fix tests on MinGW
- test: Add push parser test with overridden encoding
- testapi: test_xmlSAXDefaultVersion() leaves xmlSAX2DefaultVersionValue set
to 1 with LIBXML_SAX1_ENABLED (David Kilzer)
- gitlab-ci: Lower _XOPEN_SOURCE value
- testapi: Don't set http_proxy environment variable
- test: Add push parser tests for split UTF-8 sequences
- xinclude: Lower initial table size when fuzzing
- tests: Test streaming schema validation
- runtest: Skip element name in schema error messages
### Documentation
- doc: Add notes about runtest to MAINTAINERS.md
- doc: Don't document internal macros in xmlversion.h
- doc: Allow 'unsigned' without 'int'
- doc: Improve documentation of configuration options
v2.11.6: Nov 16 2023
### Regressions
- threads: Fix --with-thread-alloc
- xinclude: Fix 'last' pointer in xmlXIncludeCopyNode
### Bug fixes
- parser: Fix potential use-after-free in xmlParseCharDataInternal
v2.11.5: Aug 9 2023
### Regressions
- parser: Make xmlSwitchEncoding always skip the BOM
- autotools: Improve iconv check
### Bug fixes
- valid: Fix c1->parent pointer in xmlCopyDocElementContent
- encoding: Always call ucnv_convertEx with flush set to false
### Portability
- autotools: fix Python module file ext for cygwin/msys2 (Christoph Reiter)
### Tests
- runtest: Fix compilation without LIBXML_HTML_ENABLED
v2.11.4: May 18 2023
Fixes a serious regression.
- parser: Fix regression when push parsing UTF-8 sequences
v2.11.3: May 11 2023
Fixes more regressions.
- xinclude: Fix false positives in inclusion loop detection
- autotools: Fix ICU detection
- parser: Fix "huge input lookup" error with push parser
- xpath: Fix build without LIBXML_XPATH_ENABLED
- hash: Fix possible startup crash with old libxslt versions
- autoconf: fix iconv library paths (Mike Dalessio)
v2.11.2: May 5 2023
Fix regressions.
- threads: Fix startup crash with weak symbol hack
- win32: Don't depend on removed .def file
- schemas: Fix memory leak in xmlSchemaValidateStream
v2.11.1: Apr 30 2023
Fixes build and ABI issues.
- cmake: Fix va_copy detection (Luca Niccoli)
- libxml.m4: Fix quoting
- Link with --undefined-version
- libxml2.syms: Revert removal of version information
v2.11.0: Apr 28 2023
### Major changes
Protection against entity expansion attacks, also known as "billion laughs"
has been greatly improved. Malicious files should be detected reliably now
and false positives should be reduced. It is possible though that large
documents which make heavy use of entities are rejected now.
This release finally fixes symbol visibility on UNIX systems. Internal
symbols will now be hidden. While these symbols were never declared in public
headers, it was still possible to declare them manually. Now this won't work.
All symbol information has been removed from the ELF version script to fix
link errors with --no-undefined-version. The version nodes are kept so it
should still be possible to run binaries linked against older versions.
About 90 memory errors in code paths handling malloc failures have been fixed.
While these issues shouldn't impact security, this improves robustness under
memory pressure.
The XInclude engine has been reworked to properly support nested includes.
Several cases of quadratic behavior in the XML push parser have been fixed.
Refactoring has begun on some buffering and encoding code with the goal of
simplifying this part of the code base and improving error reporting.
Other highlights:
- Consolidated private header files.
- Major rework of the autoconf build.
- Deprecated several outdated and internal functions.
Special thanks to Google's Open Source Security Subsidies program for
sponsoring much of the work on this release!
Ongoing work on libxml2 relies on funding. For a list of important open
issues see <https://gitlab.gnome.org/GNOME/libxml2/-/issues/507>
### Security
- Fix use-after-free in xmlParseContentInternal() (David Kilzer)
- xmllint: Fix use-after-free with --maxmem
- parser: Fix OOB read when formatting error message
- entities: Rework entity amplification checks
### Regressions
- parser: Fix regression in xmlParserNodeInfo accounting
### Bug fixes
- Fix memory errors in code handling malloc failures
- encoding: Fix error code in asciiToUTF8
- xpath: number('-') should return NaN
- xmlParseStartTag2() contains typo when checking for default definitions for
an attribute in a namespace (David Kilzer)
- uri: Fix handling of port numbers
- error: Make sure that error messages are valid UTF-8
- xinclude: Fix nested includes
### Improvements
- xmllint: Validate --maxmem integer option
- xmlValidatePopElement() can return invalid value (-1) (David Kilzer)
- parser: Rework EBCDIC code page detection
- parser: Limit name length in xmlParseEncName
- parser: Rework shrinking of input buffers
- html: Rely on CUR_CHAR to grow the input buffer
- parser: Rely on CUR_CHAR/NEXT to grow the input buffer
- valid: Make xmlValidateElement non-recursive
- html: Fix quadratic behavior in htmlParseTryOrFinish
- xmllint: Fix memory leak with --pattern --stream
- parser: Stop calling xmlParserInputShrink
- html: Impose some length limits
- valid: Allow xmlFreeValidCtxt(NULL)
- parser: Stop calling xmlParserInputGrow
- xinclude: Fix quadratic behavior in xmlXIncludeLoadTxt
- xinclude: Abort immediately if max depth was exceeded
- xpath: Only report the first error
- error: Don't move past current position
- error: Limit number of parser errors
- parser: Lower entity nesting limit with XML_PARSE_HUGE
- parser: Don't increase depth twice when parsing internal entities
- parser: Improve detection of entity loops
- parser: Only report a single entity error
- libxml.h: Remove dubious definition of LIBXML_STATIC
- html: Improve parsing of nested lists
- memory: Don't use locks in xmlMemUsed
- encoding: Remove unused variable xmlDefaultCharEncodingHandler
- Rework initialization code
- Add .editorconfig
- parser: Merge misc, prolog and epilog cases in push parser
- parser: Fix 'consumed' accounting when switching encodings
- html: Fix check for end of comment in push parser
- parser: Fix push parser with 1-3 byte initial chunk
- parser: Rewrite push parser boundary checks
- reader: Switch to xmlParserInputBufferCreateMem
- html: Don't escape ASCII chars in href attributes
- io: Don't shrink memory input buffers
- parser: Don't call xmlSHRINK from push parser
- parser: Ignore cdata argument in xmlParseCharData
- parser: Rework push parser parser progress checks
- io: Fix a few integer overflows in I/O statistics
- io: Rework xmlParserInputBufferGrow with encodings
- io: Remove xmlInputReadCallbackNop
- io: Check for memory buffer early in xmlParserInputGrow
- parser: Fix error message in xmlParseCommentComplex
- Bypass proxy in nanoHTTP for hosts in "no_proxy" (Markus Jörg)
- schemas: Fix infinite loop in xmlSchemaCheckElemSubstGroup
- threads: Remove check for pthread_equal
- xinclude: Rework XInclude cache
- xinclude: Remove inefficient refcounting scheme
- xmllint: Improve handling of empty XPath node sets
- parser: Fix potential memory leak in xmlParseAttValueInternal
- error: Don't use initGenericErrorDefaultFunc
- xpath: Lower XPath recursion limit on Windows
- Stop including sys/types.h
- Don't define WIN32 macro
- Make xmlNewSAXParserCtx take a const sax handler
- Consolidate private header files
- Remove internal macros from parserInternals.h
- Move some HTML functions to correct header file
- xmllint: Stop calling xmlSAXDefaultVersion
- Introduce xmlNewSAXParserCtxt and htmlNewSAXParserCtxt
- Don't mess with parser options in htmlParseDocument
- Remove useless call to htmlDefaultSAXHandlerInit
- Remove htmlDefaultSAXHandler from non-SAX1 build
- Don't initialize SAX handler in htmlReadMemory
- Fix htmlReadMemory mixing up XML and HTML functions
- Don't use default SAX handler to report unrelated errors
- Create stream with buffer in xmlNewStringInputStream
- xmlcatalog: Fix memory leaks
### Code quality
- xzlib: Fix implicit sign change in xz_open
- parser: Simplify calculation of available buffer space
- parser: Use size_t when subtracting input buffer pointers
- parser: Check for integer overflow when updating checkIndex
- xpath: Fix harmless integer overflow in xmlXPathTranslateFunction
- schematron: Use logical and
- relaxng: Remove useless if statement
- schemas: Remove useless if statement
- pattern: Merge identical branches
- regexp: Add sanity check in xmlRegCalloc2
- regexp: Simplify xmlRegAtomPush
- encoding: Cast toupper argument to unsigned char
- uri: Add explicit cast in xmlSaveUri
- buf: Fix return value of xmlBufGetInputBase
- parser: Fix integer overflow of input ID
- parser: Remove useless ent->etype test in xmlParseReference
- parser: Remove useless ent->children tests in xmlParseReference
- xmlmemory.c: Remove xmlMemContentShow
- libxml.h: Add comments and indentation
- libxml.h: Don't include stdio.h
- xmlexports.h: Disable docs for internal macro XMLPUBLIC
- parser: Simplify xmlParseConditionalSections
- io: Rearrange code in xmlSwitchInputEncodingInt
- warnings: Fix -Wstrict-prototypes warning
- warnings: Remove set-but-unused variables
- Fix compiler warnings in SAX2.c
- Fix unused variable warning in python/types.c
- Fix compiler warning in examples
- Fix compiler warnings in fuzzing code
- Remove unused code in nanohttp.c
- Remove or annotate char casts
- Don't use sizeof(xmlChar) or sizeof(char)
- Remove explicit integer casts
### Deprecations
- parser: Deprecate more internal functions
- parser: Deprecate some parser input functions
- parser: Deprecate xmlString*DecodeEntities
- threads: Deprecate some internal functions
- buf: Deprecate static/immutable buffers
- Deprecate internal parser functions
- Deprecate old HTML SAX API
- Generate deprecation warnings for old SAX API
- Mark more functions setting globals as deprecated
- Mark more parser functions as deprecated
- Mark most SAX1 functions as deprecated
- Deprecate some global variables
### Portability
- autoconf: Warn about outdated C compilers
- win32: Remove broken libxml2.def.src
- Remove symbols from version script
- catalog.c: Silence a cast warning on VS 2022 (Lukáš Tyrychtr)
- libxml.h: Remove ancient LynxOS setup
- Use python3 not python (Ross Burton)
- xstc/fixup-tests.py: port to Python 3 (Ross Burton)
- xstc/fixup-tests.py: unify whitespace (Ross Burton)
- Remove hacky heuristic from b2dc5675 (Alex Richardson)
- Avoid creating an out-of-bounds pointer by rewriting a check
(Alex Richardson)
- Hide internal functions
- Correctly relocate internal pointers after realloc() (Alex Richardson)
- Visual Studio builds: Allow silencing deprecation warnings (Chun-wei Fan)
- Visual Studio: Define XML_DEPRECATED (Chun-wei Fan)
- xmllint: Include <io.h> on Windows
- warnings: Work around MSVC bug
- sources: Silence C4013 warnings on Visual Studio (Chun-wei Fan)
- python/setup.py.in: Improve Windows import patching (Chun-wei Fan)
- python: Create .pyd on Windows
- Fix Python build on Windows
- Fix Windows compiler warnings in python/types.c
- Fix libxml_PyFileGet
- Remove BeOS support
- Fix libxml_PyFileGet with stdout on macOS
- Migrate from PyEval_ to PyObject_
- Port build_glob.py to Python 3
- Port genChRanges.py to Python 3
- xmlexports.h: Remove LIBXML_FASTCALL optimization
- Remove XMLCALL and XMLCDECL macros from public headers
- Remove XMLDECL macro from .c files
### Build systems
- cmake: Link against `dl` and `dld` only when `LIBXML2_WITH_MODULES` is
enabled (Alexander Kutelev)
- autotools: Fix make distcheck
- Remove RPM build, Makefile.tests, README.tests
- libxml.m4: deprecate AM_PATH_XML2, wrap PKG_CHECK_MODULES instead
(Ross Burton)
- libxml.m4: fix -Wstrict-prototypes (Sam James)
- cmake: Build static library with -DLIBXML_STATIC
- autotools: Don't use version script on Windows
- autotools: Fix winsock detection
- autotools: Only add network libraries if HTTP/FTP enabled
- autotools: Disable parallel Python build
- python: Don't output missing generators during build
- build: Remove check for broken ss_family
- http: Simplify IPv6 checks
- autotools: Fix network checks on Windows
- Fix detection of GNU libiconv
- cmake: Fix Python installation
- cmake: Don't check for Python 2
- configure.ac: Also check for MSYS host
- Improve network library detection
- Detect ws2_32 with AC_SEARCH_LIBS
- Rework network configure checks
- Remove arg cast configure checks
- Fix dlopen check
- Remove HAVE_WIN32_THREADS configuration flag
- Rework dlopen and pthread detection
- Fix test in configure.ac
- cmake: Enable GCC compiler warnings
- Always link with -no-undefined
- Use AM_CFLAGS and AM_LDFLAGS consistently
- Remove -Wredundant-decls
- Call AC_CHECK_* with multiple arguments
- configure.ac: Remove checks for unused programs
- Rework library detection in configure.ac
- Rearrange configure.ac
- Consolidate zlib and lzma detection
- Remove "runtime debugging"
- Consolidate simple API modules in configure.ac
- Fix dependency resolution in configure.ac
- Fix --with-valid --without-regexps build
- Fix --with-schemas --without-xpath build
- Don't build unneeded .c source files
- Move xmlIsXHTML to tree.c
- Cleanup distribution settings in Makefile.am
- Also clean *.pyc files for Python 2
- Don't distribute libxml2.spec
### Tests
- testchar: Add test for memory pull parser with encoding
- fuzz: Also test init function of URI fuzzer
- fuzz: Separate fuzzer for DTD validation
- gitlab-ci: Enable all "integer" sanitizers
- fuzz: Inject random malloc failures
- fuzz: Support variable integer sizes in fuzz data
- fuzz: Fix duplicate detection in fuzzEntityRecorder
- fuzz: Set filename in xmlFuzzEntityLoader
- fuzz: Allow xmlFuzzReadString(NULL)
- fuzz: Fix Makefile dependencies
- fuzz: Add test/recurse to seed corpus
- fuzz: Add separate XInclude fuzzer
- runsuite: Some errors are expected
- testrecurse: Test entity expansion stats
- testapi.c: Initialize catalog early
- gentest.py: Fix memory leak in API tests
- tests: Enable "runsuite" test
- python/tests/reader2: use absolute paths everywhere (Ross Burton)
- python/tests/reader2: always exit(1) if a test fails (Ross Burton)
- testModule: exit if the module can't be opened (Ross Burton)
- CI: disable modules in gcc:static build (Ross Burton)
- CI: fix CI on MinGW builds (Ross Burton)
- python: Fix memory leak checks
- tests: Check that xmlInitParser doesn't allocate memory
- tests: Fix use-after-free in Python tests
- tests: Remove unneeded #includes
- gitlab-ci: Make Test-Msvc exit if ctest fails
- gitlab-ci: Treat compiler warnings as errors on MSVC
- test: Add test for push parser boundaries
- gitlab-ci: Upgrade image to Ubuntu 22.10, reenable MSan
- gitlab-ci: Reenable LeakSanitizer
- gitlab-ci: Fix llvm-symbolizer
- xinclude: Don't create result doc for test with errors
- xinclude: Also test error messages
- gitlab-ci: Allow cast-align warnings from clang
- gitlab-ci: Fix tar invocation
- gitlab-ci: Move MSVC test to separate script
- gitlab-ci: Fix SUFFIX, remove MINGW_PATH
- gitlab-ci: Consolidate CMake test scripts
- gitlab-ci: Only install MinGW autotools if needed
- gitlab-ci: Only install cmake MinGW package if needed
- gitlab-ci: Install 7-Zip using the .msi
- Use $MSYSTEM and 'bash -lc' in MinGW CI
- Add CI job for MinGW/Autotools
- Consolidate CI scripts
- Allow empty MINGW_PACKAGE_PREFIX
- Move Dockerfile to .gitlab-ci directory
- testapi: Disable on Windows for now
- Disable fuzzer tests if glob.h wasn't found
- Move automata test to runtest.c
- Fix testapi when building --without-sax1
# Documentation
- doc: Remove ancient files
- Remove ancient TODOs
- html: Fix htmlInitAutoClose documentation
- doc: Mention new location of XML catalog as breaking change
- doc: Mention potentially breaking changes in NEWS
- doc: Remove xmlDllMain from documentation and version script
- doc: Mention ${sysconfdir} in man pages
- doc: Document xmlcatalog --convert
- doc: Document xmllint --nodict and --pedantic
- doc: Fix indentation in source XML files
- xmllint: Document --quiet option
- Improve cross-references in API docs
- Improve documentation of globals
- Fix documentation parser
- Support comments for global variables in documentation
- Fix update call in apibuild.py
- Don't index anything in DOC_DISABLE sections
- Fix warnings from apibuild.py
- Start with documentation for maintainers
v2.10.4: Apr 11 2023
### Security
- [CVE-2023-29469] Hashing of empty dict strings isn't deterministic
- [CVE-2023-28484] Fix null deref in xmlSchemaFixupComplexType
- schemas: Fix null-pointer-deref in xmlSchemaCheckCOSSTDerivedOK
### Regressions
- SAX2: Ignore namespaces in HTML documents
- io: Fix "buffer full" error with certain buffer sizes
v2.10.3: Oct 14 2022
### Security
- [CVE-2022-40304] Fix dict corruption caused by entity reference cycles
- [CVE-2022-40303] Fix integer overflows with XML_PARSE_HUGE
- Fix overflow check in SAX2.c
### Portability
- win32: Fix build with VS2013
### Build system
- cmake: Set SOVERSION
v2.10.2: Aug 29 2022
### Improvements
- Remove set-but-unused variable in xmlXPathScanName
- Silence -Warray-bounds warning
### Build system
- build: require automake-1.16.3 or later (Xi Ruoyao)
- Remove generated files from distribution
### Test suite
- Don't create missing.xml when running testapi
v2.10.1: Aug 25 2022
### Regressions
- Fix xmlCtxtReadDoc with encoding
### Bug fixes
- Fix HTML parser with threads and --without-legacy
### Build system
- Fix build with Python 3.10
- cmake: Disable version script on macOS
- Remove Makefile rule to build testapi.c
### Documentation
- Switch back to HTML output for API documentation
- Port doc/examples/index.py to Python 3
- Fix order of exports in libxml2-api.xml
- Remove libxml2-refs.xml
v2.10.0: Aug 17 2022
### Breaking changes
The Docbook parser module and all related symbols habe been removed completely.
This was experimental code which never worked and generated a deprecation
warning for 15+ years. The library's soname wasn't changed in order to allow
seamless upgrades to later versions. If this concerns you, consider bumping
soname yourself.
Some other modules are now disabled by default and will eventually be removed
completely:
- Support for XPointer locations (ranges and points): This was based on
a W3C specification which never got beyond Working Draft status. To my
knowledge, there's no software supporting this spec which is still
maintained. You now have to enable this code by passing the
`--with-xptr-locs` configuration option. Be warned that this part of
the code base is buggy and had many security issues in the past.
- Support for the built-in FTP client (`--with-ftp`).
- Support for "legacy" functions (`--with-legacy`).
If you're concerned about ABI stability and haven't disabled these modules
already, add the following configuration options or bump soname yourself:
--with-ftp
--with-legacy
--with-xptr-locs
Several functions of the public API were deprecated. Most of them should be
completely unused and will generate a deprecation warning now.
The autoconf build now uses the sysconfdir variable for the location of
the default catalog file. The path changed from hardcoded /etc/xml/catalog
to ${sysconfdir}/xml/catalog. The sysconfdir variable defaults to
${prefix}/etc, prefix defaults to /usr/local, so without other options
the path becomes /usr/local/etc/xml/catalog. If you want the old behavior,
configure with
--sysconfdir=/etc
### Security
- [CVE-2022-2309] Reset nsNr in xmlCtxtReset
- Reserve byte for NUL terminator and report errors consistently in xmlBuf and
xmlBuffer (David Kilzer)
- Fix missing NUL terminators in xmlBuf and xmlBuffer functions (David Kilzer)
- Fix integer overflow in xmlBufferDump() (David Kilzer)
- xmlBufAvail() should return length without including a byte for NUL
terminator (David Kilzer)
- Fix ownership of xmlNodePtr & xmlAttrPtr fields in xmlSetTreeDoc() (David
Kilzer)
- Use xmlNewDocText in xmlXIncludeCopyRange
- Fix use-after-free bugs when calling xmlTextReaderClose() before
xmlFreeTextReader() on post-validating parser (David Kilzer)
- Use UPDATE_COMPAT() consistently in buf.c (David Kilzer)
- fix: xmlXPathParserContext could be double-delete in OOM case. (jinsub ahn)
### Removals and deprecations
- Disable XPointer location support by default
- Remove outdated xml2Conf.sh
- Deprecate module init and cleanup functions
- Remove obsolete XML Software Autoupdate (XSA) file
- Remove DOCBparser
- Remove obsolete Python test framework
- Remove broken VxWorks support
- Remove broken Mac OS 9 support
- Remove broken bakefile support
- Remove broken Visual Studio 2010 support
- Remove broken Windows CE support
- Deprecate IDREF-related functions in valid.h
- Deprecate legacy functions
- Disable legacy support by default
- Deprecate all functions in nanoftp.h
- Disable FTP support by default
- Add XML_DEPRECATED macro
- Remove elfgcchack.h
### Regressions
- Skip incorrectly opened HTML comments
- Restore behavior of htmlDocContentDumpFormatOutput() (David Kilzer)
### Bug fixes
- Fix memory leak with invalid XSD
- Make XPath depth check work with recursive invocations
- Fix memory leak in xmlLoadEntityContent error path
- Avoid double-free if malloc fails in inputPush
- Properly fold whitespace around the QName value when validating an XSD
schema. (Damjan Jovanovic)
- Add whitespace folding for some atomic data types that it's missing on.
(Damjan Jovanovic)
- Don't add IDs containing unexpanded entity references
### Improvements
- Avoid calling xmlSetTreeDoc
- Simplify xmlFreeNode
- Don't reset nsDef when changing node content
- Fix unintended fall-through in xmlNodeAddContentLen
- Remove unused xmlBuf functions (David Kilzer)
- Implement xpath1() XPointer scheme
- Add configuration flag for XPointer locations support
- Fix compiler warnings in Python code
- Mark more static data as `const` (David Kilzer)
- Make xmlStaticCopyNode non-recursive
- Clean up encoding switching code
- Simplify recursive pthread mutex
- Use non-recursive mutex in dict.c
- Fix parser progress checks
- Avoid arithmetic on freed pointers
- Improve buffer allocation scheme
- Remove unneeded #includes
- Add support for some non-standard escapes in regular expressions. (Damjan
Jovanovic)
- htmlParseComment: handle abruptly-closed comments (Mike Dalessio)
- Add let variable tag support (Oliver Diehl)
- Add value-of tag support (Oliver Diehl)
- Remove useless call to xmlRelaxNGCleanupTypes
- Don't include ICU headers in public headers
- Update `xmlStrlen()` to use POSIX / ISO C `strlen()` (Mike Dalessio)
- Fix unused variable warnings with disabled features
- Only warn on invalid redeclarations of predefined entities
- Remove unneeded code in xmlreader.c
- Rework validation context flags
### Portability
- Use NAN/INFINITY if available to init XPath NaN/Inf (Sergey Kosukhin)
- Fix Python tests on macOS
- Fix xmlCleanupThreads on Windows
- Fix reinitialization of library on Windows
- Don't mix declarations and code in runtest.c
- Use portable python shebangs (David Seifert)
- Use critical sections as mutex on Windows
- Don't set HAVE_WIN32_THREADS in win32config.h
- Use stdint.h with newer MSVC
- Remove cruft from win32config.h
- Remove isinf/isnan emulation in win32config.h
- Always fopen files with "rb"
- Remove __DJGPP__ checks
- Remove useless __CYGWIN__ checks
### Build system
- Don't autogenerate doc/examples/Makefile.am
- cmake: Install libxml.m4 on UNIX-like platforms (Daniel E)
- cmake: Use symbol versioning on UNIX-like platforms (Daniel E)
- Port genUnicode.py to Python 3
- Port gentest.py to Python 3
- cmake: Fix build without thread support
- cmake: Install documentation in CMAKE_INSTALL_DOCDIR
- cmake: Remove non needed files in docs dir (Daniel E)
- configure: move XML_PRIVATE_LIBS after WIN32_EXTRA_LIBADD is set
(Christopher Degawa)
- Move local Autoconf macros into m4 directory
- Use XML_PRIVATE_LIBS in libxml2_la_LIBADD
- Update libxml-2.0-uninstalled.pc.in
- Remove LIBS from XML_PRIVATE_LIBS
- Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS
- Don't overlink executables
- cmake: Adjust paths for UNIX or UNIX-like target systems (Daniel Engberg)
- build: Make use of variables in libxml's pkg-config file (Daniel Engberg)
- Avoid obsolescent `test -a` constructs (David Seifert)
- Move AM_MAINTAINER_MODE to AM section
- configure.ac: make AM_SILENT_RULES([yes]) unconditional (David Seifert)
- Streamline documentation installation
- Don't try to recreate COPYING symlink
- Detect libm using libtool's macros (David Seifert)
- configure.ac: disable static libraries by default (David Seifert)
- python/Makefile.am: nest python docs in $(docdir) (David Seifert)
- python/Makefile.am: rely on global AM_INIT_AUTOMAKE (David Seifert)
- Makefile.am: install examples more idiomatically (David Seifert)
- configure.ac: remove useless AC_SUBST (David Seifert)
- Respect `--sysconfdir` in source files (David Seifert)
- Ignore configure backup file created by recent autoreconf too (Vadim Zeitlin)
- Only install *.html and *.c example files
- Remove --with-html-dir option
- Rework documentation build system
- Remove old website
- Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings (David Seifert)
- Update genChRanges.py
- Update build_glob.py
- Remove ICONV_CONST test
- Remove obsolete AC_HEADER checks
- Don't check for standard C89 library functions
- Don't check for standard C89 headers
- Remove special configuration for certain maintainers
### Test suite, CI
- Disable network in API tests
- testapi: remove leading slash from "/missing.xml" (Mike Gilbert)
- Build Autotools CI tests out of source tree (VPATH)
- Add --with-minimum build to CI tests
- Fix warnings when testing --with-minimum build
- cmake: Run all tests when threads are disabled
- Also build CI tests with -Werror
- Move doc/examples tests to new test suite
- Simplify 'make check' targets
- Fix schemas and relaxng tests
- Remove unused result files
- Allow missing result files in runtest
- Move regexp tests to runtest
- Move SVG tests to runtest.c
- Move testModule to new test suite
- Move testThreads to new test suite
- Remove major parts of old test suite
- Make testchar return an error on failure (Tony Tascioglu)
- Add CI job for static build
- python/tests: open() relative to test scripts (David Seifert)
- Port some test scripts to Python 3
### Documentation
- Improve documentation of tree manipulation API
- Update xml2-config man page
- Consolidate man pages
- Rename xmlcatalog_man.xml
- Make examples a standalone HTML page
- Fix documentation in entities.c
- Add note about optimization flags
v2.9.14: May 02 2022:
- Security:
[CVE-2022-29824] Integer overflow in xmlBuf and xmlBuffer
Fix potential double-free in xmlXPtrStringRangeFunction
Fix memory leak in xmlFindCharEncodingHandler
Normalize XPath strings in-place
Prevent integer-overflow in htmlSkipBlankChars() and xmlSkipBlankChars()
(David Kilzer)
Fix leak of xmlElementContent (David Kilzer)
- Bug fixes:
Fix parsing of subtracted regex character classes
Fix recursion check in xinclude.c
Reset last error in xmlCleanupGlobals
Fix certain combinations of regex range quantifiers
Fix range quantifier on subregex
- Improvements:
Fix recovery from invalid HTML start tags
- Build system, portability:
Define LFS macros before including system headers
Initialize XPath floating-point globals
configure: check for icu DEFS (James Hilliard)
configure.ac: produce tar.xz only (GNOME policy) (David Seifert)
CMakeLists.txt: Fix LIBXML_VERSION_NUMBER
Fix build with older Python versions
Fix --without-valid build
v2.9.13: Feb 19 2022:
- Security:
[CVE-2022-23308] Use-after-free of ID and IDREF attributes
(Thanks to Shinji Sato for the report)
Use-after-free in xmlXIncludeCopyRange (David Kilzer)
Fix Null-deref-in-xmlSchemaGetComponentTargetNs (huangduirong)
Fix memory leak in xmlXPathCompNodeTest
Fix null pointer deref in xmlStringGetNodeList
Fix several memory leaks found by Coverity (David King)
- Fixed regressions:
Fix regression in RelaxNG pattern matching
Properly handle nested documents in xmlFreeNode
Fix regression with PEs in external DTD
Fix random dropping of characters on dumping ASCII encoded XML (Mohammad Razavi)
Revert "Make schema validation fail with multiple top-level elements"
Fix regression when parsing invalid HTML tags in push mode
Fix regression parsing public IDs literals in HTML
Fix buffering in xmlOutputBufferWrite
Fix whitespace when serializing empty HTML documents
Fix XPath recursion limit
Fix regression in xmlNodeDumpOutputInternal
Work around lxml API abuse
- Bug fixes:
Fix xmlSetTreeDoc with entity references
Fix double counting of CRLF in comments
Make sure to grow input buffer in xmlParseMisc
Don't ignore xmllint options after "-"
Don't normalize namespace URIs in XPointer xmlns() scheme
Fix handling of XSD with empty namespace
Also register HTML document nodes
Make xmllint return an error if arguments are missing
Fix handling of ctxt->base in xmlXPtrEvalXPtrPart
Fix xmllint --maxmem
Fix htmlReadFd, which was using a mix of xml and html context functions (Finn Barber)
Move current position before possible calling of ctxt->sax->characters (Yulin Li)
Fix parse failure when 4-byte character in UTF-16 BE is split across a chunk (David Kilzer)
Patch to forbid epsilon-reduction of final states (Arne Becker)
Avoid segfault at exit when using custom memory functions (Mike Dalessio)
- Tests, code quality, fuzzing:
Remove .travis.yml
Make xmlFuzzReadString return a zero size in error case
Fix unused function warning in testapi.c
Update NewsML DTD in test suite
Add more checks for malloc failures in xmllint.c
Avoid potential integer overflow in xmlstring.c
Run CI tests with UBSan implicit-conversion checks
Fix casting of line numbers in SAX2.c
Fix integer conversion warnings in hash.c
Add explicit casts in runtest.c
Fix integer conversion warning in xmlIconvWrapper
Add suffix to unsigned constant in xmlmemory.c
Add explicit casts in testchar.c
Fix integer conversion warnings in xmlstring.c
Add explicit cast in xmlURIUnescapeString
Remove unused variable in xmlCharEncOutFunc (David King)
- Build system, portability:
Remove xmlwin32version.h
Fix fuzzer test with VPATH build
Support custom prefix when installing Python module
Remove Makefile.win
Remove CVS and SVN-related code
Port python 3.x module to Windows and improve distutils (Chun-wei Fan)
Correctly install the HTML examples into their subdirectory (Mattia Rizzolo)
Refactor the settings of $docdir (Mattia Rizzolo)
Remove unused configure checks (Ben Boeckel)
python/Makefile.am: use *_LIBADD, not *_LDFLAGS for LIBS (Sam James)
Fix check for libtool in autogen.sh
Use version in configure.ac for CMake (Timothy Lyanguzov)
Add CMake alias targets for embedded projects (Markus Rickert)
- Documentation:
Remove SVN keyword anchors
Rework README
Remove README.cvs-commits
Remove old ChangeLog
Update hyperlinks
Remove README.docs
Remove MAINTAINERS
Remove xmltutorial.pdf
Upload documentation to GitLab pages
Document how to escape XML_CATALOG_FILES
Fix libxml2.doap
Update URL for libxml++ C++ binding (Kjell Ahlstedt)
Generate devhelp2 index file (Emmanuele Bassi)
Mention XML_CATALOG_FILES is space-separated (Jan Tojnar)
Add documentaiton for xmllint exit code 10 (Rainer Canavan)
Fix some validation errors in the FAQ (David King)
Add instructions on how to use CMake to compile libxml (Markus Rickert)
v2.9.12: May 13 2021:
- Build system:
Add fuzz.h and seed/regexp to EXTRA_DIST
v2.9.11: May 13 2021:
- Security:
Patch for security issue CVE-2021-3541 (Daniel Veillard)
- Documentation:
Clarify xmlNewDocProp documentation (Nick Wellnhofer)
- Portability:
CMake: Only add postfixes if MSVC (Christopher Degawa),
Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer),
Use CMake PROJECT_VERSION (Markus Rickert),
Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson),
Add CI for CMake on MSVC (Markus Rickert),
Update minimum required CMake version (Markus Rickert),
Add variables for configured options to CMake config files (Markus Rickert),
Check if variables exist when defining targets (Markus Rickert),
Check if target exists when reading target properties (Markus Rickert),
Add xmlcatalog target and definition to config files (Markus Rickert),
Remove include directories for link-only dependencies (Markus Rickert),
Fix ICU build in CMake (Markus Rickert),
Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus Rickert),
Update CMake config files (Markus Rickert),
Add xmlcatalog and xmllint to CMake export (Markus Rickert),
Simplify xmlexports.h (Nick Wellnhofer),
Require dependencies based on enabled CMake options (Markus Rickert),
Use NAMELINK_COMPONENT in CMake install (Markus Rickert),
Add CMake files to EXTRA_DIST (Markus Rickert),
Add missing compile definition for static builds to CMake (Markus Rickert),
Add CI for CMake on Linux and MinGW (Markus Rickert),
Fix variable name in win32/configure.js (Nick Wellnhofer),
Fix version parsing in win32/configure.js (Nick Wellnhofer),
Fix autotools warnings (Nick Wellnhofer),
Update config.h.cmake.in (Markus Rickert),
win32: allow passing *FLAGS on command line (Michael Stahl),
Configure file xmlwin32version.h.in on MSVC (Markus Rickert),
List headers individually (Markus Rickert),
Add CMake build files (Markus Rickert),
Parenthesize Py<type>_Check() in ifs (Miro Hrončok),
Minor fixes to configure.js (Nick Wellnhofer)
- Bug Fixes:
Fix null deref in legacy SAX1 parser (Nick Wellnhofer),
Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer),
Fix line numbers in error messages for mismatched tags (Nick Wellnhofer),
Fix htmlTagLookup (Nick Wellnhofer),
Propagate error in xmlParseElementChildrenContentDeclPriv (Nick Wellnhofer),
Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick Wellnhofer),
Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer),
Validate UTF8 in xmlEncodeEntities (Joel Hockey),
Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer),
Allow FP division by zero in xmlXPathInit (Nick Wellnhofer),
Fix xmlGetNodePath with invalid node types (Nick Wellnhofer),
Fix exponential behavior with recursive entities (Nick Wellnhofer),
Fix quadratic behavior when looking up xml:* attributes (Nick Wellnhofer),
Fix slow parsing of HTML with encoding errors (Nick Wellnhofer),
Fix null deref introduced with previous commit (Nick Wellnhofer),
Check for invalid redeclarations of predefined entities (Nick Wellnhofer),
Add the copy of type from original xmlDoc in xmlCopyDoc() (SVGAnimate),
parser.c: shrink the input buffer when appropriate (Mike Dalessio),
Fix infinite loop in HTML parser introduced with recent commits (Nick Wellnhofer),
Fix quadratic runtime when parsing CDATA sections (Nick Wellnhofer),
Fix timeout when handling recursive entities (Nick Wellnhofer),
Fix memory leak in xmlParseElementMixedContentDecl (Nick Wellnhofer),
Fix null deref in xmlStringGetNodeList (Nick Wellnhofer),
use new htmlParseLookupCommentEnd to find comment ends (Mike Dalessio),
htmlParseComment: treat `--!>` as if it closed the comment (Mike Dalessio),
Fix integer overflow in xmlSchemaGetParticleTotalRangeMin (Nick Wellnhofer),
encoding: fix memleak in xmlRegisterCharEncodingHandler() (Xiaoming Ni),
xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add, check "facet->val" (Xiaoming Ni),
Fix null pointer deref in xmlXPtrRangeInsideFunction (Nick Wellnhofer),
Fix quadratic runtime in HTML push parser with null bytes (Nick Wellnhofer),
Avoid quadratic checking of identity-constraints (Michael Matz),
Fix building with ICU 68. (Frederik Seiffert),
Convert python/libxml.c to PY_SSIZE_T_CLEAN (Victor Stinner),
Fix xmlURIEscape memory leaks. (Elliott Hughes),
Avoid call stack overflow with XML reader and recursive XIncludes (Nick Wellnhofer),
Fix caret in regexp character group (Nick Wellnhofer),
parser.c: xmlParseCharData peek behavior fixed wrt newlines (Mike Dalessio),
Fix memory leaks in XPointer string-range function (Nick Wellnhofer),
Fix use-after-free when XIncluding text from Reader (Nick Wellnhofer),
Fix SEGV in xmlSAXParseFileWithData (yanjinjq),
Fix null deref in XPointer expression error path (Nick Wellnhofer),
Don't call xmlXPathInit directly (Nick Wellnhofer),
Fix cleanup of attributes in XML reader (Nick Wellnhofer),
Fix double free in XML reader with XIncludes (Nick Wellnhofer),
Fix memory leak in xmlXIncludeAddNode error paths (Nick Wellnhofer),
Revert "Fix quadratic runtime in xi:fallback processing" (Nick Wellnhofer),
Fix error reporting with xi:fallback (Nick Wellnhofer),
Fix quadratic runtime in xi:fallback processing (Nick Wellnhofer),
Fix corner case with empty xi:fallback (Nick Wellnhofer),
Fix XInclude regression introduced with recent commit (Nick Wellnhofer),
Fix memory leak in runtest.c (Nick Wellnhofer),
Make "xmllint --push --recovery" work (Nick Wellnhofer),
Revert "Do not URI escape in server side includes" (Nick Wellnhofer),
Fix column number accounting in xmlParse*NameAndCompare (Nick Wellnhofer),
Stop counting nbChars in parser context (Nick Wellnhofer),
Fix out-of-bounds read with 'xmllint --htmlout' (Nick Wellnhofer),
Fix exponential runtime and memory in xi:fallback processing (Nick Wellnhofer),
Don't process siblings of root in xmlXIncludeProcess (Nick Wellnhofer),
Don't recurse into xi:include children in xmlXIncludeDoProcess (Nick Wellnhofer),
Fix memory leak in xmlXIncludeIncludeNode error paths (Nick Wellnhofer),
Check for custom free function in global destructor (Nick Wellnhofer),
Fix integer overflow when comparing schema dates (Nick Wellnhofer),
Fix exponential runtime in xmlFARecurseDeterminism (Nick Wellnhofer),
Don't try to handle namespaces when building HTML documents (Nick Wellnhofer),
Fix several quadratic runtime issues in HTML push parser (Nick Wellnhofer),
Fix quadratic runtime when push parsing HTML start tags (Nick Wellnhofer),
Reset XML parser input before reporting errors (David Kilzer),
Fix quadratic runtime when push parsing HTML entity refs (Nick Wellnhofer),
Fix HTML push parser lookahead (Nick Wellnhofer),
Make htmlCurrentChar always translate U+0000 (Nick Wellnhofer),
Fix UTF-8 decoder in HTML parser (Nick Wellnhofer),
Fix quadratic runtime when parsing HTML script content (Nick Wellnhofer),
Reset HTML parser input before reporting error (Nick Wellnhofer),
Fix more quadratic runtime issues in HTML push parser (Nick Wellnhofer),
Fix regression introduced with 477c7f6a (Nick Wellnhofer),
Fix quadratic runtime in HTML parser (Nick Wellnhofer),
Reset HTML parser input before reporting encoding error (Nick Wellnhofer),
Fix integer overflow in xmlFAParseQuantExact (Nick Wellnhofer),
Fix return value of xmlC14NDocDumpMemory (Nick Wellnhofer),
Don't follow next pointer on documents in xmlXPathRunStreamEval (Nick Wellnhofer),
Fix integer overflow in _xmlSchemaParseGYear (Nick Wellnhofer),
Fix integer overflow when parsing {min,max}Occurs (Nick Wellnhofer),
Fix another memory leak in xmlSchemaValAtomicType (Nick Wellnhofer),
Fix unsigned integer overflow in htmlParseTryOrFinish (Nick Wellnhofer),
Fix integer overflow in htmlParseCharRef (Nick Wellnhofer),
Fix undefined behavior in UTF16LEToUTF8 (Nick Wellnhofer),
Fix return value of xmlCharEncOutput (Nick Wellnhofer),
Never expand parameter entities in text declaration (Nick Wellnhofer),
Fix undefined behavior in xmlXPathTryStreamCompile (Nick Wellnhofer),
Fix use-after-free with validating reader (Nick Wellnhofer),
xmlParseBalancedChunkMemory must not be called with NULL doc (Nick Wellnhofer),
Revert "Fix memory leak in xmlParseBalancedChunkMemoryRecover" (Nick Wellnhofer),
Fix memory leak in xmlXIncludeLoadDoc error path (Nick Wellnhofer),
Make schema validation fail with multiple top-level elements (Nick Wellnhofer),
Call xmlCleanupParser on ELF destruction (Samuel Thibault),
Fix copying of entities in xmlParseReference (Nick Wellnhofer),
Fix memory leak in xmlSchemaValidateStream (Zhipeng Xie),
Fix xmlSchemaGetCanonValue formatting for date and dateTime (Kevin Puetz),
Fix memory leak when shared libxml.dll is unloaded (Kevin Puetz),
Fix potentially-uninitialized critical section in Win32 DLL builds (Kevin Puetz),
Fix integer overflow in xmlBufferResize (Nick Wellnhofer),
Check for overflow when allocating two-dimensional arrays (Nick Wellnhofer),
Remove useless comparisons (Nick Wellnhofer),
Fix overflow check in xmlNodeDump (Nick Wellnhofer),
Fix infinite loop in xmlStringLenDecodeEntities (Zhipeng Xie),
Fix freeing of nested documents (Nick Wellnhofer),
Fix more memory leaks in error paths of XPath parser (Nick Wellnhofer),
Fix memory leaks of encoding handlers in xmlsave.c (Nick Wellnhofer),
Fix xml2-config error code (Nick Wellnhofer),
Fix memory leak in error path of XPath expr parser (Nick Wellnhofer),
Fix overflow handling in xmlBufBackToBuffer (Nick Wellnhofer),
Null pointer handling in catalog.c (raniervf),
xml2-config.in: fix regressions introduced by commit 2f2bf4b2c (Dmitry V. Levin)
- Improvements:
Store per-element parser state in a struct (Nick Wellnhofer),
update for xsd:language type check (PaulHiggs),
Update INSTALL.libxml2 (Nick Wellnhofer),
Fix include order in c14n.h (Nick Wellnhofer),
Fix duplicate xmlStrEqual calls in htmlParseEndTag (Nick Wellnhofer),
Speed up htmlCheckAutoClose (Nick Wellnhofer),
Speed up htmlTagLookup (Nick Wellnhofer),
Stop checking attributes for UTF-8 validity (Nick Wellnhofer),
Reduce some fuzzer timeouts (Nick Wellnhofer),
Only run a few CI tests unless scheduled (Nick Wellnhofer),
Improve fuzzer stability (Nick Wellnhofer),
Check for feature flags in fuzzer tests (Nick Wellnhofer),
Another attempt at improving fuzzer stability (Nick Wellnhofer),
Revert "Improve HTML fuzzer stability" (Nick Wellnhofer),
Add charset names to fuzzing dictionaries (Nick Wellnhofer),
Improve HTML fuzzer stability (Nick Wellnhofer),
Add CI for MSVC x86 (Markus Rickert),
Add a flag to not output anything when xmllint succeeded (hhb),
Speed up HTML fuzzer (Nick Wellnhofer),
Remove unused encoding parameter of HTML output functions (Nick Wellnhofer),
Handle malloc failures in fuzzing code (Nick Wellnhofer),
add test coverage for incorrectly-closed comments (Mike Dalessio),
Enforce maximum length of fuzz input (Nick Wellnhofer),
Remove temporary members from struct _xmlXPathContext (Nick Wellnhofer),
Build the Python extension with PY_SSIZE_T_CLEAN (Victor Stinner),
Add CI test for Python 3 (Nick Wellnhofer),
Add fuzzing dictionaries to EXTRA_DIST (Nick Wellnhofer),
Add 'fuzz' subdirectory to DIST_SUBDIRS (Nick Wellnhofer),
Allow port numbers up to INT_MAX (Nick Wellnhofer),
Handle dumps of corrupted documents more gracefully (Nick Wellnhofer),
Limit size of free lists in XML reader when fuzzing (Nick Wellnhofer),
Hardcode maximum XPath recursion depth (Nick Wellnhofer),
Pass URL of main entity in XML fuzzer (Nick Wellnhofer),
Consolidate seed corpus generation (Nick Wellnhofer),
Test fuzz targets with dummy driver (Nick Wellnhofer),
Fix regression introduced with commit d88df4b (Nick Wellnhofer),
Fix regression introduced with commit 74dcc10b (Nick Wellnhofer),
Add TODO comment in xinclude.c (Nick Wellnhofer),
Stop using maxParserDepth in xpath.c (Nick Wellnhofer),
Remove dead code in xinclude.c (Nick Wellnhofer),
Don't add formatting newlines to XInclude nodes (Nick Wellnhofer),
Don't use SAX1 if all element handlers are NULL (Nick Wellnhofer),
Remove unneeded progress checks in HTML parser (Nick Wellnhofer),
Use strcmp when fuzzing (Nick Wellnhofer),
Fix XPath fuzzer (Nick Wellnhofer),
Fuzz XInclude engine (Nick Wellnhofer),
Add XPath and XPointer fuzzer (Nick Wellnhofer),
Update fuzzing code (Nick Wellnhofer),
More *NodeDumpOutput fixes (Nick Wellnhofer),
Fix *NodeDumpOutput functions (Nick Wellnhofer),
Make xmlNodeDumpOutputInternal non-recursive (Nick Wellnhofer),
Make xhtmlNodeDumpOutput non-recursive (Nick Wellnhofer),
Make htmlNodeDumpFormatOutput non-recursive (Nick Wellnhofer),
Fix .gitattributes (Nick Wellnhofer),
Rework control flow in htmlCurrentChar (Nick Wellnhofer),
Make 'xmllint --html --push -' read from stdin (Nick Wellnhofer),
Remove misleading comments in xpath.c (Nick Wellnhofer),
Update to Devhelp index file format version 2 (Andre Klapper),
Set project language to C (Markus Rickert),
Add variable for working directory of XML Conformance Test Suite (Markus Rickert),
Add additional tests and XML Conformance Test Suite (Markus Rickert),
Add command line option for temp directory in runtest (Markus Rickert),
Ensure LF line endings for test files (Markus Rickert),
Enable runtests and testThreads (Markus Rickert),
Limit regexp nesting depth (Nick Wellnhofer),
Fix return values and documentation in encoding.c (Nick Wellnhofer),
Add regexp regression tests (David Kilzer),
Report error for invalid regexp quantifiers (Nick Wellnhofer),
Fix rebuilding docs, by hiding __attribute__((...)) behind a macro. (Martin Vidner),
Copy xs:duration parser from libexslt (Nick Wellnhofer),
Fuzz target for XML Schemas (Nick Wellnhofer),
Move entity recorder to fuzz.c (Nick Wellnhofer),
Fuzz target for HTML parser (Nick Wellnhofer),
Update GitLab CI container (Nick Wellnhofer),
Add options file for xml fuzzer (Nick Wellnhofer),
Add a couple of libFuzzer targets (Nick Wellnhofer),
Guard new calls to xmlValidatePopElement in xml_reader.c (Daniel Cheng),
Add LIBXML_VALID_ENABLED to xmlreader (Łukasz Wojniłowicz),
Fix typos (Nick Wellnhofer),
Disable LeakSanitizer (Nick Wellnhofer),
Stop calling SAX getEntity handler from XMLReader (Nick Wellnhofer),
Add test case for recursive external parsed entities (Nick Wellnhofer),
Enable error tests with entity substitution (Nick Wellnhofer),
Don't load external entity from xmlSAX2GetEntity (Nick Wellnhofer),
Merge code paths loading external entities (Nick Wellnhofer),
Copy some XMLReader option flags to parser context (Nick Wellnhofer),
Add xmlPopOutputCallbacks (Nick Wellnhofer),
Updated Python test reader2.py (Pieter van Oostrum),
Updated python/tests/tstLastError.py (Pieter van Oostrum),
Use random seed in xmlDictComputeFastKey (Ranier Vilela),
Enable more undefined behavior sanitizers (Nick Wellnhofer)
v2.9.10: Oct 30 2019:
- Documentation:
Fix a few more typos ("fonction") (Nick Wellnhofer),
Large batch of typo fixes (Jared Yanovich),
Fix typos: tree: move{ -> s}, reconcil{i -> }ed, h{o -> e}ld by... (Jan Pokorný),
Fix typo: xpath: simpli{ -> fi}ed (Jan Pokorný),
Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump (Jan Pokorný),
Fix comments in test code (zhouzhongyuan),
fix comment in testReader.c (zhouzhongyuan)
- Portability:
Fix some release issues on Fedora 30 (Daniel Veillard),
Fix exponent digits when running tests under old MSVC (Daniel Richard G),
Work around buggy ceil() function on AIX (Daniel Richard G),
Don't call printf with NULL string in runtest.c (Daniel Richard G),
Switched from unsigned long to ptrdiff_t in parser.c (Stephen Chenney),
timsort.h: support older GCCs (Jérôme Duval),
Make configure.ac work with older pkg-config (Nick Wellnhofer),
Stop defining _REENTRANT on some Win32 platforms (Nick Wellnhofer),
Fix nanohttp.c on MinGW (Nick Wellnhofer),
Fix Windows compiler warning in testC14N.c (Nick Wellnhofer),
Merge testThreadsWin32.c into testThreads.c (Nick Wellnhofer),
Fix Python bindings under Windows (Nick Wellnhofer)
- Bug Fixes:
Another fix for conditional sections at end of document (Nick Wellnhofer),
Fix for conditional sections at end of document (Nick Wellnhofer),
Make sure that Python tests exit with error code (Nick Wellnhofer),
Audit memory error handling in xpath.c (Nick Wellnhofer),
Fix error code in xmlTextWriterStartDocument (Nick Wellnhofer),
Fix integer overflow when counting written bytes (Nick Wellnhofer),
Fix uninitialized memory access in HTML parser (Nick Wellnhofer),
Fix memory leak in xmlSchemaValAtomicType (Nick Wellnhofer),
Disallow conditional sections in internal subset (Nick Wellnhofer),
Fix use-after-free in xmlTextReaderFreeNodeList (Nick Wellnhofer),
Fix Regextests (Nick Wellnhofer),
Fix empty branch in regex (Nick Wellnhofer),
Fix integer overflow in entity recursion check (Nick Wellnhofer),
Don't read external entities or XIncludes from stdin (Nick Wellnhofer),
Fix Schema determinism check of ##other namespaces (Nick Wellnhofer),
Fix potential null deref in xmlSchemaIDCFillNodeTables (zhouzhongyuan),
Fix potential memory leak in xmlBufBackToBuffer (Nick Wellnhofer),
Fix error message when processing XIncludes with fallbacks (Nick Wellnhofer),
Fix memory leak in xmlRegEpxFromParse (zhouzhongyuan),
14:00 is a valid timezone for xs:dateTime (Nick Wellnhofer),
Fix memory leak in xmlParseBalancedChunkMemoryRecover (Zhipeng Xie),
Fix potential null deref in xmlRelaxNGParsePatterns (Nick Wellnhofer),
Misleading error message with xs:{min|max}Inclusive (bettermanzzy),
Fix memory leak in xmlXIncludeLoadTxt (Wang Kirin),
Partial fix for comparison of xs:durations (Nick Wellnhofer),
Fix null deref in xmlreader buffer (zhouzhongyuan),
Fix unability to RelaxNG-validate grammar with choice-based name class (Jan Pokorný),
Fix unability to validate ambiguously constructed interleave for RelaxNG (Jan Pokorný),
Fix possible null dereference in xmlXPathIdFunction (zhouzhongyuan),
fix memory leak in xmlAllocOutputBuffer (zhouzhongyuan),
Fix unsigned int overflow (Jens Eggerstedt),
dict.h: gcc 2.95 doesn't allow multiple storage classes (Nick Wellnhofer),
Fix another code path in xmlParseQName (Nick Wellnhofer),
Make sure that xmlParseQName returns NULL in error case (Nick Wellnhofer),
Fix build without reader but with pattern (Nick Wellnhofer),
Fix memory leak in xmlAllocOutputBufferInternal error path (Nick Wellnhofer),
Fix unsigned integer overflow (Nick Wellnhofer),
Fix return value of xmlOutputBufferWrite (Nick Wellnhofer),
Fix parser termination from "Double hyphen within comment" error (David Warring),
Fix call stack overflow in xmlFreePattern (Nick Wellnhofer),
Fix null deref in previous commit (Nick Wellnhofer),
Fix memory leaks in xmlXPathParseNameComplex error paths (Nick Wellnhofer),
Check for integer overflow in xmlXPtrEvalChildSeq (Nick Wellnhofer),
Fix xmllint dump of XPath namespace nodes (Nick Wellnhofer),
Fix float casts in xmlXPathSubstringFunction (Nick Wellnhofer),
Fix null deref in xmlregexp error path (Nick Wellnhofer),
Fix null pointer dereference in xmlTextReaderReadOuterXml (Nick Wellnhofer),
Fix memory leaks in xmlParseStartTag2 error paths (Nick Wellnhofer),
Fix memory leak in xmlSAX2StartElement (Nick Wellnhofer),
Fix commit "Memory leak in xmlFreeID (xmlreader.c)" (Nick Wellnhofer),
Fix NULL pointer deref in xmlTextReaderValidateEntity (Nick Wellnhofer),
Memory leak in xmlFreeTextReader (Nick Wellnhofer),
Memory leak in xmlFreeID (xmlreader.c) (Nick Wellnhofer)
- Improvements:
Run XML conformance tests under CI (Nick Wellnhofer),
Update GitLab CI config (Nick Wellnhofer),
Propagate memory errors in valuePush (Nick Wellnhofer),
Propagate memory errors in xmlXPathCompExprAdd (Nick Wellnhofer),
Make xmlFreeDocElementContent non-recursive (Nick Wellnhofer),
Enable continuous integration via GitLab CI (Nick Wellnhofer),
Avoid ignored attribute warnings under GCC (Nick Wellnhofer),
Make xmlDumpElementContent non-recursive (Nick Wellnhofer),
Make apibuild.py ignore ATTRIBUTE_NO_SANITIZE (Nick Wellnhofer),
Mark xmlExp* symbols as removed (Nick Wellnhofer),
Make xmlParseConditionalSections non-recursive (Nick Wellnhofer),
Adjust expected error in Python tests (Nick Wellnhofer),
Make xmlTextReaderFreeNodeList non-recursive (Nick Wellnhofer),
Make xmlFreeNodeList non-recursive (Nick Wellnhofer),
Make xmlParseContent and xmlParseElement non-recursive (Nick Wellnhofer),
Remove executable bit from non-executable files (Nick Wellnhofer),
Fix expected output of test/schemas/any4 (Nick Wellnhofer),
Optimize build instructions in README (zhouzhongyuan),
xml2-config.in: Output CFLAGS and LIBS on the same line (Hugh McMaster),
xml2-config: Add a --dynamic switch to print only shared libraries (Hugh McMaster),
Annotate functions with __attribute__((no_sanitize)) (Nick Wellnhofer),
Fix warnings when compiling without reader or push parser (Nick Wellnhofer),
Remove unused member `doc` in xmlSaveCtxt (Nick Wellnhofer),
Limit recursion depth in xmlXPathCompOpEvalPredicate (Nick Wellnhofer),
Remove -Wno-array-bounds (Nick Wellnhofer),
Remove unreachable code in xmlXPathCountFunction (Nick Wellnhofer),
Improve XPath predicate and filter evaluation (Nick Wellnhofer),
Limit recursion depth in xmlXPathOptimizeExpression (Nick Wellnhofer),
Disable hash randomization when fuzzing (Nick Wellnhofer),
Optional recursion limit when parsing XPath expressions (Nick Wellnhofer),
Optional recursion limit when evaluating XPath expressions (Nick Wellnhofer),
Use break statements in xmlXPathCompOpEval (Nick Wellnhofer),
Optional XPath operation limit (Nick Wellnhofer),
Fix compilation with --with-minimum (Nick Wellnhofer),
Check XPath stack after calling functions (Nick Wellnhofer),
Remove debug printf in xmlreader.c (Nick Wellnhofer),
Always define LIBXML_THREAD_ENABLED when enabled (Michael Haubenwallner),
Regenerate NEWS (Nick Wellnhofer),
Change git repo URL (Nick Wellnhofer),
Change bug tracker URL (Nick Wellnhofer),
Remove outdated HTML file (Nick Wellnhofer),
Fix unused function warning in testapi.c (Nick Wellnhofer),
Add some generated test files to .gitignore (Nick Wellnhofer),
Remove unneeded function pointer casts (Nick Wellnhofer),
Fix -Wcast-function-type warnings (GCC 8) (Nick Wellnhofer),
Fix -Wformat-truncation warnings (GCC 8) (Nick Wellnhofer)
- Cleanups:
Rebuild docs (Nick Wellnhofer),
Disable xmlExp regex code (Nick Wellnhofer),
Remove redundant code in xmlRelaxNGValidateState (Nick Wellnhofer),
Remove redundant code in xmlXPathCompRelationalExpr (Nick Wellnhofer)
v2.9.9: Jan 03 2019:
- Security:
CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression (Nick Wellnhofer),
CVE-2018-14404 Fix nullptr deref with XPath logic ops (Nick Wellnhofer),
- Documentation:
reader: Fix documentation comment (Mohammed Sadiq)
- Portability:
Fix MSVC build with lzma (Nick Wellnhofer),
Variables need 'extern' in static lib on Cygwin (Michael Haubenwallner),
Really declare dllexport/dllimport for Cygwin (Michael Haubenwallner),
Merge branch 'patch-2' into 'master' (Nick Wellnhofer),
Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 in $srcdir (Vitaly Buka),
Improve error message if pkg.m4 couldn't be found (Nick Wellnhofer),
NaN and Inf fixes for pre-C99 compilers (Nick Wellnhofer)
- Bug Fixes:
Revert "Support xmlTextReaderNextSibling w/o preparsed doc" (Nick Wellnhofer),
Fix building relative URIs (Thomas Holder),
Problem with data in interleave in RelaxNG validation (Nikolai Weibull),
Fix memory leak in xmlSwitchInputEncodingInt error path (Nick Wellnhofer),
Set doc on element obtained from freeElems (Nick Wellnhofer),
Fix HTML serialization with UTF-8 encoding (Nick Wellnhofer),
Use actual doc in xmlTextReaderRead*Xml (Nick Wellnhofer),
Unlink node before freeing it in xmlSAX2StartElement (Nick Wellnhofer),
Check return value of nodePush in xmlSAX2StartElement (Nick Wellnhofer),
Free input buffer in xmlHaltParser (Nick Wellnhofer),
Reset HTML parser input pointers on encoding failure (Nick Wellnhofer),
Don't run icu_parse_test if EUC-JP is unsupported (Nick Wellnhofer),
Fix xmlSchemaValidCtxtPtr reuse memory leak (Greg Hildstrom),
Fix xmlTextReaderNext with preparsed document (Felix Bünemann),
Remove stray character from comment (Nick Wellnhofer),
Remove a misleading line from xmlCharEncOutput (Andrey Bienkowski),
HTML noscript should not close p (Daniel Veillard),
Don't change context node in xmlXPathRoot (Nick Wellnhofer),
Stop using XPATH_OP_RESET (Nick Wellnhofer),
Revert "Change calls to xmlCharEncInput to set flush false" (Nick Wellnhofer)
- Improvements:
Fix "Problem with data in interleave in RelaxNG validation" (Nikolai Weibull),
cleanup: remove some unreachable code (Thomas Holder),
add --relative to testURI (Thomas Holder),
Remove redefined starts and defines inside include elements (Nikolai Weibull),
Allow choice within choice in nameClass in RELAX NG (Nikolai Weibull),
Look inside divs for starts and defines inside include (Nikolai Weibull),
Add compile and libxml2-config.cmake to .gitignore (Nikolai Weibull),
Stop using doc->charset outside parser code (Nick Wellnhofer),
Add newlines to 'xmllint --xpath' output (Nick Wellnhofer),
Don't include SAX.h from globals.h (Nick Wellnhofer),
Support xmlTextReaderNextSibling w/o preparsed doc (Felix Bünemann),
Don't instruct user to run make when autogen.sh failed (林博仁(Buo-ren Lin)),
Run Travis ASan tests with "sudo: required" (Nick Wellnhofer),
Improve restoring of context size and position (Nick Wellnhofer),
Simplify and harden nodeset filtering (Nick Wellnhofer),
Avoid unnecessary backups of the context node (Nick Wellnhofer),
Fix inconsistency in xmlXPathIsInf (Nick Wellnhofer)
- Cleanups:
v2.9.8: Mar 05 2018:
- Portability:
python: remove single use of _PyVerify_fd (Patrick Welche),
Build more test executables on Windows/MSVC (Nick Wellnhofer),
Stop including ansidecl.h (Nick Wellnhofer),
Fix libz and liblzma detection (Nick Wellnhofer),
Revert "Compile testapi with -Wno-unused-function" (Nick Wellnhofer)
- Bug Fixes:
Fix xmlParserEntityCheck (Nick Wellnhofer),
Halt parser in case of encoding error (Nick Wellnhofer),
Clear entity content in case of errors (Nick Wellnhofer),
Change calls to xmlCharEncInput to set flush false when not final call. Having flush incorrectly set to true causes errors for ICU. (Joel Hockey),
Fix buffer over-read in xmlParseNCNameComplex (Nick Wellnhofer),
Fix ICU library filenames on Windows/MSVC (Nick Wellnhofer),
Fix xmlXPathIsNaN broken by recent commit (Nick Wellnhofer),
Fix -Wenum-compare warnings (Nick Wellnhofer),
Fix callback signature in testapi.c (Nick Wellnhofer),
Fix unused parameter warning without ICU (Nick Wellnhofer),
Fix IO callback signatures (Nick Wellnhofer),
Fix misc callback signatures (Nick Wellnhofer),
Fix list callback signatures (Nick Wellnhofer),
Fix hash callback signatures (Nick Wellnhofer),
Refactor name and type signature for xmlNop (Vlad Tsyrklevich),
Fixed ICU to set flush correctly and provide pivot buffer. (Joel Hockey),
Skip EBCDIC tests if EBCDIC isn't supported (Nick Wellnhofer)
- Improvements:
Disable pointer-overflow UBSan checks under Travis (Nick Wellnhofer),
Improve handling of context input_id (Daniel Veillard),
Add resource file to Windows DLL (ccpaging),
Run Travis tests with -Werror (Nick Wellnhofer),
Build with "-Wall -Wextra" (Nick Wellnhofer),
Fix -Wtautological-pointer-compare warnings (Nick Wellnhofer),
Remove unused AC_CHECKs (Nick Wellnhofer),
Update information about contributing (Nick Wellnhofer),
Fix -Wmisleading-indentation warnings (Nick Wellnhofer),
Don't touch CFLAGS in configure.ac (Nick Wellnhofer),
Ignore function pointer cast warnings (Nick Wellnhofer),
Simplify XPath NaN, inf and -0 handling (Nick Wellnhofer),
Introduce xmlPosixStrdup and update xmlMemStrdup (Nick Wellnhofer),
Add test for ICU flush and pivot buffer (Nick Wellnhofer),
Compile testapi with -Wno-unused-function (Nick Wellnhofer)
2.9.7: Nov 02 2017:
- Documentation:
xmlcatalog: refresh man page wrt. querying system catalog easily (Jan Pokorný)
- Portability:
Fix deprecated Travis compiler flag (Nick Wellnhofer),
Add declaration for DllMain (J. Peter Mugaas),
Fix preprocessor conditional in threads.h (J. Peter Mugaas),
Fix pointer comparison warnings on 64-bit Windows (J. Peter Mugaas),
Fix macro redefinition warning (J. Peter Mugaas),
Default to native threads on MinGW-w64 (Nick Wellnhofer),
Simplify Windows IO functions (Nick Wellnhofer),
Fix runtest on Windows (Nick Wellnhofer),
socklen_t is always int on Windows (Nick Wellnhofer),
Don't redefine socket error codes on Windows (Nick Wellnhofer),
Fix pointer/int cast warnings on 64-bit Windows (Nick Wellnhofer),
Fix Windows compiler warnings in xmlCanonicPath (Nick Wellnhofer)
- Bug Fixes:
xmlcatalog: restore ability to query system catalog easily (Jan Pokorný),
Fix comparison of nodesets to strings (Nick Wellnhofer)
- Improvements:
Add Makefile rules to rebuild HTML man pages (Nick Wellnhofer),
Fix mixed decls and code in timsort.h (Nick Wellnhofer),
Rework handling of return values in thread tests (Nick Wellnhofer),
Fix unused variable warnings in testrecurse (Nick Wellnhofer),
Fix -Wimplicit-fallthrough warnings (J. Peter Mugaas),
Upgrade timsort.h to latest revision (Nick Wellnhofer),
Increase warning level to /W3 under MSVC (Nick Wellnhofer),
Fix a couple of warnings in dict.c and threads.c (Nick Wellnhofer),
Update .gitignore for Windows (Nick Wellnhofer),
Fix unused variable warnings in nanohttp.c (Nick Wellnhofer),
Fix the Windows header mess (Nick Wellnhofer),
Don't include winsock2.h in xmllint.c (Nick Wellnhofer),
Remove generated file python/setup.py from version control (Nick Wellnhofer),
Use __linux__ macro in generated code (Nick Wellnhofer)
v2.9.6: Oct 06 2017:
- Portability:
Change preprocessor OS tests to __linux__ (Nick Wellnhofer)
- Bug Fixes:
Fix XPath stack frame logic (Nick Wellnhofer),
Report undefined XPath variable error message (Nick Wellnhofer),
Fix regression with librsvg (Nick Wellnhofer),
Handle more invalid entity values in recovery mode (Nick Wellnhofer),
Fix structured validation errors (Nick Wellnhofer),
Fix memory leak in LZMA decompressor (Nick Wellnhofer),
Set memory limit for LZMA decompression (Nick Wellnhofer),
Handle illegal entity values in recovery mode (Nick Wellnhofer),
Fix debug dump of streaming XPath expressions (Nick Wellnhofer),
Fix memory leak in nanoftp (Nick Wellnhofer),
Fix memory leaks in SAX1 parser (Nick Wellnhofer)
v2.9.5: Sep 04 2017:
- Security:
Detect infinite recursion in parameter entities (Nick Wellnhofer),
Fix handling of parameter-entity references (Nick Wellnhofer),
Disallow namespace nodes in XPointer ranges (Nick Wellnhofer),
Fix XPointer paths beginning with range-to (Nick Wellnhofer)
- Documentation:
Documentation fixes (Nick Wellnhofer),
Spelling and grammar fixes (Nick Wellnhofer)
- Portability:
Adding README.zOS to list of extra files for the release (Daniel Veillard),
Description of work needed to compile on zOS (Stéphane Michaut),
Porting libxml2 on zOS encoding of code (Stéphane Michaut),
small changes for OS/400 (Patrick Monnerat),
relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers (Chun-wei Fan)
- Bug Fixes:
Problem resolving relative URIs (Daniel Veillard),
Fix unwanted warnings when switching encodings (Nick Wellnhofer),
Fix signature of xmlSchemaAugmentImportedIDC (Daniel Veillard),
Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup (David Kilzer),
Fix NULL pointer deref in xmlFAParseCharClassEsc (Nick Wellnhofer),
Fix infinite loops with push parser in recovery mode (Nick Wellnhofer),
Send xmllint usage error to stderr (Nick Wellnhofer),
Fix NULL deref in xmlParseExternalEntityPrivate (Nick Wellnhofer),
Make sure not to call IS_BLANK_CH when parsing the DTD (Nick Wellnhofer),
Fix xmlHaltParser (Nick Wellnhofer),
Fix pathological performance when outputting charrefs (Nick Wellnhofer),
Fix invalid-source-encoding warnings in testWriter.c (Nick Wellnhofer),
Fix duplicate SAX callbacks for entity content (David Kilzer),
Treat URIs with scheme as absolute in C14N (Nick Wellnhofer),
Fix copy-paste errors in error messages (Nick Wellnhofer),
Fix sanity check in htmlParseNameComplex (Nick Wellnhofer),
Fix potential infinite loop in xmlStringLenDecodeEntities (Nick Wellnhofer),
Reset parser input pointers on encoding failure (Nick Wellnhofer),
Fix memory leak in xmlParseEntityDecl error path (Nick Wellnhofer),
Fix xmlBuildRelativeURI for URIs starting with './' (Nick Wellnhofer),
Fix type confusion in xmlValidateOneNamespace (Nick Wellnhofer),
Fix memory leak in xmlStringLenGetNodeList (Nick Wellnhofer),
Fix NULL pointer deref in xmlDumpElementContent (Daniel Veillard),
Fix memory leak in xmlBufAttrSerializeTxtContent (Nick Wellnhofer),
Stop parser on unsupported encodings (Nick Wellnhofer),
Check for integer overflow in memory debug code (Nick Wellnhofer),
Fix buffer size checks in xmlSnprintfElementContent (Nick Wellnhofer),
Avoid reparsing in xmlParseStartTag2 (Nick Wellnhofer),
Fix undefined behavior in xmlRegExecPushStringInternal (Nick Wellnhofer),
Check XPath exponents for overflow (Nick Wellnhofer),
Check for overflow in xmlXPathIsPositionalPredicate (Nick Wellnhofer),
Fix spurious error message (Nick Wellnhofer),
Fix memory leak in xmlCanonicPath (Nick Wellnhofer),
Fix memory leak in xmlXPathCompareNodeSetValue (Nick Wellnhofer),
Fix memory leak in pattern error path (Nick Wellnhofer),
Fix memory leak in parser error path (Nick Wellnhofer),
Fix memory leaks in XPointer error paths (Nick Wellnhofer),
Fix memory leak in xmlXPathNodeSetMergeAndClear (Nick Wellnhofer),
Fix memory leak in XPath filter optimizations (Nick Wellnhofer),
Fix memory leaks in XPath error paths (Nick Wellnhofer),
Do not leak the new CData node if adding fails (David Tardon),
Prevent unwanted external entity reference (Neel Mehta),
Increase buffer space for port in HTTP redirect support (Daniel Veillard),
Fix more NULL pointer derefs in xpointer.c (Nick Wellnhofer),
Avoid function/data pointer conversion in xpath.c (Nick Wellnhofer),
Fix format string warnings (Nick Wellnhofer),
Disallow namespace nodes in XPointer points (Nick Wellnhofer),
Fix comparison with root node in xmlXPathCmpNodes (Nick Wellnhofer),
Fix attribute decoding during XML schema validation (Alex Henrie),
Fix NULL pointer deref in XPointer range-to (Nick Wellnhofer)
- Improvements:
Updating the spec file to reflect Fedora 24 (Daniel Veillard),
Add const in five places to move 1 KiB to .rdata (Bruce Dawson),
Fix missing part of comment for function xmlXPathEvalExpression() (Daniel Veillard),
Get rid of "blanks wrapper" for parameter entities (Nick Wellnhofer),
Simplify handling of parameter entity references (Nick Wellnhofer),
Deduplicate code in encoding.c (Nick Wellnhofer),
Make HTML parser functions take const pointers (Nick Wellnhofer),
Build test programs only when needed (Nick Wellnhofer),
Fix doc/examples/index.py (Nick Wellnhofer),
Fix compiler warnings in threads.c (Nick Wellnhofer),
Fix empty-body warning in nanohttp.c (Nick Wellnhofer),
Fix cast-align warnings (Nick Wellnhofer),
Fix unused-parameter warnings (Nick Wellnhofer),
Rework entity boundary checks (Nick Wellnhofer),
Don't switch encoding for internal parameter entities (Nick Wellnhofer),
Merge duplicate code paths handling PE references (Nick Wellnhofer),
Test SAX2 callbacks with entity substitution (Nick Wellnhofer),
Support catalog and threads tests under --without-sax1 (Nick Wellnhofer),
Misc fixes for 'make tests' (Nick Wellnhofer),
Initialize keepBlanks in HTML parser (Nick Wellnhofer),
Add test cases for bug 758518 (David Kilzer),
Fix compiler warning in htmlParseElementInternal (Nick Wellnhofer),
Remove useless check in xmlParseAttributeListDecl (Nick Wellnhofer),
Allow zero sized memory input buffers (Nick Wellnhofer),
Add TODO comment in xmlSwitchEncoding (Nick Wellnhofer),
Check for integer overflow in xmlXPathFormatNumber (Nick Wellnhofer),
Make Travis print UBSan stacktraces (Nick Wellnhofer),
Add .travis.yml (Nick Wellnhofer),
Fix expected error output in Python tests (Nick Wellnhofer),
Simplify control flow in xmlParseStartTag2 (Nick Wellnhofer),
Disable LeakSanitizer when running API tests (Nick Wellnhofer),
Avoid out-of-bound array access in API tests (Nick Wellnhofer),
Avoid spurious UBSan errors in parser.c (Nick Wellnhofer),
Parse small XPath numbers more accurately (Nick Wellnhofer),
Rework XPath rounding functions (Nick Wellnhofer),
Fix white space in test output (Nick Wellnhofer),
Fix axis traversal from attribute and namespace nodes (Nick Wellnhofer),
Check for trailing characters in XPath expressions earlier (Nick Wellnhofer),
Rework final handling of XPath results (Nick Wellnhofer),
Make xmlXPathEvalExpression call xmlXPathEval (Nick Wellnhofer),
Remove unused variables (Nick Wellnhofer),
Don't print generic error messages in XPath tests (Nick Wellnhofer)
- Cleanups:
Fix a couple of misleading indentation errors (Daniel Veillard),
Remove unnecessary calls to xmlPopInput (Nick Wellnhofer)
2.9.4: May 23 2016:
- Security:
More format string warnings with possible format string vulnerability (David Kilzer),
Avoid building recursive entities (Daniel Veillard),
Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde),
Heap-based buffer-underreads due to xmlParseName (David Kilzer),
Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde),
Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde),
Fix some format string warnings with possible format string vulnerability (David Kilzer),
Detect change of encoding when parsing HTML names (Hugh Davenport),
Fix inappropriate fetch of entities content (Daniel Veillard),
Bug 759398: Heap use-after-free in xmlDictComputeFastKey <https://bugzilla.gnome.org/show_bug.cgi?id=759398> (Pranjal Jumde),
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> (Pranjal Jumde),
Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal <https://bugzilla.gnome.org/show_bug.cgi?id=758588> (David Kilzer),
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> (Pranjal Jumde),
Add missing increments of recursion depth counter to XML parser. (Peter Simons)
- Documentation:
Fix typo: s{ ec -> cr }cipt (Jan Pokorný),
Fix typos: dictio{ nn -> n }ar{y,ies} (Jan Pokorný),
Fix typos: PATH_{ SEAPARATOR -> SEPARATOR } (Jan Pokorný),
Correct a typo. (Shlomi Fish)
- Portability:
Correct the usage of LDFLAGS (Mattias Hansson),
Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson),
libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger),
Fix apibuild for a recently added construct (Daniel Veillard),
Use pkg-config to locate zlib when possible (Stewart Brodie),
Use pkg-config to locate ICU when possible (Stewart Brodie),
Portability to non C99 compliant compilers (Patrick Monnerat),
dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. (Patrick Monnerat),
os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat),
os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat),
os400: implement CL command XMLCATALOG. (Patrick Monnerat),
os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat),
os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat),
os400: implement CL command XMLLINT. (Patrick Monnerat),
os400: compile and install program xmllint (qshell-only). (Patrick Monnerat),
os400: initscript make_module(): Use options instead of positional parameters. (Patrick Monnerat),
os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick Monnerat),
os400: use like() for double type. (Patrick Monnerat),
os400: use like() for int type. (Patrick Monnerat),
os400: use like() for unsigned int type. (Patrick Monnerat),
os400: use like() for enum types. (Patrick Monnerat),
Add xz to xml2-config --libs output (Baruch Siach),
Bug 760190: configure.ac should be able to build --with-icu without icu-config tool <https://bugzilla.gnome.org/show_bug.cgi?id=760190> (David Kilzer),
win32\VC10\config.h and VS 2015 (Bruce Dawson),
Add configure maintainer mode (orzen)
- Bug Fixes:
Avoid an out of bound access when serializing malformed strings (Daniel Veillard),
Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer),
Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer),
Bug 763071: heap-buffer-overflow in xmlStrncat <https://bugzilla.gnome.org/show_bug.cgi?id=763071> (Pranjal Jumde),
Integer overflow parsing port number in URI (Michael Paddon),
Fix an error with regexp on nullable counted char transition (Daniel Veillard),
Fix memory leak with XPath namespace nodes (Nick Wellnhofer),
Fix namespace axis traversal (Nick Wellnhofer),
Fix null pointer deref in docs with no root element (Hugh Davenport),
Fix XSD validation of URIs with ampersands (Alex Henrie),
xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of day" and should not cause an error. (Patrick Monnerat),
xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat),
xmllint: flush stdout before interactive shell input. (Patrick Monnerat),
Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer),
Fix namespace::node() XPath expression (Nick Wellnhofer),
Fix OOB write in xmlXPathEmptyNodeSet (Nick Wellnhofer),
Fix parsing of NCNames in XPath (Nick Wellnhofer),
Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer),
Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht),
Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" <https://bugzilla.gnome.org/show_bug.cgi?id=760921> (David Kilzer),
Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd <https://bugzilla.gnome.org/show_bug.cgi?id=760861> (David Kilzer),
error.c: *input->cur == 0 does not mean no error (Pavel Raiskup),
Add missing RNG test files (David Kilzer),
Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte character in large CDATA section is split across buffer <https://bugzilla.gnome.org/show_bug.cgi?id=760183> (David Kilzer),
Bug 758572: ASAN crash in make check <https://bugzilla.gnome.org/show_bug.cgi?id=758572> (David Kilzer),
Bug 721158: Missing ICU string when doing --version on xmllint <https://bugzilla.gnome.org/show_bug.cgi?id=721158> (David Kilzer),
python 3: libxml2.c wrappers create Unicode str already (Michael Stahl),
Add autogen.sh to distrib (orzen),
Heap-based buffer overread in xmlNextChar (Daniel Veillard)
- Improvements:
Add more debugging info to runtest (Daniel Veillard),
Implement "runtest -u" mode (David Kilzer),
Add a make rule to rebuild for ASAN (Daniel Veillard)
v2.9.3: Nov 20 2015:
- Security:
CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport),
CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard),
CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard),
CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard),
CVE-2015-5312 Another entity expansion issue (David Drysdale),
CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale),
CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard),
CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard),
CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard),
CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard),
CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard)
CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard),
CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard),
- Documentation:
Correct spelling of "calling" (Alex Henrie),
Fix a small error in xmllint --format description (Fabien Degomme),
Avoid XSS on the search of xmlsoft.org (Daniel Veillard)
- Portability:
threads: use forward declarations only for glibc (Michael Heimpold),
Update Win32 configure.js to search for configure.ac (Daniel Veillard)
- Bug Fixes:
Bug on creating new stream from entity (Daniel Veillard),
Fix some loop issues embedding NEXT (Daniel Veillard),
Do not print error context when there is none (Daniel Veillard),
Avoid extra processing of MarkupDecl when EOF (Hugh Davenport),
Fix parsing short unclosed comment uninitialized access (Daniel Veillard),
Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta),
Fix a bug in CData error handling in the push parser (Daniel Veillard),
Fix a bug on name parsing at the end of current input buffer (Daniel Veillard),
Fix the spurious ID already defined error (Daniel Veillard),
Fix previous change to node sort order (Nick Wellnhofer),
Fix a self assignment issue raised by clang (Scott Graham),
Fail parsing early on if encoding conversion failed (Daniel Veillard),
Do not process encoding values if the declaration if broken (Daniel Veillard),
Silence clang's -Wunknown-attribute (Michael Catanzaro),
xmlMemUsed is not thread-safe (Martin von Gagern),
Fix support for except in nameclasses (Daniel Veillard),
Fix order of root nodes (Nick Wellnhofer),
Allow attributes on descendant-or-self axis (Nick Wellnhofer),
Fix the fix to Windows locking (Steve Nairn),
Fix timsort invariant loop re: Envisage article (Christopher Swenson),
Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer),
Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer),
Remove various unused value assignments (Philip Withnall),
Fix missing entities after CVE-2014-3660 fix (Daniel Veillard),
Revert "Missing initialization for the catalog module" (Daniel Veillard)
- Improvements:
Reuse xmlHaltParser() where it makes sense (Daniel Veillard),
xmlStopParser reset errNo (Daniel Veillard),
Re-enable xz support by default (Daniel Veillard),
Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard),
Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance),
Regression test for bug #695699 (Nick Wellnhofer),
Add a couple of XPath tests (Nick Wellnhofer),
Add Python 3 rpm subpackage (Tomas Radej),
libxml2-config.cmake.in: update include directories (Samuel Martin),
Adding example from bugs 738805 to regression tests (Daniel Veillard)
- Cleanups:
2.9.2: Oct 16 2014:
- Security:
Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),
CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)
- Bug Fixes:
fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),
xmlmemory: handle realloc properly (Yegor Yefremov),
Python generator bug raised by the const change (Daniel Veillard),
Windows Critical sections not released correctly (Daniel Veillard),
Parser error on repeated recursive entity expansion containing < (Daniel Veillard),
xpointer : fixing Null Pointers (Gaurav Gupta),
Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),
parser bug on misformed namespace attributes (Dennis Filder),
Pointer dereferenced before null check (Daniel Veillard),
Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),
Possible overflow in HTMLParser.c (Daniel Veillard),
python/tests/sync.py assumes Python dictionaries are ordered (John Beck),
Fix Enum check and missing break (Gaurav Gupta),
xmlIO: Handle error returns from dup() (Philip Withnall),
Fix a problem properly saving URIs (Daniel Veillard),
wrong error column in structured error when parsing attribute values (Juergen Keil),
wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),
no error column in structured error handler for xml schema validation errors (Juergen Keil),
Couple of Missing Null checks (Gaurav Gupta),
Add couple of missing Null checks (Daniel Veillard),
xmlschemastypes: Fix potential array overflow (Philip Withnall),
runtest: Fix a memory leak on parse failure (Philip Withnall),
xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),
xmlcatalog: Fix a memory leak on quit (Philip Withnall),
HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),
Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),
Avoid Possible Null Pointer in trio.c (Gaurav Gupta),
Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),
XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),
Fix various Missing Null checks (Gaurav Gupta),
Fix a potential NULL dereference (Daniel Veillard),
Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),
Add a missing argument check (Gaurav Gupta),
Adding a check in case of allocation error (Gaurav Gupta),
xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),
Adding some missing NULL checks (Gaurav),
Fixes for xmlInitParserCtxt (Daniel Veillard),
Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),
erroneously ignores a validation error if no error callback set (Daniel Veillard),
xmllint was not parsing the --c14n11 flag (Sérgio Batista),
Avoid Possible null pointer dereference in memory debug mode (Gaurav),
Avoid Double Null Check (Gaurav),
Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),
Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),
Avoid a possible NULL pointer dereference (Gaurav),
Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),
Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),
fixing a ptotential uninitialized access (Daniel Veillard),
Fix an fd leak in an error case (Daniel Veillard),
Missing initialization for the catalog module (Daniel Veillard),
Handling of XPath function arguments in error case (Nick Wellnhofer),
Fix a couple of missing NULL checks (Gaurav),
Avoid a possibility of dangling encoding handler (Gaurav),
Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),
Fix a bug loading some compressed files (Mike Alexander),
Fix XPath node comparison bug (Gaurav),
Type mismatch in xmlschemas.c (Gaurav),
Type mismatch in xmlschemastypes.c (Gaurav),
Avoid a deadcode in catalog.c (Daniel Veillard),
run close socket on Solaris, same as we do on other platforms (Denis Pauk),
Fix pointer dereferenced before null check (Gaurav),
Fix a potential NULL dereference in tree code (Daniel Veillard),
Fix potential NULL pointer dereferences in regexp code (Gaurav),
xmllint --pretty crashed without following numeric argument (Tim Galeckas),
Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),
Fix XPath '//' optimization with predicates (Nick Wellnhofer),
Clear up a potential NULL dereference (Daniel Veillard),
Fix a possible NULL dereference (Gaurav),
Avoid crash if allocation fails (Daniel Veillard),
Remove occasional leading space in XPath number formatting (Daniel Veillard),
Fix handling of mmap errors (Daniel Veillard),
Catch malloc error and exit accordingly (Daniel Veillard),
missing else in xlink.c (Ami Fischman),
Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),
Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),
properly quote the namespace uris written out during c14n (Aleksey Sanin),
Remove premature XInclude check on URI being relative (Alexey Neyman),
Fix missing break on last() function for attributes (dcb),
Do not URI escape in server side includes (Romain Bondue),
Fix an error in xmlCleanupParser (Alexander Pastukhov)
- Documentation:
typo in error messages "colon are forbidden from..." (Daniel Veillard),
Fix a link to James SAX documentation old page (Daniel Veillard),
Fix typos in relaxng.c (Jan Pokorný),
Fix a doc typo (Daniel Veillard),
Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),
Add limitations about encoding conversion (Daniel Veillard),
Fix typos in xmlschemas{,types}.c (Jan Pokorný),
Fix incorrect spelling entites->entities (Jan Pokorný),
Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)
- Portability:
AC_CONFIG_FILES and executable bit (Roumen Petrov),
remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),
fix some tabs mixing incompatible with python3 (Roumen Petrov),
Visual Studio 14 CTP defines snprintf() (Francis Dupont),
OS400: do not try to copy unexisting doc files (Patrick Monnerat),
OS400: use either configure.ac or configure.in. (Patrick Monnerat),
os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),
OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),
OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),
OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),
OS400: include in distribution tarball. (Patrick Monnerat),
OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),
OS400: Add compilation scripts. (Patrick Monnerat),
OS400: ILE RPG language header files. (Patrick Monnerat),
OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),
OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat),
OS400: Easy character transcoding support (Patrick Monnerat),
OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),
OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),
Fix building when configuring without xpath and xptr (Daniel Veillard),
configure: Add --with-python-install-dir (Jonas Eriksson),
Fix compilation with minimum and xinclude. (Nicolas Le Cam),
Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),
Fix compilation with minimum and schematron. (Nicolas Le Cam),
Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),
Don't use xmlValidateName() when not available. (Nicolas Le Cam),
Fix a portability issue on Windows (Longstreth Jon),
Various portability patches for OpenVMS (Jacob (Jouk) Jansen),
Use specific macros for portability to OS/400 (Patrick Monnerat),
Add macros needed for OS/400 portability (Patrick Monnerat),
Portability patch for fopen on OS/400 (Patrick Monnerat),
Portability fixes for OS/400 (Patrick Monnerat),
Improve va_list portability (Patrick Monnerat),
Portability fix (Patrick Monnerat),
Portability fix (Patrick Monnerat),
Generic portability fix (Patrick Monnerat),
Shortening lines in headers (Patrick Monnerat),
build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),
build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),
fix some tabs mixing incompatible with python3 (Daniel Veillard),
add additional defines checks for support "./configure --with-minimum" (Denis Pauk),
Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),
python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),
python: Fix compiler warnings when building python3 bindings (Armin K),
Fix for compilation with python 2.6.8 (Petr Sumbera)
- Improvements:
win32/libxml2.def.src after rebuild in doc (Roumen Petrov),
elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),
elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),
Provide cmake module (Samuel Martin),
Fix a couple of issues raised by make dist (Daniel Veillard),
Fix and add const qualifiers (Kurt Roeckx),
Preparing for upcoming release of 2.9.2 (Daniel Veillard),
Fix zlib and lzma libraries check via command line (Dmitriy),
wrong error column in structured error when parsing end tag (Juergen Keil),
doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),
Add methods for python3 iterator (Ron Angeles),
Support element node traversal in document fragments. (Kyle VanderBeek),
xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),
Added macros for argument casts (Eric Zurcher),
adding init calls to xml and html Read parsing entry points (Daniel Veillard),
Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),
Implement choice for name classes on attributes (Shaun McCance),
Two small namespace tweaks (Daniel Veillard),
xmllint --memory should fail on empty files (Daniel Veillard),
Cast encoding name to char pointer to match arg type (Nikolay Sivov)
- Cleanups:
Removal of old configure.in (Daniel Veillard),
Unreachable code in tree.c (Gaurav Gupta),
Remove a couple of dead conditions (Gaurav Gupta),
Avoid some dead code and cleanup in relaxng.c (Gaurav),
Drop not needed checks (Denis Pauk),
Fix a wrong test (Daniel Veillard)
2.9.1: Apr 19 2013:
- Features:
Support for Python3 (Daniel Veillard),
Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)
- Documentation:
Add documentation for xmllint --xpath (Daniel Veillard),
Fix the URL of the SAX documentation from James (Daniel Veillard),
Fix spelling of "length". (Michael Wood)
- Portability:
Fix python bindings with versions older than 2.7 (Daniel Veillard),
rebuild docs:Makefile.am (Roumen Petrov),
elfgcchack.h after rebuild in doc (Roumen Petrov),
elfgcchack for buf module (Roumen Petrov),
Fix a uneeded and wrong extra link parameter (Daniel Veillard),
Few cleanup patches for Windows (Denis Pauk),
Fix rpmbuild --nocheck (Mark Salter),
Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),
Fix Broken multi-arch support in xml2-config (Daniel Veillard),
Fix a portability issue for GCC < 3.4.0 (Daniel Veillard),
Windows build fixes (Daniel Richard),
Fix a thread portability problem (Friedrich Haubensak),
Downgrade autoconf requirement to 2.63 (Daniel Veillard)
- Bug Fixes:
Fix a linking error for python bindings (Daniel Veillard),
Fix a couple of return without value (Jüri Aedla),
Improve the hashing functions (Daniel Franke),
Improve handling of xmlStopParser() (Daniel Veillard),
Remove risk of lockup in dictionary initialization (Daniel Veillard),
Activate detection of encoding in external subset (Daniel Veillard),
Fix an output buffer flushing conversion bug (Mikhail Titov),
Fix an old bug in xmlSchemaValidateOneElement (Csaba László),
Fix configure cannot remove messages (Gilles Espinasse),
fix schema validation in combination with xsi:nil (Daniel Veillard),
xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),
Fix a few problems with setEntityLoader (Alexey Neyman),
Detect excessive entities expansion upon replacement (Daniel Veillard),
Fix the flushing out of raw buffers on encoding conversions (Daniel,
Veillard),
Fix some buffer conversion issues (Daniel Veillard),
When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,
Veillard),
Fix an error in the progressive DTD parsing code (Dan Winship),
xmllint should not load DTD by default when using the reader (Daniel,
Veillard),
Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),
Fix potential out of bound access (Daniel Veillard),
Fix large parse of file from memory (Daniel Veillard),
Fix a bug in the nsclean option of the parser (Daniel Veillard),
Fix a regression in 2.9.0 breaking validation while streaming (Daniel,
Veillard),
Remove potential calls to exit() (Daniel Veillard)
- Improvements:
Regenerated API, and testapi, rebuild documentation (Daniel Veillard),
Fix tree iterators broken by 2to3 script (Daniel Veillard),
update all tests for Python3 and Python2 (Daniel Veillard),
A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),
Fix compilation on Python3 (Daniel Veillard),
Converting apibuild.py to python3 (Daniel Veillard),
First pass at starting porting to python3 (Daniel Veillard),
updated configure.in for python3 (Daniel Veillard),
Add support for xpathRegisterVariable in Python (Shaun McCance),
Added a regression tests from bug 694228 data (Daniel Veillard),
Cache presence of '<' in entities content (Daniel Veillard),
Avoid extra processing on entities (Daniel Veillard),
Python binding for xmlRegisterInputCallback (Alexey Neyman),
Python bindings: DOM casts everything to xmlNode (Alexey Neyman),
Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),
Adding streaming validation to runtest checks (Daniel Veillard),
Add a --pushsmall option to xmllint (Daniel Veillard)
- Cleanups:
Switched comment in file to UTF-8 encoding (Daniel Veillard),
Extend gitignore (Daniel Veillard),
Silent the new python test on input (Alexey Neyman),
Cleanup of a duplicate test (Daniel Veillard),
Cleanup on duplicate test expressions (Daniel Veillard),
Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,
Gansterer),
Spec cleanups and a fix for multiarch support (Daniel Veillard),
Silence a clang warning (Daniel Veillard),
Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),
rand_seed should be static in dict.c (Wouter Van Rooy),
Fix typos in parser comments (Jan Pokorný)
2.9.0: Sep 11 2012:
- Features:
A few new API entry points,
More resilient push parser mode,
A lot of portability improvement,
Faster XPath evaluation
- Documentation:
xml2-config.1 markup error (Christian Weisgerber),
libxml(3) manpage typo fix (John Bradshaw),
More cleanups to the documentation part of libxml2 (Daniel Richard G)
- Portability:
Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),
fix builds not having stdint.h (Rob Richards),
GetProcAddressA is available only on WinCE (Daniel Veillard),
More updates and cleanups on autotools and Makefiles (Daniel Richard G),
More changes for Win32 compilation (Eric Zurcher),
Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),
Bundles all generated files for python into the distribution (Daniel Richard G),
Fix compiler warnings of wincecompat.c (Patrick Gansterer),
Fix non __GNUC__ build (Patrick Gansterer),
Fix windows unicode build (Patrick Gansterer),
clean redefinition of {v}snprintf in C-source (Roumen Petrov),
use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),
fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),
Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),
Various "make distcheck" and portability fixups (Daniel Richard G),
Fix compilation on older Visual Studio (Daniel Veillard)
- Bug Fixes:
Change the XPath code to percolate allocation errors (Daniel Veillard),
Fix reuse of xmlInitParser (Daniel Veillard),
Fix potential crash on entities errors (Daniel Veillard),
initialize var (Rob Richards),
Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),
Fix problem with specific and generic error handlers (Pietro Cerutti),
Avoid a potential infinite recursion (Daniel Veillard),
Fix an XSD error when generating internal automata (Daniel Veillard),
Patch for xinclude of text using multibyte characters (Vitaly Ostanin),
Fix a segfault on XSD validation on pattern error (Daniel Veillard),
Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),
Add a missing element check (Daniel Veillard),
Adding various checks on node type though the API (Daniel Veillard),
Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),
Fix make dist to include new private header files (Daniel Veillard),
More fixups on the push parser behaviour (Daniel Veillard),
Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),
Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),
Fixup limits parser (Daniel Veillard),
Do not fetch external parsed entities (Daniel Veillard),
Fix an error in previous commit (Aron Xu),
Fix entities local buffers size problems (Daniel Veillard),
Fix parser local buffers size problems (Daniel Veillard),
Fix a failure to report xmlreader parsing failures (Daniel Veillard)
- Improvements:
Keep libxml2.syms when running "make distclean" (Daniel Veillard),
Allow to set the quoting character of an xmlWriter (Csaba Raduly),
Keep non-significant blanks node in HTML parser (Daniel Veillard),
Add a forbidden variable error number and message to XPath (Daniel Veillard),
Support long path names on WNT (Michael Stahl),
Improve HTML escaping of attribute on output (Daniel Veillard),
Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),
Switching XPath node sorting to Timsort (Vojtech Fried),
Optimizing '//' in XPath expressions (Nick Wellnhofer),
Expose xmlBufShrink in the public tree API (Daniel Veillard),
Visible HTML elements close the head tag (Conrad Irwin),
Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),
Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),
minimize use of HAVE_CONFIG_H (Roumen Petrov),
fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),
Add support for big line numbers in error reporting (Daniel Veillard),
Avoid using xmlBuffer for serialization (Daniel Veillard),
Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),
Provide new accessors for xmlOutputBuffer (Daniel Veillard),
Improvements for old buffer compatibility (Daniel Veillard),
Expand the limit test program (Daniel Veillard),
Improve error reporting on parser errors (Daniel Veillard),
Implement some default limits in the XPath module (Daniel Veillard),
Introduce some default parser limits (Daniel Veillard),
Cleanups and new limit APIs for dictionaries (Daniel Veillard),
Fixup for buf.c (Daniel Veillard),
Cleanup URI module memory allocation code (Daniel Veillard),
Extend testlimits (Daniel Veillard),
More avoid quadratic behaviour (Daniel Veillard),
Impose a reasonable limit on PI size (Daniel Veillard),
first version of testlimits new test (Daniel Veillard),
Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),
Impose a reasonable limit on comment size (Daniel Veillard),
Impose a reasonable limit on attribute size (Daniel Veillard),
Harden the buffer code and make it more compatible (Daniel Veillard),
More cleanups for input/buffers code (Daniel Veillard),
Cleanup function xmlBufResetInput(), to set input from Buffer (Daniel Veillard)
Switch the test program for characters to new input buffers (Daniel Veillard),
Convert the HTML tree module to the new buffers (Daniel Veillard),
Convert of the HTML parser to new input buffers (Daniel Veillard),
Convert the writer to new output buffer and save APIs (Daniel Veillard),
Convert XMLReader to the new input buffers (Daniel Veillard),
New saving functions using xmlBuf and conversion (Daniel Veillard),
Provide new xmlBuf based saving functions (Daniel Veillard),
Convert XInclude to the new input buffers (Daniel Veillard),
Convert catalog code to the new input buffers (Daniel Veillard),
Convert C14N to the new Input buffer (Daniel Veillard),
Convert xmlIO.c to the new input and output buffers (Daniel Veillard),
Convert XML parser to the new input buffers (Daniel Veillard),
Incompatible change to the Input and Output buffers (Daniel Veillard),
Adding new encoding function to deal with the new structures (Daniel Veillard),
Convert XPath to xmlBuf (Daniel Veillard),
Adding a new buf module for buffers (Daniel Veillard),
Memory error within SAX2 reuse common framework (Daniel Veillard),
Fix xmllint --xpath node initialization (Daniel Veillard)
- Cleanups:
Various cleanups to avoid compiler warnings (Daniel Veillard),
Big space and tab cleanup (Daniel Veillard),
Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),
Second round of cleanups for LibXML2 docs/examples (Daniel Richard),
Remove all .cvsignore as they are not used anymore (Daniel Veillard),
Fix a Timsort function helper comment (Daniel Veillard),
Small cleanup for valgrind target (Daniel Veillard),
Patch for portability of latin characters in C files (Daniel Veillard),
Cleanup some of the parser code (Daniel Veillard),
Fix a variable name in comment (Daniel Veillard),
Regenerated testapi.c (Daniel Veillard),
Regenerating docs and API files (Daniel Veillard),
Small cleanup of unused variables in test (Daniel Veillard),
Expand .gitignore with more files (Daniel Veillard)
2.8.0: May 23 2012:
- Features:
add lzma compression support (Anders F Bjorklund)
- Documentation:
xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä),
Update README.tests (Daniel Veillard),
URI handling code is not OOM resilient (Daniel Veillard),
Fix an error in comment (Daniel Veillard),
Fixed bug #617016 (Daniel Mustieles),
Fixed two typos in the README document (Daniel Neel),
add generated html files (Anders F Bjorklund),
Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard),
Improve documentation a bit (Daniel Veillard),
Updated URL for lxml python bindings (Daniel Veillard)
- Portability:
Restore code for Windows compilation (Daniel Veillard),
Remove git error message during configure (Christian Dywan),
xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer),
remove a bashism in confgure.in (John Hein),
undef ERROR if already defined (Patrick R. Gansterer),
Fix library problems with mingw-w64 (Michael Cronenworth),
fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards),
prefer native threads on win32 (Sam Thursfield),
Allow to compile with Visual Studio 2010 (Thomas Lemm),
Fix mingw's snprintf configure check (Andoni Morales),
fixed a 64bit big endian issue (Marcus Meissner),
Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard),
Fix windows build from lzma addition (Rob Richards),
autogen: Only check for libtoolize (Colin Walters),
Fix the Windows build files (Patrick von Reth),
634846 Remove a linking option breaking Windows VC10 (Daniel Veillard),
599241 fix an initialization problem on Win64 (Andrew W. Nosenko),
fix win build (Rob Richards)
- Bug fixes:
Part for rand_r checking missing (Daniel Veillard),
Cleanup on randomization (Daniel Veillard),
Fix undefined reference in python module (Pacho Ramos),
Fix a race in xmlNewInputStream (Daniel Veillard),
Fix weird streaming RelaxNG errors (Noam),
Fix various bugs in new code raised by the API checking (Daniel Veillard),
Fix various problems with "make dist" (Daniel Veillard),
Fix a memory leak in the xzlib code (Daniel Veillard),
HTML parser error with <noscript> in the <head> (Denis Pauk),
XSD: optional element in complex type extension (Remi Gacogne),
Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard),
Fix a wrong return value in previous patch (Daniel Veillard),
Fix an uninitialized variable use (Daniel Veillard),
Fix a compilation problem with --minimum (Brandon Slack),
Remove redundant and ungarded include of resolv.h (Daniel Veillard),
xinclude with parse="text" does not use the entity loader (Shaun McCance),
Allow to parse 1 byte HTML files (Denis Pauk),
Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder),
Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
xmlParseNodeInContext problems with an empty document (Tim Elliott),
HTML element position is not detected properly (Pavel Andrejs),
Fix an off by one pointer access (Jüri Aedla),
Try to fix a problem with entities in SAX mode (Daniel Veillard),
Fix a crash with xmllint --path on empty results (Daniel Veillard),
Fixed bug #667946 (Daniel Mustieles),
Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
Fix a wrong enum type use in Schemas Types (Nico Weber),
Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard),
Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard),
fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan),
fix a pair of possible out of array char references (Daniel Veillard),
Fix an allocation error when copying entities (Daniel Veillard),
Make sure the parser returns when getting a Stop order (Chris Evans),
Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng),
Fix a schema type duration comparison overflow (Daniel Veillard),
Fix an unimplemented part in RNG value validation (Daniel Veillard),
Fix missing error status in XPath evaluation (Daniel Veillard),
Hardening of XPath evaluation (Daniel Veillard),
Fix an off by one error in encoding (Daniel Veillard),
Fix RELAX NG include bug #655288 (Shaun McCance),
Fix XSD validation bug #630130 (Toyoda Eizi),
Fix some potential problems on reallocation failures (Chris Evans),
__xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin),
__xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin),
Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards),
Small fix for previous commit (Daniel Veillard),
Fix a potential freeing error in XPath (Daniel Veillard),
Fix a potential memory access error (Daniel Veillard),
Reactivate the shared library versioning script (Daniel Veillard)
- Improvements:
use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov),
New symbols added for the next release (Daniel Veillard),
xmlTextReader bails too quickly on error (Andy Lutomirski),
Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin),
Use buffers when constructing string node lists. (Conrad Irwin),
Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
wrong message for double hyphen in comment XML error (Bryan Henderson),
Fix "make tst" to grab lzma lib too (Daniel Veillard),
Add "whereis" command to xmllint shell (Ryan),
Improve xmllint shell (Ryan),
add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
Add --system support to autogen.sh (Daniel Veillard),
Add hash randomization to hash and dict structures (Daniel Veillard),
included xzlib in dist (Anders F Bjorklund),
move xz/lzma helpers to separate included files (Anders F Bjorklund),
add generated devhelp files (Anders F Bjorklund),
add XML_WITH_LZMA to api (Anders F Bjorklund),
autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
Improve the error report on undefined REFs (Daniel Veillard),
Add exception for new W3C PI xml-model (Daniel Veillard),
Add options to ignore the internal encoding (Daniel Veillard),
testapi: use the right type for the check (Stefan Kost),
various: handle return values of write calls (Stefan Kost),
testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost),
runxmlconf: update to latest testsuite version (Stefan Kost),
configure: add -Wno-long-long to CFLAGS (Stefan Kost),
configure: support silent automake rules if possible (Stefan Kost),
xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost),
__xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin),
__xmlRaiseError: do cheap code check early (Dmitry V. Levin)
- Cleanups:
Cleanups before 2.8.0-rc2 (Daniel Veillard),
Avoid an extra operation (Daniel Veillard),
Remove vestigial de-ANSI-fication support. (Javier Jardón),
autogen.sh: Fix typo (Javier Jardón),
Do not use unsigned but unsigned int (Daniel Veillard),
Remove two references to u_short (Daniel Veillard),
Fix -Wempty-body warning from clang (Nico Weber),
Cleanups of lzma support (Daniel Veillard),
Augment the list of ignored files (Daniel Veillard),
python: remove unused variable (Stefan Kost),
python: flag two unused args (Stefan Kost),
configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
xpath: remove unused variable (Stefan Kost)
2.7.8: Nov 4 2010:
- Features:
480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
- Documentation:
Fix devhelp documentation installation (Mike Hommey),
Fix web site encoding problems (Daniel Veillard),
Fix a couple of typo in HTML parser error messages (Michael Day),
Forgot to update the news page for 0.7.7 (Daniel Veillard)
- Portability:
607273 Fix python detection on MSys/Windows (LRN),
614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer),
Fix compilation with Clang (Koop Mast),
Fix Win32 build (Rob Richards)
- Bug Fixes:
595789 fix a remaining potential Solaris problem (Daniel Veillard),
617468 fix progressive HTML parsing with style using "'" (Denis Pauk),
616478 Fix xmllint shell write command (Gwenn Kahz),
614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile),
627987 Fix XSD IDC errors in imported schemas (Jim Panetta),
629325 XPath rounding errors first cleanup (Phil Shafer),
630140 fix iso995x encoding error (Daniel Veillard),
make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard),
Fix a change of semantic on XPath preceding and following axis (Daniel Veillard),
Fix a potential segfault due to weak symbols on pthreads (Mike Hommey),
Fix a leak in XPath compilation (Daniel Veillard),
Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard),
Avoid a descriptor leak in catalog loading code (Carlo Bramini),
Fix a small bug in XPath evaluation code (Marius Wachtler),
Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
Fix errors in XSD double validation check (Csaba Raduly),
Fix handling of apos in URIs (Daniel Veillard),
xmlTextReaderReadOuterXml should handle DTD (Rob Richards),
Autogen.sh needs to create m4 directory (Rob Richards)
- Improvements:
606592 update language ID parser to RFC 5646 (Daniel Veillard),
Sort python generated stubs (Mike Hommey),
Add an HTML parser option to avoid a default doctype (Daniel Veillard)
- Cleanups:
618831 don't ship generated files in git (Adrian Bunk),
Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk),
Various cleanups on encoding handling (Daniel Veillard),
Fix xmllint to use format=1 for default formatting (Adam Spragg),
Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg),
Cleanup encoding pointer comparison (Nikolay Sivov),
Small code cleanup on previous patch (Daniel Veillard)
2.7.7: Mar 15 2010:
- Improvements:
Adding a --xpath option to xmllint (Daniel Veillard),
Make HTML parser non-recursive (Eugene Pimenov)
- Portability:
relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton),
Fix build failure on Sparc solaris (Roumen Petrov),
use autoreconf in autogen.sh (Daniel Veillard),
Fix build with mingw (Roumen Petrov),
Upgrade some of the configure and autogen (Daniel Veillard),
Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards),
Fix a const warning in xmlNodeSetBase (Martin Trappel),
Fix python generator to not use deprecated xmllib (Daniel Veillard),
Update some automake files (Daniel Veillard),
598785 Fix nanohttp on Windows (spadix)
- Bug Fixes:
libxml violates the zlib interface and crashes (Mark Adler),
Fix broken escape behaviour in regexp ranges (Daniel Veillard),
Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
Fix detection of python linker flags (Daniel Macks),
fix build error in libxml2/python (Paul Smith),
ChunkParser: Incorrect decoding of small xml files (Raul Hudea),
htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
Fix a missing #ifdef (Daniel Veillard),
Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
xmlPreviousElementSibling mistake (François Delyon),
608773 add a missing check in xmlGROW (Daniel Veillard),
Fix xmlParseInNodeContext for HTML content (Daniel Veillard),
Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards),
Fix some missing commas in HTML element lists (Eugene Pimenov),
Correct variable type to unsigned (Nikolay Sivov),
Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard),
Fix memory leak in xmlXPathEvalExpression() (Martin),
Fix an init bug in global.c (Kai Henning),
Fix xmlNodeSetBase() comment (Daniel Veillard),
Fix broken escape behaviour in regexp ranges (Daniel Veillard),
Don't give default HTML boolean attribute values in parser (Daniel Veillard),
xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
- Cleanups:
Cleanup a couple of weirdness in HTML parser (Eugene Pimenov)
2.7.6: Oct 6 2009:
- Bug Fixes:
Restore thread support in default configuration (Andrew W. Nosenko),
URI with no path parsing problem (Daniel Veillard),
Minor patch for conditional defines in threads.c (Eric Zurcher)
2.7.5: Sep 24 2009:
- Bug Fixes:
Restore behavior of --with-threads without argument (Andrew W. Nosenko),
Fix memory leak when doc is NULL (Rob Richards),
595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard),
Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard),
Fix a parsing problem with little data at startup (Daniel Veillard),
link python module with python library (Frederic Crozat),
594874 Forgot an fclose in xmllint (Daniel Veillard)
- Cleanup:
Adding symbols.xml to EXTRA_DIST (Daniel Veillard)
2.7.4: Sep 10 2009:
- Improvements:
Switch to GIT (GNOME),
Add symbol versioning to libxml2 shared libs (Daniel Veillard)
- Portability:
593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard),
594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard),
Fix Windows build * relaxng.c: fix windows build (Rob Richards),
Fix the globals.h to use XMLPUBFUN (Paul Smith),
Problem with extern extern in header (Daniel Veillard),
Add -lnetwork for compiling on Haiku (Scott McCreary),
Runtest portability patch for Solaris (Tim Rice),
Small patch to accommodate the Haiku OS (Scott McCreary),
584605 package VxWorks folder in the distribution (Daniel Veillard),
574017 Realloc too expensive on most platform (Daniel Veillard),
Fix windows build (Rob Richards),
545579 doesn't compile without schema support (Daniel Veillard),
xmllint use xmlGetNodePath when not compiled in (Daniel Veillard),
Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard),
Allow to select the threading system on Windows (LRN),
Fix Solaris binary links, cleanups (Daniel Veillard),
Bug 571059 â MSVC doesn't work with the bakefile (Intron),
fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey),
fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher)
- Documentation:
544910 typo: "renciliateNs" (Leonid Evdokimov),
Add VxWorks to list of OSes (Daniel Veillard),
Regenerate the documentation and update for git (Daniel Veillard),
560524 ¿ xmlTextReaderLocalName description (Daniel Veillard),
Added sponsoring by AOE media for the server (Daniel Veillard),
updated URLs for GNOME (Vincent Lefevre),
more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard)
- Bug fixes:
594514 memory leaks - duplicate initialization (MOD),
Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard),
492317 Fix Relax-NG validation problems (Daniel Veillard),
558452 fight with reg test and error report (Daniel Veillard),
558452 RNG compilation of optional multiple child (Daniel Veillard),
579746 XSD validation not correct / nilable groups (Daniel Veillard),
502960 provide namespace stack when parsing entity (Daniel Veillard),
566012 part 2 fix regression tests and push mode (Daniel Veillard),
566012 autodetected encoding and encoding conflict (Daniel Veillard),
584220 xpointer(/) and xinclude problems (Daniel Veillard),
587663 Incorrect Attribute-Value Normalization (Daniel Veillard),
444994 HTML chunked failure for attribute with <> (Daniel Veillard),
Fix end of buffer char being split in XML parser (Daniel Veillard),
Non ASCII character may be split at buffer end (Adiel Mittmann),
440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel),
572129 speed up parsing of large HTML text nodes (Markus Kull),
Fix HTML parsing with 0 character in CDATA (Daniel Veillard),
Fix SetGenericErrorFunc and SetStructured clash (Wang Lam),
566012 Incomplete EBCDIC parsing support (Martin Kogler),
541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard),
541237 error correcting missing end tags in HTML (Daniel Veillard),
583439 missing line numbers in push mode (Daniel Veillard),
587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard),
559501 avoid select and use poll for nanohttp (Raphael Prevost),
559410 - Regexp bug on (...)? constructs (Daniel Veillard),
Fix a small problem on previous HTML parser patch (Daniel Veillard),
592430 - HTML parser runs into endless loop (Daniel Veillard),
447899 potential double free in xmlFreeTextReader (Daniel Veillard),
446613 small validation bug mixed content with NS (Daniel Veillard),
Fix the problem of revalidating a doc with RNG (Daniel Veillard),
Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer),
512131 refs from externalRef part need to be added (Daniel Veillard),
512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard),
588441 allow '.' in HTML Names even if invalid (Daniel Veillard),
582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard),
579317 Try to find the HTML encoding information (Daniel Veillard),
575875 don't output charset=html (Daniel Veillard),
571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard),
570702 fix a bug in regexp determinism checking (Daniel Veillard),
567619 xmlValidateNotationUse missing param test (Daniel Veillard),
574393 ¿ utf-8 filename magic for compressed files (Hans Breuer),
Fix a couple of problems in the parser (Daniel Veillard),
585505 ¿ Document ids and refs populated by XSD (Wayne Jensen),
582906 XSD validating multiple imports of the same schema (Jason Childs),
Bug 582887 ¿ problems validating complex schemas (Jason Childs),
Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos),
576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky),
Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre),
Preserve attributes of include start on tree copy (Petr Pajas),
Skip silently unrecognized XPointer schemes (Jakub Wilk),
Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard),
potential NULL dereference on non-glibc (Jim Meyering),
Fix an XSD validation crash (Daniel Veillard),
Fix a regression in streaming entities support (Daniel Veillard),
Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin),
Aleksey Sanin support for c14n 1.1 (Aleksey Sanin),
reader bug fix with entities (Daniel Veillard),
use options from current parser ctxt for external entities (Rob Richards),
581612 use %s to printf strings (Christian Persch),
584605 change the threading initialization sequence (Igor Novoseltsev),
580705 keep line numbers in HTML parser (Aaron Patterson),
581803 broken HTML table attributes init (Roland Steiner),
do not set error code in xmlNsWarn (Rob Richards),
564217 fix structured error handling problems,
reuse options from current parser for entities (Rob Richards),
xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard),
add a missing check in xmlAddSibling (Kris Breuker),
avoid leaks on errors (Jinmei Tatuya)
- Cleanup:
Chasing dead assignments reported by clang-scan (Daniel Veillard),
A few more safety cleanup raised by scan (Daniel Veillard),
Fixing assorted potential problems raised by scan (Daniel Veillard),
Potential uninitialized arguments raised by scan (Daniel Veillard),
Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard),
Remove a pedantic warning (Daniel Veillard),
555833 always use rm -f in uninstall-local (Daniel Veillard),
542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard),
Autoregenerate libxml2.syms automated checkings (Daniel Veillard),
Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard),
Both args of xmlStrcasestr are const (Daniel Veillard),
hide the nbParse* variables used for debugging (Mike Hommey),
570806 changed include of config.h (William M. Brack),
cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya)
2.7.3: Jan 18 2009:
- Build fix: fix build when HTML support is not included.
- Bug fixes: avoid memory overflow in gigantic text nodes,
indentation problem on the writed (Rob Richards),
xmlAddChildList pointer problem (Rob Richards and Kevin Milburn),
xmlAddChild problem with attribute (Rob Richards and Kris Breuker),
avoid a memory leak in an edge case (Daniel Zimmermann),
deallocate some pthread data (Alex Ott).
- Improvements: configure option to avoid rebuilding docs (Adrian Bunk),
limit text nodes to 10MB max by default, add element traversal
APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards),
add gcc malloc checking (Marcus Meissner), add gcc printf like functions
parameters checking (Marcus Meissner).
2.7.2: Oct 3 2008:
- Portability fix: fix solaris compilation problem, fix compilation
if XPath is not configured in
- Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
bug, fix reader custom error handlers (Riccardo Scussat)
- Improvement: xmlSave options for more flexibility to save as
XML/HTML/XHTML, handle leading BOM in HTML documents
2.7.1: Sep 1 2008:
- Portability fix: Borland C fix (Moritz Both)
- Bug fixes: python serialization wrappers, XPath QName corner
case handking and leaks (Martin)
- Improvement: extend the xmlSave to handle HTML documents and trees
- Cleanup: python serialization wrappers
2.7.0: Aug 30 2008:
- Documentation: switch ChangeLog to UTF-8, improve mutithreads and
xmlParserCleanup docs
- Portability fixes: Older Win32 platforms (Rob Richards), MSVC
porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg),
non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
- Bug fixes: various realloc problems (Ashwin), potential double-free
(Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
Richards), pattern fix when streaming (William Brack), various XML
parsing and validation fixes based on the W3C regression tests, reader
tree skipping function fix (Ashwin), Schemas regexps escaping fix
(Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown
when encoder can't serialize characters on output
- Code cleanup: compilation fix without the reader, without the output
(Robert Schwebel), python whitespace (Martin), many space/tabs cleanups,
serious cleanup of the entity handling code
- Improvement: switch parser to XML-1.0 5th edition, add parsing flags
for old versions, switch URI parsing to RFC 3986,
add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
new hashing functions for dictionaries (based on Stefan Behnel work),
improve handling of misplaced html/head/body in HTML parser, better
regression test tools and code coverage display, better algorithms
to detect various versions of the billion laughts attacks, make
arbitrary parser limits avoidable as a parser option
2.6.32: Apr 8 2008:
- Documentation: returning heap memory to kernel (Wolfram Sang),
trying to clarify xmlCleanupParser() use, xmlXPathContext improvement
(Jack Jansen), improve the *Recover* functions documentation,
XmlNodeType doc link fix (Martijn Arts)
- Bug fixes: internal subset memory leak (Ashwin), avoid problem with
paths starting with // (Petr Sumbera), streaming XSD validation callback
patches (Ashwin), fix redirection on port other than 80 (William Brack),
SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan),
regexp bug with '.' (Andrew Tosh), flush the writer at the end of the
document (Alfred Mickautsch), output I/O bug fix (William Brack),
writer CDATA output after a text node (Alex Khesin), UTF-16 encoding
detection (William Brack), fix handling of empty CDATA nodes for Safari
team, python binding problem with namespace nodes, improve HTML parsing
(Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily
Chekalkin), XSD test crash, weird system parameter entity parsing problem,
allow save to file:///X:/ windows paths, various attribute normalisation
problems, externalSubsetSplit fix (Ashwin), attribute redefinition in
the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many
out of memory handling fixes (Ashwin), XPath out of memory handling fixes
(Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding
conversion buffer size (Christian Fruth), problems with EatName
functions on memory errors, BOM handling in external parsed entities
(Mark Rowe)
- Code cleanup: fix build under VS 2008 (David Wimsey), remove useless
mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo
Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need
a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon),
cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build
fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards),
duplicate code removal (Ashwin), missing malloc test and error reports
(Ashwin), VMS makefile fix (Tycho Hilhorst)
- improvements: better plug of schematron in the normal error handling
(Tobias Minich)
2.6.31: Jan 11 2008:
- Security fix: missing of checks in UTF-8 parsing
- Bug fixes: regexp bug, dump attribute from XHTML document, fix
xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
(Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
XSD crash due to double free (Rob Richards), indentation fix in
xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
parsing if attribute redeclared, avoid crash in hash list scanner if
deleting elements, column counter bug fix (Christian Schmidt),
HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
output from xml2-config (Fred Crozat), avoid an xmllint crash
(Stefan Kost), don't stop HTML parsing on out of range chars.
- Code cleanup: fix open() call third argument, regexp cut'n paste
copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
some make distcheck related fixes (John Carr)
- Improvements: HTTP Header: includes port number (William Brack),
testURI --debug option,
2.6.30: Aug 23 2007:
- Portability: Solaris crash on error handling, windows path fixes
(Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)
- Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
reusing a writer for a new document (Dodji Seketeli), Schemas
xsi:nil handling patch (Frank Gross), relative URI build problem
(Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
detection bug, fix disparity with xmlSAXUserParseMemory, automata
generation for complex regexp counts problems, Schemas IDC import
problems (Frank Gross), xpath predicate evailation error handling
(William Brack)
2.6.29: Jun 12 2007:
- Portability: patches from Andreas Stricke for WinCEi,
fix compilation warnings (William Brack), avoid warnings on Apple OS/X
(Wendy Doyle and Mark Rowe), Windows compilation and threading
improvements (Rob Richards), compilation against old Python versions,
new GNU tar changes (Ryan Hill)
- Documentation: xmlURIUnescapeString comment,
- Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind'
flag fix (Richard Jones), regexp interpretation of \,
htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
typo (Bjorn Reese), entity content failure, xmlListAppend() fix
(Georges-André Silber), XPath number serialization (William Brack),
nanohttp gzipped stream fix (William Brack and Alex Cornejo),
xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon),
XPath string value of PI nodes (William Brack), XPath node set
sorting bugs (William Brack), avoid outputting namespace decl
dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
error handling, recustion on next in catalogs, fix a Relax-NG crash,
workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes,
invalid character in attribute detection bug, big comments before
internal subset streaming bug, HTML parsing of attributes with : in
the name, IDness of name in HTML (Dagfinn I. Mannsåker)
- Improvement: keep URI query parts in raw form (Richard Jones),
embed tag support in HTML (Michael Day)
2.6.28: Apr 17 2007:
- Documentation: comment fixes (Markus Keim), xpath comments fixes too
(James Dennett)
- Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage
(Usamah Malik), various regexp bug fixes (DV and William), path conversion
on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
principal node of axis bug, HTML serialization of some codepoint
(Steven Rainwater), user data propagation in XInclude (Michael Day),
standalone and XML decl detection (Michael Day), Python id output
for some id, fix the big python string memory leak, URI parsing fixes
(Stéphane Bidoul and William), long comments parsing bug (William),
concurrent threads initialization (Ted Phelps), invalid char
in text XInclude (William), XPath memory leak (William), tab in
python problems (Andreas Hanke), XPath node comparison error
(Oleg Paraschenko), cleanup patch for reader (Julien Reichel),
XML Schemas attribute group (William), HTML parsing problem (William),
fix char 0x2d in regexps (William), regexp quantifier range with
min occurs of 0 (William), HTML script/style parsing (Mike Day)
- Improvement: make xmlTextReaderSetup() public
- Compilation and postability: fix a missing include problem (William),
__ss_family on AIX again (Björn Wiberg), compilation without zlib
(Michael Day), catalog patch for Win32 (Christian Ehrlicher),
Windows CE fixes (Andreas Stricke)
- Various CVS to SVN infrastructure changes
2.6.27: Oct 25 2006:
- Portability fixes: file names on windows (Roland Schwingel,
Emelyanov Alexey), windows compile fixup (Rob Richards),
AIX iconv() is apparently case sensitive
- improvements: Python XPath types mapping (Nic Ferrier), XPath optimization
(Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node
equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest
improvememt (Kasimier), expose if library was compiled with zlib
support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs
(Kasimier), xmlTextConcat should work with comments and PIs (Rob
Richards), export htmlNewParserCtxt needed by Michael Day, refactoring
of catalog entity loaders (Michael Day), add XPointer support to
python bindings (Ross Reedstrom, Brian West and Stefan Anca),
try to sort out most file path to URI conversions and xmlPathToUri,
add --html --memory case to xmllint
- building fix: fix --with-minimum (Felipe Contreras), VMS fix,
const'ification of HTML parser structures (Matthias Clasen),
portability fix (Emelyanov Alexey), wget autodetection (Peter
Breitenlohner), remove the build path recorded in the python
shared module, separate library flags for shared and static builds
(Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix
--with-minimum --with-schemas builds
- bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and
attribute (Kasimier), crash when using the recover mode,
xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier),
missing destroy in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes
(Kasimier), warning on entities processing, XHTML script and style
serialization (Kasimier), python generator for long types, bug in
xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate
allocation bug (Marton Illes), error message end of line (Rob Richards),
fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
crash, parser safety patch (Ben Darnell), _private context propagation
when parsing entities (with Michael Day), fix entities behaviour when
using SAX, URI to file path fix (Mikhail Zabaluev), disappearing validity
context, arg error in SAX callback (Mike Hommey), fix mixed-content
autodetect when using --noblanks, fix xmlIOParseDTD error handling,
fix bug in xmlSplitQName on special Names, fix Relax-NG element content
validation bug, fix xmlReconciliateNs bug, fix potential attribute
XML parsing bug, fix line/column accounting in XML parser, chunking bug
in the HTML parser on script, try to detect obviously buggy HTML
meta encoding indications, bugs with encoding BOM and xmlSaveDoc,
HTML entities in attributes parsing, HTML minimized attribute values,
htmlReadDoc and htmlReadIO were broken, error handling bug in
xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in
htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer),
bug on misformed SSD regexps (Christopher Boumenot)
- documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik),
fix xmlXPathCastToString documentation, improve man pages for
xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few
functions
2.6.26: Jun 6 2006:
- portability fixes: Python detection (Joseph Sacco), compilation
error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)
- bug fixes: encoding buffer problem, mix of code and data in
xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik),
variousXSD validation fixes (Kasimier), memory leak in pattern (Rob
Richards andKasimier), attribute with colon in name (Rob Richards), XPath
leak inerror reporting (Aleksey Sanin), XInclude text include of
selfdocument.
- improvements: Xpath optimizations (Kasimier), XPath object
cache(Kasimier)
2.6.25: Jun 6 2006::
Do not use or package 2.6.25
2.6.24: Apr 28 2006:
- Portability fixes: configure on Windows, testapi compile on windows
(Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher),
HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1
cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on
Windows (Roland Schwingel).
- Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier
Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.
- Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext()
on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming
bug, xmlParseComment (with William Brack), regexp bug fixes (DV &
Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier),
one Relax-NG interleave bug, xmllint --path and --valid,
XSD bugfixes (Kasimier), remove debug
left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole),
xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large
number of cleanups and small fixes based on Coverity reports, bug
in character ranges, Unicode tables const (Aivars Kalvans), schemas
fix (Stefan Kost), xmlRelaxNGParse error deallocation,
xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed
code point, ixmllint --nonet to never reach the net (Gary Coady),
line break in writer after end PI (Jason Viers).
- Documentation: man pages updates and cleanups (Daniel Leidert).
- New features: Relax NG structure error handlers.
2.6.23: Jan 5 2006:
- portability fixes: Windows (Rob Richards), getaddrinfo on Windows
(Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
--with-minimum compilation fixes (William Brack), error case handling fix
on Solaris (Albert Chin), don't use 'list' as parameter name reported by
Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick
Jones),
- code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
(Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
parsing code (Bjorn Reese)
- bug fixes: xmlBuildRelativeURI and empty path (William Brack),
combinatory explosion and performances in regexp code, leak in
xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
XPath pattern based evaluation bugs (DV & Kasimier),
xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
split problem (William), issues with non-namespaced attributes in
xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
HTML parsing of script, Python must not output to stdout (Nic Ferrier),
exclusive C14N namespace visibility (Aleksey Sanin), XSD datatype
totalDigits bug (Kasimier Buchcik), error handling when writing to an
xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
(Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
(Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
compilation and build fixes (Michael Day), removed dependencies on
xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath
pattern based evaluation fixes (Kasimier)
- improvements: XSD Schemas redefinitions/restrictions (Kasimier
Buchcik), node copy checks and fix for attribute (Rob Richards), counted
transition bug in regexps, ctxt->standalone = -2 to indicate no
standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
(Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
(Kasimier), handle gzipped HTTP resources (Gary Coady), add
htmlDocDumpMemoryFormat. (Rob Richards),
- documentation: typo (Michael Day), libxml man page (Albert Chin), save
function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
2.6.22: Sep 12 2005:
- build fixes: compile without schematron (Stéphane Bidoul)
- bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
output formatting for meta element (Rob Richards), script and style
XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
(Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)
- improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
derive (Kasimier Buchcik).
- documentation: generation of gtk-doc like docs, integration with
devhelp.
2.6.21: Sep 4 2005:
- build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
convention problems on Windows (Marcus Boerger), cleanups based on Linus'
sparse tool, update of win32/configure.js (Rob Richards), remove warnings
on Windows(Marcus Boerger), compilation without SAX1, detection of the
Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
compilation/link with threads and old gcc, compile problem by C370 on
Z/OS,
- bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
Schemas comparisons NIST passes, automata build error xsd:all,
xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
namespace ahndling in Schemas (Kasimier), empty model group in Schemas
(Kasimier), wildcard in Schemas (Kasimier), URI composition (William),
xs:anyType in Schemas (Kasimier), Python resolver emitting error
messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
serialization, streaming XPath, Schemas determinism detection problem,
XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
xmlGetLineNo fixes, bug on entities handling, entity name extraction in
error handling with XInclude, text nodes in HTML body tags (Gary Coady),
xml:id and IDness at the treee level fixes, XPath streaming patterns
bugs.
- improvements: structured interfaces for schemas and RNG error reports
(Marcus Boerger), optimization of the char data inner loop parsing
(thanks to Behdad Esfahbod for the idea), schematron validation though
not finished yet, xmlSaveOption to omit XML declaration, keyref match
error reports (Kasimier), formal expression handling code not plugged
yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
for text nodes allocation.
- documentation: xmllint man page had --nonet duplicated
2.6.20: Jul 10 2005:
- build fixes: Windows build (Rob Richards), Mingw compilation (Igor
Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
andriy@google.com), use gcc weak references to pthread to avoid the
pthread dependency on Linux, compilation problem (Steve Nairn), compiling
of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
compilation when disabling parts of the library, standalone test
distribution.
- bug fixes: bug in lang(), memory cleanup on errors (William Brack),
HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
(Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
(Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
on XInclude (William), pattern fixes (William), attribute bug in
exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
(Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
areBlanks() heuristic failure, duplicate attributes in DTD bug
(William).
- improvements: lot of work on Schemas by Kasimier Buchcik both on
conformance and streaming, Schemas validation messages (Kasimier Buchcik,
Matthew Burgess), namespace removal at the python level (Brent
Hendricks), Update to new Schemas regression tests from W3C/Nist
(Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
standalone test framework and programs, new DOM import APIs
xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
Schemas regression tests, xmlStopParser() available in pull mode too,
ienhancement to xmllint --shell namespaces support, Windows port of the
standalone testing tools (Kasimier and William),
xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
Schemas APIs, Schemas xmlReader support.
2.6.19: Apr 02 2005:
- build fixes: drop .la from RPMs, --with-minimum build fix (William
Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
Linux/ELF/gcc4
- bug fixes: schemas type decimal fixups (William Brack), xmmlint return
code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
Fabrice), workaround "DAV:" namespace brokenness in c14n (Aleksey Sanin),
segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
(Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
HTML serialization of name attribute on a elements, Python error handlers
leaks and improvement (Brent Hendricks), uninitialized variable in
encoding code, Relax-NG validation bug, potential crash if
gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
switched back to assuming UTF-8 in case no encoding is given at
serialization time
- improvements: lot of work on Schemas by Kasimier Buchcik on facets
checking and also mixed handling.
-
2.6.18: Mar 13 2005:
- build fixes: warnings (Peter Breitenlohner), testapi.c generation,
Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
some gcc4 fixes, HP-UX portability fixes (Rick Jones).
- bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
xmlreader stopping on non-fatal errors, thread support for dictionaries
reference counting (Gary Coady), internal subset and push problem, URL
saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
(Mike Hommey), warning should not count as error (William Brack),
xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
FTP and HTTP code to reuse the uri parsing and IPv6 (William),
xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
(Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
(Rob Richards), Schemas decimal type fixes (William Brack),
xmlByteConsumed static buffer (Ben Maurer).
- improvement: speedup parsing comments and DTDs, dictionary support for
hash tables, Schemas Identity constraints (Kasimier), streaming XPath
subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
Stansvik),
- Documentation: Wiki support (Joel Reed)
2.6.17: Jan 16 2005:
- build fixes: Windows, warnings removal (William Brack),
maintainer-clean dependency(William), build in a different directory
(William), fixing --with-minimum configure build (William), BeOS build
(Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
McNichol)
- bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
to use the catalog(s), loop on output (William Brack), XPath memory leak,
ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
warning not using error callback (William), xmlStopParser bug (William),
UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
push mode (Rob Richards), line and col computations fixups (Aleksey
Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
patterns with too many steps, bug in RNG choice optimization, line number
sometimes missing.
- improvements: XSD Schemas (Kasimier Buchcik), python generator
(William), xmlUTF8Strpos speedup (William), unicode Python strings
(William), XSD error reports (Kasimier Buchcik), Python __str__ call
serialize().
- new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
Reed), error extraction API from regexps, new XMLSave option for format
(Phil Shafer)
- documentation: site improvement (John Fleck), FAQ entries
(William).
2.6.16: Nov 10 2004:
- general hardening and bug fixing crossing all the API based on new
automated regression testing
- build fix: IPv6 build and test on AIX (Dodji Seketeli)
- bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding
conversion functions return values, UTF-8 bug affecting XPath reported by
Markus Bertheau, catalog problem with NULL entries (William Brack)
- documentation: fix to xmllint man page, some API function description
were updated.
- improvements: DTD validation APIs provided at the Python level (Brent
Hendricks)
2.6.15: Oct 27 2004:
- security fixes on the nanoftp and nanohttp modules
- build fixes: xmllint detection bug in configure, building outside the
source tree (Thomas Fitzsimmons)
- bug fixes: HTML parser on broken ASCII chars in names (William), Python
paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William),
saving to python file objects (Malcolm Tredinnick), DTD lookup fix
(Malcolm), save back <group> in catalogs (William), tree build
fixes (DV and Rob Richards), Schemas memory bug, structured error handler
on Python 64bits, thread local memory deallocation, memory leak reported
by Volker Roth, xmlValidateDtd in the presence of an internal subset,
entities and _private problem (William), xmlBuildRelativeURI error
(William).
- improvements: better XInclude error reports (William), tree debugging
module and tests, convenience functions at the Reader API (Graham
Bennett), add support for PI in the HTML parser.
2.6.14: Sep 29 2004:
- build fixes: configure paths for xmllint and xsltproc, compilation
without HTML parser, compilation warning cleanups (William Brack &
Malcolm Tredinnick), VMS makefile update (Craig Berry),
- bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier
Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
(Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
handling of failed realloc(), out of bound array addressing in Schemas
date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
E20 validation fix (Malcolm),
- improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy
(Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm
Tredinnick), Schemas support for xsi:schemaLocation,
xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)
2.6.13: Aug 31 2004:
- build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc,
Solaris compiler warning, fixing RPM BuildRequires,
- fixes: DTD loading on Windows (Igor), Schemas error reports APIs
(Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
problem (William), Schemas hexbinary empty values, encoding error could
generate a serialization loop.
- Improvements: Schemas validity improvements (Kasimier), added --path
and --load-trace options to xmllint
- documentation: tutorial update (John Fleck)
2.6.12: Aug 22 2004:
- build fixes: fix --with-minimum, elfgcchack.h fixes (Peter
Breitenlohner), perl path lookup (William), diff on Solaris (Albert
Chin), some 64bits cleanups.
- Python: avoid a warning with 2.3 (William Brack), tab and space mixes
(William), wrapper generator fixes (William), Cygwin support (Gerrit P.
Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support
(Torkel Lyng)
- Schemas: a lot of bug fixes and improvements from Kasimier Buchcik
- fixes: RVT fixes (William), XPath context resets bug (William), memory
debug (Steve Hay), catalog white space handling (Peter Breitenlohner),
xmlReader state after attribute reading (William), structured error
handler (William), XInclude generated xml:base fixup (William), Windows
memory reallocation problem (Steve Hay), Out of Memory conditions
handling (William and Olivier Andrieu), htmlNewDoc() charset bug,
htmlReadMemory init (William), a posteriori validation DTD base
(William), notations serialization missing, xmlGetNodePath (Dodji),
xmlCheckUTF8 (Diego Tartara), missing line numbers on entity
(William)
- improvements: DocBook catalog build scrip (William), xmlcatalog tool
(Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey),
xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude
to not generate start/end nodes, extend xmllint --version to include CVS
tag (William)
- documentation: web pages fixes, validity API docs fixes (William)
schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)
2.6.11: July 5 2004:
- Schemas: a lot of changes and improvements by Kasimier Buchcik for
attributes, namespaces and simple types.
- build fixes: --with-minimum (William Brack), some gcc cleanup
(William), --with-thread-alloc (William)
- portability: Windows binary package change (Igor Zlatkovic), Catalog
path on Windows
- documentation: update to the tutorial (John Fleck), xmllint return code
(John Fleck), man pages (Ville Skytta),
- bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX
properly initialize the library (William), empty node set in XPath
(William), xmlSchemas errors (William), invalid charref problem pointed
by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
with div processing (William), XPointer and xml:base problem(William),
Reader and entities, xmllint return code for schemas (William), reader
streaming problem (Steve Ball), DTD serialization problem (William),
libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on
Python classes, xmlReader buffer bug, Python bindings memory interfaces
improvement (with Stéphane Bidoul), Fixed the push parser to be back to
synchronous behaviour.
- improvement: custom per-thread I/O enhancement (Rob Richards), register
namespace in debug shell (Stefano Debenedetti), Python based regression
test for non-Unix users (William), dynamically increase the number of
XPath extension functions in Python and fix a memory leak (Marc-Antoine
Parent and William)
- performance: hack done with Arjan van de Ven to reduce ELF footprint
and generated code on Linux, plus use gcc runtime profiling to optimize
the code generated in the RPM packages.
2.6.10: May 17 2004:
- Web page generated for ChangeLog
- build fixes: --without-html problems, make check without make all
- portability: problem with xpath.c on Windows (MSC and Borland), memcmp
vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not
use "list" as parameter name, make tests work with Python 1.5 (Ed
Davis),
- improvements: made xmlTextReaderMode public, small buffers resizing
(Morten Welinder), add --maxmem option to xmllint, add
xmlPopInputCallback() for Matt Sergeant, refactoring of serialization
escaping, added escaping customization
- bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William
Brack), xmlReader end of stream problem, node deregistration with reader,
URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp
transition reduction (William), various XSD Schemas fixes (Kasimier
Buchcik), XInclude fallback problem (William), weird problems with DTD
(William), structured error handler callback context (William), reverse
xmlEncodeSpecialChars() behaviour back to escaping '"'
2.6.9: Apr 18 2004:
- implement xml:id Working Draft, relaxed XPath id() checking
- bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
Beckett), Relax-NG compilation (William Brack), Regexp patches (with
William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
William), Relax-NG name classes compares (William), XInclude duplicate
fallback (William), external DTD encoding detection (William), a DTD
validation bug (William), xmlReader Close() fix, recursive extension
schemas
- improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
save optimization, better handle IIS broken HTTP redirect behaviour (Ian
Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
dependency, XML Schemas union support (Kasimier Buchcik), warning removal
clanup (William), keep ChangeLog compressed when installing from RPMs
- documentation: examples and xmlDocDumpMemory docs (John Fleck), new
example (load, xpath, modify, save), xmlCatalogDump() comments,
- Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
compiler NaN handling bug (Mark Vakoc)
2.6.8: Mar 23 2004:
- First step of the cleanup of the serialization code and APIs
- XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam
Dickmeiss), anyURI for "" (John Belmonte)
- Python: Canonicalization C14N support added (Anthony Carrico)
- xmlDocCopyNode() extension (William)
- Relax-NG: fix when processing XInclude results (William), external
reference in interleave (William), missing error on <choice>
failure (William), memory leak in schemas datatype facets.
- xmlWriter: patch for better DTD support (Alfred Mickautsch)
- bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William
Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to
URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
XInclude and XPointer fixes for entities (William), XML parser bug
reported by Holger Rauch, nanohttp fd leak (William), regexps char
groups '-' handling (William), dictionary reference counting problems,
do not close stderr.
- performance patches from Petr Pajas
- Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
- compilation and portability fixes: --without-valid, catalog cleanups
(Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation
to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino
Vidal), Windows build (Eric Zurcher)
2.6.7: Feb 23 2004:
- documentation: tutorial updates (John Fleck), benchmark results
- xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)
- XPath optimization (Petr Pajas)
- DTD ID handling optimization
- bugfixes: xpath number with > 19 fractional (William Brack), push
mode with unescaped '>' characters, fix xmllint --stream --timing, fix
xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent
handling NULL, trying to fix Relax-NG/Perl interface.
- python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)
- Added relaxng option to xmllint --shell
2.6.6: Feb 12 2004:
- nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and
William) reported by Yuuichi Teranishi
- bugfixes: make test and path issues, xmlWriter attribute serialization
(William Brack), xmlWriter indentation (William), schemas validation
(Eric Haszlakiewicz), XInclude dictionaries issues (William and Oleg
Paraschenko), XInclude empty fallback (William), HTML warnings (William),
XPointer in XInclude (William), Python namespace serialization,
isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
entities in internal subset (William), internal subset bug in push mode,
<xs:all> fix (Alexey Sarytchev)
- Build: fix for automake-1.8 (Alexander Winston), warnings removal
(Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix
--with-minimum configuration.
- XInclude: allow the 2001 namespace without warning.
- Documentation: missing example/index.html (John Fleck), version
dependencies (John Fleck)
- reader API: structured error reporting (Steve Ball)
- Windows compilation: mingw, msys (Mikhail Grushinskiy), function
prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
patch
- Parsers: added xmlByteConsumed(ctxt) API to get the byte offset in
input.
2.6.5: Jan 25 2004:
- Bugfixes: dictionaries for schemas (William Brack), regexp segfault
(William), xs:all problem (William), a number of XPointer bugfixes
(William), xmllint error go to stderr, DTD validation problem with
namespace, memory leak (William), SAX1 cleanup and minimal options fixes
(Mark Vadoc), parser context reset on error (Shaun McCance), XPath union
evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin),
XML Schemas double free (Steve Ball), XInclude with no href, argument
callbacks order for XPath callbacks (Frederic Peters)
- Documentation: python scripts (William Brack), xslt stylesheets (John
Fleck), doc (Sven Zimmerman), I/O example.
- Python bindings: fixes (William), enum support (Stéphane Bidoul),
structured error reporting (Stéphane Bidoul)
- XInclude: various fixes for conformance, problem related to dictionary
references (William & me), recursion (William)
- xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
Mickautsch),
- xmlSchemas: normalizedString datatype (John Belmonte)
- code cleanup for strings functions (William)
- Windows: compiler patches (Mark Vakoc)
- Parser optimizations, a few new XPath and dictionary APIs for future
XSLT optimizations.
2.6.4: Dec 24 2003:
- Windows build fixes (Igor Zlatkovic)
- Some serious XInclude problems reported by Oleg Paraschenko and
- Unix and Makefile packaging fixes (me, William Brack,
- Documentation improvements (John Fleck, William Brack), example fix
(Lucas Brasilino)
- bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of
NULL strings (William Brack) , API building reader or parser from
filedescriptor should not close it, changed XPath sorting to be stable
again (William Brack), xmlGetNodePath() generating '(null)' (William
Brack), DTD validation and namespace bug (William Brack), XML Schemas
double inclusion behaviour
2.6.3: Dec 10 2003:
- documentation updates and cleanup (DV, William Brack, John Fleck)
- added a repository of examples, examples from Aleksey Sanin, Dodji
Seketeli, Alfred Mickautsch
- Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw
(Kenneth Haley)
- Unicode range checking (William Brack)
- code cleanup (William Brack)
- Python bindings: doc (John Fleck), bug fixes
- UTF-16 cleanup and BOM issues (William Brack)
- bug fixes: ID and xmlReader validation, XPath (William Brack),
xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser
(James Bursa), attribute defaulting and validation, some serialization
cleanups, XML_GET_LINE macro, memory debug when using threads (William
Brack), serialization of attributes and entities content, xmlWriter
(Daniel Schulman)
- XInclude bugfix, new APIs and update to the last version including the
namespace change.
- XML Schemas improvements: include (Robert Stepanek), import and
namespace handling, fixed the regression tests troubles, added examples
based on Eric van der Vlist book, regexp fixes
- preliminary pattern support for streaming (needed for schemas
constraints), added xmlTextReaderPreservePattern() to collect subdocument
when streaming.
- various fixes in the structured error handling
2.6.2: Nov 4 2003:
- XPath context unregistration fixes
- text node coalescing fixes (Mark Lilback)
- API to screate a W3C Schemas from an existing document (Steve Ball)
- BeOS patches (Marcin 'Shard' Konicki)
- xmlStrVPrintf function added (Aleksey Sanin)
- compilation fixes (Mark Vakoc)
- stdin parsing fix (William Brack)
- a posteriori DTD validation fixes
- xmlReader bug fixes: Walker fixes, python bindings
- fixed xmlStopParser() to really stop the parser and errors
- always generate line numbers when using the new xmlReadxxx
functions
- added XInclude support to the xmlReader interface
- implemented XML_PARSE_NONET parser option
- DocBook XSLT processing bug fixed
- HTML serialization for <p> elements (William Brack and me)
- XPointer failure in XInclude are now handled as resource errors
- fixed xmllint --html to use the HTML serializer on output (added
--xmlout to implement the previous behaviour of saving it using the XML
serializer)
2.6.1: Oct 28 2003:
- Mostly bugfixes after the big 2.6.0 changes
- Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup
(William Brack)
- Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor
Zlatkovic)
- xmlWriter bugfix (Alfred Mickautsch)
- chvalid.[ch]: couple of fixes from Stephane Bidoul
- context reset: error state reset, push parser reset (Graham
Bennett)
- context reuse: generate errors if file is not readable
- defaulted attributes for element coming from internal entities
(Stephane Bidoul)
- Python: tab and spaces mix (William Brack)
- Error handler could crash in DTD validation in 2.6.0
- xmlReader: do not use the document or element _private field
- testSAX.c: avoid a problem with some PIs (Massimo Morara)
- general bug fixes: mandatory encoding in text decl, serializing
Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik),
XPath errors not reported, slow HTML parsing of large documents.
2.6.0: Oct 20 2003:
- Major revision release: should be API and ABI compatible but got a lot
of change
- Increased the library modularity, far more options can be stripped out,
a --with-minimum configuration will weight around 160KBytes
- Use per parser and per document dictionary, allocate names and small
text nodes from the dictionary
- Switch to a SAX2 like parser rewrote most of the XML parser core,
provides namespace resolution and defaulted attributes, minimize memory
allocations and copies, namespace checking and specific error handling,
immutable buffers, make predefined entities static structures, etc...
- rewrote all the error handling in the library, all errors can be
intercepted at a structured level, with precise information
available.
- New simpler and more generic XML and HTML parser APIs, allowing to
easily modify the parsing options and reuse parser context for multiple
consecutive documents.
- Similar new APIs for the xmlReader, for options and reuse, provided new
functions to access content as const strings, use them for Python
bindings
- a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin),
Walker i.e. reader on a document tree based on Alfred Mickautsch code,
make room in nodes for line numbers, reference counting and future PSVI
extensions, generation of character ranges to be checked with faster
algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer
access
- New xmlWriter API provided by Alfred Mickautsch
- Schemas: base64 support by Anthony Carrico
- Parser<->HTTP integration fix, proper processing of the Mime-Type
and charset information if available.
- Relax-NG: bug fixes including the one reported by Martijn Faassen and
zeroOrMore, better error reporting.
- Python bindings (Stéphane Bidoul), never use stdout for errors
output
- Portability: all the headers have macros for export and calling
convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry),
Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor),
Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul),
warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin
'Shard' Konicki)
- Documentation fixes and README (William Brack), search fix (William),
tutorial updates (John Fleck), namespace docs (Stefan Kost)
- Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized
mutexes, HTML doctype lowercase, SAX/IO (William), compression detection
and restore (William), attribute declaration in DTDs (William), namespace
on attribute in HTML output (William), input filename (Rob Richards),
namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks
(Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter
Derr), high codepoint charref like , buffer access in push
mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug
(William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
error handling.
- xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
testing, --nodict for building without tree dictionary, --nocdata to
replace CDATA by text, --nsclean to remove surperfluous namespace
declarations
- added xml2-config --libtool-libs option from Kevin P. Fleming
- a lot of profiling and tuning of the code, speedup patch for
xmlSearchNs() by Luca Padovani. The xmlReader should do far less
allocation and it speed should get closer to SAX. Chris Anderson worked
on speeding and cleaning up repetitive checking code.
- cleanup of "make tests"
- libxml-2.0-uninstalled.pc from Malcolm Tredinnick
- deactivated the broken docBook SGML parser code and plugged the XML
parser instead.
2.5.11: Sep 9 2003:
A bugfix only release: - risk of crash in Relax-NG
- risk of crash when using multithreaded programs
2.5.10: Aug 15 2003:
A bugfixes only release - Windows Makefiles (William Brack)
- UTF-16 support fixes (Mark Itzcovitz)
- Makefile and portability (William Brack) automake, Linux alpha, Mingw
on Windows (Mikhail Grushinskiy)
- HTML parser (Oliver Stoeneberg)
- XInclude performance problem reported by Kevin Ruscoe
- XML parser performance problem reported by Grant Goodale
- xmlSAXParseDTD() bug fix from Malcolm Tredinnick
- and a couple other cleanup
2.5.9: Aug 9 2003:
- bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build
(Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading
(Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli),
xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean
Griffin), HTML parsing problem (William Brack), DTD validation for mixed
content + namespaces, HTML serialization, library initialization,
progressive HTML parser
- better interfaces for Relax-NG error handling (Joachim Bauch, )
- adding xmlXIncludeProcessTree() for XInclud'ing in a subtree
- doc fixes and improvements (John Fleck)
- configure flag for -with-fexceptions when embedding in C++
- couple of new UTF-8 helper functions (William Brack)
- general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)
- xmlTextReader cleanup + enum for node types (Bjorn Reese)
- general compilation/warning cleanup Solaris/HP-UX/... (William
Brack)
2.5.8: Jul 6 2003:
- bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark
Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack),
PI related memleak, compilation without schemas or without xpath (Joerg
Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs,
rpm problem on , i86_64, removed a few compilation problems from 2.5.7,
xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)
- portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)
- William Brack fixed multithreading lock problems
- IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)
- Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane
Bidoul)
- A few W3C Schemas Structure improvements
- W3C Schemas Datatype improvements (Charlie Bozeman)
- Python bindings for thread globals (Stéphane Bidoul), and method/class
generator
- added --nonet option to xmllint
- documentation improvements (John Fleck)
2.5.7: Apr 25 2003:
- Relax-NG: Compiling to regexp and streaming validation on top of the
xmlReader interface, added to xmllint --stream
- xmlReader: Expand(), Next() and DOM access glue, bug fixes
- Support for large files: RGN validated a 4.5GB instance
- Thread support is now configured in by default
- Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes
(Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser
and zero bytes handling, some missing Windows file path conversions,
behaviour of the parser and validator in the presence of "out of memory"
error conditions
- extended the API to be able to plug a garbage collecting memory
allocator, added xmlMallocAtomic() and modified the allocations
accordingly.
- Performances: removed excessive malloc() calls, speedup of the push and
xmlReader interfaces, removed excessive thread locking
- Documentation: man page (John Fleck), xmlReader documentation
- Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)
2.5.6: Apr 1 2003:
- Fixed W3C XML Schemas datatype, should be compliant now except for
binHex and base64 which are not supported yet.
- bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and
XInclude entities handling, encoding detection on external subsets, XML
Schemas bugs and memory leaks, HTML parser (James Bursa)
- portability: python/trio (Albert Chin), Sun compiler warnings
- documentation: added --relaxng option to xmllint man page (John)
- improved error reporting: xml:space, start/end tag mismatches, Relax NG
errors
2.5.5: Mar 24 2003:
- Lot of fixes on the Relax NG implementation. More testing including
DocBook and TEI examples.
- Increased the support for W3C XML Schemas datatype
- Several bug fixes in the URI handling layer
- Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding
conversion, line counting in the parser.
- Added support for $XMLLINT_INDENT environment variable, FTP delete
- Fixed the RPM spec file name
2.5.4: Feb 20 2003:
- Conformance testing and lot of fixes on Relax NG and XInclude
implementation
- Implementation of XPointer element() scheme
- Bug fixes: XML parser, XInclude entities merge, validity checking on
namespaces,
2 serialization bugs, node info generation problems, a DTD regexp
generation problem.
- Portability: windows updates and path canonicalization (Igor)
- A few typo fixes (Kjartan Maraas)
- Python bindings generator fixes (Stephane Bidoul)
2.5.3: Feb 10 2003:
- RelaxNG and XML Schemas datatypes improvements, and added a first
version of RelaxNG Python bindings
- Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for
serializing namespace nodes, encoding conversion bug, XHTML1
serialization
- Portability fixes: Windows (Igor), AMD 64bits RPM spec file
2.5.2: Feb 5 2003:
- First implementation of RelaxNG, added --relaxng flag to xmllint
- Schemas support now compiled in by default.
- Bug fixes: DTD validation, namespace checking, XInclude and entities,
delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul),
XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory
consumption, HTML parser, HTML serialization in the presence of
namespaces
- added an HTML API to check elements and attributes.
- Documentation improvement, PDF for the tutorial (John Fleck), doc
patches (Stefan Kost)
- Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)
- Added python bindings for XPointer, contextual error reporting
(Stéphane Bidoul)
- URI/file escaping problems (Stefano Zacchiroli)
2.5.1: Jan 8 2003:
- Fixes a memory leak and configuration/compilation problems in 2.5.0
- documentation updates (John)
- a couple of XmlTextReader fixes
2.5.0: Jan 6 2003:
- New XmltextReader interface based on C#
API (with help of Stéphane Bidoul)
- Windows: more exports, including the new API (Igor)
- XInclude fallback fix
- Python: bindings for the new API, packaging (Stéphane Bidoul),
drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup
and iterators for Python-2.2 (Hannu Krosing)
- Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update
(John)
- Fix an XML parser bug raised by Vyacheslav Pindyura
- Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)
- Entities handling fixes
- new API to optionally track node creation and deletion (Lukas
Schroeder)
- Added documentation for the XmltextReader interface and some XML guidelines
2.4.30: Dec 12 2002:
- 2.4.29 broke the python bindings, rereleasing
- Improvement/fixes of the XML API generator, and couple of minor code
fixes.
2.4.29: Dec 11 2002:
- Windows fixes (Igor): Windows CE port, pthread linking, python bindings
(Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
- Fix for prev in python bindings (ERDI Gergo)
- Fix for entities handling (Marcus Clarke)
- Refactored the XML and HTML dumps to a single code path, fixed XHTML1
dump
- Fix for URI parsing when handling URNs with fragment identifiers
- Fix for HTTP URL escaping problem
- added an TextXmlReader (C#) like API (work in progress)
- Rewrote the API in XML generation script, includes a C parser and saves
more information needed for C# bindings
2.4.28: Nov 22 2002:
- a couple of python binding fixes
- 2 bug fixes in the XML push parser
- potential memory leak removed (Martin Stoilov)
- fix to the configure script for Unix (Dimitri Papadopoulos)
- added encoding support for XInclude parse="text"
- autodetection of XHTML1 and specific serialization rules added
- nasty threading bug fixed (William Brack)
2.4.27: Nov 17 2002:
- fixes for the Python bindings
- a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(),
HTML parser, Schemas (Charles Bozeman), document fragment support
(Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer,
xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr
Pajas), entities processing
- added grep to xmllint --shell
- VMS update patch from Craig A. Berry
- cleanup of the Windows build with support for more compilers (Igor),
better thread support on Windows
- cleanup of Unix Makefiles and spec file
- Improvements to the documentation (John Fleck)
2.4.26: Oct 18 2002:
- Patches for Windows CE port, improvements on Windows paths handling
- Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() ,
HTML serialization, Namespace compliance, and a number of small
problems
2.4.25: Sep 26 2002:
- A number of bug fixes: XPath, validation, Python bindings, DOM and
tree, xmlI/O, Html
- Serious rewrite of XInclude
- Made XML Schemas regexp part of the default build and APIs, small fix
and improvement of the regexp core
- Changed the validation code to reuse XML Schemas regexp APIs
- Better handling of Windows file paths, improvement of Makefiles (Igor,
Daniel Gehriger, Mark Vakoc)
- Improved the python I/O bindings, the tests, added resolver and regexp
APIs
- New logos from Marc Liyanage
- Tutorial improvements: John Fleck, Christopher Harris
- Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe
Merlet)
- removal of all stderr/perror use for error reporting
- Better error reporting: XPath and DTD validation
- update of the trio portability layer (Bjorn Reese)
2.4.24: Aug 22 2002 - XPath fixes (William), xf:escape-uri() (Wesley Terpstra)
- Python binding fixes: makefiles (William), generator, rpm build, x86-64
(fcrozat)
- HTML <style> and boolean attributes serializer fixes
- C14N improvements by Aleksey
- doc cleanups: Rick Jones
- Windows compiler makefile updates: Igor and Elizabeth Barham
- XInclude: implementation of fallback and xml:base fixup added
2.4.23: July 6 2002:
- performances patches: Peter Jacobi
- c14n fixes, testsuite and performances: Aleksey Sanin
- added xmlDocFormatDump: Chema Celorio
- new tutorial: John Fleck
- new hash functions and performances: Sander Vesik, portability fix from
Peter Jacobi
- a number of bug fixes: XPath (William Brack, Richard Jinks), XML and
HTML parsers, ID lookup function
- removal of all remaining sprintf: Aleksey Sanin
2.4.22: May 27 2002:
- a number of bug fixes: configure scripts, base handling, parser, memory
usage, HTML parser, XPath, documentation (Christian Cornelssen),
indentation, URI parsing
- Optimizations for XMLSec, fixing and making public some of the network
protocol handlers (Aleksey)
- performance patch from Gary Pennington
- Charles Bozeman provided date and time support for XML Schemas
datatypes
2.4.21: Apr 29 2002:
This release is both a bug fix release and also contains the early XML
Schemas structures at
http://www.w3.org/TR/xmlschema-1/
and datatypes at
http://www.w3.org/TR/xmlschema-2/
code, beware, all
interfaces are likely to change, there is huge holes, it is clearly a work in
progress and don't even think of putting this code in a production system,
it's actually not compiled in by default. The real fixes are:
- a couple of bugs or limitations introduced in 2.4.20
- patches for Borland C++ and MSC by Igor
- some fixes on XPath strings and conformance patches by Richard
Jinks
- patch from Aleksey for the ExcC14N specification
- OSF/1 bug fix by Bjorn
2.4.20: Apr 15 2002:
- bug fixes: file descriptor leak, XPath, HTML output, DTD validation
- XPath conformance testing by Richard Jinks
- Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings,
libxml.m4
2.4.19: Mar 25 2002:
- bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
encoder
- portability fixes in the HTTP code
- memory allocation checks using valgrind, and profiling tests
- revamp of the Windows build and Makefiles
2.4.18: Mar 18 2002:
- bug fixes: tree, SAX, canonicalization, validation, portability,
XPath
- removed the --with-buffer option it was becoming unmaintainable
- serious cleanup of the Python makefiles
- speedup patch to XPath very effective for DocBook stylesheets
- Fixes for Windows build, cleanup of the documentation
2.4.17: Mar 8 2002:
- a lot of bug fixes, including "namespace nodes have no parents in
XPath"
- fixed/improved the Python wrappers, added more examples and more
regression tests, XPath extension functions can now return node-sets
- added the XML Canonicalization support from Aleksey Sanin
2.4.16: Feb 20 2002:
- a lot of bug fixes, most of them were triggered by the XML Testsuite
from OASIS and W3C. Compliance has been significantly improved.
- a couple of portability fixes too.
2.4.15: Feb 11 2002:
- Fixed the Makefiles, especially the python module ones
- A few bug fixes and cleanup
- Includes cleanup
2.4.14: Feb 8 2002:
- Change of License to the MIT
License basically for integration in XFree86 codebase, and removing
confusion around the previous dual-licensing
- added Python bindings, beta software but should already be quite
complete
- a large number of fixes and cleanups, especially for all tree
manipulations
- cleanup of the headers, generation of a reference API definition in
XML
2.4.13: Jan 14 2002:
- update of the documentation: John Fleck and Charlie Bozeman
- cleanup of timing code from Justin Fletcher
- fixes for Windows and initial thread support on Win32: Igor and Serguei
Narojnyi
- Cygwin patch from Robert Collins
- added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg
2.4.12: Dec 7 2001:
- a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman),
XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups
(robert)
- Eric Lavigne contributed project files for MacOS
- some makefiles cleanups
2.4.11: Nov 26 2001:
- fixed a couple of errors in the includes, fixed a few bugs, some code
cleanups
- xmllint man pages improvement by Heiko Rupp
- updated VMS build instructions from John A Fotheringham
- Windows Makefiles updates from Igor
2.4.10: Nov 10 2001:
- URI escaping fix (Joel Young)
- added xmlGetNodePath() (for paths or XPointers generation)
- Fixes namespace handling problems when using DTD and validation
- improvements on xmllint: Morus Walter patches for --format and
--encode, Stefan Kost and Heiko Rupp improvements on the --shell
- fixes for xmlcatalog linking pointed by Weiqi Gao
- fixes to the HTML parser
2.4.9: Nov 6 2001:
- fixes more catalog bugs
- avoid a compilation problem, improve xmlGetLineNo()
2.4.8: Nov 4 2001:
- fixed SGML catalogs broken in previous release, updated xmlcatalog
tool
- fixed a compile errors and some includes troubles.
2.4.7: Oct 30 2001:
- exported some debugging interfaces
- serious rewrite of the catalog code
- integrated Gary Pennington thread safety patch, added configure option
and regression tests
- removed an HTML parser bug
- fixed a couple of potentially serious validation bugs
- integrated the SGML DocBook support in xmllint
- changed the nanoftp anonymous login passwd
- some I/O cleanup and a couple of interfaces for Perl wrapper
- general bug fixes
- updated xmllint man page by John Fleck
- some VMS and Windows updates
2.4.6: Oct 10 2001:
- added an updated man pages by John Fleck
- portability and configure fixes
- an infinite loop on the HTML parser was removed (William)
- Windows makefile patches from Igor
- fixed half a dozen bugs reported for libxml or libxslt
- updated xmlcatalog to be able to modify SGML super catalogs
2.4.5: Sep 14 2001:
- Remove a few annoying bugs in 2.4.4
- forces the HTML serializer to output decimal charrefs since some
version of Netscape can't handle hexadecimal ones
1.8.16: Sep 14 2001:
- maintenance release of the old libxml1 branch, couple of bug and
portability fixes
2.4.4: Sep 12 2001:
- added --convert to xmlcatalog, bug fixes and cleanups of XML
Catalog
- a few bug fixes and some portability changes
- some documentation cleanups
2.4.3: Aug 23 2001:
- XML Catalog support see the doc
- New NaN/Infinity floating point code
- A few bug fixes
2.4.2: Aug 15 2001:
- adds xmlLineNumbersDefault() to control line number generation
- lot of bug fixes
- the Microsoft MSC projects files should now be up to date
- inheritance of namespaces from DTD defaulted attributes
- fixes a serious potential security bug
- added a --format option to xmllint
2.4.1: July 24 2001:
- possibility to keep line numbers in the tree
- some computation NaN fixes
- extension of the XPath API
- cleanup for alpha and ia64 targets
- patch to allow saving through HTTP PUT or POST
2.4.0: July 10 2001:
- Fixed a few bugs in XPath, validation, and tree handling.
- Fixed XML Base implementation, added a couple of examples to the
regression tests
- A bit of cleanup
2.3.14: July 5 2001:
- fixed some entities problems and reduce memory requirement when
substituting them
- lots of improvements in the XPath queries interpreter can be
substantially faster
- Makefiles and configure cleanups
- Fixes to XPath variable eval, and compare on empty node set
- HTML tag closing bug fixed
- Fixed an URI reference computation problem when validating
2.3.13: June 28 2001:
- 2.3.12 configure.in was broken as well as the push mode XML parser
- a few more fixes for compilation on Windows MSC by Yon Derek
1.8.14: June 28 2001:
- Zbigniew Chyla gave a patch to use the old XML parser in push mode
- Small Makefile fix
2.3.12: June 26 2001:
- lots of cleanup
- a couple of validation fix
- fixed line number counting
- fixed serious problems in the XInclude processing
- added support for UTF8 BOM at beginning of entities
- fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
miscompile uri.c (William), Thomas Leitner provided a fix for the
optimizer on Tru64
- incorporated Yon Derek and Igor Zlatkovic fixes and improvements for
compilation on Windows MSC
- update of libxml-doc.el (Felix Natter)
- fixed 2 bugs in URI normalization code
2.3.11: June 17 2001:
- updates to trio, Makefiles and configure should fix some portability
problems (alpha)
- fixed some HTML serialization problems (pre, script, and block/inline
handling), added encoding aware APIs, cleanup of this code
- added xmlHasNsProp()
- implemented a specific PI for encoding support in the DocBook SGML
parser
- some XPath fixes (-Infinity, / as a function parameter and namespaces
node selection)
- fixed a performance problem and an error in the validation code
- fixed XInclude routine to implement the recursive behaviour
- fixed xmlFreeNode problem when libxml is included statically twice
- added --version to xmllint for bug reports
2.3.10: June 1 2001:
- fixed the SGML catalog support
- a number of reported bugs got fixed, in XPath, iconv detection,
XInclude processing
- XPath string function should now handle unicode correctly
2.3.9: May 19 2001:
Lots of bugfixes, and added a basic SGML catalog support:
- HTML push bugfix #54891 and another patch from Jonas Borgstrom
- some serious speed optimization again
- some documentation cleanups
- trying to get better linking on Solaris (-R)
- XPath API cleanup from Thomas Broyer
- Validation bug fixed #54631, added a patch from Gary Pennington, fixed
xmlValidGetValidElements()
- Added an INSTALL file
- Attribute removal added to API: #54433
- added a basic support for SGML catalogs
- fixed xmlKeepBlanksDefault(0) API
- bugfix in xmlNodeGetLang()
- fixed a small configure portability problem
- fixed an inversion of SYSTEM and PUBLIC identifier in HTML document
1.8.13: May 14 2001:
- bugfixes release of the old libxml1 branch used by Gnome
2.3.8: May 3 2001:
- Integrated an SGML DocBook parser for the Gnome project
- Fixed a few things in the HTML parser
- Fixed some XPath bugs raised by XSLT use, tried to fix the floating
point portability issue
- Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for
DOM+validation using the XML REC as input and a 700MHz celeron).
- incorporated more Windows cleanup
- added xmlSaveFormatFile()
- fixed problems in copying nodes with entities references (gdome)
- removed some troubles surrounding the new validation module
2.3.7: April 22 2001:
- lots of small bug fixes, corrected XPointer
- Non deterministic content model validation support
- added xmlDocCopyNode for gdome2
- revamped the way the HTML parser handles end of tags
- XPath: corrections of namespaces support and number formatting
- Windows: Igor Zlatkovic patches for MSC compilation
- HTML output fixes from P C Chow and William M. Brack
- Improved validation speed sensible for DocBook
- fixed a big bug with ID declared in external parsed entities
- portability fixes, update of Trio from Bjorn Reese
2.3.6: April 8 2001:
- Code cleanup using extreme gcc compiler warning options, found and
cleared half a dozen potential problem
- the Eazel team found an XML parser bug
- cleaned up the user of some of the string formatting function. used the
trio library code to provide the one needed when the platform is missing
them
- xpath: removed a memory leak and fixed the predicate evaluation
problem, extended the testsuite and cleaned up the result. XPointer seems
broken ...
2.3.5: Mar 23 2001:
- Biggest change is separate parsing and evaluation of XPath expressions,
there is some new APIs for this too
- included a number of bug fixes(XML push parser, 51876, notations,
52299)
- Fixed some portability issues
2.3.4: Mar 10 2001:
- Fixed bugs #51860 and #51861
- Added a global variable xmlDefaultBufferSize to allow default buffer
size to be application tunable.
- Some cleanup in the validation code, still a bug left and this part
should probably be rewritten to support ambiguous content model :-\
- Fix a couple of serious bugs introduced or raised by changes in 2.3.3
parser
- Fixed another bug in xmlNodeGetContent()
- Bjorn fixed XPath node collection and Number formatting
- Fixed a loop reported in the HTML parsing
- blank space are reported even if the Dtd content model proves that they
are formatting spaces, this is for XML conformance
2.3.3: Mar 1 2001:
- small change in XPath for XSLT
- documentation cleanups
- fix in validation by Gary Pennington
- serious parsing performances improvements
2.3.2: Feb 24 2001:
- chasing XPath bugs, found a bunch, completed some TODO
- fixed a Dtd parsing bug
- fixed a bug in xmlNodeGetContent
- ID/IDREF support partly rewritten by Gary Pennington
2.3.1: Feb 15 2001:
- some XPath and HTML bug fixes for XSLT
- small extension of the hash table interfaces for DOM gdome2
implementation
- A few bug fixes
2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track):
- Lots of XPath bug fixes
- Add a mode with Dtd lookup but without validation error reporting for
XSLT
- Add support for text node without escaping (XSLT)
- bug fixes for xmlCheckFilename
- validation code bug fixes from Gary Pennington
- Patch from Paul D. Smith correcting URI path normalization
- Patch to allow simultaneous install of libxml-devel and
libxml2-devel
- the example Makefile is now fixed
- added HTML to the RPM packages
- tree copying bugfixes
- updates to Windows makefiles
- optimization patch from Bjorn Reese
2.2.11: Jan 4 2001:
- bunch of bug fixes (memory I/O, xpath, ftp/http, ...)
- added htmlHandleOmittedElem()
- Applied Bjorn Reese's IPV6 first patch
- Applied Paul D. Smith patches for validation of XInclude results
- added XPointer xmlns() new scheme support
2.2.10: Nov 25 2000:
- Fix the Windows problems of 2.2.8
- integrate OpenVMS patches
- better handling of some nasty HTML input
- Improved the XPointer implementation
- integrate a number of provided patches
2.2.9: Nov 25 2000:
- erroneous release :-(
2.2.8: Nov 13 2000:
- First version of XInclude
support
- Patch in conditional section handling
- updated MS compiler project
- fixed some XPath problems
- added an URI escaping function
- some other bug fixes
2.2.7: Oct 31 2000:
- added message redirection
- XPath improvements (thanks TOM !)
- xmlIOParseDTD() added
- various small fixes in the HTML, URI, HTTP and XPointer support
- some cleanup of the Makefile, autoconf and the distribution content
2.2.6: Oct 25 2000::
- Added an hash table module, migrated a number of internal structure to
those
- Fixed a posteriori validation problems
- HTTP module cleanups
- HTML parser improvements (tag errors, script/style handling, attribute
normalization)
- coalescing of adjacent text nodes
- couple of XPath bug fixes, exported the internal API
2.2.5: Oct 15 2000::
- XPointer implementation and testsuite
- Lot of XPath fixes, added variable and functions registration, more
tests
- Portability fixes, lots of enhancements toward an easy Windows build
and release
- Late validation fixes
- Integrated a lot of contributed patches
- added memory management docs
- a performance problem when using large buffer seems fixed
2.2.4: Oct 1 2000::
- main XPath problem fixed
- Integrated portability patches for Windows
- Serious bug fixes on the URI and HTML code
2.2.3: Sep 17 2000:
- bug fixes
- cleanup of entity handling code
- overall review of all loops in the parsers, all sprintf usage has been
checked too
- Far better handling of larges Dtd. Validating against DocBook XML Dtd
works smoothly now.
1.8.10: Sep 6 2000:
- bug fix release for some Gnome projects
2.2.2: August 12 2000:
- mostly bug fixes
- started adding routines to access xml parser context options
2.2.1: July 21 2000:
- a purely bug fixes release
- fixed an encoding support problem when parsing from a memory block
- fixed a DOCTYPE parsing problem
- removed a bug in the function allowing to override the memory
allocation routines
2.2.0: July 14 2000:
- applied a lot of portability fixes
- better encoding support/cleanup and saving (content is now always
encoded in UTF-8)
- the HTML parser now correctly handles encodings
- added xmlHasProp()
- fixed a serious problem with &
- propagated the fix to FTP client
- cleanup, bugfixes, etc ...
- Added a page about libxml Internationalization
support
1.8.9: July 9 2000:
- fixed the spec the RPMs should be better
- fixed a serious bug in the FTP implementation, released 1.8.9 to solve
rpmfind users problem
2.1.1: July 1 2000:
- fixes a couple of bugs in the 2.1.0 packaging
- improvements on the HTML parser
2.1.0 and 1.8.8: June 29 2000:
- 1.8.8 is mostly a commodity package for upgrading to libxml2 according
to new instructions. It fixes a nasty problem
about & charref parsing
- 2.1.0 also ease the upgrade from libxml v1 to the recent version. it
also contains numerous fixes and enhancements:
added xmlStopParser() to stop parsing
improved a lot parsing speed when there is large CDATA blocks
includes XPath patches provided by Picdar Technology
tried to fix as much as possible DTD validation and namespace
related problems
output to a given encoding has been added/tested
lot of various fixes
- added xmlStopParser() to stop parsing
- improved a lot parsing speed when there is large CDATA blocks
- includes XPath patches provided by Picdar Technology
- tried to fix as much as possible DTD validation and namespace
related problems
- output to a given encoding has been added/tested
- lot of various fixes
2.0.0: Apr 12 2000:
- First public release of libxml2. If you are using libxml, it's a good
idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially
scheduled for Apr 3 the release occurred only on Apr 12 due to massive
workload.
- The include are now located under $prefix/include/libxml (instead of
$prefix/include/gnome-xml), they also are referenced by
#include <libxml/xxx.h>
instead of
#include "xxx.h"
- a new URI module for parsing URIs and following strictly RFC 2396
- the memory allocation routines used by libxml can now be overloaded
dynamically by using xmlMemSetup()
- The previously CVS only tool tester has been renamed
xmllint and is now installed as part of the libxml2
package
- The I/O interface has been revamped. There is now ways to plug in
specific I/O modules, either at the URI scheme detection level using
xmlRegisterInputCallbacks() or by passing I/O functions when creating a
parser context using xmlCreateIOParserCtxt()
- there is a C preprocessor macro LIBXML_VERSION providing the version
number of the libxml module in use
- a number of optional features of libxml can now be excluded at
configure time (FTP/HTTP/HTML/XPath/Debug)
2.0.0beta: Mar 14 2000:
- This is a first Beta release of libxml version 2
- It's available only fromxmlsoft.org
FTP, it's packaged as libxml2-2.0.0beta and available as tar and
RPMs
- This version is now the head in the Gnome CVS base, the old one is
available under the tag LIB_XML_1_X
- This includes a very large set of changes. From a programmatic point
of view applications should not have to be modified too much, check the
upgrade page
- Some interfaces may changes (especially a bit about encoding).
- the updates includes:
fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
handled now
Better handling of entities, especially well-formedness checking
and proper PEref extensions in external subsets
DTD conditional sections
Validation now correctly handle entities content
change
structures to accommodate DOM
- fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
handled now
- Better handling of entities, especially well-formedness checking
and proper PEref extensions in external subsets
- DTD conditional sections
- Validation now correctly handle entities content
- change
structures to accommodate DOM
- Serious progress were made toward compliance, here are the result of the test against the
OASIS testsuite (except the Japanese tests since I don't support that
encoding yet). This URL is rebuilt every couple of hours using the CVS
head version.
1.8.7: Mar 6 2000:
- This is a bug fix release:
- It is possible to disable the ignorable blanks heuristic used by
libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
that for adherence to XML spec, this behaviour will be disabled by
default in 2.x . The same function will allow to keep compatibility for
old code.
- Blanks in <a> </a> constructs are not ignored anymore,
avoiding heuristic is really the Right Way :-\
- The unchecked use of snprintf which was breaking libxml-1.8.6
compilation on some platforms has been fixed
- nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
URIs
1.8.6: Jan 31 2000:
- added a nanoFTP transport module, debugged until the new version of rpmfind can use
it without troubles
1.8.5: Jan 21 2000:
- adding APIs to parse a well balanced chunk of XML (production [43] content of the
XML spec)
- fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no
- Jody Goldberg <jgoldberg@home.com> provided another patch trying
to solve the zlib checks problems
- The current state in gnome CVS base is expected to ship as 1.8.5 with
gnumeric soon
1.8.4: Jan 13 2000:
- bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()
- all exit() call should have been removed from libxml
- fixed a problem with INCLUDE_WINSOCK on WIN32 platform
- added newDocFragment()
1.8.3: Jan 5 2000:
- a Push interface for the XML and HTML parsers
- a shell-like interface to the document tree (try tester --shell :-)
- lots of bug fixes and improvement added over XMas holidays
- fixed the DTD parsing code to work with the xhtml DTD
- added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()
- Fixed bugs in xmlNewNs()
- External entity loading code has been revamped, now it uses
xmlLoadExternalEntity(), some fix on entities processing were added
- cleaned up WIN32 includes of socket stuff
1.8.2: Dec 21 1999:
- I got another problem with includes and C++, I hope this issue is fixed
for good this time
- Added a few tree modification functions: xmlReplaceNode,
xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and
xmlDocSetRootElement
- Tried to improve the HTML output with help from Chris Lahey
1.8.1: Dec 18 1999:
- various patches to avoid troubles when using libxml with C++ compilers
the "namespace" keyword and C escaping in include files
- a problem in one of the core macros IS_CHAR was corrected
- fixed a bug introduced in 1.8.0 breaking default namespace processing,
and more specifically the Dia application
- fixed a posteriori validation (validation after parsing, or by using a
Dtd not specified in the original document)
- fixed a bug in
1.8.0: Dec 12 1999:
- cleanup, especially memory wise
- the parser should be more reliable, especially the HTML one, it should
not crash, whatever the input !
- Integrated various patches, especially a speedup improvement for large
dataset from Carl Nygard,
configure with --with-buffers to enable them.
- attribute normalization, oops should have been added long ago !
- attributes defaulted from DTDs should be available, xmlSetProp() now
does entities escaping by default.
1.7.4: Oct 25 1999:
- Lots of HTML improvement
- Fixed some errors when saving both XML and HTML
- More examples, the regression tests should now look clean
- Fixed a bug with contiguous charref
1.7.3: Sep 29 1999:
- portability problems fixed
- snprintf was used unconditionally, leading to link problems on system
were it's not available, fixed
1.7.1: Sep 24 1999:
- The basic type for strings manipulated by libxml has been renamed in
1.7.1 from CHAR to xmlChar. The reason
is that CHAR was conflicting with a predefined type on Windows. However
on non WIN32 environment, compatibility is provided by the way of a
#define .
- Changed another error : the use of a structure field called errno, and
leading to troubles on platforms where it's a macro
1.7.0: Sep 23 1999:
- Added the ability to fetch remote DTD or parsed entities, see the nanohttp module.
- Added an errno to report errors by another mean than a simple printf
like callback
- Finished ID/IDREF support and checking when validation
- Serious memory leaks fixed (there is now a memory wrapper module)
- Improvement of XPath
implementation
- Added an HTML parser front-end
Daniel Veillard at
bugs.html
bin/xmlcatalog 0000755 00000050610 15033621455 0007403 0 ustar 00 ELF >