Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!=33tree.hnu[/** * @file * * @brief Document tree API * * Data structures and functions to build, modify, query and * serialize XML and HTML document trees. Also contains the * buffer API. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef XML_TREE_INTERNALS /* * Emulate circular dependency for backward compatibility */ #include #else /* XML_TREE_INTERNALS */ #ifndef __XML_TREE_H__ /** @cond ignore */ #define __XML_TREE_H__ /** @endcond */ #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Backward compatibility */ /** @cond ignore */ #define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT #define xmlDefaultBufferSize 4096 #define XML_GET_CONTENT(n) \ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) #define XML_GET_LINE(n) xmlGetLineNo(n) /** @endcond */ /* * Some of the basic types pointer to structures: */ /* xmlIO.h */ /** * Parser input buffer * * This struct and all related functions should ultimately * be removed from the public interface. */ typedef struct _xmlParserInputBuffer xmlParserInputBuffer; typedef xmlParserInputBuffer *xmlParserInputBufferPtr; /** Output buffer */ typedef struct _xmlOutputBuffer xmlOutputBuffer; typedef xmlOutputBuffer *xmlOutputBufferPtr; /* parser.h */ /** Parser input */ typedef struct _xmlParserInput xmlParserInput; typedef xmlParserInput *xmlParserInputPtr; /** Parser context */ typedef struct _xmlParserCtxt xmlParserCtxt; typedef xmlParserCtxt *xmlParserCtxtPtr; /** SAX locator */ typedef struct _xmlSAXLocator xmlSAXLocator; typedef xmlSAXLocator *xmlSAXLocatorPtr; /** SAX handler */ typedef struct _xmlSAXHandler xmlSAXHandler; typedef xmlSAXHandler *xmlSAXHandlerPtr; /* entities.h */ /** Entity declaration */ typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; /** * Removed, buffers always use XML_BUFFER_ALLOC_IO now. */ 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; /** Buffer type */ typedef struct _xmlBuffer xmlBuffer; typedef xmlBuffer *xmlBufferPtr; /** * A buffer structure, this old construct is limited to 2GB and * is being deprecated, use API with xmlBuf instead. */ struct _xmlBuffer { /** * @deprecated Use #xmlBufferContent * * The buffer content UTF8 */ xmlChar *content XML_DEPRECATED_MEMBER; /** * @deprecated Use #xmlBufferLength * * The buffer size used */ unsigned int use XML_DEPRECATED_MEMBER; /* The buffer size */ unsigned int size XML_DEPRECATED_MEMBER; /* The realloc method */ xmlBufferAllocationScheme alloc XML_DEPRECATED_MEMBER; /* in IO mode we may have a different base */ xmlChar *contentIO XML_DEPRECATED_MEMBER; }; /** Buffer with 64-bit support */ typedef struct _xmlBuf xmlBuf; typedef xmlBuf *xmlBufPtr; /** * 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 /** * 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" /** * 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 Level 1 values. * See http://www.w3.org/TR/REC-DOM-Level-1/ * * Actually this had diverged a bit, and XML_DTD_NODE is used instead * of XML_DOCUMENT_TYPE_NODE. */ typedef enum { /** * An element. * * Objects of this type are an xmlNode. */ XML_ELEMENT_NODE= 1, /** * An attribute. * * Objects of this type are an xmlAttr. */ XML_ATTRIBUTE_NODE= 2, /** * A text node. * * Objects of this type are an xmlNode. */ XML_TEXT_NODE= 3, /** * A CDATA section. * * Objects of this type are an xmlNode. */ XML_CDATA_SECTION_NODE= 4, /** * An entity reference. * * Objects of this type are an xmlNode. The `children` member * points to the entity declaration if available. */ XML_ENTITY_REF_NODE= 5, /** unused */ XML_ENTITY_NODE= 6, /** * A processing instruction. * * Objects of this type are an xmlNode. */ XML_PI_NODE= 7, /** * A comment. * * Objects of this type are an xmlNode. */ XML_COMMENT_NODE= 8, /** * A document. * * Objects of this type are an xmlDoc. */ XML_DOCUMENT_NODE= 9, /** unused */ XML_DOCUMENT_TYPE_NODE= 10, /** * A document fragment. * * Objects of this type are an xmlNode. */ XML_DOCUMENT_FRAG_NODE= 11, /** A notation, unused */ XML_NOTATION_NODE= 12, /** * An HTML document. * * Objects of this type are an xmlDoc. */ XML_HTML_DOCUMENT_NODE= 13, /** * A document type definition. * * Objects of this type are an xmlDtd. */ XML_DTD_NODE= 14, /** * An element declaration. * * Objects of this type are an xmlElement. */ XML_ELEMENT_DECL= 15, /** * An attribute declaration. * * Objects of this type are an xmlAttribute. */ XML_ATTRIBUTE_DECL= 16, /** * An entity declaration. * * Objects of this type are an xmlEntity. */ XML_ENTITY_DECL= 17, /** * An XPath namespace node. * * Can only be returned by the XPath engine. Objects of this * type are an xmlNs which has a completely different layout * than xmlNode. The `next` member contains a pointer to the * xmlNode element to which the namespace applies. * * Nodes of this type must be handled with extreme care to * avoid type confusion bugs. */ XML_NAMESPACE_DECL= 18, /** * An XInclude start marker. * * Objects of this type are an xmlNode. Inserted as preceding * sibling of XIncluded content. */ XML_XINCLUDE_START= 19, /** * An XInclude end marker. * * Objects of this type are an xmlNode. Inserted as following * sibling of XIncluded content. */ XML_XINCLUDE_END= 20 /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */ } xmlElementType; /** @cond IGNORE */ /* For backward compatibility */ #define XML_DOCB_DOCUMENT_NODE 21 /** @endcond */ /** Notation declaration */ typedef struct _xmlNotation xmlNotation; typedef xmlNotation *xmlNotationPtr; /** * A DTD Notation definition. * * Should be treated as opaque. Accessing members directly * is deprecated. */ struct _xmlNotation { /** Notation name */ const xmlChar *name; /** Public identifier, if any */ const xmlChar *PublicID; /** System identifier, if any */ const xmlChar *SystemID; }; /** * 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; /** * A DTD Attribute default definition. */ typedef enum { XML_ATTRIBUTE_NONE = 1, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED, XML_ATTRIBUTE_FIXED } xmlAttributeDefault; /** Enumeration in a DTD */ typedef struct _xmlEnumeration xmlEnumeration; typedef xmlEnumeration *xmlEnumerationPtr; /** * List structure used when there is an enumeration in DTDs. * * Should be treated as opaque. Accessing members directly * is deprecated. */ struct _xmlEnumeration { /** next enumeration */ struct _xmlEnumeration *next XML_DEPRECATED_MEMBER; /** value */ const xmlChar *name XML_DEPRECATED_MEMBER; }; /** Attribute declaration */ typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; /** * An Attribute declaration in a DTD. * * Should be treated as opaque. Accessing members directly * is deprecated. */ struct _xmlAttribute { /** application data */ void *_private; /** XML_ATTRIBUTE_DECL */ xmlElementType type; /** attribute name */ const xmlChar *name; /** NULL */ struct _xmlNode *children; /** NULL */ struct _xmlNode *last; /** DTD */ struct _xmlDtd *parent; /** next sibling */ struct _xmlNode *next; /** previous sibling */ struct _xmlNode *prev; /** containing document */ struct _xmlDoc *doc; /** next in hash table */ struct _xmlAttribute *nexth; /** attribute type */ xmlAttributeType atype; /** attribute default */ xmlAttributeDefault def; /** default value */ xmlChar *defaultValue; /** enumeration tree if any */ xmlEnumeration *tree XML_DEPRECATED_MEMBER; /** namespace prefix if any */ const xmlChar *prefix; /** element name */ const xmlChar *elem; }; /** * 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; /** * 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; /** Element content in element declarations */ typedef struct _xmlElementContent xmlElementContent; typedef xmlElementContent *xmlElementContentPtr; /** * An XML Element content as stored after parsing an element definition * in a DTD. * * Should be treated as opaque. Accessing members directly * is deprecated. */ struct _xmlElementContent { /** PCDATA, ELEMENT, SEQ or OR */ xmlElementContentType type XML_DEPRECATED_MEMBER; /** ONCE, OPT, MULT or PLUS */ xmlElementContentOccur ocur XML_DEPRECATED_MEMBER; /** element name */ const xmlChar *name XML_DEPRECATED_MEMBER; /** first child */ struct _xmlElementContent *c1 XML_DEPRECATED_MEMBER; /** second child */ struct _xmlElementContent *c2 XML_DEPRECATED_MEMBER; /** parent */ struct _xmlElementContent *parent XML_DEPRECATED_MEMBER; /** namespace prefix */ const xmlChar *prefix XML_DEPRECATED_MEMBER; }; /** * 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; /** Element declaration */ typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; /** * An XML Element declaration from a DTD. * * Should be treated as opaque. Accessing members directly * is deprecated. */ struct _xmlElement { /** application data */ void *_private; /** XML_ELEMENT_DECL */ xmlElementType type; /** element name */ const xmlChar *name; /** NULL */ struct _xmlNode *children; /** NULL */ struct _xmlNode *last; /** -> DTD */ struct _xmlDtd *parent; /** next sibling */ struct _xmlNode *next; /** previous sibling */ struct _xmlNode *prev; /** containing document */ struct _xmlDoc *doc; /** element type */ xmlElementTypeVal etype; /** allowed element content */ xmlElementContent *content; /** list of declared attributes */ xmlAttribute *attributes; /** namespace prefix if any */ const xmlChar *prefix; #ifdef LIBXML_REGEXP_ENABLED /** validating regexp */ xmlRegexp *contModel XML_DEPRECATED_MEMBER; #else void *contModel XML_DEPRECATED_MEMBER; #endif }; /** * A namespace declaration node. */ #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL typedef xmlElementType xmlNsType; /** Namespace declaration */ typedef struct _xmlNs xmlNs; typedef xmlNs *xmlNsPtr; /** * An XML namespace. * Note that prefix == NULL is valid, it defines the default namespace * within the subtree (until overridden). * * xmlNsType is unified with xmlElementType. * * Note that the XPath engine returns XPath namespace nodes as * xmlNs cast to xmlNode. This is a terrible design decision that * can easily cause type confusion errors. In this case, the `next` * member points to the xmlNode element to which the namespace * node belongs. */ struct _xmlNs { /** next namespace */ struct _xmlNs *next; /** XML_NAMESPACE_DECL */ xmlNsType type; /** namespace URI */ const xmlChar *href; /** namespace prefix */ const xmlChar *prefix; /** application data */ void *_private; /** normally an xmlDoc */ struct _xmlDoc *context XML_DEPRECATED_MEMBER; }; /** Document type definition (DTD) */ typedef struct _xmlDtd xmlDtd; typedef xmlDtd *xmlDtdPtr; /** * An XML DTD, as defined by ns. * (Note that this is not intended for elem->nsDef). */ xmlDOMWrapAcquireNsFunction getNsForNodeFunc; }; /** * Signature for the registration callback of a created node * * @param node the current node */ typedef void (*xmlRegisterNodeFunc) (xmlNode *node); /** * Signature for the deregistration callback of a discarded node * * @param node the current node */ typedef void (*xmlDeregisterNodeFunc) (xmlNode *node); /** * Macro for compatibility naming layer with libxml1. Maps * to "children." */ #ifndef xmlChildrenNode #define xmlChildrenNode children #endif /** * Macro for compatibility naming layer with libxml1. Maps * to "children". */ #ifndef xmlRootNode #define xmlRootNode children #endif /* * Variables. */ /** @cond ignore */ XML_DEPRECATED XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void); XML_DEPRECATED XMLPUBFUN xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void); #ifndef XML_GLOBALS_NO_REDEFINITION #define xmlRegisterNodeDefaultValue \ (*__xmlRegisterNodeDefaultValue()) #define xmlDeregisterNodeDefaultValue \ (*__xmlDeregisterNodeDefaultValue()) #endif /** @endcond */ /* * Some helper functions */ XMLPUBFUN int xmlValidateNCName (const xmlChar *value, int space); XMLPUBFUN int xmlValidateQName (const xmlChar *value, int space); XMLPUBFUN int xmlValidateName (const xmlChar *value, int space); XMLPUBFUN int xmlValidateNMToken (const xmlChar *value, int space); 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); /* * Creating/freeing new structures. */ XMLPUBFUN xmlDtd * xmlCreateIntSubset (xmlDoc *doc, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN xmlDtd * xmlNewDtd (xmlDoc *doc, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN xmlDtd * xmlGetIntSubset (const xmlDoc *doc); XMLPUBFUN void xmlFreeDtd (xmlDtd *cur); XMLPUBFUN xmlNs * xmlNewNs (xmlNode *node, const xmlChar *href, const xmlChar *prefix); XMLPUBFUN void xmlFreeNs (xmlNs *cur); XMLPUBFUN void xmlFreeNsList (xmlNs *cur); XMLPUBFUN xmlDoc * xmlNewDoc (const xmlChar *version); XMLPUBFUN void xmlFreeDoc (xmlDoc *cur); XMLPUBFUN xmlAttr * xmlNewDocProp (xmlDoc *doc, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttr * xmlNewProp (xmlNode *node, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttr * xmlNewNsProp (xmlNode *node, xmlNs *ns, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttr * xmlNewNsPropEatName (xmlNode *node, xmlNs *ns, xmlChar *name, const xmlChar *value); XMLPUBFUN void xmlFreePropList (xmlAttr *cur); XMLPUBFUN void xmlFreeProp (xmlAttr *cur); XMLPUBFUN xmlAttr * xmlCopyProp (xmlNode *target, xmlAttr *cur); XMLPUBFUN xmlAttr * xmlCopyPropList (xmlNode *target, xmlAttr *cur); XMLPUBFUN xmlDtd * xmlCopyDtd (xmlDtd *dtd); XMLPUBFUN xmlDoc * xmlCopyDoc (xmlDoc *doc, int recursive); /* * Creating new nodes. */ XMLPUBFUN xmlNode * xmlNewDocNode (xmlDoc *doc, xmlNs *ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocNodeEatName (xmlDoc *doc, xmlNs *ns, xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewNode (xmlNs *ns, const xmlChar *name); XMLPUBFUN xmlNode * xmlNewNodeEatName (xmlNs *ns, xmlChar *name); XMLPUBFUN xmlNode * xmlNewChild (xmlNode *parent, xmlNs *ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocText (const xmlDoc *doc, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewText (const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocPI (xmlDoc *doc, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewPI (const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocTextLen (xmlDoc *doc, const xmlChar *content, int len); XMLPUBFUN xmlNode * xmlNewTextLen (const xmlChar *content, int len); XMLPUBFUN xmlNode * xmlNewDocComment (xmlDoc *doc, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewComment (const xmlChar *content); XMLPUBFUN xmlNode * xmlNewCDataBlock (xmlDoc *doc, const xmlChar *content, int len); XMLPUBFUN xmlNode * xmlNewCharRef (xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlNode * xmlNewReference (const xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlNode * xmlCopyNode (xmlNode *node, int recursive); XMLPUBFUN xmlNode * xmlDocCopyNode (xmlNode *node, xmlDoc *doc, int recursive); XMLPUBFUN xmlNode * xmlDocCopyNodeList (xmlDoc *doc, xmlNode *node); XMLPUBFUN xmlNode * xmlCopyNodeList (xmlNode *node); XMLPUBFUN xmlNode * xmlNewTextChild (xmlNode *parent, xmlNs *ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocRawNode (xmlDoc *doc, xmlNs *ns, const xmlChar *name, const xmlChar *content); XMLPUBFUN xmlNode * xmlNewDocFragment (xmlDoc *doc); /* * Navigating. */ XMLPUBFUN long xmlGetLineNo (const xmlNode *node); XMLPUBFUN xmlChar * xmlGetNodePath (const xmlNode *node); XMLPUBFUN xmlNode * xmlDocGetRootElement (const xmlDoc *doc); XMLPUBFUN xmlNode * xmlGetLastChild (const xmlNode *parent); XMLPUBFUN int xmlNodeIsText (const xmlNode *node); XMLPUBFUN int xmlIsBlankNode (const xmlNode *node); /* * Changing the structure. */ XMLPUBFUN xmlNode * xmlDocSetRootElement (xmlDoc *doc, xmlNode *root); XMLPUBFUN void xmlNodeSetName (xmlNode *cur, const xmlChar *name); XMLPUBFUN xmlNode * xmlAddChild (xmlNode *parent, xmlNode *cur); XMLPUBFUN xmlNode * xmlAddChildList (xmlNode *parent, xmlNode *cur); XMLPUBFUN xmlNode * xmlReplaceNode (xmlNode *old, xmlNode *cur); XMLPUBFUN xmlNode * xmlAddPrevSibling (xmlNode *cur, xmlNode *elem); XMLPUBFUN xmlNode * xmlAddSibling (xmlNode *cur, xmlNode *elem); XMLPUBFUN xmlNode * xmlAddNextSibling (xmlNode *cur, xmlNode *elem); XMLPUBFUN void xmlUnlinkNode (xmlNode *cur); XMLPUBFUN xmlNode * xmlTextMerge (xmlNode *first, xmlNode *second); XMLPUBFUN int xmlTextConcat (xmlNode *node, const xmlChar *content, int len); XMLPUBFUN void xmlFreeNodeList (xmlNode *cur); XMLPUBFUN void xmlFreeNode (xmlNode *cur); XMLPUBFUN int xmlSetTreeDoc (xmlNode *tree, xmlDoc *doc); XMLPUBFUN int xmlSetListDoc (xmlNode *list, xmlDoc *doc); /* * Namespaces. */ XMLPUBFUN xmlNs * xmlSearchNs (xmlDoc *doc, xmlNode *node, const xmlChar *nameSpace); XMLPUBFUN xmlNs * xmlSearchNsByHref (xmlDoc *doc, xmlNode *node, const xmlChar *href); XMLPUBFUN int xmlGetNsListSafe (const xmlDoc *doc, const xmlNode *node, xmlNs ***out); XMLPUBFUN xmlNs ** xmlGetNsList (const xmlDoc *doc, const xmlNode *node); XMLPUBFUN void xmlSetNs (xmlNode *node, xmlNs *ns); XMLPUBFUN xmlNs * xmlCopyNamespace (xmlNs *cur); XMLPUBFUN xmlNs * xmlCopyNamespaceList (xmlNs *cur); /* * Changing the content. */ XMLPUBFUN xmlAttr * xmlSetProp (xmlNode *node, const xmlChar *name, const xmlChar *value); XMLPUBFUN xmlAttr * xmlSetNsProp (xmlNode *node, xmlNs *ns, const xmlChar *name, const xmlChar *value); 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 xmlAttr * xmlHasProp (const xmlNode *node, const xmlChar *name); XMLPUBFUN xmlAttr * xmlHasNsProp (const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace); XMLPUBFUN xmlChar * xmlGetNsProp (const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace); XMLPUBFUN xmlNode * xmlStringGetNodeList (const xmlDoc *doc, const xmlChar *value); XMLPUBFUN xmlNode * xmlStringLenGetNodeList (const xmlDoc *doc, const xmlChar *value, int len); XMLPUBFUN xmlChar * xmlNodeListGetString (xmlDoc *doc, const xmlNode *list, int inLine); XMLPUBFUN xmlChar * xmlNodeListGetRawString (const xmlDoc *doc, const xmlNode *list, int inLine); XMLPUBFUN int xmlNodeSetContent (xmlNode *cur, const xmlChar *content); XMLPUBFUN int xmlNodeSetContentLen (xmlNode *cur, const xmlChar *content, int len); XMLPUBFUN int xmlNodeAddContent (xmlNode *cur, const xmlChar *content); XMLPUBFUN int xmlNodeAddContentLen (xmlNode *cur, const xmlChar *content, int len); XMLPUBFUN xmlChar * xmlNodeGetContent (const xmlNode *cur); XMLPUBFUN int xmlNodeBufGetContent (xmlBuffer *buffer, const xmlNode *cur); XMLPUBFUN int xmlBufGetNodeContent (xmlBuf *buf, const xmlNode *cur); XMLPUBFUN xmlChar * xmlNodeGetLang (const xmlNode *cur); XMLPUBFUN int xmlNodeGetSpacePreserve (const xmlNode *cur); XMLPUBFUN int xmlNodeSetLang (xmlNode *cur, const xmlChar *lang); XMLPUBFUN int xmlNodeSetSpacePreserve (xmlNode *cur, int val); XMLPUBFUN int xmlNodeGetBaseSafe (const xmlDoc *doc, const xmlNode *cur, xmlChar **baseOut); XMLPUBFUN xmlChar * xmlNodeGetBase (const xmlDoc *doc, const xmlNode *cur); XMLPUBFUN int xmlNodeSetBase (xmlNode *cur, const xmlChar *uri); /* * Removing content. */ XMLPUBFUN int xmlRemoveProp (xmlAttr *cur); XMLPUBFUN int xmlUnsetNsProp (xmlNode *node, xmlNs *ns, const xmlChar *name); XMLPUBFUN int xmlUnsetProp (xmlNode *node, const xmlChar *name); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBuffer *buf, xmlDoc *doc, xmlAttr *attr, const xmlChar *string); #endif /* LIBXML_OUTPUT_ENABLED */ /* * Namespace handling. */ XMLPUBFUN int xmlReconciliateNs (xmlDoc *doc, xmlNode *tree); #ifdef LIBXML_OUTPUT_ENABLED /* * Saving. */ XMLPUBFUN void xmlDocDumpFormatMemory (xmlDoc *cur, xmlChar **mem, int *size, int format); XMLPUBFUN void xmlDocDumpMemory (xmlDoc *cur, xmlChar **mem, int *size); XMLPUBFUN void xmlDocDumpMemoryEnc (xmlDoc *out_doc, xmlChar **doc_txt_ptr, int * doc_txt_len, const char *txt_encoding); XMLPUBFUN void xmlDocDumpFormatMemoryEnc(xmlDoc *out_doc, xmlChar **doc_txt_ptr, int * doc_txt_len, const char *txt_encoding, int format); XMLPUBFUN int xmlDocFormatDump (FILE *f, xmlDoc *cur, int format); XMLPUBFUN int xmlDocDump (FILE *f, xmlDoc *cur); XMLPUBFUN void xmlElemDump (FILE *f, xmlDoc *doc, xmlNode *cur); XMLPUBFUN int xmlSaveFile (const char *filename, xmlDoc *cur); XMLPUBFUN int xmlSaveFormatFile (const char *filename, xmlDoc *cur, int format); XMLPUBFUN size_t xmlBufNodeDump (xmlBuf *buf, xmlDoc *doc, xmlNode *cur, int level, int format); XMLPUBFUN int xmlNodeDump (xmlBuffer *buf, xmlDoc *doc, xmlNode *cur, int level, int format); XMLPUBFUN int xmlSaveFileTo (xmlOutputBuffer *buf, xmlDoc *cur, const char *encoding); XMLPUBFUN int xmlSaveFormatFileTo (xmlOutputBuffer *buf, xmlDoc *cur, const char *encoding, int format); XMLPUBFUN void xmlNodeDumpOutput (xmlOutputBuffer *buf, xmlDoc *doc, xmlNode *cur, int level, int format, const char *encoding); XMLPUBFUN int xmlSaveFormatFileEnc (const char *filename, xmlDoc *cur, const char *encoding, int format); XMLPUBFUN int xmlSaveFileEnc (const char *filename, xmlDoc *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 (xmlDoc *doc, int mode); XML_DEPRECATED XMLPUBFUN int xmlGetCompressMode (void); XML_DEPRECATED XMLPUBFUN void xmlSetCompressMode (int mode); /* * DOM-wrapper helper functions. */ XMLPUBFUN xmlDOMWrapCtxt * xmlDOMWrapNewCtxt (void); XMLPUBFUN void xmlDOMWrapFreeCtxt (xmlDOMWrapCtxt *ctxt); XMLPUBFUN int xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxt *ctxt, xmlNode *elem, int options); XMLPUBFUN int xmlDOMWrapAdoptNode (xmlDOMWrapCtxt *ctxt, xmlDoc *sourceDoc, xmlNode *node, xmlDoc *destDoc, xmlNode *destParent, int options); XMLPUBFUN int xmlDOMWrapRemoveNode (xmlDOMWrapCtxt *ctxt, xmlDoc *doc, xmlNode *node, int options); XMLPUBFUN int xmlDOMWrapCloneNode (xmlDOMWrapCtxt *ctxt, xmlDoc *sourceDoc, xmlNode *node, xmlNode **clonedNode, xmlDoc *destDoc, xmlNode *destParent, int deep, int options); /* * 5 interfaces from DOM ElementTraversal, but different in entities * traversal. */ XMLPUBFUN unsigned long xmlChildElementCount (xmlNode *parent); XMLPUBFUN xmlNode * xmlNextElementSibling (xmlNode *node); XMLPUBFUN xmlNode * xmlFirstElementChild (xmlNode *parent); XMLPUBFUN xmlNode * xmlLastElementChild (xmlNode *parent); XMLPUBFUN xmlNode * xmlPreviousElementSibling (xmlNode *node); 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); /* * Handling Buffers, the old ones see `xmlBuf` for the new ones. */ XML_DEPRECATED XMLPUBFUN void xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme xmlGetBufferAllocationScheme(void); XMLPUBFUN xmlBuffer * xmlBufferCreate (void); XMLPUBFUN xmlBuffer * xmlBufferCreateSize (size_t size); XMLPUBFUN xmlBuffer * xmlBufferCreateStatic (void *mem, size_t size); XML_DEPRECATED XMLPUBFUN int xmlBufferResize (xmlBuffer *buf, unsigned int size); XMLPUBFUN void xmlBufferFree (xmlBuffer *buf); XMLPUBFUN int xmlBufferDump (FILE *file, xmlBuffer *buf); XMLPUBFUN int xmlBufferAdd (xmlBuffer *buf, const xmlChar *str, int len); XMLPUBFUN int xmlBufferAddHead (xmlBuffer *buf, const xmlChar *str, int len); XMLPUBFUN int xmlBufferCat (xmlBuffer *buf, const xmlChar *str); XMLPUBFUN int xmlBufferCCat (xmlBuffer *buf, const char *str); XML_DEPRECATED XMLPUBFUN int xmlBufferShrink (xmlBuffer *buf, unsigned int len); XML_DEPRECATED XMLPUBFUN int xmlBufferGrow (xmlBuffer *buf, unsigned int len); XMLPUBFUN void xmlBufferEmpty (xmlBuffer *buf); XMLPUBFUN const xmlChar* xmlBufferContent (const xmlBuffer *buf); XMLPUBFUN xmlChar* xmlBufferDetach (xmlBuffer *buf); XMLPUBFUN void xmlBufferSetAllocationScheme(xmlBuffer *buf, xmlBufferAllocationScheme scheme); XMLPUBFUN int xmlBufferLength (const xmlBuffer *buf); XMLPUBFUN void xmlBufferWriteCHAR (xmlBuffer *buf, const xmlChar *string); XMLPUBFUN void xmlBufferWriteChar (xmlBuffer *buf, const char *string); XMLPUBFUN void xmlBufferWriteQuotedString(xmlBuffer *buf, const xmlChar *string); /* * 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 (xmlBuf *buf); XMLPUBFUN size_t xmlBufUse (xmlBuf *buf); XMLPUBFUN size_t xmlBufShrink (xmlBuf *buf, size_t len); #ifdef __cplusplus } #endif #endif /* __XML_TREE_H__ */ #endif /* XML_TREE_INTERNALS */ PK!ͫ(D D list.hnu[/** * @file * * @brief lists interfaces * * this module implement the list support used in * various place in the library. * * @copyright See Copyright for the status of this software. * * @author Gary Pennington */ #ifndef __XML_LINK_INCLUDE__ #define __XML_LINK_INCLUDE__ #include #ifdef __cplusplus extern "C" { #endif /** * Linked list item * * @deprecated Don't use in new code. */ typedef struct _xmlLink xmlLink; typedef xmlLink *xmlLinkPtr; /** * Linked list * * @deprecated Don't use in new code. */ typedef struct _xmlList xmlList; typedef xmlList *xmlListPtr; /** * Callback function used to free data from a list. * * @param lk the data to deallocate */ typedef void (*xmlListDeallocator) (xmlLink *lk); /** * Callback function used to compare 2 data. * * @param data0 the first data * @param data1 the second data * @returns 0 is equality, -1 or 1 otherwise depending on the ordering. */ typedef int (*xmlListDataCompare) (const void *data0, const void *data1); /** * Callback function used when walking a list with #xmlListWalk. * * @param data the data found in the list * @param user extra user provided data to the walker * @returns 0 to stop walking the list, 1 otherwise. */ typedef int (*xmlListWalker) (const void *data, void *user); /* Creation/Deletion */ XMLPUBFUN xmlList * xmlListCreate (xmlListDeallocator deallocator, xmlListDataCompare compare); XMLPUBFUN void xmlListDelete (xmlList *l); /* Basic Operators */ XMLPUBFUN void * xmlListSearch (xmlList *l, void *data); XMLPUBFUN void * xmlListReverseSearch (xmlList *l, void *data); XMLPUBFUN int xmlListInsert (xmlList *l, void *data) ; XMLPUBFUN int xmlListAppend (xmlList *l, void *data) ; XMLPUBFUN int xmlListRemoveFirst (xmlList *l, void *data); XMLPUBFUN int xmlListRemoveLast (xmlList *l, void *data); XMLPUBFUN int xmlListRemoveAll (xmlList *l, void *data); XMLPUBFUN void xmlListClear (xmlList *l); XMLPUBFUN int xmlListEmpty (xmlList *l); XMLPUBFUN xmlLink * xmlListFront (xmlList *l); XMLPUBFUN xmlLink * xmlListEnd (xmlList *l); XMLPUBFUN int xmlListSize (xmlList *l); XMLPUBFUN void xmlListPopFront (xmlList *l); XMLPUBFUN void xmlListPopBack (xmlList *l); XMLPUBFUN int xmlListPushFront (xmlList *l, void *data); XMLPUBFUN int xmlListPushBack (xmlList *l, void *data); /* Advanced Operators */ XMLPUBFUN void xmlListReverse (xmlList *l); XMLPUBFUN void xmlListSort (xmlList *l); XMLPUBFUN void xmlListWalk (xmlList *l, xmlListWalker walker, void *user); XMLPUBFUN void xmlListReverseWalk (xmlList *l, xmlListWalker walker, void *user); XMLPUBFUN void xmlListMerge (xmlList *l1, xmlList *l2); XMLPUBFUN xmlList * xmlListDup (xmlList *old); XMLPUBFUN int xmlListCopy (xmlList *cur, xmlList *old); /* Link operators */ XMLPUBFUN void * xmlLinkGetData (xmlLink *lk); /* xmlListUnique() */ /* xmlListSwap */ #ifdef __cplusplus } #endif #endif /* __XML_LINK_INCLUDE__ */ PK!եn xmlstring.hnu[/** * @file * * @brief set of routines to process strings * * type and interfaces needed for the internal string handling * of the library, especially UTF8 processing. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_STRING_H__ #define __XML_STRING_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * 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; /** * 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__ */ PK!ՒSAX2.hnu[/** * @file * * @brief SAX2 parser interface used to build the DOM tree * * those are the default SAX2 interfaces used by * the library when building DOM tree. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SAX2_H__ #define __XML_SAX2_H__ #include #include #ifdef __cplusplus extern "C" { #endif XMLPUBFUN const xmlChar * xmlSAX2GetPublicId (void *ctx); XMLPUBFUN const xmlChar * xmlSAX2GetSystemId (void *ctx); XMLPUBFUN void xmlSAX2SetDocumentLocator (void *ctx, xmlSAXLocator *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 *publicId, const xmlChar *systemId); XMLPUBFUN void xmlSAX2ExternalSubset (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN xmlEntity * xmlSAX2GetEntity (void *ctx, const xmlChar *name); XMLPUBFUN xmlEntity * xmlSAX2GetParameterEntity (void *ctx, const xmlChar *name); XMLPUBFUN xmlParserInput * 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, xmlEnumeration *tree); XMLPUBFUN void xmlSAX2ElementDecl (void *ctx, const xmlChar *name, int type, xmlElementContent *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); XML_DEPRECATED XMLPUBFUN void xmlSAX2StartElement (void *ctx, const xmlChar *fullname, const xmlChar **atts); XML_DEPRECATED XMLPUBFUN void xmlSAX2EndElement (void *ctx, const xmlChar *name); 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__ */ PK! xmlschemas.hnu[/** * @file * * @brief incomplete XML Schemas structure implementation * * interface to the XML Schemas handling and schema validity * checking, it is incomplete right now. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SCHEMA_H__ #define __XML_SCHEMA_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #include #include #include #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. */ /** * 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 */ /** XML schema */ typedef struct _xmlSchema xmlSchema; typedef xmlSchema *xmlSchemaPtr; /** * Signature of an error callback from an XSD validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * Signature of a warning callback from an XSD validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** Schema parser context */ typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt; typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr; /** Schema validation context */ typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt; typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr; /** * 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 * * @param ctx user provided context * @param file returned file information * @param line returned line information * @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 xmlSchemaParserCtxt * xmlSchemaNewParserCtxt (const char *URL); XMLPUBFUN xmlSchemaParserCtxt * xmlSchemaNewMemParserCtxt (const char *buffer, int size); XMLPUBFUN xmlSchemaParserCtxt * xmlSchemaNewDocParserCtxt (xmlDoc *doc); XMLPUBFUN void xmlSchemaFreeParserCtxt (xmlSchemaParserCtxt *ctxt); XMLPUBFUN void xmlSchemaSetParserErrors (xmlSchemaParserCtxt *ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); XMLPUBFUN void xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN int xmlSchemaGetParserErrors (xmlSchemaParserCtxt *ctxt, xmlSchemaValidityErrorFunc * err, xmlSchemaValidityWarningFunc * warn, void **ctx); XMLPUBFUN void xmlSchemaSetResourceLoader (xmlSchemaParserCtxt *ctxt, xmlResourceLoader loader, void *data); XMLPUBFUN int xmlSchemaIsValid (xmlSchemaValidCtxt *ctxt); XMLPUBFUN xmlSchema * xmlSchemaParse (xmlSchemaParserCtxt *ctxt); XMLPUBFUN void xmlSchemaFree (xmlSchema *schema); #ifdef LIBXML_DEBUG_ENABLED XMLPUBFUN void xmlSchemaDump (FILE *output, xmlSchema *schema); #endif /* LIBXML_DEBUG_ENABLED */ /* * Interfaces for validating */ XMLPUBFUN void xmlSchemaSetValidErrors (xmlSchemaValidCtxt *ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx); XMLPUBFUN void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN int xmlSchemaGetValidErrors (xmlSchemaValidCtxt *ctxt, xmlSchemaValidityErrorFunc *err, xmlSchemaValidityWarningFunc *warn, void **ctx); XMLPUBFUN int xmlSchemaSetValidOptions (xmlSchemaValidCtxt *ctxt, int options); XMLPUBFUN void xmlSchemaValidateSetFilename(xmlSchemaValidCtxt *vctxt, const char *filename); XMLPUBFUN int xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxt *ctxt); XMLPUBFUN xmlSchemaValidCtxt * xmlSchemaNewValidCtxt (xmlSchema *schema); XMLPUBFUN void xmlSchemaFreeValidCtxt (xmlSchemaValidCtxt *ctxt); XMLPUBFUN int xmlSchemaValidateDoc (xmlSchemaValidCtxt *ctxt, xmlDoc *instance); XMLPUBFUN int xmlSchemaValidateOneElement (xmlSchemaValidCtxt *ctxt, xmlNode *elem); XMLPUBFUN int xmlSchemaValidateStream (xmlSchemaValidCtxt *ctxt, xmlParserInputBuffer *input, xmlCharEncoding enc, const xmlSAXHandler *sax, void *user_data); XMLPUBFUN int xmlSchemaValidateFile (xmlSchemaValidCtxt *ctxt, const char * filename, int options); XMLPUBFUN xmlParserCtxt * xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxt *ctxt); /** * Interface to insert Schemas SAX validation in a SAX stream */ typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct; typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr; XMLPUBFUN xmlSchemaSAXPlugStruct * xmlSchemaSAXPlug (xmlSchemaValidCtxt *ctxt, xmlSAXHandler **sax, void **user_data); XMLPUBFUN int xmlSchemaSAXUnplug (xmlSchemaSAXPlugStruct *plug); XMLPUBFUN void xmlSchemaValidateSetLocator (xmlSchemaValidCtxt *vctxt, xmlSchemaValidityLocatorFunc f, void *ctxt); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_H__ */ PK!wM xmlmodule.hnu[/** * @file * * @brief Dynamic module loading * * API for dynamic module loading. Only used by old libxslt versions * and subject to removal. * * @copyright See Copyright for the status of this software. * * @author Joel W. Reed */ #ifndef __XML_MODULE_H__ #define __XML_MODULE_H__ #include #ifdef LIBXML_MODULES_ENABLED #ifdef __cplusplus extern "C" { #endif /** * A handle to a dynamically loaded module */ typedef struct _xmlModule xmlModule; typedef xmlModule *xmlModulePtr; /** * 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; XML_DEPRECATED XMLPUBFUN xmlModule *xmlModuleOpen (const char *filename, int options); XML_DEPRECATED XMLPUBFUN int xmlModuleSymbol (xmlModule *module, const char* name, void **result); XML_DEPRECATED XMLPUBFUN int xmlModuleClose (xmlModule *module); XML_DEPRECATED XMLPUBFUN int xmlModuleFree (xmlModule *module); #ifdef __cplusplus } #endif #endif /* LIBXML_MODULES_ENABLED */ #endif /*__XML_MODULE_H__ */ PK!hՎ xmlsave.hnu[/** * @file * * @brief XML/HTML serializer * * API to save documents or subtrees of documents. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XMLSAVE_H__ #define __XML_XMLSAVE_H__ #include #include #include #include #ifdef LIBXML_OUTPUT_ENABLED #ifdef __cplusplus extern "C" { #endif /** * This is the set of XML save options that can be passed down * to the #xmlSaveToFd and similar calls. */ typedef enum { /** * Format output. This adds newlines and enables indenting * by default. */ XML_SAVE_FORMAT = 1<<0, /** * Don't emit an XML declaration. */ XML_SAVE_NO_DECL = 1<<1, /** * Don't emit empty tags. */ XML_SAVE_NO_EMPTY = 1<<2, /** * Don't serialize as XHTML. */ XML_SAVE_NO_XHTML = 1<<3, /** * Always serialize as XHTML. */ XML_SAVE_XHTML = 1<<4, /** * Serialize HTML documents as XML. */ XML_SAVE_AS_XML = 1<<5, /** * Serialize XML documents as HTML. */ XML_SAVE_AS_HTML = 1<<6, /** * Format with non-significant whitespace. * TODO: What does this mean? */ XML_SAVE_WSNONSIG = 1<<7, /** * Always emit empty tags. This is the default unless the * deprecated thread-local setting xmlSaveNoEmptyTags is * set to 1. * * @since 2.14 */ XML_SAVE_EMPTY = 1<<8, /** * Don't indent output when formatting. * * @since 2.14 */ XML_SAVE_NO_INDENT = 1<<9, /** * Always indent output when formatting. This is the default * unless the deprecated thread-local setting * xmlIndentTreeOutput is set to 0. * * @since 2.14 */ XML_SAVE_INDENT = 1<<10 } xmlSaveOption; /** XML and HTML serializer */ typedef struct _xmlSaveCtxt xmlSaveCtxt; typedef xmlSaveCtxt *xmlSaveCtxtPtr; XMLPUBFUN xmlSaveCtxt * xmlSaveToFd (int fd, const char *encoding, int options); XMLPUBFUN xmlSaveCtxt * xmlSaveToFilename (const char *filename, const char *encoding, int options); XMLPUBFUN xmlSaveCtxt * xmlSaveToBuffer (xmlBuffer *buffer, const char *encoding, int options); XMLPUBFUN xmlSaveCtxt * xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void *ioctx, const char *encoding, int options); XMLPUBFUN long xmlSaveDoc (xmlSaveCtxt *ctxt, xmlDoc *doc); XMLPUBFUN long xmlSaveTree (xmlSaveCtxt *ctxt, xmlNode *node); XMLPUBFUN int xmlSaveFlush (xmlSaveCtxt *ctxt); XMLPUBFUN int xmlSaveClose (xmlSaveCtxt *ctxt); XMLPUBFUN xmlParserErrors xmlSaveFinish (xmlSaveCtxt *ctxt); XMLPUBFUN int xmlSaveSetIndentString (xmlSaveCtxt *ctxt, const char *indent); XML_DEPRECATED XMLPUBFUN int xmlSaveSetEscape (xmlSaveCtxt *ctxt, xmlCharEncodingOutputFunc escape); XML_DEPRECATED XMLPUBFUN int xmlSaveSetAttrEscape (xmlSaveCtxt *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__ */ PK!\8+ + pattern.hnu[/** * @file * * @brief pattern expression handling * * allows to compile and test pattern expressions for nodes * either in a tree or based on a parser state. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_PATTERN_H__ #define __XML_PATTERN_H__ #include #include #include #ifdef LIBXML_PATTERN_ENABLED #ifdef __cplusplus extern "C" { #endif /** * A compiled (XPath based) pattern to select nodes */ typedef struct _xmlPattern xmlPattern; typedef xmlPattern *xmlPatternPtr; /** * Internal type. 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 (xmlPattern *comp); XMLPUBFUN void xmlFreePatternList (xmlPattern *comp); XMLPUBFUN xmlPattern * xmlPatterncompile (const xmlChar *pattern, xmlDict *dict, int flags, const xmlChar **namespaces); XMLPUBFUN int xmlPatternCompileSafe (const xmlChar *pattern, xmlDict *dict, int flags, const xmlChar **namespaces, xmlPattern **patternOut); XMLPUBFUN int xmlPatternMatch (xmlPattern *comp, xmlNode *node); /** State object for streaming interface */ typedef struct _xmlStreamCtxt xmlStreamCtxt; typedef xmlStreamCtxt *xmlStreamCtxtPtr; XMLPUBFUN int xmlPatternStreamable (xmlPattern *comp); XMLPUBFUN int xmlPatternMaxDepth (xmlPattern *comp); XMLPUBFUN int xmlPatternMinDepth (xmlPattern *comp); XMLPUBFUN int xmlPatternFromRoot (xmlPattern *comp); XMLPUBFUN xmlStreamCtxt * xmlPatternGetStreamCtxt (xmlPattern *comp); XMLPUBFUN void xmlFreeStreamCtxt (xmlStreamCtxt *stream); XMLPUBFUN int xmlStreamPushNode (xmlStreamCtxt *stream, const xmlChar *name, const xmlChar *ns, int nodeType); XMLPUBFUN int xmlStreamPush (xmlStreamCtxt *stream, const xmlChar *name, const xmlChar *ns); XMLPUBFUN int xmlStreamPushAttr (xmlStreamCtxt *stream, const xmlChar *name, const xmlChar *ns); XMLPUBFUN int xmlStreamPop (xmlStreamCtxt *stream); XMLPUBFUN int xmlStreamWantsAnyNode (xmlStreamCtxt *stream); #ifdef __cplusplus } #endif #endif /* LIBXML_PATTERN_ENABLED */ #endif /* __XML_PATTERN_H__ */ PK!]pEpExpathInternals.hnu[/** * @file * * @brief internal interfaces for XML Path Language implementation * * internal interfaces for XML Path Language implementation * used to build new modules on top of XPath like XPointer and * XSLT * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XPATH_INTERNALS_H__ #define __XML_XPATH_INTERNALS_H__ #include #include #include #ifdef LIBXML_XPATH_ENABLED #ifdef __cplusplus extern "C" { #endif /** * Push a value on the stack * * @deprecated Use #xmlXPathValuePush */ #define valuePush xmlXPathValuePush /** * Pop a value from the stack * * @deprecated Use #xmlXPathValuePop */ #define valuePop xmlXPathValuePop /************************************************************************ * * * Helpers * * * ************************************************************************/ /* * Many of these macros may later turn into functions. They * shouldn't be used in \#ifdef's preprocessor instructions. */ /** * Raises an error. * * @param ctxt an XPath parser context * @param err an xmlXPathError code */ #define xmlXPathSetError(ctxt, err) \ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \ if ((ctxt) != NULL) (ctxt)->error = (err); } /** * Raises an XPATH_INVALID_ARITY error. * * @param ctxt an XPath parser context */ #define xmlXPathSetArityError(ctxt) \ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY) /** * Raises an XPATH_INVALID_TYPE error. * * @param ctxt an XPath parser context */ #define xmlXPathSetTypeError(ctxt) \ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE) /** * Get the error code of an XPath context. * * @param ctxt an XPath parser context * @returns the context error. */ #define xmlXPathGetError(ctxt) ((ctxt)->error) /** * Check if an XPath error was raised. * * @param ctxt an XPath parser context * @returns true if an error has been raised, false otherwise. */ #define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK) /** * Get the document of an XPath context. * * @param ctxt an XPath parser context * @returns the context document. */ #define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc) /** * Get the context node of an XPath context. * * @param ctxt an XPath parser context * @returns the context node. */ #define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node) XMLPUBFUN int xmlXPathPopBoolean (xmlXPathParserContext *ctxt); XMLPUBFUN double xmlXPathPopNumber (xmlXPathParserContext *ctxt); XMLPUBFUN xmlChar * xmlXPathPopString (xmlXPathParserContext *ctxt); XMLPUBFUN xmlNodeSet * xmlXPathPopNodeSet (xmlXPathParserContext *ctxt); XMLPUBFUN void * xmlXPathPopExternal (xmlXPathParserContext *ctxt); /** * Pushes the boolean `val` on the context stack. * * @param ctxt an XPath parser context * @param val a boolean */ #define xmlXPathReturnBoolean(ctxt, val) \ valuePush((ctxt), xmlXPathNewBoolean(val)) /** * Pushes true on the context stack. * * @param ctxt an XPath parser context */ #define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1) /** * Pushes false on the context stack. * * @param ctxt an XPath parser context */ #define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0) /** * Pushes the double `val` on the context stack. * * @param ctxt an XPath parser context * @param val a double */ #define xmlXPathReturnNumber(ctxt, val) \ valuePush((ctxt), xmlXPathNewFloat(val)) /** * Pushes the string `str` on the context stack. * * @param ctxt an XPath parser context * @param str a string */ #define xmlXPathReturnString(ctxt, str) \ valuePush((ctxt), xmlXPathWrapString(str)) /** * Pushes an empty string on the stack. * * @param ctxt an XPath parser context */ #define xmlXPathReturnEmptyString(ctxt) \ valuePush((ctxt), xmlXPathNewCString("")) /** * Pushes the node-set `ns` on the context stack. * * @param ctxt an XPath parser context * @param ns a node-set */ #define xmlXPathReturnNodeSet(ctxt, ns) \ valuePush((ctxt), xmlXPathWrapNodeSet(ns)) /** * Pushes an empty node-set on the context stack. * * @param ctxt an XPath parser context */ #define xmlXPathReturnEmptyNodeSet(ctxt) \ valuePush((ctxt), xmlXPathNewNodeSet(NULL)) /** * Pushes user data on the context stack. * * @param ctxt an XPath parser context * @param val user data */ #define xmlXPathReturnExternal(ctxt, val) \ valuePush((ctxt), xmlXPathWrapExternal(val)) /** * Check if the current value on the XPath stack is a node set or * an XSLT value tree. * * @param ctxt an XPath parser context * @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))) /** * Checks if the current value on the XPath stack is an external * object. * * @param ctxt an XPath parser context * @returns true if the current object on the stack is an external * object. */ #define xmlXPathStackIsExternal(ctxt) \ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS)) /** * Empties a node-set. * * @param ns a node-set */ #define xmlXPathEmptyNodeSet(ns) \ { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; } /** * Macro to return from the function if an XPath error was detected. */ #define CHECK_ERROR \ if (ctxt->error != XPATH_EXPRESSION_OK) return /** * Macro to return 0 from the function if an XPath error was detected. */ #define CHECK_ERROR0 \ if (ctxt->error != XPATH_EXPRESSION_OK) return(0) /** * Macro to raise an XPath error and return. * * @param X the error code */ #define XP_ERROR(X) \ { xmlXPathErr(ctxt, X); return; } /** * Macro to raise an XPath error and return 0. * * @param X the error code */ #define XP_ERROR0(X) \ { xmlXPathErr(ctxt, X); return(0); } /** * Macro to check that the value on top of the XPath stack is of a given * type. * * @param typeval the XPath type */ #define CHECK_TYPE(typeval) \ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ XP_ERROR(XPATH_INVALID_TYPE) /** * Macro to check that the value on top of the XPath stack is of a given * type. Return(0) in case of failure * * @param typeval the XPath type */ #define CHECK_TYPE0(typeval) \ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ XP_ERROR0(XPATH_INVALID_TYPE) /** * Macro to check that the number of args passed to an XPath function matches. * * @param x the number of expected args */ #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); /** * 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); /** * 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); /** * 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 (xmlXPathContext *ctxt, xmlXPathVariableLookupFunc f, void *data); /* * Function Lookup forwarding. */ XMLPUBFUN void xmlXPathRegisterFuncLookup (xmlXPathContext *ctxt, xmlXPathFuncLookupFunc f, void *funcCtxt); /* * Error reporting. */ XMLPUBFUN void xmlXPatherror (xmlXPathParserContext *ctxt, const char *file, int line, int no); XMLPUBFUN void xmlXPathErr (xmlXPathParserContext *ctxt, int error); #ifdef LIBXML_DEBUG_ENABLED XMLPUBFUN void xmlXPathDebugDumpObject (FILE *output, xmlXPathObject *cur, int depth); XMLPUBFUN void xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExpr *comp, int depth); #endif /** * NodeSet handling. */ XMLPUBFUN int xmlXPathNodeSetContains (xmlNodeSet *cur, xmlNode *val); XMLPUBFUN xmlNodeSet * xmlXPathDifference (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathIntersection (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathDistinctSorted (xmlNodeSet *nodes); XMLPUBFUN xmlNodeSet * xmlXPathDistinct (xmlNodeSet *nodes); XMLPUBFUN int xmlXPathHasSameNodes (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathNodeLeadingSorted (xmlNodeSet *nodes, xmlNode *node); XMLPUBFUN xmlNodeSet * xmlXPathLeadingSorted (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathNodeLeading (xmlNodeSet *nodes, xmlNode *node); XMLPUBFUN xmlNodeSet * xmlXPathLeading (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathNodeTrailingSorted (xmlNodeSet *nodes, xmlNode *node); XMLPUBFUN xmlNodeSet * xmlXPathTrailingSorted (xmlNodeSet *nodes1, xmlNodeSet *nodes2); XMLPUBFUN xmlNodeSet * xmlXPathNodeTrailing (xmlNodeSet *nodes, xmlNode *node); XMLPUBFUN xmlNodeSet * xmlXPathTrailing (xmlNodeSet *nodes1, xmlNodeSet *nodes2); /** * Extending a context. */ XMLPUBFUN int xmlXPathRegisterNs (xmlXPathContext *ctxt, const xmlChar *prefix, const xmlChar *ns_uri); XMLPUBFUN const xmlChar * xmlXPathNsLookup (xmlXPathContext *ctxt, const xmlChar *prefix); XMLPUBFUN void xmlXPathRegisteredNsCleanup (xmlXPathContext *ctxt); XMLPUBFUN int xmlXPathRegisterFunc (xmlXPathContext *ctxt, const xmlChar *name, xmlXPathFunction f); XMLPUBFUN int xmlXPathRegisterFuncNS (xmlXPathContext *ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathFunction f); XMLPUBFUN int xmlXPathRegisterVariable (xmlXPathContext *ctxt, const xmlChar *name, xmlXPathObject *value); XMLPUBFUN int xmlXPathRegisterVariableNS (xmlXPathContext *ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObject *value); XMLPUBFUN xmlXPathFunction xmlXPathFunctionLookup (xmlXPathContext *ctxt, const xmlChar *name); XMLPUBFUN xmlXPathFunction xmlXPathFunctionLookupNS (xmlXPathContext *ctxt, const xmlChar *name, const xmlChar *ns_uri); XMLPUBFUN void xmlXPathRegisteredFuncsCleanup (xmlXPathContext *ctxt); XMLPUBFUN xmlXPathObject * xmlXPathVariableLookup (xmlXPathContext *ctxt, const xmlChar *name); XMLPUBFUN xmlXPathObject * xmlXPathVariableLookupNS (xmlXPathContext *ctxt, const xmlChar *name, const xmlChar *ns_uri); XMLPUBFUN void xmlXPathRegisteredVariablesCleanup(xmlXPathContext *ctxt); /** * Utilities to extend XPath. */ XMLPUBFUN xmlXPathParserContext * xmlXPathNewParserContext (const xmlChar *str, xmlXPathContext *ctxt); XMLPUBFUN void xmlXPathFreeParserContext (xmlXPathParserContext *ctxt); XMLPUBFUN xmlXPathObject * xmlXPathValuePop (xmlXPathParserContext *ctxt); XMLPUBFUN int xmlXPathValuePush (xmlXPathParserContext *ctxt, xmlXPathObject *value); XMLPUBFUN xmlXPathObject * xmlXPathNewString (const xmlChar *val); XMLPUBFUN xmlXPathObject * xmlXPathNewCString (const char *val); XMLPUBFUN xmlXPathObject * xmlXPathWrapString (xmlChar *val); XMLPUBFUN xmlXPathObject * xmlXPathWrapCString (char * val); XMLPUBFUN xmlXPathObject * xmlXPathNewFloat (double val); XMLPUBFUN xmlXPathObject * xmlXPathNewBoolean (int val); XMLPUBFUN xmlXPathObject * xmlXPathNewNodeSet (xmlNode *val); XMLPUBFUN xmlXPathObject * xmlXPathNewValueTree (xmlNode *val); XMLPUBFUN int xmlXPathNodeSetAdd (xmlNodeSet *cur, xmlNode *val); XMLPUBFUN int xmlXPathNodeSetAddUnique (xmlNodeSet *cur, xmlNode *val); XMLPUBFUN int xmlXPathNodeSetAddNs (xmlNodeSet *cur, xmlNode *node, xmlNs *ns); XMLPUBFUN void xmlXPathNodeSetSort (xmlNodeSet *set); XMLPUBFUN void xmlXPathRoot (xmlXPathParserContext *ctxt); XML_DEPRECATED XMLPUBFUN void xmlXPathEvalExpr (xmlXPathParserContext *ctxt); XMLPUBFUN xmlChar * xmlXPathParseName (xmlXPathParserContext *ctxt); XMLPUBFUN xmlChar * xmlXPathParseNCName (xmlXPathParserContext *ctxt); /* * Existing functions. */ XMLPUBFUN double xmlXPathStringEvalNumber (const xmlChar *str); XMLPUBFUN int xmlXPathEvaluatePredicateResult (xmlXPathParserContext *ctxt, xmlXPathObject *res); XMLPUBFUN void xmlXPathRegisterAllFunctions (xmlXPathContext *ctxt); XMLPUBFUN xmlNodeSet * xmlXPathNodeSetMerge (xmlNodeSet *val1, xmlNodeSet *val2); XMLPUBFUN void xmlXPathNodeSetDel (xmlNodeSet *cur, xmlNode *val); XMLPUBFUN void xmlXPathNodeSetRemove (xmlNodeSet *cur, int val); XMLPUBFUN xmlXPathObject * xmlXPathNewNodeSetList (xmlNodeSet *val); XMLPUBFUN xmlXPathObject * xmlXPathWrapNodeSet (xmlNodeSet *val); XMLPUBFUN xmlXPathObject * xmlXPathWrapExternal (void *val); XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContext *ctxt); XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContext *ctxt); XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContext *ctxt, int inf, int strict); XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContext *ctxt); XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContext *ctxt); XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContext *ctxt); XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContext *ctxt); XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContext *ctxt); XMLPUBFUN void xmlXPathModValues(xmlXPathParserContext *ctxt); XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name); /* * Some of the axis navigation routines. */ XMLPUBFUN xmlNode *xmlXPathNextSelf(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextChild(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextDescendant(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextDescendantOrSelf(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextParent(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextAncestorOrSelf(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextFollowingSibling(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextFollowing(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextNamespace(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextAttribute(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextPreceding(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextAncestor(xmlXPathParserContext *ctxt, xmlNode *cur); XMLPUBFUN xmlNode *xmlXPathNextPrecedingSibling(xmlXPathParserContext *ctxt, xmlNode *cur); /* * The official core of XPath functions. */ XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContext *ctxt, int nargs); XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContext *ctxt, int nargs); /** * Really internal functions */ XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNs *ns); #ifdef __cplusplus } #endif #endif /* LIBXML_XPATH_ENABLED */ #endif /* ! __XML_XPATH_INTERNALS_H__ */ PK!v[ uri.hnu[/** * @file * * @brief library of generic URI related routines * * library of generic URI related routines * Implements RFC 2396 * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_URI_H__ #define __XML_URI_H__ #include #include #include #ifdef __cplusplus extern "C" { #endif /** Parsed URI */ typedef struct _xmlURI xmlURI; typedef xmlURI *xmlURIPtr; /** * 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 */ 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) */ }; XMLPUBFUN xmlURI * 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 xmlURI * xmlParseURI (const char *str); XMLPUBFUN int xmlParseURISafe (const char *str, xmlURI **uri); XMLPUBFUN xmlURI * xmlParseURIRaw (const char *str, int raw); XMLPUBFUN int xmlParseURIReference (xmlURI *uri, const char *str); XMLPUBFUN xmlChar * xmlSaveUri (xmlURI *uri); XMLPUBFUN void xmlPrintURI (FILE *stream, xmlURI *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 (xmlURI *uri); XMLPUBFUN xmlChar* xmlCanonicPath (const xmlChar *path); XMLPUBFUN xmlChar* xmlPathToURI (const xmlChar *path); #ifdef __cplusplus } #endif #endif /* __XML_URI_H__ */ PK!ISrxmlschemastypes.hnu[/** * @file * * @brief implementation of XML Schema Datatypes * * module providing the XML Schema Datatypes implementation * both definition and validity checking * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SCHEMA_TYPES_H__ #define __XML_SCHEMA_TYPES_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif /** * Schema whitespace value type */ 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 xmlSchemaType * xmlSchemaGetPredefinedType (const xmlChar *name, const xmlChar *ns); XMLPUBFUN int xmlSchemaValidatePredefinedType (xmlSchemaType *type, const xmlChar *value, xmlSchemaVal **val); XMLPUBFUN int xmlSchemaValPredefTypeNode (xmlSchemaType *type, const xmlChar *value, xmlSchemaVal **val, xmlNode *node); XMLPUBFUN int xmlSchemaValidateFacet (xmlSchemaType *base, xmlSchemaFacet *facet, const xmlChar *value, xmlSchemaVal *val); XMLPUBFUN int xmlSchemaValidateFacetWhtsp (xmlSchemaFacet *facet, xmlSchemaWhitespaceValueType fws, xmlSchemaValType valType, const xmlChar *value, xmlSchemaVal *val, xmlSchemaWhitespaceValueType ws); XMLPUBFUN void xmlSchemaFreeValue (xmlSchemaVal *val); XMLPUBFUN xmlSchemaFacet * xmlSchemaNewFacet (void); XMLPUBFUN int xmlSchemaCheckFacet (xmlSchemaFacet *facet, xmlSchemaType *typeDecl, xmlSchemaParserCtxt *ctxt, const xmlChar *name); XMLPUBFUN void xmlSchemaFreeFacet (xmlSchemaFacet *facet); XMLPUBFUN int xmlSchemaCompareValues (xmlSchemaVal *x, xmlSchemaVal *y); XMLPUBFUN xmlSchemaType * xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaType *type); XMLPUBFUN int xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacet *facet, const xmlChar *value, unsigned long actualLen, unsigned long *expectedLen); XMLPUBFUN xmlSchemaType * xmlSchemaGetBuiltInType (xmlSchemaValType type); XMLPUBFUN int xmlSchemaIsBuiltInTypeFacet (xmlSchemaType *type, int facetType); XMLPUBFUN xmlChar * xmlSchemaCollapseString (const xmlChar *value); XMLPUBFUN xmlChar * xmlSchemaWhiteSpaceReplace (const xmlChar *value); XMLPUBFUN unsigned long xmlSchemaGetFacetValueAsULong (xmlSchemaFacet *facet); XMLPUBFUN int xmlSchemaValidateLengthFacet (xmlSchemaType *type, xmlSchemaFacet *facet, const xmlChar *value, xmlSchemaVal *val, unsigned long *length); XMLPUBFUN int xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacet *facet, xmlSchemaValType valType, const xmlChar *value, xmlSchemaVal *val, unsigned long *length, xmlSchemaWhitespaceValueType ws); XMLPUBFUN int xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaType *type, const xmlChar *value, xmlSchemaVal **val, xmlNode *node); XMLPUBFUN int xmlSchemaGetCanonValue (xmlSchemaVal *val, const xmlChar **retValue); XMLPUBFUN int xmlSchemaGetCanonValueWhtsp (xmlSchemaVal *val, const xmlChar **retValue, xmlSchemaWhitespaceValueType ws); XMLPUBFUN int xmlSchemaValueAppend (xmlSchemaVal *prev, xmlSchemaVal *cur); XMLPUBFUN xmlSchemaVal * xmlSchemaValueGetNext (xmlSchemaVal *cur); XMLPUBFUN const xmlChar * xmlSchemaValueGetAsString (xmlSchemaVal *val); XMLPUBFUN int xmlSchemaValueGetAsBoolean (xmlSchemaVal *val); XMLPUBFUN xmlSchemaVal * xmlSchemaNewStringValue (xmlSchemaValType type, const xmlChar *value); XMLPUBFUN xmlSchemaVal * xmlSchemaNewNOTATIONValue (const xmlChar *name, const xmlChar *ns); XMLPUBFUN xmlSchemaVal * xmlSchemaNewQNameValue (const xmlChar *namespaceName, const xmlChar *localName); XMLPUBFUN int xmlSchemaCompareValuesWhtsp (xmlSchemaVal *x, xmlSchemaWhitespaceValueType xws, xmlSchemaVal *y, xmlSchemaWhitespaceValueType yws); XMLPUBFUN xmlSchemaVal * xmlSchemaCopyValue (xmlSchemaVal *val); XMLPUBFUN xmlSchemaValType xmlSchemaGetValType (xmlSchemaVal *val); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_TYPES_H__ */ PK!P٧ƣ schematron.hnu[/** * @file * * @brief XML Schematron implementation * * interface to the XML Schematron validity checking. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SCHEMATRON_H__ #define __XML_SCHEMATRON_H__ #include #ifdef LIBXML_SCHEMATRON_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif /** * Schematron validation options */ typedef enum { /** quiet no report */ XML_SCHEMATRON_OUT_QUIET = 1 << 0, /** build a textual report */ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /** output SVRL */ XML_SCHEMATRON_OUT_XML = 1 << 2, /** output via xmlStructuredErrorFunc */ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /** output to a file descriptor */ XML_SCHEMATRON_OUT_FILE = 1 << 8, /** output to a buffer */ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /** output to I/O mechanism */ XML_SCHEMATRON_OUT_IO = 1 << 10 } xmlSchematronValidOptions; /** Schematron schema */ typedef struct _xmlSchematron xmlSchematron; typedef xmlSchematron *xmlSchematronPtr; /** * Signature of an error callback from a Schematron validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); /** * Signature of a warning callback from a Schematron validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); /** Schematron parser context */ typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt; typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr; /** Schematron validation context */ typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt; typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr; /* * Interfaces for parsing. */ XMLPUBFUN xmlSchematronParserCtxt * xmlSchematronNewParserCtxt (const char *URL); XMLPUBFUN xmlSchematronParserCtxt * xmlSchematronNewMemParserCtxt(const char *buffer, int size); XMLPUBFUN xmlSchematronParserCtxt * xmlSchematronNewDocParserCtxt(xmlDoc *doc); XMLPUBFUN void xmlSchematronFreeParserCtxt (xmlSchematronParserCtxt *ctxt); /***** XMLPUBFUN void xmlSchematronSetParserErrors(xmlSchematronParserCtxt *ctxt, xmlSchematronValidityErrorFunc err, xmlSchematronValidityWarningFunc warn, void *ctx); XMLPUBFUN int xmlSchematronGetParserErrors(xmlSchematronParserCtxt *ctxt, xmlSchematronValidityErrorFunc * err, xmlSchematronValidityWarningFunc * warn, void **ctx); XMLPUBFUN int xmlSchematronIsValid (xmlSchematronValidCtxt *ctxt); *****/ XMLPUBFUN xmlSchematron * xmlSchematronParse (xmlSchematronParserCtxt *ctxt); XMLPUBFUN void xmlSchematronFree (xmlSchematron *schema); /* * Interfaces for validating */ XMLPUBFUN void xmlSchematronSetValidStructuredErrors( xmlSchematronValidCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx); /****** XMLPUBFUN void xmlSchematronSetValidErrors (xmlSchematronValidCtxt *ctxt, xmlSchematronValidityErrorFunc err, xmlSchematronValidityWarningFunc warn, void *ctx); XMLPUBFUN int xmlSchematronGetValidErrors (xmlSchematronValidCtxt *ctxt, xmlSchematronValidityErrorFunc *err, xmlSchematronValidityWarningFunc *warn, void **ctx); XMLPUBFUN int xmlSchematronSetValidOptions(xmlSchematronValidCtxt *ctxt, int options); XMLPUBFUN int xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxt *ctxt); XMLPUBFUN int xmlSchematronValidateOneElement (xmlSchematronValidCtxt *ctxt, xmlNode *elem); *******/ XMLPUBFUN xmlSchematronValidCtxt * xmlSchematronNewValidCtxt (xmlSchematron *schema, int options); XMLPUBFUN void xmlSchematronFreeValidCtxt (xmlSchematronValidCtxt *ctxt); XMLPUBFUN int xmlSchematronValidateDoc (xmlSchematronValidCtxt *ctxt, xmlDoc *instance); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMATRON_ENABLED */ #endif /* __XML_SCHEMATRON_H__ */ PK![,11 xmlautomata.hnu[/** * @file * * @brief API to build regexp automata * * These are internal functions and shouldn't be used. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_AUTOMATA_H__ #define __XML_AUTOMATA_H__ #include #ifdef LIBXML_REGEXP_ENABLED #include #ifdef __cplusplus extern "C" { #endif /** * A libxml automata description * * It can be compiled into a regexp */ typedef struct _xmlAutomata xmlAutomata; typedef xmlAutomata *xmlAutomataPtr; /** * A state in the automata description */ typedef struct _xmlAutomataState xmlAutomataState; typedef xmlAutomataState *xmlAutomataStatePtr; /* * Building API */ XML_DEPRECATED XMLPUBFUN xmlAutomata * xmlNewAutomata (void); XML_DEPRECATED XMLPUBFUN void xmlFreeAutomata (xmlAutomata *am); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataGetInitState (xmlAutomata *am); XML_DEPRECATED XMLPUBFUN int xmlAutomataSetFinalState (xmlAutomata *am, xmlAutomataState *state); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewState (xmlAutomata *am); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewTransition (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewTransition2 (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, const xmlChar *token2, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewNegTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, const xmlChar *token2, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewCountTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, int min, int max, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewCountTrans2 (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, const xmlChar *token2, int min, int max, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewOnceTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, int min, int max, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewOnceTrans2 (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, const xmlChar *token, const xmlChar *token2, int min, int max, void *data); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewAllTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, int lax); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewEpsilon (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewCountedTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, int counter); XML_DEPRECATED XMLPUBFUN xmlAutomataState * xmlAutomataNewCounterTrans (xmlAutomata *am, xmlAutomataState *from, xmlAutomataState *to, int counter); XML_DEPRECATED XMLPUBFUN int xmlAutomataNewCounter (xmlAutomata *am, int min, int max); XML_DEPRECATED XMLPUBFUN struct _xmlRegexp * xmlAutomataCompile (xmlAutomata *am); XML_DEPRECATED XMLPUBFUN int xmlAutomataIsDeterminist (xmlAutomata *am); #ifdef __cplusplus } #endif #endif /* LIBXML_REGEXP_ENABLED */ #endif /* __XML_AUTOMATA_H__ */ PK!HH&& encoding.hnu[/** * @file * * @brief Character encoding conversion functions * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_CHAR_ENCODING_H__ #define __XML_CHAR_ENCODING_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* * Backward compatibility */ /** @cond ignore */ #define UTF8Toisolat1 xmlUTF8ToIsolat1 #define isolat1ToUTF8 xmlIsolat1ToUTF8 /** @endcond */ /** * Encoding conversion errors */ typedef enum { /** Success */ XML_ENC_ERR_SUCCESS = 0, /** Internal or unclassified error */ XML_ENC_ERR_INTERNAL = -1, /** Invalid or untranslatable input sequence */ XML_ENC_ERR_INPUT = -2, /** Not enough space in output buffer */ XML_ENC_ERR_SPACE = -3, /** Out-of-memory error */ XML_ENC_ERR_MEMORY = -4 } xmlCharEncError; /** * Predefined values for some standard encodings. */ typedef enum { /** No char encoding detected */ XML_CHAR_ENCODING_ERROR= -1, /** No char encoding detected */ XML_CHAR_ENCODING_NONE= 0, /** UTF-8 */ XML_CHAR_ENCODING_UTF8= 1, /** UTF-16 little endian */ XML_CHAR_ENCODING_UTF16LE= 2, /** UTF-16 big endian */ XML_CHAR_ENCODING_UTF16BE= 3, /** UCS-4 little endian */ XML_CHAR_ENCODING_UCS4LE= 4, /** UCS-4 big endian */ XML_CHAR_ENCODING_UCS4BE= 5, /** EBCDIC uh! */ XML_CHAR_ENCODING_EBCDIC= 6, /** UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS4_2143=7, /** UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS4_3412=8, /** UCS-2 */ XML_CHAR_ENCODING_UCS2= 9, /** ISO-8859-1 ISO Latin 1 */ XML_CHAR_ENCODING_8859_1= 10, /** ISO-8859-2 ISO Latin 2 */ XML_CHAR_ENCODING_8859_2= 11, /** ISO-8859-3 */ XML_CHAR_ENCODING_8859_3= 12, /** ISO-8859-4 */ XML_CHAR_ENCODING_8859_4= 13, /** ISO-8859-5 */ XML_CHAR_ENCODING_8859_5= 14, /** ISO-8859-6 */ XML_CHAR_ENCODING_8859_6= 15, /** ISO-8859-7 */ XML_CHAR_ENCODING_8859_7= 16, /** ISO-8859-8 */ XML_CHAR_ENCODING_8859_8= 17, /** ISO-8859-9 */ XML_CHAR_ENCODING_8859_9= 18, /** ISO-2022-JP */ XML_CHAR_ENCODING_2022_JP= 19, /** Shift_JIS */ XML_CHAR_ENCODING_SHIFT_JIS=20, /** EUC-JP */ XML_CHAR_ENCODING_EUC_JP= 21, /** pure ASCII */ XML_CHAR_ENCODING_ASCII= 22, /** UTF-16 native, available since 2.14 */ XML_CHAR_ENCODING_UTF16= 23, /** HTML (output only), available since 2.14 */ XML_CHAR_ENCODING_HTML= 24, /** ISO-8859-10, available since 2.14 */ XML_CHAR_ENCODING_8859_10= 25, /** ISO-8859-11, available since 2.14 */ XML_CHAR_ENCODING_8859_11= 26, /** ISO-8859-13, available since 2.14 */ XML_CHAR_ENCODING_8859_13= 27, /** ISO-8859-14, available since 2.14 */ XML_CHAR_ENCODING_8859_14= 28, /** ISO-8859-15, available since 2.14 */ XML_CHAR_ENCODING_8859_15= 29, /** ISO-8859-16, available since 2.14 */ XML_CHAR_ENCODING_8859_16= 30, /** windows-1252, available since 2.15 */ XML_CHAR_ENCODING_WINDOWS_1252 = 31 } xmlCharEncoding; /** * Encoding conversion flags */ typedef enum { /** Create converter for input (conversion to UTF-8) */ XML_ENC_INPUT = (1 << 0), /** Create converter for output (conversion from UTF-8) */ XML_ENC_OUTPUT = (1 << 1), /** Use HTML5 mappings */ XML_ENC_HTML = (1 << 2) } xmlCharEncFlags; /** * Convert characters to UTF-8. * * On success, the value of `inlen` after return is the number of * bytes consumed and `outlen` is the number of bytes produced. * * @param out a pointer to an array of bytes to store the UTF-8 result * @param outlen the length of `out` * @param in a pointer to an array of chars in the original encoding * @param inlen the length of `in` * @returns the number of bytes written or an xmlCharEncError code. */ typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /** * Convert characters from UTF-8. * * On success, the value of `inlen` after return is the number of * bytes consumed and `outlen` is the number of bytes produced. * * @param out a pointer to an array of bytes to store the result * @param outlen the length of `out` * @param in a pointer to an array of UTF-8 chars * @param inlen the length of `in` * @returns the number of bytes written or an xmlCharEncError code. */ typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /** * Convert between character encodings. * * The value of `inlen` after return is the number of bytes consumed * and `outlen` is the number of bytes produced. * * If the converter can consume partial multi-byte sequences, the * `flush` flag can be used to detect truncated sequences at EOF. * Otherwise, the flag can be ignored. * * @param vctxt conversion context * @param out a pointer to an array of bytes to store the result * @param outlen the length of `out` * @param in a pointer to an array of input bytes * @param inlen the length of `in` * @param flush end of input * @returns an xmlCharEncError code. */ typedef xmlCharEncError (*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen, const unsigned char *in, int *inlen, int flush); /** * Free a conversion context. * * @param vctxt conversion context */ typedef void (*xmlCharEncConvCtxtDtor)(void *vctxt); /** Character encoding converter */ typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; /** * A character encoding conversion handler for non UTF-8 encodings. * * This structure will be made private. */ struct _xmlCharEncodingHandler { char *name XML_DEPRECATED_MEMBER; union { xmlCharEncConvFunc func; xmlCharEncodingInputFunc legacyFunc; } input XML_DEPRECATED_MEMBER; union { xmlCharEncConvFunc func; xmlCharEncodingOutputFunc legacyFunc; } output XML_DEPRECATED_MEMBER; void *inputCtxt XML_DEPRECATED_MEMBER; void *outputCtxt XML_DEPRECATED_MEMBER; xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER; int flags XML_DEPRECATED_MEMBER; }; /** * If this function returns XML_ERR_OK, it must fill the `out` * pointer with an encoding handler. The handler can be obtained * from #xmlCharEncNewCustomHandler. * * `flags` can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both. * * @param vctxt user data * @param name encoding name * @param flags bit mask of flags * @param out pointer to resulting handler * @returns an xmlParserErrors code. */ typedef xmlParserErrors (*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags, xmlCharEncodingHandler **out); /* * Interfaces for encoding handlers. */ XML_DEPRECATED XMLPUBFUN void xmlInitCharEncodingHandlers (void); XML_DEPRECATED XMLPUBFUN void xmlCleanupCharEncodingHandlers (void); XML_DEPRECATED XMLPUBFUN void xmlRegisterCharEncodingHandler (xmlCharEncodingHandler *handler); XMLPUBFUN xmlParserErrors xmlLookupCharEncodingHandler (xmlCharEncoding enc, xmlCharEncodingHandler **out); XMLPUBFUN xmlParserErrors xmlOpenCharEncodingHandler (const char *name, int output, xmlCharEncodingHandler **out); XMLPUBFUN xmlParserErrors xmlCreateCharEncodingHandler (const char *name, xmlCharEncFlags flags, xmlCharEncConvImpl impl, void *implCtxt, xmlCharEncodingHandler **out); XMLPUBFUN xmlCharEncodingHandler * xmlGetCharEncodingHandler (xmlCharEncoding enc); XMLPUBFUN xmlCharEncodingHandler * xmlFindCharEncodingHandler (const char *name); XML_DEPRECATED XMLPUBFUN xmlCharEncodingHandler * xmlNewCharEncodingHandler (const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output); XMLPUBFUN xmlParserErrors xmlCharEncNewCustomHandler (const char *name, xmlCharEncConvFunc input, xmlCharEncConvFunc output, xmlCharEncConvCtxtDtor ctxtDtor, void *inputCtxt, void *outputCtxt, xmlCharEncodingHandler **out); /* * Interfaces for encoding names and aliases. */ XML_DEPRECATED XMLPUBFUN int xmlAddEncodingAlias (const char *name, const char *alias); XML_DEPRECATED XMLPUBFUN int xmlDelEncodingAlias (const char *alias); XML_DEPRECATED XMLPUBFUN const char * xmlGetEncodingAlias (const char *alias); XML_DEPRECATED 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); struct _xmlBuffer; 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 xmlUTF8ToIsolat1 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN int xmlIsolat1ToUTF8 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #ifdef __cplusplus } #endif #endif /* __XML_CHAR_ENCODING_H__ */ PK!J-J-xmlIO.hnu[/** * @file * * @brief I/O interfaces used by the parser * * Functions and datatypes for parser input and output. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_IO_H__ #define __XML_IO_H__ #include #include #include #define XML_TREE_INTERNALS #include #undef XML_TREE_INTERNALS #ifdef __cplusplus extern "C" { #endif /** * Callback used in the I/O Input API to detect if the current handler * can provide input functionality for this resource. * * @param filename the filename or URI * @returns 1 if yes and 0 if another Input module should be used */ typedef int (*xmlInputMatchCallback) (const char *filename); /** * Callback used in the I/O Input API to open the resource * * @param filename the filename or URI * @returns an Input context or NULL in case or error */ typedef void * (*xmlInputOpenCallback) (const char *filename); /** * Callback used in the I/O Input API to read the resource * * @param context an Input context * @param buffer the buffer to store data read * @param len the length of the buffer in bytes * @returns the number of bytes read or -1 in case of error */ typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len); /** * Callback used in the I/O Input API to close the resource * * @param context an Input context * @returns 0 or -1 in case of error */ typedef int (*xmlInputCloseCallback) (void * context); #ifdef LIBXML_OUTPUT_ENABLED /** * Callback used in the I/O Output API to detect if the current handler * can provide output functionality for this resource. * * @param filename the filename or URI * @returns 1 if yes and 0 if another Output module should be used */ typedef int (*xmlOutputMatchCallback) (const char *filename); /** * Callback used in the I/O Output API to open the resource * * @param filename the filename or URI * @returns an Output context or NULL in case or error */ typedef void * (*xmlOutputOpenCallback) (const char *filename); /** * Callback used in the I/O Output API to write to the resource * * @param context an Output context * @param buffer the buffer of data to write * @param len the length of the buffer in bytes * @returns the number of bytes written or -1 in case of error */ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer, int len); /** * Callback used in the I/O Output API to close the resource * * @param context an Output context * @returns 0 or -1 in case of error */ typedef int (*xmlOutputCloseCallback) (void * context); #endif /* LIBXML_OUTPUT_ENABLED */ /** * Signature for the function doing the lookup for a suitable input method * corresponding to an URI. * * @param URI the URI to read from * @param enc the requested source encoding * @returns the new xmlParserInputBuffer in case of success or NULL if no * method was found. */ typedef xmlParserInputBuffer * (*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc); /** * Signature for the function doing the lookup for a suitable output method * corresponding to an URI. * * @param URI the URI to write to * @param encoder the requested target encoding * @param compression compression level * @returns the new xmlOutputBuffer in case of success or NULL if no * method was found. */ typedef xmlOutputBuffer * (*xmlOutputBufferCreateFilenameFunc)(const char *URI, xmlCharEncodingHandler *encoder, int compression); /** * Parser input buffer * * This struct and all related functions should ultimately * be removed from the public interface. */ struct _xmlParserInputBuffer { void* context XML_DEPRECATED_MEMBER; xmlInputReadCallback readcallback XML_DEPRECATED_MEMBER; xmlInputCloseCallback closecallback XML_DEPRECATED_MEMBER; /* I18N conversions to UTF-8 */ xmlCharEncodingHandler *encoder XML_DEPRECATED_MEMBER; /* Local buffer encoded in UTF-8 */ xmlBuf *buffer XML_DEPRECATED_MEMBER; /* if encoder != NULL buffer for raw input */ xmlBuf *raw XML_DEPRECATED_MEMBER; /* -1=unknown, 0=not compressed, 1=compressed */ int compressed XML_DEPRECATED_MEMBER; int error XML_DEPRECATED_MEMBER; /* amount consumed from raw */ unsigned long rawconsumed XML_DEPRECATED_MEMBER; }; #ifdef LIBXML_OUTPUT_ENABLED /** * Output buffer */ struct _xmlOutputBuffer { void* context; xmlOutputWriteCallback writecallback; xmlOutputCloseCallback closecallback; /* I18N conversions to UTF-8 */ xmlCharEncodingHandler *encoder; /* Local buffer encoded in UTF-8 or ISOLatin */ xmlBuf *buffer; /* if encoder != NULL buffer for output */ xmlBuf *conv; /* total number of byte written */ int written; int error; }; #endif /* LIBXML_OUTPUT_ENABLED */ /** @cond ignore */ XML_DEPRECATED XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * __xmlParserInputBufferCreateFilenameValue(void); XML_DEPRECATED XMLPUBFUN xmlOutputBufferCreateFilenameFunc * __xmlOutputBufferCreateFilenameValue(void); #ifndef XML_GLOBALS_NO_REDEFINITION #define xmlParserInputBufferCreateFilenameValue \ (*__xmlParserInputBufferCreateFilenameValue()) #define xmlOutputBufferCreateFilenameValue \ (*__xmlOutputBufferCreateFilenameValue()) #endif /** @endcond */ /* * Interfaces for input */ XMLPUBFUN void xmlCleanupInputCallbacks (void); XMLPUBFUN int xmlPopInputCallbacks (void); XMLPUBFUN void xmlRegisterDefaultInputCallbacks (void); XMLPUBFUN xmlParserInputBuffer * xmlAllocParserInputBuffer (xmlCharEncoding enc); XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateFilename (const char *URI, xmlCharEncoding enc); XML_DEPRECATED XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateFile (FILE *file, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateFd (int fd, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateMem (const char *mem, int size, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateStatic (const char *mem, int size, xmlCharEncoding enc); XMLPUBFUN xmlParserInputBuffer * xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc); XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferRead (xmlParserInputBuffer *in, int len); XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferGrow (xmlParserInputBuffer *in, int len); XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferPush (xmlParserInputBuffer *in, int len, const char *buf); XMLPUBFUN void xmlFreeParserInputBuffer (xmlParserInputBuffer *in); XMLPUBFUN char * xmlParserGetDirectory (const char *filename); XMLPUBFUN int xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc, xmlInputCloseCallback closeFunc); XMLPUBFUN xmlParserInputBuffer * __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 xmlOutputBuffer * xmlAllocOutputBuffer (xmlCharEncodingHandler *encoder); XMLPUBFUN xmlOutputBuffer * xmlOutputBufferCreateFilename (const char *URI, xmlCharEncodingHandler *encoder, int compression); XMLPUBFUN xmlOutputBuffer * xmlOutputBufferCreateFile (FILE *file, xmlCharEncodingHandler *encoder); XMLPUBFUN xmlOutputBuffer * xmlOutputBufferCreateBuffer (xmlBuffer *buffer, xmlCharEncodingHandler *encoder); XMLPUBFUN xmlOutputBuffer * xmlOutputBufferCreateFd (int fd, xmlCharEncodingHandler *encoder); XMLPUBFUN xmlOutputBuffer * xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void *ioctx, xmlCharEncodingHandler *encoder); /* Couple of APIs to get the output without digging into the buffers */ XMLPUBFUN const xmlChar * xmlOutputBufferGetContent (xmlOutputBuffer *out); XMLPUBFUN size_t xmlOutputBufferGetSize (xmlOutputBuffer *out); XMLPUBFUN int xmlOutputBufferWrite (xmlOutputBuffer *out, int len, const char *buf); XMLPUBFUN int xmlOutputBufferWriteString (xmlOutputBuffer *out, const char *str); XMLPUBFUN int xmlOutputBufferWriteEscape (xmlOutputBuffer *out, const xmlChar *str, xmlCharEncodingOutputFunc escaping); XMLPUBFUN int xmlOutputBufferFlush (xmlOutputBuffer *out); XMLPUBFUN int xmlOutputBufferClose (xmlOutputBuffer *out); XMLPUBFUN int xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, xmlOutputOpenCallback openFunc, xmlOutputWriteCallback writeFunc, xmlOutputCloseCallback closeFunc); XMLPUBFUN xmlOutputBuffer * __xmlOutputBufferCreateFilename(const char *URI, xmlCharEncodingHandler *encoder, int compression); #endif /* LIBXML_OUTPUT_ENABLED */ XML_DEPRECATED XMLPUBFUN xmlParserInput * xmlCheckHTTPInput (xmlParserCtxt *ctxt, xmlParserInput *ret); XML_DEPRECATED XMLPUBFUN xmlParserInput * xmlNoNetExternalEntityLoader (const char *URL, const char *ID, xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlNormalizeWindowsPath (const xmlChar *path); XML_DEPRECATED XMLPUBFUN int xmlCheckFilename (const char *path); 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); #ifdef LIBXML_HTTP_STUBS_ENABLED /** @cond IGNORE */ XML_DEPRECATED XMLPUBFUN int xmlIOHTTPMatch (const char *filename); XML_DEPRECATED XMLPUBFUN void * xmlIOHTTPOpen (const char *filename); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlRegisterHTTPPostCallbacks (void ); 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); /** @endcond */ #endif /* LIBXML_HTTP_STUBS_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__ */ PK![22hash.hnu[/** * @file * * @brief Chained hash tables * * This module implements the hash table support used in * various places in the library. * * @copyright See Copyright for the status of this software. */ #ifndef __XML_HASH_H__ #define __XML_HASH_H__ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * Hash table mapping strings to pointers * * Also supports lookup using two or three strings as key. */ 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. */ /** * 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 * * @param fptr pointer to a function */ #define XML_CAST_FPTR(fptr) fptr /* * function types: */ /** * Callback to free data from a hash. * * @param payload the data in the hash * @param name the name associated */ typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name); /** * Callback to copy data from a hash. * * @param payload the data in the hash * @param name the name associated * @returns a copy of the data or NULL in case of error. */ typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name); /** * Callback when scanning data in a hash with the simple scanner. * * @param payload the data in the hash * @param data extra scanner data * @param name the name associated */ typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name); /** * Callback when scanning data in a hash with the full scanner. * * @param payload the data in the hash * @param data extra scanner data * @param name the name associated * @param name2 the second name associated * @param name3 the third name associated */ typedef void (*xmlHashScannerFull)(void *payload, void *data, const xmlChar *name, const xmlChar *name2, const xmlChar *name3); /* * Constructor and destructor. */ XMLPUBFUN xmlHashTable * xmlHashCreate (int size); XMLPUBFUN xmlHashTable * xmlHashCreateDict (int size, xmlDict *dict); XMLPUBFUN void xmlHashFree (xmlHashTable *hash, xmlHashDeallocator dealloc); XMLPUBFUN void xmlHashDefaultDeallocator(void *entry, const xmlChar *name); /* * Add a new entry to the hash table. */ XMLPUBFUN int xmlHashAdd (xmlHashTable *hash, const xmlChar *name, void *userdata); XMLPUBFUN int xmlHashAddEntry (xmlHashTable *hash, const xmlChar *name, void *userdata); XMLPUBFUN int xmlHashUpdateEntry (xmlHashTable *hash, const xmlChar *name, void *userdata, xmlHashDeallocator dealloc); XMLPUBFUN int xmlHashAdd2 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, void *userdata); XMLPUBFUN int xmlHashAddEntry2 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, void *userdata); XMLPUBFUN int xmlHashUpdateEntry2 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator dealloc); XMLPUBFUN int xmlHashAdd3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata); XMLPUBFUN int xmlHashAddEntry3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata); XMLPUBFUN int xmlHashUpdateEntry3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata, xmlHashDeallocator dealloc); /* * Remove an entry from the hash table. */ XMLPUBFUN int xmlHashRemoveEntry (xmlHashTable *hash, const xmlChar *name, xmlHashDeallocator dealloc); XMLPUBFUN int xmlHashRemoveEntry2 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator dealloc); XMLPUBFUN int xmlHashRemoveEntry3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator dealloc); /* * Retrieve the payload. */ XMLPUBFUN void * xmlHashLookup (xmlHashTable *hash, const xmlChar *name); XMLPUBFUN void * xmlHashLookup2 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2); XMLPUBFUN void * xmlHashLookup3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3); XMLPUBFUN void * xmlHashQLookup (xmlHashTable *hash, const xmlChar *prefix, const xmlChar *name); XMLPUBFUN void * xmlHashQLookup2 (xmlHashTable *hash, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2); XMLPUBFUN void * xmlHashQLookup3 (xmlHashTable *hash, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2, const xmlChar *prefix3, const xmlChar *name3); /* * Helpers. */ XMLPUBFUN xmlHashTable * xmlHashCopySafe (xmlHashTable *hash, xmlHashCopier copy, xmlHashDeallocator dealloc); XMLPUBFUN xmlHashTable * xmlHashCopy (xmlHashTable *hash, xmlHashCopier copy); XMLPUBFUN int xmlHashSize (xmlHashTable *hash); XMLPUBFUN void xmlHashScan (xmlHashTable *hash, xmlHashScanner scan, void *data); XMLPUBFUN void xmlHashScan3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner scan, void *data); XMLPUBFUN void xmlHashScanFull (xmlHashTable *hash, xmlHashScannerFull scan, void *data); XMLPUBFUN void xmlHashScanFull3 (xmlHashTable *hash, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScannerFull scan, void *data); #ifdef __cplusplus } #endif #endif /* ! __XML_HASH_H__ */ PK!8   threads.hnu[/** * @file * * @brief interfaces for thread handling * * set of generic threading related routines * should work with pthreads, Windows native or TLS threads * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_THREADS_H__ #define __XML_THREADS_H__ #include #ifdef __cplusplus extern "C" { #endif /** Mutual exclusion object */ typedef struct _xmlMutex xmlMutex; typedef xmlMutex *xmlMutexPtr; /** Reentrant mutual exclusion object */ typedef struct _xmlRMutex xmlRMutex; typedef xmlRMutex *xmlRMutexPtr; XMLPUBFUN int xmlCheckThreadLocalStorage(void); XMLPUBFUN xmlMutex * xmlNewMutex (void); XMLPUBFUN void xmlMutexLock (xmlMutex *tok); XMLPUBFUN void xmlMutexUnlock (xmlMutex *tok); XMLPUBFUN void xmlFreeMutex (xmlMutex *tok); XMLPUBFUN xmlRMutex * xmlNewRMutex (void); XMLPUBFUN void xmlRMutexLock (xmlRMutex *tok); XMLPUBFUN void xmlRMutexUnlock (xmlRMutex *tok); XMLPUBFUN void xmlFreeRMutex (xmlRMutex *tok); /* * Library wide APIs. */ XML_DEPRECATED XMLPUBFUN void xmlInitThreads (void); XMLPUBFUN void xmlLockLibrary (void); XMLPUBFUN void xmlUnlockLibrary(void); XML_DEPRECATED XMLPUBFUN void xmlCleanupThreads(void); /** @cond IGNORE */ #if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \ defined(LIBXML_STATIC_FOR_DLL) int xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved); #endif /** @endcond */ #ifdef __cplusplus } #endif #endif /* __XML_THREADS_H__ */ PK!Dn*^t)t) HTMLparser.hnu[/** * @file * * @brief HTML parser, doesn't support HTML5 * * This module orginally implemented an HTML parser based on the * (underspecified) HTML 4.0 spec. As of 2.14, the tokenizer * conforms to HTML5. Tree construction still follows a custom, * unspecified algorithm with many differences to HTML5. * * The parser defaults to ISO-8859-1, the default encoding of * HTTP/1.0. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __HTML_PARSER_H__ #define __HTML_PARSER_H__ #include #include #ifdef LIBXML_HTML_ENABLED #ifdef __cplusplus extern "C" { #endif /* * Backward compatibility */ #define UTF8ToHtml htmlUTF8ToHtml #define htmlDefaultSubelement(elt) elt->defaultsubelt #define htmlElementAllowedHereDesc(parent,elt) \ htmlElementAllowedHere((parent), (elt)->name) #define htmlRequiredAttrs(elt) (elt)->attrs_req /* * Most of the back-end structures from XML and HTML are shared. */ /** Same as xmlParserCtxt */ typedef xmlParserCtxt htmlParserCtxt; typedef xmlParserCtxtPtr htmlParserCtxtPtr; typedef xmlParserNodeInfo htmlParserNodeInfo; /** Same as xmlSAXHandler */ typedef xmlSAXHandler htmlSAXHandler; typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; /** Same as xmlParserInput */ typedef xmlParserInput htmlParserInput; typedef xmlParserInputPtr htmlParserInputPtr; typedef xmlDocPtr htmlDocPtr; typedef xmlNodePtr htmlNodePtr; /** @cond ignore */ /* * 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; /* unused */ char endTag; /* Whether the end tag can be implied */ char saveEndTag; /* unused */ char empty; /* Is this an empty element ? */ char depr; /* unused */ char dtd; /* unused */ char isinline; /* is this a block 0 or inline 1 element */ const char *desc; /* the description */ const char** subelts XML_DEPRECATED_MEMBER; const char* defaultsubelt XML_DEPRECATED_MEMBER; const char** attrs_opt XML_DEPRECATED_MEMBER; const char** attrs_depr XML_DEPRECATED_MEMBER; const char** attrs_req XML_DEPRECATED_MEMBER; int dataMode; }; /* * 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 /** * @deprecated Use #xmlSAX2InitHtmlDefaultSAXHandler */ XML_DEPRECATED XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler; #endif /* LIBXML_SAX1_ENABLED */ /** @endcond */ /* * There is only few public functions. */ XML_DEPRECATED XMLPUBFUN void htmlInitAutoClose (void); XML_DEPRECATED XMLPUBFUN const htmlElemDesc * htmlTagLookup (const xmlChar *tag); XML_DEPRECATED XMLPUBFUN const htmlEntityDesc * htmlEntityLookup(const xmlChar *name); XML_DEPRECATED XMLPUBFUN const htmlEntityDesc * htmlEntityValueLookup(unsigned int value); XML_DEPRECATED XMLPUBFUN int htmlIsAutoClosed(xmlDoc *doc, xmlNode *elem); XML_DEPRECATED XMLPUBFUN int htmlAutoCloseTag(xmlDoc *doc, const xmlChar *name, xmlNode *elem); XML_DEPRECATED XMLPUBFUN const htmlEntityDesc * htmlParseEntityRef(htmlParserCtxt *ctxt, const xmlChar **str); XML_DEPRECATED XMLPUBFUN int htmlParseCharRef(htmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void htmlParseElement(htmlParserCtxt *ctxt); XMLPUBFUN htmlParserCtxt * htmlNewParserCtxt(void); XMLPUBFUN htmlParserCtxt * htmlNewSAXParserCtxt(const htmlSAXHandler *sax, void *userData); XMLPUBFUN htmlParserCtxt * htmlCreateMemoryParserCtxt(const char *buffer, int size); XMLPUBFUN int htmlParseDocument(htmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlDoc * htmlSAXParseDoc (const xmlChar *cur, const char *encoding, htmlSAXHandler *sax, void *userData); XMLPUBFUN xmlDoc * htmlParseDoc (const xmlChar *cur, const char *encoding); XMLPUBFUN htmlParserCtxt * htmlCreateFileParserCtxt(const char *filename, const char *encoding); XML_DEPRECATED XMLPUBFUN xmlDoc * htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandler *sax, void *userData); XMLPUBFUN xmlDoc * htmlParseFile (const char *filename, const char *encoding); XML_DEPRECATED XMLPUBFUN int htmlUTF8ToHtml (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); XML_DEPRECATED XMLPUBFUN int htmlEncodeEntities(unsigned char *out, int *outlen, const unsigned char *in, int *inlen, int quoteChar); XML_DEPRECATED XMLPUBFUN int htmlIsScriptAttribute(const xmlChar *name); XML_DEPRECATED XMLPUBFUN int htmlHandleOmittedElem(int val); #ifdef LIBXML_PUSH_ENABLED /* * Interfaces for the Push mode. */ XMLPUBFUN htmlParserCtxt * htmlCreatePushParserCtxt(htmlSAXHandler *sax, void *user_data, const char *chunk, int size, const char *filename, xmlCharEncoding enc); XMLPUBFUN int htmlParseChunk (htmlParserCtxt *ctxt, const char *chunk, int size, int terminate); #endif /* LIBXML_PUSH_ENABLED */ XMLPUBFUN void htmlFreeParserCtxt (htmlParserCtxt *ctxt); /* * New set of simpler/more flexible APIs */ /** * This is the set of HTML parser options that can be passed to * #htmlReadDoc, #htmlCtxtSetOptions and other functions. */ typedef enum { /** * No effect as of 2.14.0. */ HTML_PARSE_RECOVER = 1<<0, /** * Do not default to a doctype if none was found. */ HTML_PARSE_NODEFDTD = 1<<2, /** * Disable error and warning reports to the error handlers. * Errors are still accessible with xmlCtxtGetLastError(). */ HTML_PARSE_NOERROR = 1<<5, /** * Disable warning reports. */ HTML_PARSE_NOWARNING = 1<<6, /** * No effect. */ HTML_PARSE_PEDANTIC = 1<<7, /** * Remove some text nodes containing only whitespace from the * result document. Which nodes are removed depends on a conservative * heuristic. The reindenting feature of the serialization code relies * on this option to be set when parsing. Use of this option is * DISCOURAGED. */ HTML_PARSE_NOBLANKS = 1<<8, /** * No effect. */ HTML_PARSE_NONET = 1<<11, /** * Do not add implied html, head or body elements. */ HTML_PARSE_NOIMPLIED = 1<<13, /** * Store small strings directly in the node struct to save * memory. */ HTML_PARSE_COMPACT = 1<<16, /** * Relax some internal limits. See XML_PARSE_HUGE in xmlParserOption. * * @since 2.14.0 * * Use XML_PARSE_HUGE with older versions. */ HTML_PARSE_HUGE = 1<<19, /** * Ignore the encoding in the HTML declaration. This option is * mostly unneeded these days. The only effect is to enforce * ISO-8859-1 decoding of ASCII-like data. */ HTML_PARSE_IGNORE_ENC =1<<21, /** * Enable reporting of line numbers larger than 65535. * * @since 2.14.0 * * Use XML_PARSE_BIG_LINES with older versions. */ HTML_PARSE_BIG_LINES = 1<<22, /** * Make the tokenizer emit a SAX callback for each token. This results * in unbalanced invocations of startElement and endElement. * * For now, this is only usable to tokenize HTML5 with custom SAX * callbacks. A tree builder isn't implemented yet. * * @since 2.14.0 */ HTML_PARSE_HTML5 = 1<<26 } htmlParserOption; XMLPUBFUN void htmlCtxtReset (htmlParserCtxt *ctxt); XMLPUBFUN int htmlCtxtSetOptions (htmlParserCtxt *ctxt, int options); XMLPUBFUN int htmlCtxtUseOptions (htmlParserCtxt *ctxt, int options); XMLPUBFUN xmlDoc * htmlReadDoc (const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlReadFile (const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlReadMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlReadFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlReadIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlCtxtParseDocument (htmlParserCtxt *ctxt, xmlParserInput *input); XMLPUBFUN xmlDoc * htmlCtxtReadDoc (xmlParserCtxt *ctxt, const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlCtxtReadFile (xmlParserCtxt *ctxt, const char *filename, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlCtxtReadMemory (xmlParserCtxt *ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlCtxtReadFd (xmlParserCtxt *ctxt, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * htmlCtxtReadIO (xmlParserCtxt *ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /** * deprecated content model */ 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 */ XML_DEPRECATED XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; XML_DEPRECATED XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; XML_DEPRECATED XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; XML_DEPRECATED XMLPUBFUN htmlStatus htmlNodeStatus(xmlNode *, int) ; #ifdef __cplusplus } #endif #endif /* LIBXML_HTML_ENABLED */ #endif /* __HTML_PARSER_H__ */ PK!mCC nanoftp.hnu[/** * @file * * @brief Removed legacy symbols for an outdated FTP client * * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __NANO_FTP_H__ #define __NANO_FTP_H__ #ifdef __GNUC__ #warning "libxml/nanoftp.h is deprecated" #endif #endif /* __NANO_FTP_H__ */ PK!\C relaxng.hnu[/** * @file * * @brief implementation of the Relax-NG validation * * implementation of the Relax-NG validation * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_RELAX_NG__ #define __XML_RELAX_NG__ #include #include #include #include #include #ifdef LIBXML_RELAXNG_ENABLED #ifdef __cplusplus extern "C" { #endif /** RelaxNG schema */ typedef struct _xmlRelaxNG xmlRelaxNG; typedef xmlRelaxNG *xmlRelaxNGPtr; /** * Signature of an error callback from a Relax-NG validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * Signature of a warning callback from a Relax-NG validation * * @param ctx the validation context * @param msg the message * @param ... extra arguments */ typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** RelaxNG parser context */ typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt; typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr; /** RelaxNG validation context */ typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt; typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr; /** * 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; /** * 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 xmlRelaxNGParserCtxt * xmlRelaxNGNewParserCtxt (const char *URL); XMLPUBFUN xmlRelaxNGParserCtxt * xmlRelaxNGNewMemParserCtxt (const char *buffer, int size); XMLPUBFUN xmlRelaxNGParserCtxt * xmlRelaxNGNewDocParserCtxt (xmlDoc *doc); XMLPUBFUN int xmlRelaxParserSetFlag (xmlRelaxNGParserCtxt *ctxt, int flag); XMLPUBFUN int xmlRelaxParserSetIncLImit (xmlRelaxNGParserCtxt *ctxt, int limit); XMLPUBFUN void xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxt *ctxt); XMLPUBFUN void xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxt *ctxt, xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityWarningFunc warn, void *ctx); XMLPUBFUN int xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxt *ctxt, xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityWarningFunc *warn, void **ctx); XMLPUBFUN void xmlRelaxNGSetParserStructuredErrors( xmlRelaxNGParserCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN void xmlRelaxNGSetResourceLoader (xmlRelaxNGParserCtxt *ctxt, xmlResourceLoader loader, void *vctxt); XMLPUBFUN xmlRelaxNG * xmlRelaxNGParse (xmlRelaxNGParserCtxt *ctxt); XMLPUBFUN void xmlRelaxNGFree (xmlRelaxNG *schema); #ifdef LIBXML_DEBUG_ENABLED XMLPUBFUN void xmlRelaxNGDump (FILE *output, xmlRelaxNG *schema); #endif /* LIBXML_DEBUG_ENABLED */ #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void xmlRelaxNGDumpTree (FILE * output, xmlRelaxNG *schema); #endif /* LIBXML_OUTPUT_ENABLED */ /* * Interfaces for validating */ XMLPUBFUN void xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxt *ctxt, xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityWarningFunc warn, void *ctx); XMLPUBFUN int xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxt *ctxt, xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityWarningFunc *warn, void **ctx); XMLPUBFUN void xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx); XMLPUBFUN xmlRelaxNGValidCtxt * xmlRelaxNGNewValidCtxt (xmlRelaxNG *schema); XMLPUBFUN void xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxt *ctxt); XMLPUBFUN int xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxt *ctxt, xmlDoc *doc); /* * Interfaces for progressive validation when possible */ XMLPUBFUN int xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem); XMLPUBFUN int xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxt *ctxt, const xmlChar *data, int len); XMLPUBFUN int xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem); XMLPUBFUN int xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem); XMLPUBFUN void xmlRelaxNGValidCtxtClearErrors(xmlRelaxNGValidCtxt* ctxt); #ifdef __cplusplus } #endif #endif /* LIBXML_RELAXNG_ENABLED */ #endif /* __XML_RELAX_NG__ */ PK!edict.hnu[/** * @file * * @brief string dictionary * * dictionary of reusable strings, just used to avoid allocation * and freeing operations. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_DICT_H__ #define __XML_DICT_H__ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * Dictionary (pool for interned strings) */ typedef struct _xmlDict xmlDict; typedef xmlDict *xmlDictPtr; /* * Initializer */ XML_DEPRECATED XMLPUBFUN int xmlInitializeDict(void); /* * Constructor and destructor. */ XMLPUBFUN xmlDict * xmlDictCreate (void); XMLPUBFUN size_t xmlDictSetLimit (xmlDict *dict, size_t limit); XMLPUBFUN size_t xmlDictGetUsage (xmlDict *dict); XMLPUBFUN xmlDict * xmlDictCreateSub(xmlDict *sub); XMLPUBFUN int xmlDictReference(xmlDict *dict); XMLPUBFUN void xmlDictFree (xmlDict *dict); /* * Lookup of entry in the dictionary. */ XMLPUBFUN const xmlChar * xmlDictLookup (xmlDict *dict, const xmlChar *name, int len); XMLPUBFUN const xmlChar * xmlDictExists (xmlDict *dict, const xmlChar *name, int len); XMLPUBFUN const xmlChar * xmlDictQLookup (xmlDict *dict, const xmlChar *prefix, const xmlChar *name); XMLPUBFUN int xmlDictOwns (xmlDict *dict, const xmlChar *str); XMLPUBFUN int xmlDictSize (xmlDict *dict); /* * Cleanup function */ XML_DEPRECATED XMLPUBFUN void xmlDictCleanup (void); #ifdef __cplusplus } #endif #endif /* ! __XML_DICT_H__ */ PK!W4 p.p.valid.hnu[/** * @file * * @brief DTD validator * * API to handle XML Document Type Definitions and validate * documents. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_VALID_H__ #define __XML_VALID_H__ #include #include #define XML_TREE_INTERNALS #include #undef XML_TREE_INTERNALS #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Validation state added for non-deterministic content model. */ typedef struct _xmlValidState xmlValidState; typedef xmlValidState *xmlValidStatePtr; /** * Report a validity error. * * @param ctx user data (usually an xmlValidCtxt) * @param msg printf-like format string * @param ... arguments to format */ typedef void (*xmlValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * Report a validity warning. * * @param ctx user data (usually an xmlValidCtxt) * @param msg printf-like format string * @param ... arguments to format */ typedef void (*xmlValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); typedef struct _xmlValidCtxt xmlValidCtxt; typedef xmlValidCtxt *xmlValidCtxtPtr; /** * An xmlValidCtxt is used for error reporting when validating. */ 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 */ xmlNode *node; /* Current parsed Node */ int nodeNr; /* Depth of the parsing stack */ int nodeMax; /* Max depth of the parsing stack */ xmlNode **nodeTab; /* array of nodes */ unsigned int flags; /* internal flags */ xmlDoc *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 xmlAutomata *am; /* the automata */ xmlAutomataState *state; /* used to build the automata */ #else void *am; void *state; #endif }; typedef struct _xmlHashTable xmlNotationTable; typedef xmlNotationTable *xmlNotationTablePtr; typedef struct _xmlHashTable xmlElementTable; typedef xmlElementTable *xmlElementTablePtr; typedef struct _xmlHashTable xmlAttributeTable; typedef xmlAttributeTable *xmlAttributeTablePtr; typedef struct _xmlHashTable xmlIDTable; typedef xmlIDTable *xmlIDTablePtr; typedef struct _xmlHashTable xmlRefTable; typedef xmlRefTable *xmlRefTablePtr; /* Notation */ XMLPUBFUN xmlNotation * xmlAddNotationDecl (xmlValidCtxt *ctxt, xmlDtd *dtd, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); XML_DEPRECATED XMLPUBFUN xmlNotationTable * xmlCopyNotationTable (xmlNotationTable *table); XML_DEPRECATED XMLPUBFUN void xmlFreeNotationTable (xmlNotationTable *table); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlDumpNotationDecl (xmlBuffer *buf, xmlNotation *nota); /* XML_DEPRECATED, still used in lxml */ XMLPUBFUN void xmlDumpNotationTable (xmlBuffer *buf, xmlNotationTable *table); #endif /* LIBXML_OUTPUT_ENABLED */ /* Element Content */ XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlNewElementContent (const xmlChar *name, xmlElementContentType type); XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlCopyElementContent (xmlElementContent *content); XML_DEPRECATED XMLPUBFUN void xmlFreeElementContent (xmlElementContent *cur); XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlNewDocElementContent (xmlDoc *doc, const xmlChar *name, xmlElementContentType type); XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlCopyDocElementContent(xmlDoc *doc, xmlElementContent *content); XML_DEPRECATED XMLPUBFUN void xmlFreeDocElementContent(xmlDoc *doc, xmlElementContent *cur); XML_DEPRECATED XMLPUBFUN void xmlSnprintfElementContent(char *buf, int size, xmlElementContent *content, int englob); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlSprintfElementContent(char *buf, xmlElementContent *content, int englob); #endif /* LIBXML_OUTPUT_ENABLED */ /* Element */ XMLPUBFUN xmlElement * xmlAddElementDecl (xmlValidCtxt *ctxt, xmlDtd *dtd, const xmlChar *name, xmlElementTypeVal type, xmlElementContent *content); XML_DEPRECATED XMLPUBFUN xmlElementTable * xmlCopyElementTable (xmlElementTable *table); XML_DEPRECATED XMLPUBFUN void xmlFreeElementTable (xmlElementTable *table); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlDumpElementTable (xmlBuffer *buf, xmlElementTable *table); XML_DEPRECATED XMLPUBFUN void xmlDumpElementDecl (xmlBuffer *buf, xmlElement *elem); #endif /* LIBXML_OUTPUT_ENABLED */ /* Enumeration */ XML_DEPRECATED XMLPUBFUN xmlEnumeration * xmlCreateEnumeration (const xmlChar *name); /* XML_DEPRECATED, needed for custom attributeDecl SAX handler */ XMLPUBFUN void xmlFreeEnumeration (xmlEnumeration *cur); XML_DEPRECATED XMLPUBFUN xmlEnumeration * xmlCopyEnumeration (xmlEnumeration *cur); /* Attribute */ XMLPUBFUN xmlAttribute * xmlAddAttributeDecl (xmlValidCtxt *ctxt, xmlDtd *dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *ns, xmlAttributeType type, xmlAttributeDefault def, const xmlChar *defaultValue, xmlEnumeration *tree); XML_DEPRECATED XMLPUBFUN xmlAttributeTable * xmlCopyAttributeTable (xmlAttributeTable *table); XML_DEPRECATED XMLPUBFUN void xmlFreeAttributeTable (xmlAttributeTable *table); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlDumpAttributeTable (xmlBuffer *buf, xmlAttributeTable *table); XML_DEPRECATED XMLPUBFUN void xmlDumpAttributeDecl (xmlBuffer *buf, xmlAttribute *attr); #endif /* LIBXML_OUTPUT_ENABLED */ /* IDs */ XMLPUBFUN int xmlAddIDSafe (xmlAttr *attr, const xmlChar *value); XMLPUBFUN xmlID * xmlAddID (xmlValidCtxt *ctxt, xmlDoc *doc, const xmlChar *value, xmlAttr *attr); XMLPUBFUN void xmlFreeIDTable (xmlIDTable *table); XMLPUBFUN xmlAttr * xmlGetID (xmlDoc *doc, const xmlChar *ID); XMLPUBFUN int xmlIsID (xmlDoc *doc, xmlNode *elem, xmlAttr *attr); XMLPUBFUN int xmlRemoveID (xmlDoc *doc, xmlAttr *attr); /* IDREFs */ XML_DEPRECATED XMLPUBFUN xmlRef * xmlAddRef (xmlValidCtxt *ctxt, xmlDoc *doc, const xmlChar *value, xmlAttr *attr); XML_DEPRECATED XMLPUBFUN void xmlFreeRefTable (xmlRefTable *table); XML_DEPRECATED XMLPUBFUN int xmlIsRef (xmlDoc *doc, xmlNode *elem, xmlAttr *attr); XML_DEPRECATED XMLPUBFUN int xmlRemoveRef (xmlDoc *doc, xmlAttr *attr); XML_DEPRECATED XMLPUBFUN xmlList * xmlGetRefs (xmlDoc *doc, const xmlChar *ID); /** * The public function calls related to validity checking. */ #ifdef LIBXML_VALID_ENABLED /* Allocate/Release Validation Contexts */ XMLPUBFUN xmlValidCtxt * xmlNewValidCtxt(void); XMLPUBFUN void xmlFreeValidCtxt(xmlValidCtxt *); XML_DEPRECATED XMLPUBFUN int xmlValidateRoot (xmlValidCtxt *ctxt, xmlDoc *doc); XML_DEPRECATED XMLPUBFUN int xmlValidateElementDecl (xmlValidCtxt *ctxt, xmlDoc *doc, xmlElement *elem); XML_DEPRECATED XMLPUBFUN xmlChar * xmlValidNormalizeAttributeValue(xmlDoc *doc, xmlNode *elem, const xmlChar *name, const xmlChar *value); XML_DEPRECATED XMLPUBFUN xmlChar * xmlValidCtxtNormalizeAttributeValue(xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem, const xmlChar *name, const xmlChar *value); XML_DEPRECATED XMLPUBFUN int xmlValidateAttributeDecl(xmlValidCtxt *ctxt, xmlDoc *doc, xmlAttribute *attr); XML_DEPRECATED XMLPUBFUN int xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value); XML_DEPRECATED XMLPUBFUN int xmlValidateNotationDecl (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNotation *nota); XMLPUBFUN int xmlValidateDtd (xmlValidCtxt *ctxt, xmlDoc *doc, xmlDtd *dtd); XML_DEPRECATED XMLPUBFUN int xmlValidateDtdFinal (xmlValidCtxt *ctxt, xmlDoc *doc); XMLPUBFUN int xmlValidateDocument (xmlValidCtxt *ctxt, xmlDoc *doc); XMLPUBFUN int xmlValidateElement (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem); XML_DEPRECATED XMLPUBFUN int xmlValidateOneElement (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem); XML_DEPRECATED XMLPUBFUN int xmlValidateOneAttribute (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem, xmlAttr *attr, const xmlChar *value); XML_DEPRECATED XMLPUBFUN int xmlValidateOneNamespace (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem, const xmlChar *prefix, xmlNs *ns, const xmlChar *value); XML_DEPRECATED XMLPUBFUN int xmlValidateDocumentFinal(xmlValidCtxt *ctxt, xmlDoc *doc); XML_DEPRECATED XMLPUBFUN int xmlValidateNotationUse (xmlValidCtxt *ctxt, xmlDoc *doc, const xmlChar *notationName); #endif /* LIBXML_VALID_ENABLED */ XML_DEPRECATED XMLPUBFUN int xmlIsMixedElement (xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlAttribute * xmlGetDtdAttrDesc (xmlDtd *dtd, const xmlChar *elem, const xmlChar *name); XMLPUBFUN xmlAttribute * xmlGetDtdQAttrDesc (xmlDtd *dtd, const xmlChar *elem, const xmlChar *name, const xmlChar *prefix); XMLPUBFUN xmlNotation * xmlGetDtdNotationDesc (xmlDtd *dtd, const xmlChar *name); XMLPUBFUN xmlElement * xmlGetDtdQElementDesc (xmlDtd *dtd, const xmlChar *name, const xmlChar *prefix); XMLPUBFUN xmlElement * xmlGetDtdElementDesc (xmlDtd *dtd, const xmlChar *name); #ifdef LIBXML_VALID_ENABLED XMLPUBFUN int xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **names, int *len, int max); /* only needed for `xmllint --insert` */ 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(xmlValidCtxt *ctxt, xmlElement *elem); XML_DEPRECATED XMLPUBFUN int xmlValidatePushElement (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem, const xmlChar *qname); XML_DEPRECATED XMLPUBFUN int xmlValidatePushCData (xmlValidCtxt *ctxt, const xmlChar *data, int len); XML_DEPRECATED XMLPUBFUN int xmlValidatePopElement (xmlValidCtxt *ctxt, xmlDoc *doc, xmlNode *elem, const xmlChar *qname); #endif /* LIBXML_REGEXP_ENABLED */ #endif /* LIBXML_VALID_ENABLED */ #ifdef __cplusplus } #endif #endif /* __XML_VALID_H__ */ PK!TOO xmlwriter.hnu[/** * @file * * @brief text writing API for XML * * text writing API for XML * * @copyright See Copyright for the status of this software. * * @author Alfred Mickautsch */ #ifndef __XML_XMLWRITER_H__ #define __XML_XMLWRITER_H__ #include #ifdef LIBXML_WRITER_ENABLED #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** Writer object */ typedef struct _xmlTextWriter xmlTextWriter; typedef xmlTextWriter *xmlTextWriterPtr; /* * Constructors & Destructor */ XMLPUBFUN xmlTextWriter * xmlNewTextWriter(xmlOutputBuffer *out); XMLPUBFUN xmlTextWriter * xmlNewTextWriterFilename(const char *uri, int compression); XMLPUBFUN xmlTextWriter * xmlNewTextWriterMemory(xmlBuffer *buf, int compression); XMLPUBFUN xmlTextWriter * xmlNewTextWriterPushParser(xmlParserCtxt *ctxt, int compression); XMLPUBFUN xmlTextWriter * xmlNewTextWriterDoc(xmlDoc ** doc, int compression); XMLPUBFUN xmlTextWriter * xmlNewTextWriterTree(xmlDoc *doc, xmlNode *node, int compression); XMLPUBFUN void xmlFreeTextWriter(xmlTextWriter *writer); /* * Functions */ /* * Document */ XMLPUBFUN int xmlTextWriterStartDocument(xmlTextWriter *writer, const char *version, const char *encoding, const char *standalone); XMLPUBFUN int xmlTextWriterEndDocument(xmlTextWriter * writer); /* * Comments */ XMLPUBFUN int xmlTextWriterStartComment(xmlTextWriter * writer); XMLPUBFUN int xmlTextWriterEndComment(xmlTextWriter *writer); XMLPUBFUN int xmlTextWriterWriteFormatComment(xmlTextWriter *writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int xmlTextWriterWriteVFormatComment(xmlTextWriter *writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int xmlTextWriterWriteComment(xmlTextWriter * writer, const xmlChar * content); /* * Elements */ XMLPUBFUN int xmlTextWriterStartElement(xmlTextWriter *writer, const xmlChar * name); XMLPUBFUN int xmlTextWriterStartElementNS(xmlTextWriter * writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI); XMLPUBFUN int xmlTextWriterEndElement(xmlTextWriter *writer); XMLPUBFUN int xmlTextWriterFullEndElement(xmlTextWriter * writer); /* * Elements conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatElement(xmlTextWriter *writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int xmlTextWriterWriteVFormatElement(xmlTextWriter *writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int xmlTextWriterWriteElement(xmlTextWriter * writer, const xmlChar * name, const xmlChar * content); XMLPUBFUN int xmlTextWriterWriteFormatElementNS(xmlTextWriter *writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int xmlTextWriterWriteVFormatElementNS(xmlTextWriter *writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int xmlTextWriterWriteElementNS(xmlTextWriter * writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const xmlChar * content); /* * Text */ XMLPUBFUN int xmlTextWriterWriteFormatRaw(xmlTextWriter *writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int xmlTextWriterWriteVFormatRaw(xmlTextWriter *writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int xmlTextWriterWriteRawLen(xmlTextWriter *writer, const xmlChar * content, int len); XMLPUBFUN int xmlTextWriterWriteRaw(xmlTextWriter *writer, const xmlChar * content); XMLPUBFUN int xmlTextWriterWriteFormatString(xmlTextWriter * writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int xmlTextWriterWriteVFormatString(xmlTextWriter * writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int xmlTextWriterWriteString(xmlTextWriter *writer, const xmlChar * content); XMLPUBFUN int xmlTextWriterWriteBase64(xmlTextWriter *writer, const char *data, int start, int len); XMLPUBFUN int xmlTextWriterWriteBinHex(xmlTextWriter *writer, const char *data, int start, int len); /* * Attributes */ XMLPUBFUN int xmlTextWriterStartAttribute(xmlTextWriter *writer, const xmlChar * name); XMLPUBFUN int xmlTextWriterStartAttributeNS(xmlTextWriter * writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI); XMLPUBFUN int xmlTextWriterEndAttribute(xmlTextWriter * writer); /* * Attributes conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatAttribute(xmlTextWriter *writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int xmlTextWriterWriteVFormatAttribute(xmlTextWriter *writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int xmlTextWriterWriteAttribute(xmlTextWriter * writer, const xmlChar * name, const xmlChar * content); XMLPUBFUN int xmlTextWriterWriteFormatAttributeNS(xmlTextWriter *writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int xmlTextWriterWriteVFormatAttributeNS(xmlTextWriter *writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int xmlTextWriterWriteAttributeNS(xmlTextWriter * writer, const xmlChar * prefix, const xmlChar * name, const xmlChar * namespaceURI, const xmlChar * content); /* * PI's */ XMLPUBFUN int xmlTextWriterStartPI(xmlTextWriter *writer, const xmlChar * target); XMLPUBFUN int xmlTextWriterEndPI(xmlTextWriter *writer); /* * PI conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatPI(xmlTextWriter *writer, const xmlChar * target, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int xmlTextWriterWriteVFormatPI(xmlTextWriter *writer, const xmlChar * target, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int xmlTextWriterWritePI(xmlTextWriter *writer, const xmlChar * target, const xmlChar * content); /** * This macro maps to #xmlTextWriterWritePI */ #define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI /* * CDATA */ XMLPUBFUN int xmlTextWriterStartCDATA(xmlTextWriter *writer); XMLPUBFUN int xmlTextWriterEndCDATA(xmlTextWriter *writer); /* * CDATA conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatCDATA(xmlTextWriter *writer, const char *format, ...) LIBXML_ATTR_FORMAT(2,3); XMLPUBFUN int xmlTextWriterWriteVFormatCDATA(xmlTextWriter *writer, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(2,0); XMLPUBFUN int xmlTextWriterWriteCDATA(xmlTextWriter *writer, const xmlChar * content); /* * DTD */ XMLPUBFUN int xmlTextWriterStartDTD(xmlTextWriter *writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid); XMLPUBFUN int xmlTextWriterEndDTD(xmlTextWriter *writer); /* * DTD conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatDTD(xmlTextWriter *writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const char *format, ...) LIBXML_ATTR_FORMAT(5,6); XMLPUBFUN int xmlTextWriterWriteVFormatDTD(xmlTextWriter *writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(5,0); XMLPUBFUN int xmlTextWriterWriteDTD(xmlTextWriter *writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * subset); /** * this macro maps to #xmlTextWriterWriteDTD */ #define xmlTextWriterWriteDocType xmlTextWriterWriteDTD /* * DTD element definition */ XMLPUBFUN int xmlTextWriterStartDTDElement(xmlTextWriter *writer, const xmlChar * name); XMLPUBFUN int xmlTextWriterEndDTDElement(xmlTextWriter * writer); /* * DTD element definition conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatDTDElement(xmlTextWriter *writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int xmlTextWriterWriteVFormatDTDElement(xmlTextWriter *writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int xmlTextWriterWriteDTDElement(xmlTextWriter * writer, const xmlChar * name, const xmlChar * content); /* * DTD attribute list definition */ XMLPUBFUN int xmlTextWriterStartDTDAttlist(xmlTextWriter *writer, const xmlChar * name); XMLPUBFUN int xmlTextWriterEndDTDAttlist(xmlTextWriter * writer); /* * DTD attribute list definition conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatDTDAttlist(xmlTextWriter *writer, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(3,4); XMLPUBFUN int xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriter *writer, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(3,0); XMLPUBFUN int xmlTextWriterWriteDTDAttlist(xmlTextWriter * writer, const xmlChar * name, const xmlChar * content); /* * DTD entity definition */ XMLPUBFUN int xmlTextWriterStartDTDEntity(xmlTextWriter *writer, int pe, const xmlChar * name); XMLPUBFUN int xmlTextWriterEndDTDEntity(xmlTextWriter * writer); /* * DTD entity definition conveniency functions */ XMLPUBFUN int xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriter *writer, int pe, const xmlChar * name, const char *format, ...) LIBXML_ATTR_FORMAT(4,5); XMLPUBFUN int xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriter *writer, int pe, const xmlChar * name, const char *format, va_list argptr) LIBXML_ATTR_FORMAT(4,0); XMLPUBFUN int xmlTextWriterWriteDTDInternalEntity(xmlTextWriter *writer, int pe, const xmlChar * name, const xmlChar * content); XMLPUBFUN int xmlTextWriterWriteDTDExternalEntity(xmlTextWriter *writer, int pe, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid); XMLPUBFUN int xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriter * writer, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid); XMLPUBFUN int xmlTextWriterWriteDTDEntity(xmlTextWriter * writer, int pe, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid, const xmlChar * ndataid, const xmlChar * content); /* * DTD notation definition */ XMLPUBFUN int xmlTextWriterWriteDTDNotation(xmlTextWriter *writer, const xmlChar * name, const xmlChar * pubid, const xmlChar * sysid); /* * Indentation */ XMLPUBFUN int xmlTextWriterSetIndent(xmlTextWriter *writer, int indent); XMLPUBFUN int xmlTextWriterSetIndentString(xmlTextWriter *writer, const xmlChar * str); XMLPUBFUN int xmlTextWriterSetQuoteChar(xmlTextWriter *writer, xmlChar quotechar); /* * misc */ XMLPUBFUN int xmlTextWriterFlush(xmlTextWriter *writer); XMLPUBFUN int xmlTextWriterClose(xmlTextWriter *writer); #ifdef __cplusplus } #endif #endif /* LIBXML_WRITER_ENABLED */ #endif /* __XML_XMLWRITER_H__ */ PK!!х66parserInternals.hnu[/** * @file * * @brief Internals routines and limits exported by the parser. * * Except for some I/O-related functions, most of these macros and * functions are deprecated. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_PARSER_INTERNALS_H__ #define __XML_PARSER_INTERNALS_H__ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** * Push an input on the stack. * * @deprecated Use #xmlCtxtPushInput */ #define inputPush xmlCtxtPushInput /** * Pop an input from the stack. * * @deprecated Use #xmlCtxtPushInput */ #define inputPop xmlCtxtPopInput /** * Maximum element nesting depth (without XML_PARSE_HUGE). */ #define xmlParserMaxDepth 256 /** * 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 /** * Maximum size allowed when XML_PARSE_HUGE is set. */ #define XML_MAX_HUGE_LENGTH 1000000000 /** * 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 /** * 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 100000000 /** * 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 /** * Identifiers can be longer, but this will be more costly * at runtime. */ #define XML_MAX_NAMELEN 100 /************************************************************************ * * * UNICODE version of the macros. * * * ************************************************************************/ /** * Macro to check the following production in the XML spec: * * [2] Char ::= #x9 | #xA | #xD | [#x20...] * * any byte character in the accepted range * * @param c an byte value (int) */ #define IS_BYTE_CHAR(c) xmlIsChar_ch(c) /** * 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. * * @param c an UNICODE value (int) */ #define IS_CHAR(c) xmlIsCharQ(c) /** * Behaves like IS_CHAR on single-byte value * * @param c an xmlChar (usually an unsigned char) */ #define IS_CHAR_CH(c) xmlIsChar_ch(c) /** * Macro to check the following production in the XML spec: * * [3] S ::= (#x20 | #x9 | #xD | #xA)+ * @param c an UNICODE value (int) */ #define IS_BLANK(c) xmlIsBlankQ(c) /** * Behaviour same as IS_BLANK * * @param c an xmlChar value (normally unsigned char) */ #define IS_BLANK_CH(c) xmlIsBlank_ch(c) /** * Macro to check the following production in the XML spec: * * [85] BaseChar ::= ... long list see REC ... * @param c an UNICODE value (int) */ #define IS_BASECHAR(c) xmlIsBaseCharQ(c) /** * Macro to check the following production in the XML spec: * * [88] Digit ::= ... long list see REC ... * @param c an UNICODE value (int) */ #define IS_DIGIT(c) xmlIsDigitQ(c) /** * Behaves like IS_DIGIT but with a single byte argument * * @param c an xmlChar value (usually an unsigned char) */ #define IS_DIGIT_CH(c) xmlIsDigit_ch(c) /** * Macro to check the following production in the XML spec: * * [87] CombiningChar ::= ... long list see REC ... * @param c an UNICODE value (int) */ #define IS_COMBINING(c) xmlIsCombiningQ(c) /** * Always false (all combining chars > 0xff) * * @param c an xmlChar (usually an unsigned char) */ #define IS_COMBINING_CH(c) 0 /** * 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] * @param c an UNICODE value (int) */ #define IS_EXTENDER(c) xmlIsExtenderQ(c) /** * Behaves like IS_EXTENDER but with a single-byte argument * * @param c an xmlChar value (usually an unsigned char) */ #define IS_EXTENDER_CH(c) xmlIsExtender_ch(c) /** * Macro to check the following production in the XML spec: * * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] * @param c an UNICODE value (int) */ #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c) /** * Macro to check the following production in the XML spec: * * [84] Letter ::= BaseChar | Ideographic * @param c an UNICODE value (int) */ #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) /** * Macro behaves like IS_LETTER, but only check base chars * * @param c an xmlChar value (normally unsigned char) */ #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c) /** * Macro to check [a-zA-Z] * * @param c an xmlChar value */ #define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \ (((c) | 0x20) <= 0x7a)) /** * Macro to check [0-9] * * @param c an xmlChar value */ #define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39)) /** * Macro to check the following production in the XML spec: * * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | * [-'()+,./:=?;!*#@$_%] * @param c an UNICODE value (int) */ #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c) /** * Same as IS_PUBIDCHAR but for single-byte value * * @param c an xmlChar value (normally unsigned char) */ #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) /* * Global variables used for predefined strings. */ /** @cond ignore */ XMLPUBVAR const xmlChar xmlStringText[]; XMLPUBVAR const xmlChar xmlStringTextNoenc[]; XML_DEPRECATED XMLPUBVAR const xmlChar xmlStringComment[]; /** @endcond */ XML_DEPRECATED XMLPUBFUN int xmlIsLetter (int c); /* * Parser context. */ XMLPUBFUN xmlParserCtxt * xmlCreateFileParserCtxt (const char *filename); XMLPUBFUN xmlParserCtxt * xmlCreateURLParserCtxt (const char *filename, int options); XMLPUBFUN xmlParserCtxt * xmlCreateMemoryParserCtxt(const char *buffer, int size); XML_DEPRECATED XMLPUBFUN xmlParserCtxt * xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, const xmlChar *base); XMLPUBFUN void xmlCtxtErrMemory (xmlParserCtxt *ctxt); XMLPUBFUN int xmlSwitchEncoding (xmlParserCtxt *ctxt, xmlCharEncoding enc); XMLPUBFUN int xmlSwitchEncodingName (xmlParserCtxt *ctxt, const char *encoding); XMLPUBFUN int xmlSwitchToEncoding (xmlParserCtxt *ctxt, xmlCharEncodingHandler *handler); XML_DEPRECATED XMLPUBFUN int xmlSwitchInputEncoding (xmlParserCtxt *ctxt, xmlParserInput *input, xmlCharEncodingHandler *handler); /* * Input Streams. */ XMLPUBFUN xmlParserInput * xmlNewStringInputStream (xmlParserCtxt *ctxt, const xmlChar *buffer); XML_DEPRECATED XMLPUBFUN xmlParserInput * xmlNewEntityInputStream (xmlParserCtxt *ctxt, xmlEntity *entity); XMLPUBFUN int xmlCtxtPushInput (xmlParserCtxt *ctxt, xmlParserInput *input); XMLPUBFUN xmlParserInput * xmlCtxtPopInput (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlPushInput (xmlParserCtxt *ctxt, xmlParserInput *input); XML_DEPRECATED XMLPUBFUN xmlChar xmlPopInput (xmlParserCtxt *ctxt); XMLPUBFUN void xmlFreeInputStream (xmlParserInput *input); XMLPUBFUN xmlParserInput * xmlNewInputFromFile (xmlParserCtxt *ctxt, const char *filename); XMLPUBFUN xmlParserInput * xmlNewInputStream (xmlParserCtxt *ctxt); /* * Namespaces. */ XMLPUBFUN xmlChar * xmlSplitQName (xmlParserCtxt *ctxt, const xmlChar *name, xmlChar **prefix); /* * Generic production rules. */ XML_DEPRECATED XMLPUBFUN const xmlChar * xmlParseName (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseNmtoken (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseEntityValue (xmlParserCtxt *ctxt, xmlChar **orig); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseAttValue (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseSystemLiteral (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParsePubidLiteral (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseCharData (xmlParserCtxt *ctxt, int cdata); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseExternalID (xmlParserCtxt *ctxt, xmlChar **publicId, int strict); XML_DEPRECATED XMLPUBFUN void xmlParseComment (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN const xmlChar * xmlParsePITarget (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParsePI (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseNotationDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseEntityDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlParseDefaultDecl (xmlParserCtxt *ctxt, xmlChar **value); XML_DEPRECATED XMLPUBFUN xmlEnumeration * xmlParseNotationType (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlEnumeration * xmlParseEnumerationType (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlParseEnumeratedType (xmlParserCtxt *ctxt, xmlEnumeration **tree); XML_DEPRECATED XMLPUBFUN int xmlParseAttributeType (xmlParserCtxt *ctxt, xmlEnumeration **tree); XML_DEPRECATED XMLPUBFUN void xmlParseAttributeListDecl(xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlParseElementMixedContentDecl (xmlParserCtxt *ctxt, int inputchk); XML_DEPRECATED XMLPUBFUN xmlElementContent * xmlParseElementChildrenContentDecl (xmlParserCtxt *ctxt, int inputchk); XML_DEPRECATED XMLPUBFUN int xmlParseElementContentDecl(xmlParserCtxt *ctxt, const xmlChar *name, xmlElementContent **result); XML_DEPRECATED XMLPUBFUN int xmlParseElementDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseMarkupDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlParseCharRef (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlEntity * xmlParseEntityRef (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseReference (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParsePEReference (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseDocTypeDecl (xmlParserCtxt *ctxt); #ifdef LIBXML_SAX1_ENABLED XML_DEPRECATED XMLPUBFUN const xmlChar * xmlParseAttribute (xmlParserCtxt *ctxt, xmlChar **value); XML_DEPRECATED XMLPUBFUN const xmlChar * xmlParseStartTag (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseEndTag (xmlParserCtxt *ctxt); #endif /* LIBXML_SAX1_ENABLED */ XML_DEPRECATED XMLPUBFUN void xmlParseCDSect (xmlParserCtxt *ctxt); XMLPUBFUN void xmlParseContent (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseElement (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseVersionNum (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseVersionInfo (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN xmlChar * xmlParseEncName (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN const xmlChar * xmlParseEncodingDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlParseSDDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseXMLDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseTextDecl (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseMisc (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParseExternalSubset (xmlParserCtxt *ctxt, const xmlChar *publicId, const xmlChar *systemId); /** @cond ignore */ #define XML_SUBSTITUTE_NONE 0 #define XML_SUBSTITUTE_REF 1 #define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_BOTH 3 /** @endcond */ XML_DEPRECATED XMLPUBFUN xmlChar * xmlStringDecodeEntities (xmlParserCtxt *ctxt, const xmlChar *str, int what, xmlChar end, xmlChar end2, xmlChar end3); XML_DEPRECATED XMLPUBFUN xmlChar * xmlStringLenDecodeEntities (xmlParserCtxt *ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar end2, xmlChar end3); /* * other commodities shared between parser.c and parserInternals. */ XML_DEPRECATED XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxt *ctxt, const xmlChar *cur, int *len); XML_DEPRECATED XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang); /* * Really core function shared with HTML parser. */ XML_DEPRECATED XMLPUBFUN int xmlCurrentChar (xmlParserCtxt *ctxt, int *len); XML_DEPRECATED XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out, int val); XML_DEPRECATED XMLPUBFUN int xmlCopyChar (int len, xmlChar *out, int val); XML_DEPRECATED XMLPUBFUN void xmlNextChar (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlParserInputShrink (xmlParserInput *in); #ifdef __cplusplus } #endif #endif /* __XML_PARSER_INTERNALS_H__ */ PK!q00 xmlreader.hnu[/** * @file * * @brief the XMLReader implementation * * API of the XML streaming API based on C\# interfaces. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XMLREADER_H__ #define __XML_XMLREADER_H__ #include #include #include #include #ifdef LIBXML_RELAXNG_ENABLED #include #endif #ifdef LIBXML_SCHEMAS_ENABLED #include #endif #include #ifdef __cplusplus extern "C" { #endif /** * 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 /** * 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; /** * Some common options to use with #xmlTextReaderSetParserProp, but it * is better to use xmlParserOption and the xmlReaderNewxxx and * xmlReaderForxxx APIs now. */ typedef enum { /* load external DTD */ XML_PARSER_LOADDTD = 1, /* use default attributes */ XML_PARSER_DEFAULTATTRS = 2, /* DTD validation */ XML_PARSER_VALIDATE = 3, /* substitute entities */ XML_PARSER_SUBST_ENTITIES = 4 } xmlParserProperties; /** * Predefined constants for the different types of nodes. */ typedef enum { /** unknown or error */ XML_READER_TYPE_NONE = 0, /** element */ XML_READER_TYPE_ELEMENT = 1, /** attribute */ XML_READER_TYPE_ATTRIBUTE = 2, /** text */ XML_READER_TYPE_TEXT = 3, /** CDATA section */ XML_READER_TYPE_CDATA = 4, /** entity reference */ XML_READER_TYPE_ENTITY_REFERENCE = 5, /** unused */ XML_READER_TYPE_ENTITY = 6, /** processing instruction */ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7, /** comment */ XML_READER_TYPE_COMMENT = 8, /** document */ XML_READER_TYPE_DOCUMENT = 9, /** unused */ XML_READER_TYPE_DOCUMENT_TYPE = 10, /** document fragment */ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11, /** notation, unused */ XML_READER_TYPE_NOTATION = 12, /** whitespace */ XML_READER_TYPE_WHITESPACE = 13, /** significant whitespace */ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14, /** end of element */ XML_READER_TYPE_END_ELEMENT = 15, /** unused */ XML_READER_TYPE_END_ENTITY = 16, /** unused */ XML_READER_TYPE_XML_DECLARATION = 17 } xmlReaderTypes; /** xmlReader context */ typedef struct _xmlTextReader xmlTextReader; typedef xmlTextReader *xmlTextReaderPtr; /* * Constructors & Destructor */ XMLPUBFUN xmlTextReader * xmlNewTextReader (xmlParserInputBuffer *input, const char *URI); XMLPUBFUN xmlTextReader * xmlNewTextReaderFilename(const char *URI); XMLPUBFUN void xmlFreeTextReader (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderSetup(xmlTextReader *reader, xmlParserInputBuffer *input, const char *URL, const char *encoding, int options); XMLPUBFUN void xmlTextReaderSetMaxAmplification(xmlTextReader *reader, unsigned maxAmpl); XMLPUBFUN const xmlError * xmlTextReaderGetLastError(xmlTextReader *reader); /* * Iterators */ XMLPUBFUN int xmlTextReaderRead (xmlTextReader *reader); #ifdef LIBXML_WRITER_ENABLED XMLPUBFUN xmlChar * xmlTextReaderReadInnerXml(xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderReadOuterXml(xmlTextReader *reader); #endif XMLPUBFUN xmlChar * xmlTextReaderReadString (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderReadAttributeValue(xmlTextReader *reader); /* * Attributes of the node */ XMLPUBFUN int xmlTextReaderAttributeCount(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderDepth (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderHasAttributes(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderHasValue(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderIsDefault (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderIsEmptyElement(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderNodeType (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderQuoteChar (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderReadState (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderIsNamespaceDecl(xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstBaseUri (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstLocalName (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstName (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstNamespaceUri(xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstPrefix (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstXmlLang (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstString (xmlTextReader *reader, const xmlChar *str); XMLPUBFUN const xmlChar * xmlTextReaderConstValue (xmlTextReader *reader); /* * use the Const version of the routine for * better performance and simpler code */ XMLPUBFUN xmlChar * xmlTextReaderBaseUri (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderLocalName (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderName (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderNamespaceUri(xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderPrefix (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderXmlLang (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderValue (xmlTextReader *reader); /* * Methods of the XmlTextReader */ XMLPUBFUN int xmlTextReaderClose (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderGetAttributeNo (xmlTextReader *reader, int no); XMLPUBFUN xmlChar * xmlTextReaderGetAttribute (xmlTextReader *reader, const xmlChar *name); XMLPUBFUN xmlChar * xmlTextReaderGetAttributeNs (xmlTextReader *reader, const xmlChar *localName, const xmlChar *namespaceURI); XMLPUBFUN xmlParserInputBuffer * xmlTextReaderGetRemainder (xmlTextReader *reader); XMLPUBFUN xmlChar * xmlTextReaderLookupNamespace(xmlTextReader *reader, const xmlChar *prefix); XMLPUBFUN int xmlTextReaderMoveToAttributeNo(xmlTextReader *reader, int no); XMLPUBFUN int xmlTextReaderMoveToAttribute(xmlTextReader *reader, const xmlChar *name); XMLPUBFUN int xmlTextReaderMoveToAttributeNs(xmlTextReader *reader, const xmlChar *localName, const xmlChar *namespaceURI); XMLPUBFUN int xmlTextReaderMoveToFirstAttribute(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderMoveToNextAttribute(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderMoveToElement (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderNormalization (xmlTextReader *reader); XMLPUBFUN const xmlChar * xmlTextReaderConstEncoding (xmlTextReader *reader); /* * Extensions */ XMLPUBFUN int xmlTextReaderSetParserProp (xmlTextReader *reader, int prop, int value); XMLPUBFUN int xmlTextReaderGetParserProp (xmlTextReader *reader, int prop); XMLPUBFUN xmlNode * xmlTextReaderCurrentNode (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderGetParserLineNumber(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderGetParserColumnNumber(xmlTextReader *reader); XMLPUBFUN xmlNode * xmlTextReaderPreserve (xmlTextReader *reader); #ifdef LIBXML_PATTERN_ENABLED XMLPUBFUN int xmlTextReaderPreservePattern(xmlTextReader *reader, const xmlChar *pattern, const xmlChar **namespaces); #endif /* LIBXML_PATTERN_ENABLED */ XMLPUBFUN xmlDoc * xmlTextReaderCurrentDoc (xmlTextReader *reader); XMLPUBFUN xmlNode * xmlTextReaderExpand (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderNext (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderNextSibling (xmlTextReader *reader); XMLPUBFUN int xmlTextReaderIsValid (xmlTextReader *reader); #ifdef LIBXML_RELAXNG_ENABLED XMLPUBFUN int xmlTextReaderRelaxNGValidate(xmlTextReader *reader, const char *rng); XMLPUBFUN int xmlTextReaderRelaxNGValidateCtxt(xmlTextReader *reader, xmlRelaxNGValidCtxt *ctxt, int options); XMLPUBFUN int xmlTextReaderRelaxNGSetSchema(xmlTextReader *reader, xmlRelaxNG *schema); #endif #ifdef LIBXML_SCHEMAS_ENABLED XMLPUBFUN int xmlTextReaderSchemaValidate (xmlTextReader *reader, const char *xsd); XMLPUBFUN int xmlTextReaderSchemaValidateCtxt(xmlTextReader *reader, xmlSchemaValidCtxt *ctxt, int options); XMLPUBFUN int xmlTextReaderSetSchema (xmlTextReader *reader, xmlSchema *schema); #endif XMLPUBFUN const xmlChar * xmlTextReaderConstXmlVersion(xmlTextReader *reader); XMLPUBFUN int xmlTextReaderStandalone (xmlTextReader *reader); /* * Index lookup */ XMLPUBFUN long xmlTextReaderByteConsumed (xmlTextReader *reader); /* * New more complete APIs for simpler creation and reuse of readers */ XMLPUBFUN xmlTextReader * xmlReaderWalker (xmlDoc *doc); XMLPUBFUN xmlTextReader * xmlReaderForDoc (const xmlChar * cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReader * xmlReaderForFile (const char *filename, const char *encoding, int options); XMLPUBFUN xmlTextReader * xmlReaderForMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReader * xmlReaderForFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlTextReader * xmlReaderForIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN int xmlReaderNewWalker (xmlTextReader *reader, xmlDoc *doc); XMLPUBFUN int xmlReaderNewDoc (xmlTextReader *reader, const xmlChar * cur, const char *URL, const char *encoding, int options); XMLPUBFUN int xmlReaderNewFile (xmlTextReader *reader, const char *filename, const char *encoding, int options); XMLPUBFUN int xmlReaderNewMemory (xmlTextReader *reader, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN int xmlReaderNewFd (xmlTextReader *reader, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN int xmlReaderNewIO (xmlTextReader *reader, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /* * Error handling extensions */ typedef void * xmlTextReaderLocatorPtr; /** * Signature of an error callback from a reader parser * * @param arg the user argument * @param msg the message * @param severity the severity of the error * @param locator a locator indicating where the error occurred */ 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(xmlTextReader *reader, xmlTextReaderErrorFunc f, void *arg); XMLPUBFUN void xmlTextReaderSetStructuredErrorHandler(xmlTextReader *reader, xmlStructuredErrorFunc f, void *arg); XMLPUBFUN void xmlTextReaderGetErrorHandler(xmlTextReader *reader, xmlTextReaderErrorFunc *f, void **arg); XMLPUBFUN void xmlTextReaderSetResourceLoader(xmlTextReader *reader, xmlResourceLoader loader, void *data); #endif /* LIBXML_READER_ENABLED */ #ifdef __cplusplus } #endif #endif /* __XML_XMLREADER_H__ */ PK!gn n xmlexports.hnu[/** * @file * * @brief macros for marking symbols as exportable/importable. * * macros for marking symbols as exportable/importable. * * @copyright See Copyright for the status of this software. */ #ifndef __XML_EXPORTS_H__ #define __XML_EXPORTS_H__ /* * Symbol visibility */ #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(LIBXML_STATIC) #if defined(IN_LIBXML) #define XMLPUBFUN __declspec(dllexport) #define XMLPUBVAR __declspec(dllexport) extern #else #define XMLPUBFUN __declspec(dllimport) #define XMLPUBVAR __declspec(dllimport) extern #endif #else /* not Windows */ #define XMLPUBFUN #define XMLPUBVAR extern #endif /* platform switch */ /* Compatibility */ #define XMLCALL #define XMLCDECL #ifndef LIBXML_DLL_IMPORT #define LIBXML_DLL_IMPORT XMLPUBVAR #endif /* * Attributes */ #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__ >= 405 /* GCC 4.5+ supports deprecated with message */ #define XML_DEPRECATED __attribute__((deprecated("See https://gnome.pages.gitlab.gnome.org/libxml2/html/deprecated.html"))) #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301 /* GCC 3.1+ supports deprecated without message */ #define XML_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) && _MSC_VER >= 1400 /* Available since Visual Studio 2005 */ #define XML_DEPRECATED __declspec(deprecated("See https://gnome.pages.gitlab.gnome.org/libxml2/html/deprecated.html")) #else #define XML_DEPRECATED #endif #endif #ifndef XML_DEPRECATED_MEMBER #if defined(IN_LIBXML) #define XML_DEPRECATED_MEMBER #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301 #define XML_DEPRECATED_MEMBER __attribute__((deprecated)) #else #define XML_DEPRECATED_MEMBER #endif #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__ */ PK!@ chvalid.hnu[/** * @file * * @brief Unicode character range checking * * this module exports interfaces for the character * range validation APIs */ #ifndef __XML_CHVALID_H__ #define __XML_CHVALID_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** @cond ignore */ /* * 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; }; XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup; XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup; XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup; XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup; XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup; XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup; XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; /** * Range checking routine */ XMLPUBFUN int xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); /** @endcond */ /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ ((0x61 <= (c)) && ((c) <= 0x7a)) || \ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \ (0xf8 <= (c))) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsBaseCharQ(c) (((c) < 0x100) ? \ xmlIsBaseChar_ch((c)) : \ xmlCharInRange((c), &xmlIsBaseCharGroup)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsBlank_ch(c) (((c) == 0x20) || \ ((0x9 <= (c)) && ((c) <= 0xa)) || \ ((c) == 0xd)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsBlankQ(c) (((c) < 0x100) ? \ xmlIsBlank_ch((c)) : 0) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \ ((c) == 0xd) || \ (0x20 <= (c))) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsCharQ(c) (((c) < 0x100) ? \ xmlIsChar_ch((c)) :\ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \ ((0x10000 <= (c)) && ((c) <= 0x10ffff)))) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsCombiningQ(c) (((c) < 0x100) ? \ 0 : \ xmlCharInRange((c), &xmlIsCombiningGroup)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39))) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsDigitQ(c) (((c) < 0x100) ? \ xmlIsDigit_ch((c)) : \ xmlCharInRange((c), &xmlIsDigitGroup)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsExtender_ch(c) (((c) == 0xb7)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsExtenderQ(c) (((c) < 0x100) ? \ xmlIsExtender_ch((c)) : \ xmlCharInRange((c), &xmlIsExtenderGroup)) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsIdeographicQ(c) (((c) < 0x100) ? \ 0 :\ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \ ((c) == 0x3007) || \ ((0x3021 <= (c)) && ((c) <= 0x3029)))) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)]) /** * Automatically generated by genChRanges.py * * @param c char to validate */ #define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ xmlIsPubidChar_ch((c)) : 0) XML_DEPRECATED XMLPUBFUN int xmlIsBaseChar(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsBlank(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsChar(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsCombining(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsDigit(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsExtender(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsIdeographic(unsigned int ch); XML_DEPRECATED XMLPUBFUN int xmlIsPubidChar(unsigned int ch); #ifdef __cplusplus } #endif #endif /* __XML_CHVALID_H__ */ PK!e`` nanohttp.hnu[/** * @file * * @brief minimal HTTP implementation * * minimal HTTP implementation allowing to fetch resources * like external subset. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __NANO_HTTP_H__ #define __NANO_HTTP_H__ #include #ifdef LIBXML_HTTP_STUBS_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_STUBS_ENABLED */ #endif /* __NANO_HTTP_H__ */ PK!!x=b; ; xinclude.hnu[/** * @file * * @brief Implementation of XInclude 1.0 * * API to process XML Inclusions. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XINCLUDE_H__ #define __XML_XINCLUDE_H__ #include #include #include #include #ifdef LIBXML_XINCLUDE_ENABLED #ifdef __cplusplus extern "C" { #endif /** * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude */ #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude" /** * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude */ #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude" /** * Macro defining "include" */ #define XINCLUDE_NODE (const xmlChar *) "include" /** * Macro defining "fallback" */ #define XINCLUDE_FALLBACK (const xmlChar *) "fallback" /** * Macro defining "href" */ #define XINCLUDE_HREF (const xmlChar *) "href" /** * Macro defining "parse" */ #define XINCLUDE_PARSE (const xmlChar *) "parse" /** * Macro defining "xml" */ #define XINCLUDE_PARSE_XML (const xmlChar *) "xml" /** * Macro defining "text" */ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" /** * Macro defining "encoding" */ #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding" /** * Macro defining "xpointer" */ #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer" /** XInclude context */ typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; /* * standalone processing */ XMLPUBFUN int xmlXIncludeProcess (xmlDoc *doc); XMLPUBFUN int xmlXIncludeProcessFlags (xmlDoc *doc, int flags); XMLPUBFUN int xmlXIncludeProcessFlagsData(xmlDoc *doc, int flags, void *data); XMLPUBFUN int xmlXIncludeProcessTreeFlagsData(xmlNode *tree, int flags, void *data); XMLPUBFUN int xmlXIncludeProcessTree (xmlNode *tree); XMLPUBFUN int xmlXIncludeProcessTreeFlags(xmlNode *tree, int flags); /* * contextual processing */ XMLPUBFUN xmlXIncludeCtxt * xmlXIncludeNewContext (xmlDoc *doc); XMLPUBFUN int xmlXIncludeSetFlags (xmlXIncludeCtxt *ctxt, int flags); XMLPUBFUN void xmlXIncludeSetErrorHandler(xmlXIncludeCtxt *ctxt, xmlStructuredErrorFunc handler, void *data); XMLPUBFUN void xmlXIncludeSetResourceLoader(xmlXIncludeCtxt *ctxt, xmlResourceLoader loader, void *data); XMLPUBFUN int xmlXIncludeGetLastError (xmlXIncludeCtxt *ctxt); XMLPUBFUN void xmlXIncludeFreeContext (xmlXIncludeCtxt *ctxt); XMLPUBFUN int xmlXIncludeProcessNode (xmlXIncludeCtxt *ctxt, xmlNode *tree); #ifdef __cplusplus } #endif #endif /* LIBXML_XINCLUDE_ENABLED */ #endif /* __XML_XINCLUDE_H__ */ PK!S_$$xlink.hnu[/** * @file * * @brief unfinished XLink detection module * * This module is deprecated, don't use. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XLINK_H__ #define __XML_XLINK_H__ #include #include #ifdef LIBXML_XPTR_ENABLED #ifdef __cplusplus extern "C" { #endif /** @cond ignore */ /** * 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; /** @endcond */ /** * This is the prototype for the link detection routine. * It calls the default link detection callbacks upon link detection. * * @param ctx user data pointer * @param node the node to check */ typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNode *node); /* * The link detection module interact with the upper layers using * a set of callback registered at parsing time. */ /** * This is the prototype for a simple link detection callback. * * @param ctx user data pointer * @param node the node carrying the link * @param href the target of the link * @param role the role string * @param title the link title */ typedef void (*xlinkSimpleLinkFunk) (void *ctx, xmlNode *node, const xlinkHRef href, const xlinkRole role, const xlinkTitle title); /** * This is the prototype for a extended link detection callback. * * @param ctx user data pointer * @param node the node carrying the link * @param nbLocators the number of locators detected on the link * @param hrefs pointer to the array of locator hrefs * @param roles pointer to the array of locator roles * @param nbArcs the number of arcs detected on the link * @param from pointer to the array of source roles found on the arcs * @param to pointer to the array of target roles found on the arcs * @param show array of values for the show attributes found on the arcs * @param actuate array of values for the actuate attributes found on the arcs * @param nbTitles the number of titles detected on the link * @param titles array of titles detected on the link * @param langs array of xml:lang values for the titles */ typedef void (*xlinkExtendedLinkFunk)(void *ctx, xmlNode *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); /** * This is the prototype for a extended link set detection callback. * * @param ctx user data pointer * @param node the node carrying the link * @param nbLocators the number of locators detected on the link * @param hrefs pointer to the array of locator hrefs * @param roles pointer to the array of locator roles * @param nbTitles the number of titles detected on the link * @param titles array of titles detected on the link * @param langs array of xml:lang values for the titles */ typedef void (*xlinkExtendedLinkSetFunk) (void *ctx, xmlNode *node, int nbLocators, const xlinkHRef *hrefs, const xlinkRole *roles, int nbTitles, const xlinkTitle *titles, const xmlChar **langs); typedef struct _xlinkHandler xlinkHandler; typedef xlinkHandler *xlinkHandlerPtr; /** * 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. */ struct _xlinkHandler { xlinkSimpleLinkFunk simple; xlinkExtendedLinkFunk extended; xlinkExtendedLinkSetFunk set; }; /* * The default detection routine, can be overridden, they call the default * detection callbacks. */ XML_DEPRECATED XMLPUBFUN xlinkNodeDetectFunc xlinkGetDefaultDetect (void); XML_DEPRECATED XMLPUBFUN void xlinkSetDefaultDetect (xlinkNodeDetectFunc func); /* * Routines to set/get the default handlers. */ XML_DEPRECATED XMLPUBFUN xlinkHandler * xlinkGetDefaultHandler (void); XML_DEPRECATED XMLPUBFUN void xlinkSetDefaultHandler (xlinkHandler *handler); /* * Link detection module itself. */ XML_DEPRECATED XMLPUBFUN xlinkType xlinkIsLink (xmlDoc *doc, xmlNode *node); #ifdef __cplusplus } #endif #endif /* LIBXML_XPTR_ENABLED */ #endif /* __XML_XLINK_H__ */ PK![5k xmlregexp.hnu[/** * @file * * @brief Regular expressions * * A regular expression engine used for DTD and XML Schema * validation. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_REGEXP_H__ #define __XML_REGEXP_H__ #include #include #include #ifdef LIBXML_REGEXP_ENABLED #ifdef __cplusplus extern "C" { #endif /** * A libxml regular expression */ typedef struct _xmlRegexp xmlRegexp; typedef xmlRegexp *xmlRegexpPtr; /** * A libxml progressive regular expression evaluation context */ typedef struct _xmlRegExecCtxt xmlRegExecCtxt; typedef xmlRegExecCtxt *xmlRegExecCtxtPtr; /* * The POSIX like API */ XMLPUBFUN xmlRegexp * xmlRegexpCompile (const xmlChar *regexp); XMLPUBFUN void xmlRegFreeRegexp(xmlRegexp *regexp); XMLPUBFUN int xmlRegexpExec (xmlRegexp *comp, const xmlChar *value); XML_DEPRECATED XMLPUBFUN void xmlRegexpPrint (FILE *output, xmlRegexp *regexp); XMLPUBFUN int xmlRegexpIsDeterminist(xmlRegexp *comp); /** * Callback function when doing a transition in the automata * * @param exec the regular expression context * @param token the current token string * @param transdata transition data * @param inputdata input data */ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxt *exec, const xmlChar *token, void *transdata, void *inputdata); /* * The progressive API */ XML_DEPRECATED XMLPUBFUN xmlRegExecCtxt * xmlRegNewExecCtxt (xmlRegexp *comp, xmlRegExecCallbacks callback, void *data); XML_DEPRECATED XMLPUBFUN void xmlRegFreeExecCtxt (xmlRegExecCtxt *exec); XML_DEPRECATED XMLPUBFUN int xmlRegExecPushString(xmlRegExecCtxt *exec, const xmlChar *value, void *data); XML_DEPRECATED XMLPUBFUN int xmlRegExecPushString2(xmlRegExecCtxt *exec, const xmlChar *value, const xmlChar *value2, void *data); XML_DEPRECATED XMLPUBFUN int xmlRegExecNextValues(xmlRegExecCtxt *exec, int *nbval, int *nbneg, xmlChar **values, int *terminal); XML_DEPRECATED XMLPUBFUN int xmlRegExecErrInfo (xmlRegExecCtxt *exec, const xmlChar **string, int *nbval, int *nbneg, xmlChar **values, int *terminal); #ifdef __cplusplus } #endif #endif /* LIBXML_REGEXP_ENABLED */ #endif /*__XML_REGEXP_H__ */ PK!ߛp catalog.hnu[/** * @file * * @brief interfaces to the Catalog handling system * * 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 * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_CATALOG_H__ #define __XML_CATALOG_H__ #include #include #include #include #ifdef LIBXML_CATALOG_ENABLED #ifdef __cplusplus extern "C" { #endif /** * The namespace for the XML Catalogs elements. */ #define XML_CATALOGS_NAMESPACE \ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" /** * The specific XML Catalog Processing Instruction name. */ #define XML_CATALOG_PI \ (const xmlChar *) "oasis-xml-catalog" /** @cond ignore */ /* * 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; /** @endcond */ /** XML catalog */ typedef struct _xmlCatalog xmlCatalog; typedef xmlCatalog *xmlCatalogPtr; /* * Operations on a given catalog. */ XML_DEPRECATED XMLPUBFUN xmlCatalog * xmlNewCatalog (int sgml); XML_DEPRECATED XMLPUBFUN xmlCatalog * xmlLoadACatalog (const char *filename); #ifdef LIBXML_SGML_CATALOG_ENABLED XML_DEPRECATED XMLPUBFUN xmlCatalog * xmlLoadSGMLSuperCatalog (const char *filename); XML_DEPRECATED XMLPUBFUN int xmlConvertSGMLCatalog (xmlCatalog *catal); #endif /* LIBXML_SGML_CATALOG_ENABLED */ XML_DEPRECATED XMLPUBFUN int xmlACatalogAdd (xmlCatalog *catal, const xmlChar *type, const xmlChar *orig, const xmlChar *replace); XML_DEPRECATED XMLPUBFUN int xmlACatalogRemove (xmlCatalog *catal, const xmlChar *value); XML_DEPRECATED XMLPUBFUN xmlChar * xmlACatalogResolve (xmlCatalog *catal, const xmlChar *pubID, const xmlChar *sysID); XML_DEPRECATED XMLPUBFUN xmlChar * xmlACatalogResolveSystem(xmlCatalog *catal, const xmlChar *sysID); XML_DEPRECATED XMLPUBFUN xmlChar * xmlACatalogResolvePublic(xmlCatalog *catal, const xmlChar *pubID); XML_DEPRECATED XMLPUBFUN xmlChar * xmlACatalogResolveURI (xmlCatalog *catal, const xmlChar *URI); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlACatalogDump (xmlCatalog *catal, FILE *out); #endif /* LIBXML_OUTPUT_ENABLED */ XML_DEPRECATED XMLPUBFUN void xmlFreeCatalog (xmlCatalog *catal); XML_DEPRECATED XMLPUBFUN int xmlCatalogIsEmpty (xmlCatalog *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); XMLPUBFUN xmlDocPtr xmlCatalogDumpDoc (void); #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); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlParseCatalogFile (const char *filename); #ifdef LIBXML_SGML_CATALOG_ENABLED XML_DEPRECATED XMLPUBFUN int xmlCatalogConvert (void); #endif /* LIBXML_SGML_CATALOG_ENABLED */ /* * 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); XML_DEPRECATED XMLPUBFUN xmlCatalogPrefer xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); XMLPUBFUN void xmlCatalogSetDefaults (xmlCatalogAllow allow); XMLPUBFUN xmlCatalogAllow xmlCatalogGetDefaults (void); /* DEPRECATED interfaces */ XML_DEPRECATED XMLPUBFUN const xmlChar * xmlCatalogGetSystem (const xmlChar *sysID); XML_DEPRECATED XMLPUBFUN const xmlChar * xmlCatalogGetPublic (const xmlChar *pubID); #ifdef __cplusplus } #endif #endif /* LIBXML_CATALOG_ENABLED */ #endif /* __XML_CATALOG_H__ */ PK!]# HTMLtree.hnu[/** * @file * * @brief HTML documents * * This modules implements functions to work with HTML documents, * most of them related to serialization. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __HTML_TREE_H__ #define __HTML_TREE_H__ #include #include #include #include #ifdef LIBXML_HTML_ENABLED #ifdef __cplusplus extern "C" { #endif /* Deprecated */ /** @cond ignore */ #define HTML_TEXT_NODE XML_TEXT_NODE #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE #define HTML_COMMENT_NODE XML_COMMENT_NODE #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE #define HTML_PI_NODE XML_PI_NODE /** @endcond */ XMLPUBFUN xmlDoc * htmlNewDoc (const xmlChar *URI, const xmlChar *ExternalID); XMLPUBFUN xmlDoc * htmlNewDocNoDtD (const xmlChar *URI, const xmlChar *ExternalID); XMLPUBFUN const xmlChar * htmlGetMetaEncoding (xmlDoc *doc); XMLPUBFUN int htmlSetMetaEncoding (xmlDoc *doc, const xmlChar *encoding); #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN void htmlDocDumpMemory (xmlDoc *cur, xmlChar **mem, int *size); XMLPUBFUN void htmlDocDumpMemoryFormat (xmlDoc *cur, xmlChar **mem, int *size, int format); XMLPUBFUN int htmlSaveFile (const char *filename, xmlDoc *cur); XMLPUBFUN int htmlSaveFileEnc (const char *filename, xmlDoc *cur, const char *encoding); XMLPUBFUN int htmlSaveFileFormat (const char *filename, xmlDoc *cur, const char *encoding, int format); XMLPUBFUN int htmlNodeDump (xmlBuffer *buf, xmlDoc *doc, xmlNode *cur); XMLPUBFUN int htmlDocDump (FILE *f, xmlDoc *cur); XMLPUBFUN void htmlNodeDumpFile (FILE *out, xmlDoc *doc, xmlNode *cur); XMLPUBFUN int htmlNodeDumpFileFormat (FILE *out, xmlDoc *doc, xmlNode *cur, const char *encoding, int format); XMLPUBFUN void htmlNodeDumpOutput (xmlOutputBuffer *buf, xmlDoc *doc, xmlNode *cur, const char *encoding); XMLPUBFUN void htmlNodeDumpFormatOutput(xmlOutputBuffer *buf, xmlDoc *doc, xmlNode *cur, const char *encoding, int format); XMLPUBFUN void htmlDocContentDumpOutput(xmlOutputBuffer *buf, xmlDoc *cur, const char *encoding); XMLPUBFUN void htmlDocContentDumpFormatOutput(xmlOutputBuffer *buf, xmlDoc *cur, const char *encoding, int format); #endif /* LIBXML_OUTPUT_ENABLED */ XML_DEPRECATED XMLPUBFUN int htmlIsBooleanAttr (const xmlChar *name); #ifdef __cplusplus } #endif #endif /* LIBXML_HTML_ENABLED */ #endif /* __HTML_TREE_H__ */ PK!4 ww debugXML.hnu[/** * @file * * @brief Tree debugging APIs * * Interfaces to a set of routines used for debugging the tree * produced by the XML parser. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __DEBUG_XML__ #define __DEBUG_XML__ #include #include #include #ifdef LIBXML_DEBUG_ENABLED #include #ifdef __cplusplus extern "C" { #endif /* * The standard Dump routines. */ XMLPUBFUN void xmlDebugDumpString (FILE *output, const xmlChar *str); XMLPUBFUN void xmlDebugDumpAttr (FILE *output, xmlAttr *attr, int depth); XMLPUBFUN void xmlDebugDumpAttrList (FILE *output, xmlAttr *attr, int depth); XMLPUBFUN void xmlDebugDumpOneNode (FILE *output, xmlNode *node, int depth); XMLPUBFUN void xmlDebugDumpNode (FILE *output, xmlNode *node, int depth); XMLPUBFUN void xmlDebugDumpNodeList (FILE *output, xmlNode *node, int depth); XMLPUBFUN void xmlDebugDumpDocumentHead(FILE *output, xmlDoc *doc); XMLPUBFUN void xmlDebugDumpDocument (FILE *output, xmlDoc *doc); XMLPUBFUN void xmlDebugDumpDTD (FILE *output, xmlDtd *dtd); XMLPUBFUN void xmlDebugDumpEntities (FILE *output, xmlDoc *doc); /**************************************************************** * * * Checking routines * * * ****************************************************************/ XMLPUBFUN int xmlDebugCheckDocument (FILE * output, xmlDoc *doc); #ifdef __cplusplus } #endif #endif /* LIBXML_DEBUG_ENABLED */ #endif /* __DEBUG_XML__ */ PK!;ę xmlunicode.hnu[/** * @file * * @brief Unicode character APIs * * API for the Unicode character APIs * * Deprecated, don't use. */ #ifndef __XML_UNICODE_H__ #define __XML_UNICODE_H__ #ifdef __GNUC__ #warning "libxml/xmlunicode.h is deprecated" #endif #endif /* __XML_UNICODE_H__ */ PK!@C-OO globals.hnu[/** * @file * * @brief interface for all global variables of the library * * Deprecated, don't use * * @copyright See Copyright for the status of this software. */ #ifndef __XML_GLOBALS_H #define __XML_GLOBALS_H #include /* * This file was required to access global variables until version v2.12.0. * * These includes are for backward compatibility. */ #include #include #include #include #include #include #endif /* __XML_GLOBALS_H */ PK!i entities.hnu[/** * @file * * @brief XML entities * * This module provides an API to work with XML entities. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_ENTITIES_H__ #define __XML_ENTITIES_H__ #include #define XML_TREE_INTERNALS #include #undef XML_TREE_INTERNALS #ifdef __cplusplus extern "C" { #endif /** * The different entity types. */ typedef enum { /** internal general entity */ XML_INTERNAL_GENERAL_ENTITY = 1, /** external general parsed entity */ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, /** external general unparsed entity */ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, /** internal parameter entity */ XML_INTERNAL_PARAMETER_ENTITY = 4, /** external parameter entity */ XML_EXTERNAL_PARAMETER_ENTITY = 5, /** internal predefined entity */ XML_INTERNAL_PREDEFINED_ENTITY = 6 } xmlEntityType; /** * An entity declaration */ struct _xmlEntity { /** application data */ void *_private; /** XML_ENTITY_DECL, must be second ! */ xmlElementType type; /** Entity name */ const xmlChar *name; /** First child link */ struct _xmlNode *children; /** Last child link */ struct _xmlNode *last; /** -> DTD */ struct _xmlDtd *parent; /** next sibling link */ struct _xmlNode *next; /** previous sibling link */ struct _xmlNode *prev; /** the containing document */ struct _xmlDoc *doc; /** content without ref substitution */ xmlChar *orig; /** content or ndata if unparsed */ xmlChar *content; /** the content length */ int length; /** The entity type */ xmlEntityType etype; /** External identifier for PUBLIC */ const xmlChar *ExternalID; /** URI for a SYSTEM or PUBLIC Entity */ const xmlChar *SystemID; /** unused */ struct _xmlEntity *nexte; /** the full URI as computed */ const xmlChar *URI; /** unused */ int owner; /** various flags */ int flags; /** expanded size */ unsigned long expandedSize; }; typedef struct _xmlHashTable xmlEntitiesTable; typedef xmlEntitiesTable *xmlEntitiesTablePtr; XMLPUBFUN xmlEntity * xmlNewEntity (xmlDoc *doc, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *content); XMLPUBFUN void xmlFreeEntity (xmlEntity *entity); XMLPUBFUN int xmlAddEntity (xmlDoc *doc, int extSubset, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *content, xmlEntity **out); XMLPUBFUN xmlEntity * xmlAddDocEntity (xmlDoc *doc, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *content); XMLPUBFUN xmlEntity * xmlAddDtdEntity (xmlDoc *doc, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *content); XMLPUBFUN xmlEntity * xmlGetPredefinedEntity (const xmlChar *name); XMLPUBFUN xmlEntity * xmlGetDocEntity (const xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlEntity * xmlGetDtdEntity (xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlEntity * xmlGetParameterEntity (xmlDoc *doc, const xmlChar *name); XMLPUBFUN xmlChar * xmlEncodeEntitiesReentrant(xmlDoc *doc, const xmlChar *input); XMLPUBFUN xmlChar * xmlEncodeSpecialChars (const xmlDoc *doc, const xmlChar *input); XML_DEPRECATED XMLPUBFUN xmlEntitiesTable * xmlCreateEntitiesTable (void); XML_DEPRECATED XMLPUBFUN xmlEntitiesTable * xmlCopyEntitiesTable (xmlEntitiesTable *table); XML_DEPRECATED XMLPUBFUN void xmlFreeEntitiesTable (xmlEntitiesTable *table); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN void xmlDumpEntitiesTable (xmlBuffer *buf, xmlEntitiesTable *table); XML_DEPRECATED XMLPUBFUN void xmlDumpEntityDecl (xmlBuffer *buf, xmlEntity *ent); #endif /* LIBXML_OUTPUT_ENABLED */ #ifdef __cplusplus } #endif # endif /* __XML_ENTITIES_H__ */ PK!parser.hnu[/** * @file * * @brief Validating XML 1.0 parser * * Interfaces, constants and types related to the XML parser. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_PARSER_H__ #define __XML_PARSER_H__ #include /** @cond ignore */ #define XML_TREE_INTERNALS /** @endcond */ #include #undef XML_TREE_INTERNALS #include #include #include #include #include #include #include #include #include /* for compatibility */ #include #include #ifdef __cplusplus extern "C" { #endif /** * The default version of XML used: 1.0 */ #define XML_DEFAULT_VERSION "1.0" /** * Status after parsing a document */ typedef enum { /** not well-formed */ XML_STATUS_NOT_WELL_FORMED = (1 << 0), /** not namespace-well-formed */ XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1), /** DTD validation failed */ XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2), /** catastrophic failure like OOM or I/O error */ XML_STATUS_CATASTROPHIC_ERROR = (1 << 3) } xmlParserStatus; /** * Resource type for resource loaders */ typedef enum { /** unknown */ XML_RESOURCE_UNKNOWN = 0, /** main document */ XML_RESOURCE_MAIN_DOCUMENT, /** external DTD */ XML_RESOURCE_DTD, /** external general entity */ XML_RESOURCE_GENERAL_ENTITY, /** external parameter entity */ XML_RESOURCE_PARAMETER_ENTITY, /** XIncluded document */ XML_RESOURCE_XINCLUDE, /** XIncluded text */ XML_RESOURCE_XINCLUDE_TEXT } xmlResourceType; /** * Flags for parser input */ typedef enum { /** The input buffer won't be changed during parsing. */ XML_INPUT_BUF_STATIC = (1 << 1), /** The input buffer is zero-terminated. (Note that the zero byte shouldn't be included in buffer size.) */ XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2), /** Uncompress gzipped file input */ XML_INPUT_UNZIP = (1 << 3), /** Allow network access. Unused internally. */ XML_INPUT_NETWORK = (1 << 4), /** Allow system catalog to resolve URIs. */ XML_INPUT_USE_SYS_CATALOG = (1 << 5) } xmlParserInputFlags; /* Deprecated */ typedef void (* xmlParserInputDeallocate)(xmlChar *str); /** * Parser input */ struct _xmlParserInput { /* Input buffer */ xmlParserInputBuffer *buf XML_DEPRECATED_MEMBER; /** * @deprecated Use #xmlCtxtGetInputPosition * * The filename or URI, if any */ const char *filename; /* unused */ const char *directory XML_DEPRECATED_MEMBER; /* Base of the array to parse */ const xmlChar *base; /** * @deprecated Use #xmlCtxtGetInputWindow * * Current char being parsed */ const xmlChar *cur; /* end of the array to parse */ const xmlChar *end; /* unused */ int length XML_DEPRECATED_MEMBER; /** * @deprecated Use #xmlCtxtGetInputPosition * * Current line */ int line; /** * @deprecated Use #xmlCtxtGetInputPosition * * Current column */ int col; /** * @deprecated Use #xmlCtxtGetInputPosition * * How many xmlChars already consumed */ unsigned long consumed; /* function to deallocate the base */ xmlParserInputDeallocate free XML_DEPRECATED_MEMBER; /* unused */ const xmlChar *encoding XML_DEPRECATED_MEMBER; /* the version string for entity */ const xmlChar *version XML_DEPRECATED_MEMBER; /* Flags */ int flags XML_DEPRECATED_MEMBER; /* an unique identifier for the entity, unused internally */ int id XML_DEPRECATED_MEMBER; /* unused */ unsigned long parentConsumed XML_DEPRECATED_MEMBER; /* entity, if any */ xmlEntity *entity XML_DEPRECATED_MEMBER; }; /** @cond ignore */ 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; }; /* * Internal type */ 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; /* * Internal bits in the 'loadsubset' context member */ #define XML_DETECT_IDS 2 #define XML_COMPLETE_ATTRS 4 #define XML_SKIP_IDS 8 /* * Internal type. Only XML_PARSE_READER is used. */ 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; /** @endcond */ /** * Callback for custom resource loaders. * * `flags` can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK. * * The URL is resolved using XML catalogs before being passed to * the callback. * * On success, `out` should be set to a new parser input object and * XML_ERR_OK should be returned. * * @param ctxt parser context * @param url URL or system ID to load * @param publicId publid ID from DTD (optional) * @param type resource type * @param flags flags * @param out result pointer * @returns an xmlParserErrors code. */ typedef xmlParserErrors (*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId, xmlResourceType type, xmlParserInputFlags flags, xmlParserInput **out); /** * Parser context */ struct _xmlParserCtxt { /** * @deprecated Use xmlCtxtGetSaxHandler() and * xmlCtxtSetSaxHandler(). * * the SAX handler */ struct _xmlSAXHandler *sax; /** * @deprecated Use #xmlCtxtGetUserData * * user data for SAX interface, defaults to the context itself */ void *userData; /** * @deprecated Use xmlCtxtGetDocument() * * the document being built */ xmlDoc *myDoc; /** * @deprecated Use xmlCtxtGetStatus() * * is the document well formed? */ int wellFormed; /** * @deprecated Use xmlParserOption XML_PARSE_NOENT * * shall we replace entities? */ int replaceEntities XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetVersion() * * the XML version string */ xmlChar *version; /** * @deprecated Use xmlCtxtGetDeclaredEncoding() * * the declared encoding, if any */ xmlChar *encoding; /** * @deprecated Use xmlCtxtGetStandalone() * * standalone document */ int standalone; /** * @deprecated Use xmlCtxtIsHtml() * * non-zero for HTML documents, actually an htmlInsertMode */ int html; /* Input stream stack */ /** * Current input stream */ /* TODO: Add accessors, see issue #762 */ xmlParserInput *input; /* Number of current input streams */ int inputNr; /* Max number of input streams */ int inputMax XML_DEPRECATED_MEMBER; /* stack of inputs */ xmlParserInput **inputTab; /* Node analysis stack only used for DOM building */ /** * @deprecated Use #xmlCtxtGetNode * * The current element. */ xmlNode *node; /* Depth of the parsing stack */ int nodeNr XML_DEPRECATED_MEMBER; /* Max depth of the parsing stack */ int nodeMax XML_DEPRECATED_MEMBER; /* array of nodes */ xmlNode **nodeTab XML_DEPRECATED_MEMBER; /* Whether node info should be kept */ int record_info; /* info about each node parsed */ xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetLastError() * * error code */ int errNo; /* reference and external subset */ int hasExternalSubset XML_DEPRECATED_MEMBER; /* the internal subset has PE refs */ int hasPErefs XML_DEPRECATED_MEMBER; /* unused */ int external XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetStatus() * * is the document valid */ int valid; /** * @deprecated Use xmlParserOption XML_PARSE_DTDVALID * * shall we try to validate? */ int validate XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetValidCtxt() * * The validity context */ xmlValidCtxt vctxt; /* push parser state */ xmlParserInputState instate XML_DEPRECATED_MEMBER; /* unused */ int token XML_DEPRECATED_MEMBER; /** * @deprecated Don't use * * The main document URI, if available, with its last * component stripped. */ char *directory; /* Node name stack */ /* Current parsed Node */ const xmlChar *name XML_DEPRECATED_MEMBER; /* Depth of the parsing stack */ int nameNr XML_DEPRECATED_MEMBER; /* Max depth of the parsing stack */ int nameMax XML_DEPRECATED_MEMBER; /* array of nodes */ const xmlChar **nameTab XML_DEPRECATED_MEMBER; /* unused */ long nbChars XML_DEPRECATED_MEMBER; /* used by progressive parsing lookup */ long checkIndex XML_DEPRECATED_MEMBER; /** * @deprecated Use inverted xmlParserOption XML_PARSE_NOBLANKS * * ugly but ... */ int keepBlanks XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtIsStopped() * * SAX callbacks are disabled */ int disableSAX XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtIsInSubset * * Set if DTD content is parsed. * * - 0: not in DTD * - 1: in internal DTD subset * - 2: in external DTD subset */ int inSubset; /** * @deprecated Use the `name` argument of the * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl * * Name of the internal subset (root element type). */ const xmlChar *intSubName; /** * @deprecated Use the `systemId` argument of the * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl * * System identifier (URI) of external the subset. */ xmlChar *extSubURI; /** * @deprecated Use the `publicId` argument of the * `internalSubset` SAX callback or #xmlCtxtGetDocTypeDecl * * This member is MISNAMED. It contains the *public* identifier * of the external subset. */ xmlChar *extSubSystem; /* xml:space values */ /* Should the parser preserve spaces */ int *space XML_DEPRECATED_MEMBER; /* Depth of the parsing stack */ int spaceNr XML_DEPRECATED_MEMBER; /* Max depth of the parsing stack */ int spaceMax XML_DEPRECATED_MEMBER; /* array of space infos */ int *spaceTab XML_DEPRECATED_MEMBER; /* to prevent entity substitution loops */ int depth XML_DEPRECATED_MEMBER; /* unused */ xmlParserInput *entity XML_DEPRECATED_MEMBER; /* unused */ int charset XML_DEPRECATED_MEMBER; /* Those two fields are there to speed up large node parsing */ int nodelen XML_DEPRECATED_MEMBER; int nodemem XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlParserOption XML_PARSE_PEDANTIC * * signal pedantic warnings */ int pedantic XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetPrivate() and xmlCtxtSetPrivate() * * For user data, libxml won't touch it */ void *_private; /** * @deprecated Use xmlParserOption XML_PARSE_DTDLOAD, * XML_PARSE_DTDATTR or XML_PARSE_SKIP_IDS. * * Control loading of the external subset and handling of IDs. * Other options like `validate` can override this value. * * - 0: The default behavior is to process IDs and to ignore * the external subset. * - XML_DETECT_IDS: Load external subset. This flag is * misnamed. ID handling is only controlled by XML_SKIP_IDS. * - XML_COMPLETE_ATTRS: Load external subset and process * default attributes. * - XML_SKIP_IDS: Ignore IDs. */ int loadsubset XML_DEPRECATED_MEMBER; /* unused */ int linenumbers XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetCatalogs() and xmlCtxtSetCatalogs() * * document's own catalog */ void *catalogs XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlParserOption XML_PARSE_RECOVER * run in recovery mode */ int recovery XML_DEPRECATED_MEMBER; /* unused */ int progressive XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetDict() and xmlCtxtSetDict() * * dictionary for the parser */ xmlDict *dict; /* array for the attributes callbacks */ const xmlChar **atts XML_DEPRECATED_MEMBER; /* the size of the array */ int maxatts XML_DEPRECATED_MEMBER; /* unused */ int docdict XML_DEPRECATED_MEMBER; /* * pre-interned strings */ const xmlChar *str_xml XML_DEPRECATED_MEMBER; const xmlChar *str_xmlns XML_DEPRECATED_MEMBER; const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER; /* * Everything below is used only by the new SAX mode */ /* operating in the new SAX mode */ int sax2 XML_DEPRECATED_MEMBER; /* the number of inherited namespaces */ int nsNr XML_DEPRECATED_MEMBER; /* the size of the arrays */ int nsMax XML_DEPRECATED_MEMBER; /* the array of prefix/namespace name */ const xmlChar **nsTab XML_DEPRECATED_MEMBER; /* which attribute were allocated */ unsigned *attallocs XML_DEPRECATED_MEMBER; /* array of data for push */ xmlStartTag *pushTab XML_DEPRECATED_MEMBER; /* defaulted attributes if any */ xmlHashTable *attsDefault XML_DEPRECATED_MEMBER; /* non-CDATA attributes if any */ xmlHashTable *attsSpecial XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetStatus() * * is the document XML Namespace okay */ int nsWellFormed; /** * @deprecated Use xmlCtxtGetOptions() * * Extra options */ int options; /** * @deprecated Use inverted xmlParserOption XML_PARSE_NODICT * * Use dictionary names for the tree */ int dictNames XML_DEPRECATED_MEMBER; /* * Those fields are needed only for streaming parsing so far */ /* number of freed element nodes */ int freeElemsNr XML_DEPRECATED_MEMBER; /* List of freed element nodes */ xmlNode *freeElems XML_DEPRECATED_MEMBER; /* number of freed attributes nodes */ int freeAttrsNr XML_DEPRECATED_MEMBER; /* List of freed attributes nodes */ xmlAttr *freeAttrs XML_DEPRECATED_MEMBER; /** * @deprecated Use xmlCtxtGetLastError() * * the complete error information for the last error. */ xmlError lastError XML_DEPRECATED_MEMBER; /* the parser mode */ xmlParserMode parseMode XML_DEPRECATED_MEMBER; /* unused */ unsigned long nbentities XML_DEPRECATED_MEMBER; /* size of external entities */ unsigned long sizeentities XML_DEPRECATED_MEMBER; /* for use by HTML non-recursive parser */ /* Current NodeInfo */ xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER; /* Depth of the parsing stack */ int nodeInfoNr XML_DEPRECATED_MEMBER; /* Max depth of the parsing stack */ int nodeInfoMax XML_DEPRECATED_MEMBER; /* array of nodeInfos */ xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER; /* we need to label inputs */ int input_id XML_DEPRECATED_MEMBER; /* volume of entity copy */ unsigned long sizeentcopy XML_DEPRECATED_MEMBER; /* quote state for push parser */ int endCheckState XML_DEPRECATED_MEMBER; /* number of errors */ unsigned short nbErrors XML_DEPRECATED_MEMBER; /* number of warnings */ unsigned short nbWarnings XML_DEPRECATED_MEMBER; /* maximum amplification factor */ unsigned maxAmpl XML_DEPRECATED_MEMBER; /* namespace database */ xmlParserNsData *nsdb XML_DEPRECATED_MEMBER; /* allocated size */ unsigned attrHashMax XML_DEPRECATED_MEMBER; /* atttribute hash table */ xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER; xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER; void *errorCtxt XML_DEPRECATED_MEMBER; xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER; void *resourceCtxt XML_DEPRECATED_MEMBER; xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER; void *convCtxt XML_DEPRECATED_MEMBER; }; /** * A SAX Locator. */ struct _xmlSAXLocator { const xmlChar *(*getPublicId)(void *ctx); const xmlChar *(*getSystemId)(void *ctx); int (*getLineNumber)(void *ctx); int (*getColumnNumber)(void *ctx); }; /** * SAX callback to resolve external entities. * * This is only used to load DTDs. The preferred way to install * custom resolvers is #xmlCtxtSetResourceLoader. * * @param ctx the user data (XML parser context) * @param publicId The public identifier of the entity * @param systemId The system identifier of the entity (URL) * @returns the xmlParserInput if inlined or NULL for DOM behaviour. */ typedef xmlParserInput *(*resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId); /** * SAX callback for the internal subset. * * @param ctx the user data (XML parser context) * @param name the root element name * @param publicId the public identifier * @param systemId the system identifier (e.g. filename or URL) */ typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); /** * SAX callback for the external subset. * * @param ctx the user data (XML parser context) * @param name the root element name * @param publicId the public identifier * @param systemId the system identifier (e.g. filename or URL) */ typedef void (*externalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); /** * SAX callback to look up a general entity by name. * * @param ctx the user data (XML parser context) * @param name The entity name * @returns the xmlEntity if found. */ typedef xmlEntity *(*getEntitySAXFunc) (void *ctx, const xmlChar *name); /** * SAX callback to look up a parameter entity by name. * * @param ctx the user data (XML parser context) * @param name The entity name * @returns the xmlEntity if found. */ typedef xmlEntity *(*getParameterEntitySAXFunc) (void *ctx, const xmlChar *name); /** * SAX callback for entity declarations. * * @param ctx the user data (XML parser context) * @param name the entity name * @param type the entity type * @param publicId The public ID of the entity * @param systemId The system ID of the entity * @param content the entity value (without processing). */ typedef void (*entityDeclSAXFunc) (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); /** * SAX callback for notation declarations. * * @param ctx the user data (XML parser context) * @param name The name of the notation * @param publicId The public ID of the notation * @param systemId The system ID of the notation */ typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); /** * SAX callback for attribute declarations. * * @param ctx the user data (XML parser context) * @param elem the name of the element * @param fullname the attribute name * @param type the attribute type * @param def the type of default value * @param defaultValue the attribute default value * @param tree the tree of enumerated value set */ typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumeration *tree); /** * SAX callback for element declarations. * * @param ctx the user data (XML parser context) * @param name the element name * @param type the element type * @param content the element value tree */ typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name, int type, xmlElementContent *content); /** * SAX callback for unparsed entity declarations. * * @param ctx the user data (XML parser context) * @param name The name of the entity * @param publicId The public ID of the entity * @param systemId The system ID of the entity * @param notationName the name of the notation */ typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName); /** * This callback receives the "document locator" at startup, * which is always the global xmlDefaultSAXLocator. * * Everything is available on the context, so this is useless in * our case. * * @param ctx the user data (XML parser context) * @param loc A SAX Locator */ typedef void (*setDocumentLocatorSAXFunc) (void *ctx, xmlSAXLocator *loc); /** * SAX callback for start of document. * * @param ctx the user data (XML parser context) */ typedef void (*startDocumentSAXFunc) (void *ctx); /** * SAX callback for end of document. * * @param ctx the user data (XML parser context) */ typedef void (*endDocumentSAXFunc) (void *ctx); /** * SAX callback for start tags. * * @param ctx the user data (XML parser context) * @param name The element name, including namespace prefix * @param atts An array of name/value attributes pairs, NULL terminated */ typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name, const xmlChar **atts); /** * SAX callback for end tags. * * @param ctx the user data (XML parser context) * @param name The element name */ typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name); /** * Callback for attributes. * * @deprecated This typedef is unused. * * @param ctx the user data (XML parser context) * @param name The attribute name, including namespace prefix * @param value The attribute value */ typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *value); /** * SAX callback for entity references. * * @param ctx the user data (XML parser context) * @param name The entity name */ typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name); /** * SAX callback for character data. * * @param ctx the user data (XML parser context) * @param ch a xmlChar string * @param len the number of xmlChar */ typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch, int len); /** * SAX callback for "ignorable" whitespace. * * @param ctx the user data (XML parser context) * @param ch a xmlChar string * @param len the number of xmlChar */ typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, const xmlChar *ch, int len); /** * SAX callback for processing instructions. * * @param ctx the user data (XML parser context) * @param target the target name * @param data the PI data's */ typedef void (*processingInstructionSAXFunc) (void *ctx, const xmlChar *target, const xmlChar *data); /** * SAX callback for comments. * * @param ctx the user data (XML parser context) * @param value the comment content */ typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value); /** * SAX callback for CDATA sections. * * @param ctx the user data (XML parser context) * @param value The pcdata content * @param len the block length */ typedef void (*cdataBlockSAXFunc) ( void *ctx, const xmlChar *value, int len); /** * SAX callback for warning messages. * * @param ctx an XML parser context * @param msg the message to display/transmit * @param ... extra parameters for the message display */ typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * SAX callback for error messages. * * @param ctx an XML parser context * @param msg the message to display/transmit * @param ... extra parameters for the message display */ typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * SAX callback for fatal error messages. * * @param ctx an XML parser context * @param msg the message to display/transmit * @param ... extra parameters for the message display */ typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * SAX callback to get standalone status. * * @param ctx the user data (XML parser context) * @returns 1 if true */ typedef int (*isStandaloneSAXFunc) (void *ctx); /** * SAX callback to get internal subset status. * * @param ctx the user data (XML parser context) * @returns 1 if true */ typedef int (*hasInternalSubsetSAXFunc) (void *ctx); /** * SAX callback to get external subset status. * * @param ctx the user data (XML parser context) * @returns 1 if true */ typedef int (*hasExternalSubsetSAXFunc) (void *ctx); /************************************************************************ * * * The SAX version 2 API extensions * * * ************************************************************************/ /** * Special constant required for SAX2 handlers. */ #define XML_SAX2_MAGIC 0xDEEDBEAF /** * SAX2 callback for start tags. * * It provides the namespace information for the element, as well as * the new namespace declarations on the element. * * @param ctx the user data (XML parser context) * @param localname the local name of the element * @param prefix the element namespace prefix if available * @param URI the element namespace name if available * @param nb_namespaces number of namespace definitions on that node * @param namespaces pointer to the array of prefix/URI pairs namespace definitions * @param nb_attributes the number of attributes on that node * @param nb_defaulted the number of defaulted attributes. The defaulted * ones are at the end of the array * @param attributes pointer to the array of (localname/prefix/URI/value/end) * attribute values. */ 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); /** * SAX2 callback for end tags. * * It provides the namespace information for the element. * * @param ctx the user data (XML parser context) * @param localname the local name of the element * @param prefix the element namespace prefix if available * @param URI the element namespace name if available */ typedef void (*endElementNsSAX2Func) (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI); /** * Callbacks for SAX parser * * For DTD-related handlers, it's recommended to either use the * original libxml2 handler or set them to NULL if DTDs can be * ignored. */ struct _xmlSAXHandler { /** * Called after the start of the document type declaration * was parsed. * * Should typically not be modified. */ internalSubsetSAXFunc internalSubset; /** * Standalone status. Not invoked by the parser. Not supposed * to be changed by applications. */ isStandaloneSAXFunc isStandalone; /** * Internal subset availability. Not invoked by the parser. * Not supposed to be changed by applications. */ hasInternalSubsetSAXFunc hasInternalSubset; /** * External subset availability. Not invoked by the parser. * Not supposed to be changed by applications. */ hasExternalSubsetSAXFunc hasExternalSubset; /** * Only called when loading external DTDs. Not called to load * external entities. * * Should typically not be modified. */ resolveEntitySAXFunc resolveEntity; /** * Called when looking up general entities. * * Should typically not be modified. */ getEntitySAXFunc getEntity; /** * Called after an entity declaration was parsed. * * Should typically not be modified. */ entityDeclSAXFunc entityDecl; /** * Called after a notation declaration was parsed. * * Should typically not be modified. */ notationDeclSAXFunc notationDecl; /** * Called after an attribute declaration was parsed. * * Should typically not be modified. */ attributeDeclSAXFunc attributeDecl; /** * Called after an element declaration was parsed. * * Should typically not be modified. */ elementDeclSAXFunc elementDecl; /** * Called after an unparsed entity declaration was parsed. * * Should typically not be modified. */ unparsedEntityDeclSAXFunc unparsedEntityDecl; /** * This callback receives the "document locator" at startup, * which is always the global xmlDefaultSAXLocator. * * Everything is available on the context, so this is useless in * our case. */ setDocumentLocatorSAXFunc setDocumentLocator; /** * Called after the XML declaration was parsed. * * Use xmlCtxtGetVersion(), xmlCtxtGetDeclaredEncoding() and * xmlCtxtGetStandalone() to get data from the XML declaration. */ startDocumentSAXFunc startDocument; /** * Called at the end of the document. */ endDocumentSAXFunc endDocument; /** * Legacy start tag handler * * `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; /** * See _xmlSAXHandler.startElement */ endElementSAXFunc endElement; /** * Called after an entity reference was parsed. */ referenceSAXFunc reference; /** * Called after a character data was parsed. */ charactersSAXFunc characters; /** * Called after "ignorable" whitespace was parsed. * * `ignorableWhitespace` should always be set to the same value * as `characters`. Otherwise, the parser will try to detect * whitespace which is unreliable. */ ignorableWhitespaceSAXFunc ignorableWhitespace; /** * Called after a processing instruction was parsed. */ processingInstructionSAXFunc processingInstruction; /** * Called after a comment was parsed. */ commentSAXFunc comment; /** * Callback for warning messages. */ warningSAXFunc warning; /** * Callback for error messages. */ errorSAXFunc error; /** * Unused, all errors go to `error`. */ fatalErrorSAXFunc fatalError; /** * Called when looking up parameter entities. * * Should typically not be modified. */ getParameterEntitySAXFunc getParameterEntity; /** * Called after a CDATA section was parsed. */ cdataBlockSAXFunc cdataBlock; /** * Called to parse the external subset. * * Should typically not be modified. */ externalSubsetSAXFunc externalSubset; /** * Legacy magic value * * `initialized` should always be set to XML_SAX2_MAGIC to * enable the modern SAX2 interface. */ unsigned int initialized; /** * Application data */ void *_private; /** * Called after a start tag was parsed. */ startElementNsSAX2Func startElementNs; /** * Called after an end tag was parsed. */ endElementNsSAX2Func endElementNs; /** * Structured error handler. * * Takes precedence over `error` or `warning`, but modern code * should use xmlCtxtSetErrorHandler(). */ xmlStructuredErrorFunc serror; }; /** * SAX handler, version 1. * * @deprecated Use version 2 handlers. */ typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; /** * SAX handler, version 1. * * @deprecated Use version 2 handlers. */ 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; }; /** * Callback for external entity loader. * * The URL is not resolved using XML catalogs before being passed * to the callback. * * @param URL The URL or system ID of the resource requested * @param publicId The public ID of the resource requested (optional) * @param context the XML parser context * @returns the entity input parser or NULL on error. */ typedef xmlParserInput *(*xmlExternalEntityLoader) (const char *URL, const char *publicId, xmlParserCtxt *context); /* * Variables */ XMLPUBVAR const char *const xmlParserVersion; /** @cond ignore */ XML_DEPRECATED XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator; #ifdef LIBXML_SAX1_ENABLED /** * @deprecated Use #xmlSAXVersion or #xmlSAX2InitDefaultSAXHandler */ XML_DEPRECATED XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler; #endif XML_DEPRECATED XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlGetWarningsDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlLineNumbersDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlPedanticParserDefaultValue(void); XML_DEPRECATED XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void); #ifdef LIBXML_OUTPUT_ENABLED XML_DEPRECATED XMLPUBFUN int *__xmlIndentTreeOutput(void); XML_DEPRECATED XMLPUBFUN const char **__xmlTreeIndentString(void); XML_DEPRECATED XMLPUBFUN int *__xmlSaveNoEmptyTags(void); #endif /** @endcond */ #ifndef XML_GLOBALS_NO_REDEFINITION /** * Thread-local setting to enable validation. Defaults to 0. * * @deprecated Use the parser option XML_PARSE_DTDVALID. */ #define xmlDoValidityCheckingDefaultValue \ (*__xmlDoValidityCheckingDefaultValue()) /** * Thread-local setting to disable warnings. Defaults to 1. * * @deprecated Use the parser option XML_PARSE_NOWARNING. */ #define xmlGetWarningsDefaultValue \ (*__xmlGetWarningsDefaultValue()) /** * Thread-local setting to ignore some whitespace. Defaults * to 1. * * @deprecated Use the parser option XML_PARSE_NOBLANKS. */ #define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue()) /** * Thread-local setting to store line numbers. Defaults * to 0, but is always enabled after setting parser options. * * @deprecated Shouldn't be needed when using parser options. */ #define xmlLineNumbersDefaultValue \ (*__xmlLineNumbersDefaultValue()) /** * Thread-local setting to enable loading of external DTDs. * Defaults to 0. * * @deprecated Use the parser option XML_PARSE_DTDLOAD. */ #define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue()) /** * Thread-local setting to enable pedantic warnings. * Defaults to 0. * * @deprecated Use the parser option XML_PARSE_PEDANTIC. */ #define xmlPedanticParserDefaultValue \ (*__xmlPedanticParserDefaultValue()) /** * Thread-local setting to enable entity substitution. * Defaults to 0. * * @deprecated Use the parser option XML_PARSE_NOENT. */ #define xmlSubstituteEntitiesDefaultValue \ (*__xmlSubstituteEntitiesDefaultValue()) #ifdef LIBXML_OUTPUT_ENABLED /** * Thread-local setting to disable indenting when * formatting output. Defaults to 1. * * @deprecated Use the xmlsave.h API with option * XML_SAVE_NO_INDENT. */ #define xmlIndentTreeOutput (*__xmlIndentTreeOutput()) /** * Thread-local setting to change the indent string. * Defaults to two spaces. * * @deprecated Use the xmlsave.h API and * xmlSaveSetIndentString(). */ #define xmlTreeIndentString (*__xmlTreeIndentString()) /** * Thread-local setting to disable empty tags when * serializing. Defaults to 0. * * @deprecated Use the xmlsave.h API with option * XML_SAVE_NO_EMPTY. */ #define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags()) #endif #endif /* * 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 (xmlParserInput *in, int len); XMLPUBFUN int xmlParserInputGrow (xmlParserInput *in, int len); /* * Basic parsing Interfaces */ #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN xmlDoc * xmlParseDoc (const xmlChar *cur); XMLPUBFUN xmlDoc * xmlParseFile (const char *filename); XMLPUBFUN xmlDoc * xmlParseMemory (const char *buffer, int size); #endif /* LIBXML_SAX1_ENABLED */ XML_DEPRECATED XMLPUBFUN int xmlSubstituteEntitiesDefault(int val); XMLPUBFUN int xmlKeepBlanksDefault (int val); XMLPUBFUN void xmlStopParser (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlPedanticParserDefault(int val); XML_DEPRECATED XMLPUBFUN int xmlLineNumbersDefault (int val); XML_DEPRECATED XMLPUBFUN int xmlThrDefSubstituteEntitiesDefaultValue(int v); XML_DEPRECATED XMLPUBFUN int xmlThrDefKeepBlanksDefaultValue(int v); XML_DEPRECATED XMLPUBFUN int xmlThrDefPedanticParserDefaultValue(int v); 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); #ifdef LIBXML_SAX1_ENABLED /* * Recovery mode */ XML_DEPRECATED XMLPUBFUN xmlDoc * xmlRecoverDoc (const xmlChar *cur); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlRecoverMemory (const char *buffer, int size); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlRecoverFile (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ /* * Less common routines and SAX interfaces */ XMLPUBFUN int xmlParseDocument (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN int xmlParseExtParsedEnt (xmlParserCtxt *ctxt); #ifdef LIBXML_SAX1_ENABLED XML_DEPRECATED XMLPUBFUN int xmlSAXUserParseFile (xmlSAXHandler *sax, void *user_data, const char *filename); XML_DEPRECATED XMLPUBFUN int xmlSAXUserParseMemory (xmlSAXHandler *sax, void *user_data, const char *buffer, int size); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseDoc (xmlSAXHandler *sax, const xmlChar *cur, int recovery); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseMemory (xmlSAXHandler *sax, const char *buffer, int size, int recovery); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseMemoryWithData (xmlSAXHandler *sax, const char *buffer, int size, int recovery, void *data); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseFile (xmlSAXHandler *sax, const char *filename, int recovery); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseFileWithData (xmlSAXHandler *sax, const char *filename, int recovery, void *data); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlSAXParseEntity (xmlSAXHandler *sax, const char *filename); XML_DEPRECATED XMLPUBFUN xmlDoc * xmlParseEntity (const char *filename); #endif /* LIBXML_SAX1_ENABLED */ #ifdef LIBXML_VALID_ENABLED XMLPUBFUN xmlDtd * xmlCtxtParseDtd (xmlParserCtxt *ctxt, xmlParserInput *input, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN int xmlCtxtValidateDocument (xmlParserCtxt *ctxt, xmlDoc *doc); XMLPUBFUN int xmlCtxtValidateDtd (xmlParserCtxt *ctxt, xmlDoc *doc, xmlDtd *dtd); XML_DEPRECATED XMLPUBFUN xmlDtd * xmlSAXParseDTD (xmlSAXHandler *sax, const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN xmlDtd * xmlParseDTD (const xmlChar *publicId, const xmlChar *systemId); XMLPUBFUN xmlDtd * xmlIOParseDTD (xmlSAXHandler *sax, xmlParserInputBuffer *input, xmlCharEncoding enc); #endif /* LIBXML_VALID_ENABLE */ #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int xmlParseBalancedChunkMemory(xmlDoc *doc, xmlSAXHandler *sax, void *user_data, int depth, const xmlChar *string, xmlNode **lst); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN xmlParserErrors xmlParseInNodeContext (xmlNode *node, const char *data, int datalen, int options, xmlNode **lst); #ifdef LIBXML_SAX1_ENABLED XMLPUBFUN int xmlParseBalancedChunkMemoryRecover(xmlDoc *doc, xmlSAXHandler *sax, void *user_data, int depth, const xmlChar *string, xmlNode **lst, int recover); XML_DEPRECATED XMLPUBFUN int xmlParseExternalEntity (xmlDoc *doc, xmlSAXHandler *sax, void *user_data, int depth, const xmlChar *URL, const xmlChar *ID, xmlNode **lst); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN int xmlParseCtxtExternalEntity(xmlParserCtxt *ctx, const xmlChar *URL, const xmlChar *ID, xmlNode **lst); /* * Parser contexts handling. */ XMLPUBFUN xmlParserCtxt * xmlNewParserCtxt (void); XMLPUBFUN xmlParserCtxt * xmlNewSAXParserCtxt (const xmlSAXHandler *sax, void *userData); XMLPUBFUN int xmlInitParserCtxt (xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN void xmlClearParserCtxt (xmlParserCtxt *ctxt); XMLPUBFUN void xmlFreeParserCtxt (xmlParserCtxt *ctxt); #ifdef LIBXML_SAX1_ENABLED XML_DEPRECATED XMLPUBFUN void xmlSetupParserForBuffer (xmlParserCtxt *ctxt, const xmlChar* buffer, const char *filename); #endif /* LIBXML_SAX1_ENABLED */ XMLPUBFUN xmlParserCtxt * xmlCreateDocParserCtxt (const xmlChar *cur); #ifdef LIBXML_PUSH_ENABLED /* * Interfaces for the Push mode. */ XMLPUBFUN xmlParserCtxt * xmlCreatePushParserCtxt(xmlSAXHandler *sax, void *user_data, const char *chunk, int size, const char *filename); XMLPUBFUN int xmlParseChunk (xmlParserCtxt *ctxt, const char *chunk, int size, int terminate); #endif /* LIBXML_PUSH_ENABLED */ /* * Special I/O mode. */ XMLPUBFUN xmlParserCtxt * xmlCreateIOParserCtxt (xmlSAXHandler *sax, void *user_data, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc); XMLPUBFUN xmlParserInput * xmlNewIOInputStream (xmlParserCtxt *ctxt, xmlParserInputBuffer *input, xmlCharEncoding enc); /* * Node infos. */ XML_DEPRECATED XMLPUBFUN const xmlParserNodeInfo* xmlParserFindNodeInfo (xmlParserCtxt *ctxt, xmlNode *node); XML_DEPRECATED XMLPUBFUN void xmlInitNodeInfoSeq (xmlParserNodeInfoSeq *seq); XML_DEPRECATED XMLPUBFUN void xmlClearNodeInfoSeq (xmlParserNodeInfoSeq *seq); XML_DEPRECATED XMLPUBFUN unsigned long xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeq *seq, xmlNode *node); XML_DEPRECATED XMLPUBFUN void xmlParserAddNodeInfo (xmlParserCtxt *ctxt, xmlParserNodeInfo *info); /* * External entities handling actually implemented in xmlIO. */ XMLPUBFUN void xmlSetExternalEntityLoader(xmlExternalEntityLoader f); XMLPUBFUN xmlExternalEntityLoader xmlGetExternalEntityLoader(void); XMLPUBFUN xmlParserInput * xmlLoadExternalEntity (const char *URL, const char *ID, xmlParserCtxt *ctxt); XML_DEPRECATED XMLPUBFUN long xmlByteConsumed (xmlParserCtxt *ctxt); /* * New set of simpler/more flexible APIs */ /** * This is the set of XML parser options that can be passed to * #xmlReadDoc, #xmlCtxtSetOptions and other functions. */ typedef enum { /** * Enable "recovery" mode which allows non-wellformed documents. * How this mode behaves exactly is unspecified and may change * without further notice. Use of this feature is DISCOURAGED. * * Not supported by the push parser. */ XML_PARSE_RECOVER = 1<<0, /** * Despite the confusing name, this option enables substitution * of entities. The resulting tree won't contain any entity * reference nodes. * * This option also enables loading of external entities (both * general and parameter entities) which is dangerous. If you * process untrusted data, it's recommended to set the * XML_PARSE_NO_XXE option to disable loading of external * entities. */ XML_PARSE_NOENT = 1<<1, /** * Enables loading of an external DTD and the loading and * substitution of external parameter entities. Has no effect * if XML_PARSE_NO_XXE is set. */ XML_PARSE_DTDLOAD = 1<<2, /** * Adds default attributes from the DTD to the result document. * * Implies XML_PARSE_DTDLOAD, but loading of external content * can be disabled with XML_PARSE_NO_XXE. */ XML_PARSE_DTDATTR = 1<<3, /** * This option enables DTD validation which requires to load * external DTDs and external entities (both general and * parameter entities) unless XML_PARSE_NO_XXE was set. * * DTD validation is vulnerable to algorithmic complexity * attacks and should never be enabled with untrusted input. */ XML_PARSE_DTDVALID = 1<<4, /** * Disable error and warning reports to the error handlers. * Errors are still accessible with xmlCtxtGetLastError(). */ XML_PARSE_NOERROR = 1<<5, /** * Disable warning reports. */ XML_PARSE_NOWARNING = 1<<6, /** * Enable some pedantic warnings. */ XML_PARSE_PEDANTIC = 1<<7, /** * Remove some whitespace from the result document. Where to * remove whitespace depends on DTD element declarations or a * broken heuristic with unfixable bugs. Use of this option is * DISCOURAGED. * * Not supported by the push parser. */ XML_PARSE_NOBLANKS = 1<<8, /** * Always invoke the deprecated SAX1 startElement and endElement * handlers. * * @deprecated This option will be removed in a future version. */ XML_PARSE_SAX1 = 1<<9, /** * Enable XInclude processing. This option only affects the * xmlTextReader and XInclude interfaces. */ XML_PARSE_XINCLUDE = 1<<10, /** * Disable network access with the built-in HTTP or FTP clients. * * After the last built-in network client was removed in 2.15, * this option has no effect expect for being passed on to custom * resource loaders. */ XML_PARSE_NONET = 1<<11, /** * Create a document without interned strings, making all * strings separate memory allocations. */ XML_PARSE_NODICT = 1<<12, /** * Remove redundant namespace declarations from the result * document. */ XML_PARSE_NSCLEAN = 1<<13, /** * Output normal text nodes instead of CDATA nodes. */ XML_PARSE_NOCDATA = 1<<14, /** * Don't generate XInclude start/end nodes when expanding * inclusions. This option only affects the xmlTextReader * and XInclude interfaces. */ XML_PARSE_NOXINCNODE = 1<<15, /** * Store small strings directly in the node struct to save * memory. */ XML_PARSE_COMPACT = 1<<16, /** * Use old Name productions from before XML 1.0 Fifth Edition. * * @deprecated This option will be removed in a future version. */ XML_PARSE_OLD10 = 1<<17, /** * Don't fix up XInclude xml:base URIs. This option only affects * the xmlTextReader and XInclude interfaces. */ XML_PARSE_NOBASEFIX = 1<<18, /** * Relax some internal limits. * * Maximum size of text nodes, tags, comments, processing instructions, * CDATA sections, entity values * * normal: 10M * huge: 1B * * Maximum size of names, system literals, pubid literals * * normal: 50K * huge: 10M * * Maximum nesting depth of elements * * normal: 256 * huge: 2048 * * Maximum nesting depth of entities * * normal: 20 * huge: 40 */ XML_PARSE_HUGE = 1<<19, /** * Enable an unspecified legacy mode for SAX parsers. * * @deprecated This option will be removed in a future version. */ XML_PARSE_OLDSAX = 1<<20, /** * Ignore the encoding in the XML declaration. This option is * mostly unneeded these days. The only effect is to enforce * UTF-8 decoding of ASCII-like data. */ XML_PARSE_IGNORE_ENC = 1<<21, /** * Enable reporting of line numbers larger than 65535. */ XML_PARSE_BIG_LINES = 1<<22, /** * Disables loading of external DTDs or entities. * * @since 2.13.0 */ XML_PARSE_NO_XXE = 1<<23, /** * Enable input decompression. Setting this option is discouraged * to avoid zip bombs. * * @since 2.14.0 */ XML_PARSE_UNZIP = 1<<24, /** * Disables the global system XML catalog. * * @since 2.14.0 */ XML_PARSE_NO_SYS_CATALOG = 1<<25, /** * Enable XML catalog processing instructions. * * @since 2.14.0 */ XML_PARSE_CATALOG_PI = 1<<26, /** * Force the parser to ignore IDs. * * @since 2.15.0 */ XML_PARSE_SKIP_IDS = 1<<27 } xmlParserOption; XMLPUBFUN void xmlCtxtReset (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtResetPush (xmlParserCtxt *ctxt, const char *chunk, int size, const char *filename, const char *encoding); XMLPUBFUN int xmlCtxtGetOptions (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtSetOptions (xmlParserCtxt *ctxt, int options); XMLPUBFUN int xmlCtxtUseOptions (xmlParserCtxt *ctxt, int options); XMLPUBFUN void * xmlCtxtGetPrivate (xmlParserCtxt *ctxt); XMLPUBFUN void xmlCtxtSetPrivate (xmlParserCtxt *ctxt, void *priv); XMLPUBFUN void * xmlCtxtGetCatalogs (xmlParserCtxt *ctxt); XMLPUBFUN void xmlCtxtSetCatalogs (xmlParserCtxt *ctxt, void *catalogs); XMLPUBFUN xmlDict * xmlCtxtGetDict (xmlParserCtxt *ctxt); XMLPUBFUN void xmlCtxtSetDict (xmlParserCtxt *ctxt, xmlDict *); XMLPUBFUN xmlSAXHandler * xmlCtxtGetSaxHandler (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtSetSaxHandler (xmlParserCtxt *ctxt, const xmlSAXHandler *sax); XMLPUBFUN xmlDoc * xmlCtxtGetDocument (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtIsHtml (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtIsStopped (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtIsInSubset (xmlParserCtxt *ctxt); #ifdef LIBXML_VALID_ENABLED XMLPUBFUN xmlValidCtxt * xmlCtxtGetValidCtxt (xmlParserCtxt *ctxt); #endif XMLPUBFUN const xmlChar * xmlCtxtGetVersion (xmlParserCtxt *ctxt); XMLPUBFUN const xmlChar * xmlCtxtGetDeclaredEncoding(xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtGetStandalone (xmlParserCtxt *ctxt); XMLPUBFUN xmlParserStatus xmlCtxtGetStatus (xmlParserCtxt *ctxt); XMLPUBFUN void * xmlCtxtGetUserData (xmlParserCtxt *ctxt); XMLPUBFUN xmlNode * xmlCtxtGetNode (xmlParserCtxt *ctxt); XMLPUBFUN int xmlCtxtGetDocTypeDecl (xmlParserCtxt *ctxt, const xmlChar **name, const xmlChar **systemId, const xmlChar **publicId); XMLPUBFUN int xmlCtxtGetInputPosition (xmlParserCtxt *ctxt, int inputIndex, const char **filname, int *line, int *col, unsigned long *bytePos); XMLPUBFUN int xmlCtxtGetInputWindow (xmlParserCtxt *ctxt, int inputIndex, const xmlChar **startOut, int *sizeInOut, int *offsetOut); XMLPUBFUN void xmlCtxtSetErrorHandler (xmlParserCtxt *ctxt, xmlStructuredErrorFunc handler, void *data); XMLPUBFUN void xmlCtxtSetResourceLoader(xmlParserCtxt *ctxt, xmlResourceLoader loader, void *vctxt); XMLPUBFUN void xmlCtxtSetCharEncConvImpl(xmlParserCtxt *ctxt, xmlCharEncConvImpl impl, void *vctxt); XMLPUBFUN void xmlCtxtSetMaxAmplification(xmlParserCtxt *ctxt, unsigned maxAmpl); XMLPUBFUN xmlDoc * xmlReadDoc (const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlReadFile (const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlReadMemory (const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlReadFd (int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlReadIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlCtxtParseDocument (xmlParserCtxt *ctxt, xmlParserInput *input); XMLPUBFUN xmlNode * xmlCtxtParseContent (xmlParserCtxt *ctxt, xmlParserInput *input, xmlNode *node, int hasTextDecl); XMLPUBFUN xmlDoc * xmlCtxtReadDoc (xmlParserCtxt *ctxt, const xmlChar *cur, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlCtxtReadFile (xmlParserCtxt *ctxt, const char *filename, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlCtxtReadMemory (xmlParserCtxt *ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlCtxtReadFd (xmlParserCtxt *ctxt, int fd, const char *URL, const char *encoding, int options); XMLPUBFUN xmlDoc * xmlCtxtReadIO (xmlParserCtxt *ctxt, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, const char *URL, const char *encoding, int options); /* * New input API */ XMLPUBFUN xmlParserErrors xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags, xmlParserInput **out); XMLPUBFUN xmlParserInput * xmlNewInputFromMemory(const char *url, const void *mem, size_t size, xmlParserInputFlags flags); XMLPUBFUN xmlParserInput * xmlNewInputFromString(const char *url, const char *str, xmlParserInputFlags flags); XMLPUBFUN xmlParserInput * xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags); XMLPUBFUN xmlParserInput * xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead, xmlInputCloseCallback ioClose, void *ioCtxt, xmlParserInputFlags flags); XMLPUBFUN xmlParserErrors xmlInputSetEncodingHandler(xmlParserInput *input, xmlCharEncodingHandler *handler); /* * Library wide options */ /** * 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 { /** Multithreading support */ XML_WITH_THREAD = 1, /** @deprecated Always available */ XML_WITH_TREE = 2, /** Serialization support */ XML_WITH_OUTPUT = 3, /** Push parser */ XML_WITH_PUSH = 4, /** XML Reader */ XML_WITH_READER = 5, /** Streaming patterns */ XML_WITH_PATTERN = 6, /** XML Writer */ XML_WITH_WRITER = 7, /** Legacy SAX1 API */ XML_WITH_SAX1 = 8, /** @deprecated FTP support was removed */ XML_WITH_FTP = 9, /** @deprecated HTTP support was removed */ XML_WITH_HTTP = 10, /** DTD validation */ XML_WITH_VALID = 11, /** HTML parser */ XML_WITH_HTML = 12, /** Legacy symbols */ XML_WITH_LEGACY = 13, /** Canonical XML */ XML_WITH_C14N = 14, /** XML Catalogs */ XML_WITH_CATALOG = 15, /** XPath */ XML_WITH_XPATH = 16, /** XPointer */ XML_WITH_XPTR = 17, /** XInclude */ XML_WITH_XINCLUDE = 18, /** iconv */ XML_WITH_ICONV = 19, /** Built-in ISO-8859-X */ XML_WITH_ISO8859X = 20, /** @deprecated Removed */ XML_WITH_UNICODE = 21, /** Regular expressions */ XML_WITH_REGEXP = 22, /** @deprecated Same as XML_WITH_REGEXP */ XML_WITH_AUTOMATA = 23, /** @deprecated Removed */ XML_WITH_EXPR = 24, /** XML Schemas */ XML_WITH_SCHEMAS = 25, /** Schematron */ XML_WITH_SCHEMATRON = 26, /** Loadable modules */ XML_WITH_MODULES = 27, /** Debugging API */ XML_WITH_DEBUG = 28, /** @deprecated Removed */ XML_WITH_DEBUG_MEM = 29, /** @deprecated Removed */ XML_WITH_DEBUG_RUN = 30, /** GZIP compression */ XML_WITH_ZLIB = 31, /** ICU */ XML_WITH_ICU = 32, /** @deprecated LZMA support was removed */ XML_WITH_LZMA = 33, /** RELAXNG, since 2.14 */ XML_WITH_RELAXNG = 34, XML_WITH_NONE = 99999 /* just to be sure of allocation size */ } xmlFeature; XMLPUBFUN int xmlHasFeature (xmlFeature feature); #ifdef __cplusplus } #endif #endif /* __XML_PARSER_H__ */ PK!<| xmlmemory.hnu[/** * @file * * @brief interface for the memory allocator * * provides interfaces for the memory allocator, * including debugging capabilities. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __DEBUG_MEMORY_ALLOC__ #define __DEBUG_MEMORY_ALLOC__ #include #include #ifdef __cplusplus extern "C" { #endif /* * The XML memory wrapper support 4 basic overloadable functions. */ /** * Signature for a free() implementation. * * @param mem an already allocated block of memory */ typedef void (*xmlFreeFunc)(void *mem); /** * Signature for a malloc() implementation. * * @param size the size requested in bytes * @returns a pointer to the newly allocated block or NULL in case of error. */ typedef void *(*xmlMallocFunc)(size_t size) LIBXML_ATTR_ALLOC_SIZE(1); /** * Signature for a realloc() implementation. * * @param mem an already allocated block of memory * @param size the new size requested in bytes * @returns a pointer to the newly reallocated block or NULL in case of error. */ typedef void *(*xmlReallocFunc)(void *mem, size_t size); /** * Signature for an strdup() implementation. * * @param str a zero terminated string * @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 */ #ifdef LIBXML_THREAD_ALLOC_ENABLED XMLPUBFUN xmlMallocFunc *__xmlMalloc(void); XMLPUBFUN xmlMallocFunc *__xmlMallocAtomic(void); XMLPUBFUN xmlReallocFunc *__xmlRealloc(void); XMLPUBFUN xmlFreeFunc *__xmlFree(void); XMLPUBFUN xmlStrdupFunc *__xmlMemStrdup(void); #ifndef XML_GLOBALS_NO_REDEFINITION #define xmlMalloc (*__xmlMalloc()) #define xmlMallocAtomic (*__xmlMallocAtomic()) #define xmlRealloc (*__xmlRealloc()) #define xmlFree (*__xmlFree()) #define xmlMemStrdup (*__xmlMemStrdup()) #endif #else /** * The variable holding the libxml malloc() implementation */ XMLPUBVAR xmlMallocFunc xmlMalloc; /** * The variable holding the libxml malloc() implementation for atomic * data (i.e. blocks not containing pointers), useful when using a * garbage collecting allocator. * * @deprecated Use #xmlMalloc */ XMLPUBVAR xmlMallocFunc xmlMallocAtomic; /** * The variable holding the libxml realloc() implementation */ XMLPUBVAR xmlReallocFunc xmlRealloc; /** * The variable holding the libxml free() implementation */ XMLPUBVAR xmlFreeFunc xmlFree; /** * The variable holding the libxml strdup() implementation */ 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); XML_DEPRECATED XMLPUBFUN int xmlGcMemSetup (xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc, xmlMallocFunc mallocAtomicFunc, xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc); XML_DEPRECATED 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__ */ PK!%ISAX.hnu[/** * @file * * @brief Old SAX version 1 handler, deprecated * * @deprecated set of SAX version 1 interfaces used to * build the DOM tree. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SAX_H__ #define __XML_SAX_H__ #ifdef __GNUC__ #warning "libxml/SAX.h is deprecated" #endif #endif /* __XML_SAX_H__ */ PK!#ZZschemasInternals.hnu[/** * @file * * @brief internal interfaces for XML Schemas * * 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 ! * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_SCHEMA_INTERNALS_H__ #define __XML_SCHEMA_INTERNALS_H__ #include #ifdef LIBXML_SCHEMAS_ENABLED #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** * Schema value type */ 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; /** * Schema content type */ 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; /** Schema value */ typedef struct _xmlSchemaVal xmlSchemaVal; typedef xmlSchemaVal *xmlSchemaValPtr; /** Schema type */ typedef struct _xmlSchemaType xmlSchemaType; typedef xmlSchemaType *xmlSchemaTypePtr; /** Schema facet */ typedef struct _xmlSchemaFacet xmlSchemaFacet; typedef xmlSchemaFacet *xmlSchemaFacetPtr; /** Schema annotation */ typedef struct _xmlSchemaAnnot xmlSchemaAnnot; typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; /** * Annotation */ struct _xmlSchemaAnnot { struct _xmlSchemaAnnot *next; xmlNode *content; /* the annotation */ }; /** * Skip unknown attribute from validation * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_SKIP 1 /** * Ignore validation non definition on attributes * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_LAX 2 /** * Apply strict validation rules on attributes * Obsolete, not used anymore. */ #define XML_SCHEMAS_ANYATTR_STRICT 3 /** * Skip unknown attribute from validation */ #define XML_SCHEMAS_ANY_SKIP 1 /** * Used by wildcards. * Validate if type found, don't worry if not found */ #define XML_SCHEMAS_ANY_LAX 2 /** * Used by wildcards. * Apply strict validation rules */ #define XML_SCHEMAS_ANY_STRICT 3 /** * Used by wildcards. * The attribute is prohibited. */ #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 /** * The attribute is required. */ #define XML_SCHEMAS_ATTR_USE_REQUIRED 1 /** * The attribute is optional. */ #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 /** * allow elements in no namespace */ #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 /** * allow elements in no namespace */ #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 /** * this is set when the "type" and "ref" references * have been resolved. */ #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 /** * the attribute has a fixed value */ #define XML_SCHEMAS_ATTR_FIXED 1 << 9 /** Schema attribute definition */ typedef struct _xmlSchemaAttribute xmlSchemaAttribute; typedef xmlSchemaAttribute *xmlSchemaAttributePtr; /** * An attribute definition. */ 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 */ xmlSchemaAnnot *annot; xmlSchemaType *base; /* Deprecated; not used */ int occurs; /* Deprecated; not used */ const xmlChar *defValue; /* The initial value of the value constraint */ xmlSchemaType *subtypes; /* the type definition */ xmlNode *node; const xmlChar *targetNamespace; int flags; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaVal *defVal; /* The compiled value constraint */ xmlSchemaAttribute *refDecl; /* Deprecated; not used */ }; /** Linked list of schema attributes */ typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; /** * Used to build a list of attribute uses on complexType definitions. * WARNING: Deprecated; not used. */ struct _xmlSchemaAttributeLink { struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */ struct _xmlSchemaAttribute *attr;/* the linked attribute */ }; /** * If the wildcard is complete. */ #define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0 /** Namespace wildcard */ typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs; typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr; /** * Used to build a list of namespaces on wildcards. */ struct _xmlSchemaWildcardNs { struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */ const xmlChar *value;/* the value */ }; /** Name wildcard */ typedef struct _xmlSchemaWildcard xmlSchemaWildcard; typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; /** * A wildcard. */ struct _xmlSchemaWildcard { xmlSchemaTypeType type; /* The kind of type */ const xmlChar *id; /* Deprecated; not used */ xmlSchemaAnnot *annot; xmlNode *node; int minOccurs; /* Deprecated; not used */ int maxOccurs; /* Deprecated; not used */ int processContents; int any; /* Indicates if the ns constraint is of ##any */ xmlSchemaWildcardNs *nsSet; /* The list of allowed namespaces */ xmlSchemaWildcardNs *negNsSet; /* The negated namespace */ int flags; }; /** * The attribute wildcard has been built. */ #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 /** * The attribute group has been defined. */ #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 /** * Marks the attr group as marked; used for circular checks. */ #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 /** * The attr group was redefined. */ #define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 /** * Whether this attr. group contains attr. group references. */ #define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 /** Attribute group */ typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; /** * An attribute group definition. * * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures * must be kept similar */ 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 */ xmlSchemaAnnot *annot; xmlSchemaAttribute *attributes; /* Deprecated; not used */ xmlNode *node; int flags; xmlSchemaWildcard *attributeWildcard; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaAttributeGroup *refItem; /* Deprecated; not used */ const xmlChar *targetNamespace; void *attrUses; }; /** Linked list of schema types */ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; /** * Used to build a list of types (e.g. member types of * simpleType with variety "union"). */ struct _xmlSchemaTypeLink { struct _xmlSchemaTypeLink *next;/* the next type link ... */ xmlSchemaType *type;/* the linked type */ }; /** Linked list of schema facets */ typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink; typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr; /** * Used to build a list of facets. */ struct _xmlSchemaFacetLink { struct _xmlSchemaFacetLink *next;/* the next facet link ... */ xmlSchemaFacet *facet;/* the linked facet */ }; /** * the element content type is mixed */ #define XML_SCHEMAS_TYPE_MIXED 1 << 0 /** * the simple or complex type has a derivation method of "extension". */ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1 /** * the simple or complex type has a derivation method of "restriction". */ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2 /** * the type is global */ #define XML_SCHEMAS_TYPE_GLOBAL 1 << 3 /** * 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. */ /** * 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 /** * the simpleType has a variety of "list". */ #define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6 /** * the simpleType has a variety of "union". */ #define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7 /** * the simpleType has a variety of "union". */ #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8 /** * the complexType has a final of "extension". */ #define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9 /** * the simpleType/complexType has a final of "restriction". */ #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10 /** * the simpleType has a final of "list". */ #define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11 /** * the simpleType has a final of "union". */ #define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12 /** * the simpleType has a final of "default". */ #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 /** * Marks the item as a builtin primitive. */ #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 /** * Marks the item as marked; used for circular checks. */ #define XML_SCHEMAS_TYPE_MARKED 1 << 16 /** * the complexType did not specify 'block' so use the default of the * `` item. */ #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17 /** * the complexType has a 'block' of "extension". */ #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18 /** * the complexType has a 'block' of "restriction". */ #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19 /** * the simple/complexType is abstract. */ #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 /** * indicates if the facets need a computed value */ #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 /** * indicates that the type was typefixed */ #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22 /** * indicates that the type is invalid */ #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 /** * a whitespace-facet value of "preserve" */ #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 /** * a whitespace-facet value of "replace" */ #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 /** * a whitespace-facet value of "collapse" */ #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 /** * has facets */ #define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 /** * indicates if the facets (pattern) need a normalized value */ #define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 /** * First stage of fixup was done. */ #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 /** * The type was redefined. */ #define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 #if 0 /** * The type redefines an other type. */ #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 #endif /** * 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 */ xmlSchemaAnnot *annot; xmlSchemaType *subtypes; xmlSchemaAttribute *attributes; /* Deprecated; not used */ xmlNode *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 */ xmlSchemaType *baseType; /* The base type component */ xmlSchemaFacet *facets; /* Local facets */ struct _xmlSchemaType *redef; /* Deprecated; not used */ int recurse; /* Obsolete */ xmlSchemaAttributeLink **attributeUses; /* Deprecated; not used */ xmlSchemaWildcard *attributeWildcard; int builtInType; /* Type of built-in types. */ xmlSchemaTypeLink *memberTypes; /* member-types if a union type. */ xmlSchemaFacetLink *facetSet; /* All facets (incl. inherited) */ const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaType *contentTypeDef; /* Used for the simple content of complex types. Could we use @subtypes for this? */ xmlRegexp *contModel; /* Holds the automaton of the content model */ const xmlChar *targetNamespace; void *attrUses; }; /** * the element is nillable */ #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 /** * the element is global */ #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 /** * the element has a default value */ #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 /** * the element has a fixed value */ #define XML_SCHEMAS_ELEM_FIXED 1 << 3 /** * the element is abstract */ #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 /** * the element is top level * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead */ #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 /** * the element is a reference to a type */ #define XML_SCHEMAS_ELEM_REF 1 << 6 /** * allow elements in no namespace * Obsolete, not used anymore. */ #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 /** * this is set when "type", "ref", "substitutionGroup" * references have been resolved. */ #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 /** * a helper flag for the search of circular references. */ #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 /** * the "block" attribute is absent */ #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 /** * disallowed substitutions are absent */ #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 /** * disallowed substitutions: "restriction" */ #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 /** * disallowed substitutions: "substitution" */ #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 /** * substitution group exclusions are absent */ #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 /** * substitution group exclusions: "extension" */ #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 /** * substitution group exclusions: "restriction" */ #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 /** * the declaration is a substitution group head */ #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 /** * this is set when the elem decl has been checked against * all constraints */ #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 /** Schema element definition */ typedef struct _xmlSchemaElement xmlSchemaElement; typedef xmlSchemaElement *xmlSchemaElementPtr; /** * An element definition. * * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of * structures must be kept similar */ 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 */ xmlSchemaAnnot *annot; xmlSchemaType *subtypes; /* the type definition */ xmlSchemaAttribute *attributes; xmlNode *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 */ xmlRegexp *contModel; /* Obsolete for WXS, maybe used for RelaxNG */ xmlSchemaContentType contentType; const xmlChar *refPrefix; /* Deprecated; not used */ xmlSchemaVal *defVal; /* The compiled value constraint. */ void *idcs; /* The identity-constraint defs */ }; /** * unknown facet handling */ #define XML_SCHEMAS_FACET_UNKNOWN 0 /** * preserve the type of the facet */ #define XML_SCHEMAS_FACET_PRESERVE 1 /** * replace the type of the facet */ #define XML_SCHEMAS_FACET_REPLACE 2 /** * 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 */ xmlSchemaAnnot *annot; xmlNode *node; int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ int whitespace; xmlSchemaVal *val; /* The compiled value */ xmlRegexp *regexp; /* The regex for patterns */ }; /** Schema notation */ typedef struct _xmlSchemaNotation xmlSchemaNotation; typedef xmlSchemaNotation *xmlSchemaNotationPtr; /** * A notation definition. */ struct _xmlSchemaNotation { xmlSchemaTypeType type; /* The kind of type */ const xmlChar *name; xmlSchemaAnnot *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. */ /** * Reflects elementFormDefault == qualified in * an XML schema document. */ #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 /** * Reflects attributeFormDefault == qualified in * an XML schema document. */ #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 /** * the schema has "extension" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 /** * the schema has "restriction" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 /** * the schema has "list" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 /** * the schema has "union" in the set of finalDefault. */ #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 /** * the schema has "extension" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 /** * the schema has "restriction" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 /** * the schema has "substitution" in the set of blockDefault. */ #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 /** * the schema is currently including an other schema with * no target namespace. */ #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 /** * A Schemas definition */ struct _xmlSchema { const xmlChar *name; /* schema name */ const xmlChar *targetNamespace; /* the target namespace */ const xmlChar *version; const xmlChar *id; /* Obsolete */ xmlDoc *doc; xmlSchemaAnnot *annot; int flags; xmlHashTable *typeDecl; xmlHashTable *attrDecl; xmlHashTable *attrgrpDecl; xmlHashTable *elemDecl; xmlHashTable *notaDecl; xmlHashTable *schemasImports; void *_private; /* unused by the library for users or bindings */ xmlHashTable *groupDecl; xmlDict *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 */ xmlHashTable *idcDef; /* All identity-constraint defs. */ void *volatiles; /* Obsolete */ }; XMLPUBFUN void xmlSchemaFreeType (xmlSchemaType *type); XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcard *wildcard); #ifdef __cplusplus } #endif #endif /* LIBXML_SCHEMAS_ENABLED */ #endif /* __XML_SCHEMA_INTERNALS_H__ */ PK!L xpointer.hnu[/** * @file * * @brief XPointer framework and schemes * * API to evaluate XPointer expressions. The following schemes are * supported: * * - element() * - xmlns() * - xpath1() * * xpointer() is an alias for the xpath1() scheme. The point and * range extensions are not supported. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XPTR_H__ #define __XML_XPTR_H__ #include #ifdef LIBXML_XPTR_ENABLED #include #include #ifdef __cplusplus extern "C" { #endif /* * Functions. */ XML_DEPRECATED XMLPUBFUN xmlXPathContext * xmlXPtrNewContext (xmlDoc *doc, xmlNode *here, xmlNode *origin); XMLPUBFUN xmlXPathObject * xmlXPtrEval (const xmlChar *str, xmlXPathContext *ctx); #ifdef __cplusplus } #endif #endif /* LIBXML_XPTR_ENABLED */ #endif /* __XML_XPTR_H__ */ PK!F(99xpath.hnu[/** * @file * * @brief XML Path Language implementation * * 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 * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_XPATH_H__ #define __XML_XPATH_H__ #include #ifdef LIBXML_XPATH_ENABLED #include #include #include #ifdef __cplusplus extern "C" { #endif /** XPath context */ typedef struct _xmlXPathContext xmlXPathContext; typedef xmlXPathContext *xmlXPathContextPtr; /** XPath parser and evaluation context */ 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; /** XPath node set */ typedef struct _xmlNodeSet xmlNodeSet; typedef xmlNodeSet *xmlNodeSetPtr; /** * A node-set (an unordered collection of nodes without duplicates). */ struct _xmlNodeSet { /** number of nodes in the set */ int nodeNr; /** size of the array as allocated */ int nodeMax; /** array of nodes in no particular order */ xmlNode **nodeTab; }; /** * An expression is evaluated to yield an object, which * has one of the following four basic types: * * - node-set * - boolean * - number * - string */ typedef enum { XPATH_UNDEFINED = 0, XPATH_NODESET = 1, XPATH_BOOLEAN = 2, XPATH_NUMBER = 3, XPATH_STRING = 4, XPATH_USERS = 8, XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */ } xmlXPathObjectType; /** @cond IGNORE */ #define XPATH_POINT 5 #define XPATH_RANGE 6 #define XPATH_LOCATIONSET 7 /** @endcond */ /** XPath object */ typedef struct _xmlXPathObject xmlXPathObject; typedef xmlXPathObject *xmlXPathObjectPtr; /** * An XPath object */ struct _xmlXPathObject { /** object type */ xmlXPathObjectType type; /** node set */ xmlNodeSet *nodesetval; /** boolean */ int boolval; /** number */ double floatval; /** string */ xmlChar *stringval; void *user; int index; void *user2; int index2; }; /** @cond ignore */ /* * unused */ typedef int (*xmlXPathConvertFunc) (xmlXPathObject *obj, int type); typedef struct _xmlXPathType xmlXPathType; typedef xmlXPathType *xmlXPathTypePtr; struct _xmlXPathType { const xmlChar *name; /* the type name */ xmlXPathConvertFunc func; /* the conversion function */ }; /* * unused */ typedef struct _xmlXPathVariable xmlXPathVariable; typedef xmlXPathVariable *xmlXPathVariablePtr; struct _xmlXPathVariable { const xmlChar *name; /* the variable name */ xmlXPathObject *value; /* the value */ }; /* * unused */ typedef void (*xmlXPathEvalFunc)(xmlXPathParserContext *ctxt, int nargs); typedef struct _xmlXPathFunct xmlXPathFunct; typedef xmlXPathFunct *xmlXPathFuncPtr; struct _xmlXPathFunct { const xmlChar *name; /* the function name */ xmlXPathEvalFunc func; /* the evaluation function */ }; /* * unused */ typedef xmlXPathObject *(*xmlXPathAxisFunc) (xmlXPathParserContext *ctxt, xmlXPathObject *cur); typedef struct _xmlXPathAxis xmlXPathAxis; typedef xmlXPathAxis *xmlXPathAxisPtr; struct _xmlXPathAxis { const xmlChar *name; /* the axis name */ xmlXPathAxisFunc func; /* the search function */ }; /** @endcond */ /** * An XPath function. * The arguments (if any) are popped out from the context stack * and the result is pushed on the stack. * * @param ctxt the XPath interprestation context * @param nargs the number of arguments */ typedef void (*xmlXPathFunction) (xmlXPathParserContext *ctxt, int nargs); /* * Function and Variable Lookup. */ /** * Prototype for callbacks used to plug variable lookup in the XPath * engine. * * @param ctxt an XPath context * @param name name of the variable * @param ns_uri the namespace name hosting this variable * @returns the XPath object value or NULL if not found. */ typedef xmlXPathObject *(*xmlXPathVariableLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); /** * Prototype for callbacks used to plug function lookup in the XPath * engine. * * @param ctxt an XPath context * @param name name of the function * @param ns_uri the namespace name hosting this function * @returns the XPath function or NULL if not found. */ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); /** * Flags for XPath engine compilation and runtime */ /** * check namespaces at compilation */ #define XML_XPATH_CHECKNS (1<<0) /** * forbid variables in expression */ #define XML_XPATH_NOVAR (1<<1) /** * 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 { /** The current document */ xmlDoc *doc; /** The current node */ xmlNode *node; /* unused (hash table) */ int nb_variables_unused; /* unused (hash table) */ int max_variables_unused; /* Hash table of defined variables */ xmlHashTable *varHash; /* number of defined types */ int nb_types; /* max number of types */ int max_types; /* Array of defined types */ xmlXPathType *types; /* unused (hash table) */ int nb_funcs_unused; /* unused (hash table) */ int max_funcs_unused; /* Hash table of defined funcs */ xmlHashTable *funcHash; /* number of defined axis */ int nb_axis; /* max number of axis */ int max_axis; /* Array of defined axis */ xmlXPathAxis *axis; /* Array of namespaces */ xmlNs **namespaces; /* number of namespace in scope */ int nsNr; /* function to free */ void *user; /** the context size */ int contextSize; /** the proximity position */ int proximityPosition; /* is this an XPointer context? */ int xptr; /* for here() */ xmlNode *here; /* for origin() */ xmlNode *origin; /* The namespaces hash table */ xmlHashTable *nsHash; /* variable lookup func */ xmlXPathVariableLookupFunc varLookupFunc; /* variable lookup data */ void *varLookupData; /* needed for XSLT */ void *extra; /* The function name when calling a function */ const xmlChar *function; /* The namespace URI when calling a function */ const xmlChar *functionURI; /* function lookup func */ xmlXPathFuncLookupFunc funcLookupFunc; /* function lookup data */ void *funcLookupData; /* Array of temp namespaces */ xmlNs **tmpNsList; /* number of namespaces in scope */ int tmpNsNr; /* user specific data block */ void *userData; /* the callback in case of errors */ xmlStructuredErrorFunc error; /* the last error */ xmlError lastError; /* the source node XSLT */ xmlNode *debugNode; /* dictionary if any */ xmlDict *dict; /** flags to control compilation */ int flags; /* Cache for reusal of XPath objects */ void *cache; /* Resource limits */ unsigned long opLimit; unsigned long opCount; int depth; }; /** Compiled XPath expression */ typedef struct _xmlXPathCompExpr xmlXPathCompExpr; typedef xmlXPathCompExpr *xmlXPathCompExprPtr; /** * An XPath parser context. It contains pure parsing information, * an xmlXPathContext, and the stack of objects. * * This struct is used for evaluation as well and misnamed. */ struct _xmlXPathParserContext { /* the current char being parsed */ const xmlChar *cur; /* the full expression */ const xmlChar *base; /** error code */ int error; /** the evaluation context */ xmlXPathContext *context; /** the current value */ xmlXPathObject *value; /* number of values stacked */ int valueNr; /* max number of values stacked */ int valueMax; /* stack of values */ xmlXPathObject **valueTab; /* the precompiled expression */ xmlXPathCompExpr *comp; /* it this an XPointer expression */ int xptr; /* used for walking preceding axis */ xmlNode *ancestor; /* always zero for compatibility */ int valueFrame; }; /************************************************************************ * * * Public API * * * ************************************************************************/ /** * Objects and Nodesets handling */ /** @cond ignore */ XML_DEPRECATED XMLPUBVAR double xmlXPathNAN; XML_DEPRECATED XMLPUBVAR double xmlXPathPINF; XML_DEPRECATED XMLPUBVAR double xmlXPathNINF; /* These macros may later turn into functions */ /** * Implement a functionality similar to the DOM NodeList.length. * * @param ns a node-set * @returns the number of nodes in the node-set. */ #define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0) /** * Implements a functionality similar to the DOM NodeList.item(). * * @param ns a node-set * @param index index of a node in the set * @returns the xmlNode 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) /** * Checks whether `ns` is empty or not. * * @param ns a node-set * @returns %TRUE if `ns` is an empty node-set. */ #define xmlXPathNodeSetIsEmpty(ns) \ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) /** @endcond */ XMLPUBFUN void xmlXPathFreeObject (xmlXPathObject *obj); XMLPUBFUN xmlNodeSet * xmlXPathNodeSetCreate (xmlNode *val); XMLPUBFUN void xmlXPathFreeNodeSetList (xmlXPathObject *obj); XMLPUBFUN void xmlXPathFreeNodeSet (xmlNodeSet *obj); XMLPUBFUN xmlXPathObject * xmlXPathObjectCopy (xmlXPathObject *val); XMLPUBFUN int xmlXPathCmpNodes (xmlNode *node1, xmlNode *node2); /** * Conversion functions to basic types. */ XMLPUBFUN int xmlXPathCastNumberToBoolean (double val); XMLPUBFUN int xmlXPathCastStringToBoolean (const xmlChar * val); XMLPUBFUN int xmlXPathCastNodeSetToBoolean(xmlNodeSet *ns); XMLPUBFUN int xmlXPathCastToBoolean (xmlXPathObject *val); XMLPUBFUN double xmlXPathCastBooleanToNumber (int val); XMLPUBFUN double xmlXPathCastStringToNumber (const xmlChar * val); XMLPUBFUN double xmlXPathCastNodeToNumber (xmlNode *node); XMLPUBFUN double xmlXPathCastNodeSetToNumber (xmlNodeSet *ns); XMLPUBFUN double xmlXPathCastToNumber (xmlXPathObject *val); XMLPUBFUN xmlChar * xmlXPathCastBooleanToString (int val); XMLPUBFUN xmlChar * xmlXPathCastNumberToString (double val); XMLPUBFUN xmlChar * xmlXPathCastNodeToString (xmlNode *node); XMLPUBFUN xmlChar * xmlXPathCastNodeSetToString (xmlNodeSet *ns); XMLPUBFUN xmlChar * xmlXPathCastToString (xmlXPathObject *val); XMLPUBFUN xmlXPathObject * xmlXPathConvertBoolean (xmlXPathObject *val); XMLPUBFUN xmlXPathObject * xmlXPathConvertNumber (xmlXPathObject *val); XMLPUBFUN xmlXPathObject * xmlXPathConvertString (xmlXPathObject *val); /** * Context handling. */ XMLPUBFUN xmlXPathContext * xmlXPathNewContext (xmlDoc *doc); XMLPUBFUN void xmlXPathFreeContext (xmlXPathContext *ctxt); XMLPUBFUN void xmlXPathSetErrorHandler(xmlXPathContext *ctxt, xmlStructuredErrorFunc handler, void *context); XMLPUBFUN int xmlXPathContextSetCache(xmlXPathContext *ctxt, int active, int value, int options); /** * Evaluation functions. */ XMLPUBFUN long xmlXPathOrderDocElems (xmlDoc *doc); XMLPUBFUN int xmlXPathSetContextNode (xmlNode *node, xmlXPathContext *ctx); XMLPUBFUN xmlXPathObject * xmlXPathNodeEval (xmlNode *node, const xmlChar *str, xmlXPathContext *ctx); XMLPUBFUN xmlXPathObject * xmlXPathEval (const xmlChar *str, xmlXPathContext *ctx); XMLPUBFUN xmlXPathObject * xmlXPathEvalExpression (const xmlChar *str, xmlXPathContext *ctxt); XMLPUBFUN int xmlXPathEvalPredicate (xmlXPathContext *ctxt, xmlXPathObject *res); /** * Separate compilation/evaluation entry points. */ XMLPUBFUN xmlXPathCompExpr * xmlXPathCompile (const xmlChar *str); XMLPUBFUN xmlXPathCompExpr * xmlXPathCtxtCompile (xmlXPathContext *ctxt, const xmlChar *str); XMLPUBFUN xmlXPathObject * xmlXPathCompiledEval (xmlXPathCompExpr *comp, xmlXPathContext *ctx); XMLPUBFUN int xmlXPathCompiledEvalToBoolean(xmlXPathCompExpr *comp, xmlXPathContext *ctxt); XMLPUBFUN void xmlXPathFreeCompExpr (xmlXPathCompExpr *comp); XML_DEPRECATED XMLPUBFUN void xmlXPathInit (void); XMLPUBFUN int xmlXPathIsNaN (double val); XMLPUBFUN int xmlXPathIsInf (double val); #ifdef __cplusplus } #endif #endif /* LIBXML_XPATH_ENABLED */ #endif /* ! __XML_XPATH_H__ */ PK!a4 xmlversion.hnu[/** * @file * * @brief compile-time version information * * compile-time version information for the XML library * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_VERSION_H__ #define __XML_VERSION_H__ /** * the version string like "1.2.3" */ #define LIBXML_DOTTED_VERSION "2.15.3" /** * the version number: 1.2.3 value is 10203 */ #define LIBXML_VERSION 21503 /** * the version number string, 1.2.3 value is "10203" */ #define LIBXML_VERSION_STRING "21503" /** * extra version information, used to show a git commit description */ #define LIBXML_VERSION_EXTRA "" /** * 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(21503); #if 1 /** * Whether the thread support is configured in */ #define LIBXML_THREAD_ENABLED #endif #if 0 /** * Whether the allocation hooks are per-thread */ #define LIBXML_THREAD_ALLOC_ENABLED #endif /** * Always enabled since 2.14.0 */ #define LIBXML_TREE_ENABLED #if 1 /** * Whether the serialization/saving support is configured in */ #define LIBXML_OUTPUT_ENABLED #endif #if 1 /** * Whether the push parsing interfaces are configured in */ #define LIBXML_PUSH_ENABLED #endif #if 1 /** * Whether the xmlReader parsing interface is configured in */ #define LIBXML_READER_ENABLED #endif #if 1 /** * Whether the xmlPattern node selection interface is configured in */ #define LIBXML_PATTERN_ENABLED #endif #if 1 /** * Whether the xmlWriter saving interface is configured in */ #define LIBXML_WRITER_ENABLED #endif #if 1 /** * Whether the older SAX1 interface is configured in */ #define LIBXML_SAX1_ENABLED #endif #if 0 /** * HTTP support was removed in 2.15 */ #define LIBXML_HTTP_STUBS_ENABLED #endif #if 1 /** * Whether the DTD validation support is configured in */ #define LIBXML_VALID_ENABLED #endif #if 1 /** * Whether the HTML support is configured in */ #define LIBXML_HTML_ENABLED #endif /* * Removed in 2.14 */ #undef LIBXML_LEGACY_ENABLED #if 1 /** * Whether the Canonicalization support is configured in */ #define LIBXML_C14N_ENABLED #endif #if 1 /** * Whether the Catalog support is configured in */ #define LIBXML_CATALOG_ENABLED #define LIBXML_SGML_CATALOG_ENABLED #endif #if 1 /** * Whether XPath is configured in */ #define LIBXML_XPATH_ENABLED #endif #if 1 /** * Whether XPointer is configured in */ #define LIBXML_XPTR_ENABLED #endif #if 1 /** * Whether XInclude is configured in */ #define LIBXML_XINCLUDE_ENABLED #endif #if 1 /** * Whether iconv support is available */ #define LIBXML_ICONV_ENABLED #endif #if 0 /** * Whether icu support is available */ #define LIBXML_ICU_ENABLED #endif #if 1 /** * Whether ISO-8859-* support is made available in case iconv is not */ #define LIBXML_ISO8859X_ENABLED #endif #if 1 /** * Whether Debugging module is configured in */ #define LIBXML_DEBUG_ENABLED #endif /* * Removed in 2.14 */ #undef LIBXML_UNICODE_ENABLED #if 1 /** * Whether the regular expressions interfaces are compiled in */ #define LIBXML_REGEXP_ENABLED #endif #if 1 /** * Whether the automata interfaces are compiled in */ #define LIBXML_AUTOMATA_ENABLED #endif #if 1 /** * Whether the RelaxNG validation interfaces are compiled in */ #define LIBXML_RELAXNG_ENABLED #endif #if 1 /** * Whether the Schemas validation interfaces are compiled in */ #define LIBXML_SCHEMAS_ENABLED #endif #if 0 /** * Whether the Schematron validation interfaces are compiled in */ #define LIBXML_SCHEMATRON_ENABLED #endif #if 1 /** * Whether the module interfaces are compiled in */ #define LIBXML_MODULES_ENABLED /** * the string suffix used by dynamic modules (usually shared libraries) */ #define LIBXML_MODULE_EXTENSION ".so" #endif #if 0 /** * Whether the Zlib support is compiled in */ #define LIBXML_ZLIB_ENABLED #endif #include #endif PK!bZw xmlerror.hnu[/** * @file * * @brief Error handling * * API for error reporting and callbacks. * * @copyright See Copyright for the status of this software. * * @author Daniel Veillard */ #ifndef __XML_ERROR_H__ #define __XML_ERROR_H__ #include #ifdef __cplusplus extern "C" { #endif /** * Set generic error callback. * * @deprecated Use #xmlSetGenericErrorFunc */ #define initGenericErrorDefaultFunc(h) \ xmlSetGenericErrorFunc(NULL, (h) ? *((xmlGenericErrorFunc *) (h)) : NULL) /** * Indicates the level of an error */ typedef enum { /** Success */ XML_ERR_NONE = 0, /** * A warning * * When parsing XML, warnings are only reported to error * handlers. */ XML_ERR_WARNING = 1, /** * An error * * When parsing XML, this is used for recoverable errors like * * - namespace errors * - validity errors when validating * - certain undeclared entities * - ID uniqueness and xml:id errors * * Note that some recoverable errors in the sense of the XML * spec are reported as warnings. * * In other contexts, this may be used for unrecoverable * errors. */ XML_ERR_ERROR = 2, /** * A fatal error * * When parsing XML, a "fatal error" according to the XML spec. * This typically means that the document isn't well-formed. * * This also includes OOM and I/O errors, resource limit * exhaustion, unexpected errors from other libraries and * invalid argument errors. */ XML_ERR_FATAL = 3 } xmlErrorLevel; /** * Indicates where an error may have come from */ typedef enum { /** Unknown */ XML_FROM_NONE = 0, /** The XML parser */ XML_FROM_PARSER, /** The tree module (unused) */ XML_FROM_TREE, /** The XML Namespace module */ XML_FROM_NAMESPACE, /** The XML DTD validation with parser context */ XML_FROM_DTD, /** The HTML parser */ XML_FROM_HTML, /** The memory allocator (unused) */ XML_FROM_MEMORY, /** The serialization code */ XML_FROM_OUTPUT, /** The Input/Output stack */ XML_FROM_IO, /** The FTP module (unused) */ XML_FROM_FTP, /** The HTTP module (unused) */ XML_FROM_HTTP, /** The XInclude processing */ XML_FROM_XINCLUDE, /** The XPath module */ XML_FROM_XPATH, /** The XPointer module */ XML_FROM_XPOINTER, /** The regular expressions module */ XML_FROM_REGEXP, /** The W3C XML Schemas Datatype module */ XML_FROM_DATATYPE, /** The W3C XML Schemas parser module */ XML_FROM_SCHEMASP, /** The W3C XML Schemas validation module */ XML_FROM_SCHEMASV, /** The Relax-NG parser module */ XML_FROM_RELAXNGP, /** The Relax-NG validator module */ XML_FROM_RELAXNGV, /** The Catalog module */ XML_FROM_CATALOG, /** The Canonicalization module */ XML_FROM_C14N, /** The XSLT engine from libxslt (unused) */ XML_FROM_XSLT, /** The XML DTD validation with valid context */ XML_FROM_VALID, /** The error checking module (unused) */ XML_FROM_CHECK, /** The xmlwriter module */ XML_FROM_WRITER, /** The dynamically loaded module module (unused) */ XML_FROM_MODULE, /** The module handling character conversion (unused) */ XML_FROM_I18N, /** The Schematron validator module */ XML_FROM_SCHEMATRONV, /** The buffers module (unused) */ XML_FROM_BUFFER, /** The URI module (unused) */ XML_FROM_URI } xmlErrorDomain; /** Structured error */ typedef struct _xmlError xmlError; typedef xmlError *xmlErrorPtr; /** * An object containing information about an error. */ struct _xmlError { /** An xmlErrorDomain value. */ int domain; /** The error code, e.g. an xmlParserErrors. */ int code; /** Human-readable error message. */ char *message; /** Error level. */ xmlErrorLevel level; /** Filename if available */ char *file; /** Line number if available */ int line; /** Extra string information. */ char *str1; /** Extra string information. */ char *str2; /** Extra string information. */ char *str3; /** Extra number information. */ int int1; /** Column number if available. */ int int2; /** Parser context if available */ void *ctxt; /** Node if available */ void *node; }; /** * Error codes. Note that only some codes are documented. */ typedef enum { /** Success. */ XML_ERR_OK = 0, /** Internal assertion failure. */ XML_ERR_INTERNAL_ERROR, /* 1 */ /** Out of memory */ 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 */ /** Unsupported character encoding. */ 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 */ /** * Internal resource limit like maximum amplification * factor exceeded. */ XML_ERR_RESOURCE_LIMIT, /* 114 */ /** Invalid argument. */ XML_ERR_ARGUMENT, /* 115 */ /** Unexpected error from the OS or an external library. */ 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 */ /** File not found. */ 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; /** * Generic error callback. * * @deprecated in favor of structured errors. * @param ctx user data * @param msg printf-like format string * @param ... arguments to format */ typedef void (*xmlGenericErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * Structured error callback receiving an xmlError. * * @param userData user provided data for the error callback * @param error the error being raised */ typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error); /** @cond ignore */ XML_DEPRECATED XMLPUBFUN const xmlError *__xmlLastError(void); XMLPUBFUN xmlGenericErrorFunc *__xmlGenericError(void); XMLPUBFUN void **__xmlGenericErrorContext(void); XMLPUBFUN xmlStructuredErrorFunc *__xmlStructuredError(void); XMLPUBFUN void **__xmlStructuredErrorContext(void); /** @endcond */ #ifndef XML_GLOBALS_NO_REDEFINITION /** * Thread-local variable containing the last reported error. * * @deprecated Use xmlGetLastError(). */ #define xmlLastError (*__xmlLastError()) /** * Thread-local variable containing the generic error callback. * * @deprecated See xmlSetStructuredErrorFunc(). */ #define xmlGenericError (*__xmlGenericError()) /** * Thread-local variable containing user data for the generic * error handler. * * @deprecated See xmlSetStructuredErrorFunc(). */ #define xmlGenericErrorContext (*__xmlGenericErrorContext()) /** * Thread-local variable containing the structured error * callback. * * @deprecated See xmlSetStructuredErrorFunc(). */ #define xmlStructuredError (*__xmlStructuredError()) /** * Thread-local variable containing user data for the * structured error handler. * * @deprecated See xmlSetStructuredErrorFunc(). */ #define xmlStructuredErrorContext (*__xmlStructuredErrorContext()) #endif XMLPUBFUN void xmlSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler); XMLPUBFUN void xmlSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler); XML_DEPRECATED XMLPUBFUN void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); XML_DEPRECATED XMLPUBFUN void xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); /* * Legacy error handlers. */ 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); struct _xmlParserInput; 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 (xmlError *err); XMLPUBFUN int xmlCopyError (const xmlError *from, xmlError *to); #ifdef __cplusplus } #endif #endif /* __XML_ERROR_H__ */ PK!Ou u c14n.hnu[/** * @file * * @brief Provide Canonical XML and Exclusive XML Canonicalization * * 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 * @copyright See Copyright for the status of this software. * * @author Aleksey Sanin */ #ifndef __XML_C14N_H__ #define __XML_C14N_H__ #include #ifdef LIBXML_C14N_ENABLED #include #include #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 */ /** * Predefined values for C14N modes */ typedef enum { /** Original C14N 1.0 spec */ XML_C14N_1_0 = 0, /** Exclusive C14N 1.0 spec */ XML_C14N_EXCLUSIVE_1_0 = 1, /** C14N 1.1 spec */ XML_C14N_1_1 = 2 } xmlC14NMode; XMLPUBFUN int xmlC14NDocSaveTo (xmlDoc *doc, xmlNodeSet *nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBuffer *buf); XMLPUBFUN int xmlC14NDocDumpMemory (xmlDoc *doc, xmlNodeSet *nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlChar **doc_txt_ptr); XMLPUBFUN int xmlC14NDocSave (xmlDoc *doc, xmlNodeSet *nodes, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, const char* filename, int compression); /** * This is the core C14N function */ /** * Signature for a C14N callback on visible nodes * * @param user_data user data * @param node the current node * @param parent the parent node * @returns 1 if the node should be included */ typedef int (*xmlC14NIsVisibleCallback) (void* user_data, xmlNode *node, xmlNode *parent); XMLPUBFUN int xmlC14NExecute (xmlDoc *doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, int mode, /* a xmlC14NMode */ xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBuffer *buf); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* LIBXML_C14N_ENABLED */ #endif /* __XML_C14N_H__ */ PK!5_)) php_libxml.hnu[/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2018 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Shane Caraveo | | Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id$ */ #ifndef PHP_LIBXML_H #define PHP_LIBXML_H #if HAVE_LIBXML extern zend_module_entry libxml_module_entry; #define libxml_module_ptr &libxml_module_entry #include "php_version.h" #define PHP_LIBXML_VERSION PHP_VERSION #ifdef PHP_WIN32 # define PHP_LIBXML_API __declspec(dllexport) #elif defined(__GNUC__) && __GNUC__ >= 4 # define PHP_LIBXML_API __attribute__ ((visibility("default"))) #else # define PHP_LIBXML_API #endif #include "zend_smart_str.h" #include #define LIBXML_SAVE_NOEMPTYTAG 1<<2 ZEND_BEGIN_MODULE_GLOBALS(libxml) zval stream_context; smart_str error_buffer; zend_llist *error_list; struct _php_libxml_entity_resolver { zval object; zend_fcall_info fci; zend_fcall_info_cache fcc; } entity_loader; zend_bool entity_loader_disabled; ZEND_END_MODULE_GLOBALS(libxml) typedef struct _libxml_doc_props { int formatoutput; int validateonparse; int resolveexternals; int preservewhitespace; int substituteentities; int stricterror; int recover; HashTable *classmap; } libxml_doc_props; typedef struct _php_libxml_ref_obj { void *ptr; int refcount; libxml_doc_props *doc_props; } php_libxml_ref_obj; typedef struct _php_libxml_node_ptr { xmlNodePtr node; int refcount; void *_private; } php_libxml_node_ptr; typedef struct _php_libxml_node_object { php_libxml_node_ptr *node; php_libxml_ref_obj *document; HashTable *properties; zend_object std; } php_libxml_node_object; static inline php_libxml_node_object *php_libxml_node_fetch_object(zend_object *obj) { return (php_libxml_node_object *)((char*)(obj) - obj->handlers->offset); } #define Z_LIBXML_NODE_P(zv) php_libxml_node_fetch_object(Z_OBJ_P((zv))) typedef void * (*php_libxml_export_node) (zval *object); PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, void *private_data); PHP_LIBXML_API int php_libxml_decrement_node_ptr(php_libxml_node_object *object); PHP_LIBXML_API int php_libxml_increment_doc_ref(php_libxml_node_object *object, xmlDocPtr docp); PHP_LIBXML_API int php_libxml_decrement_doc_ref(php_libxml_node_object *object); PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object); PHP_LIBXML_API zval *php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function); /* When an explicit freeing of node and children is required */ PHP_LIBXML_API void php_libxml_node_free_list(xmlNodePtr node); PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node); /* When object dtor is called as node may still be referenced */ PHP_LIBXML_API void php_libxml_node_decrement_resource(php_libxml_node_object *object); PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...); PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...); PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); PHP_LIBXML_API void php_libxml_switch_context(zval *context, zval *oldcontext); PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg); PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable); /* Init/shutdown functions*/ PHP_LIBXML_API void php_libxml_initialize(void); PHP_LIBXML_API void php_libxml_shutdown(void); #define LIBXML(v) ZEND_MODULE_GLOBALS_ACCESSOR(libxml, v) #if defined(ZTS) && defined(COMPILE_DL_LIBXML) ZEND_TSRMLS_CACHE_EXTERN() #endif /* Other extension may override the global state options, these global options * are copied initially to ctxt->options. Set the options to a known good value. * See libxml2 globals.c and parserInternals.c. * The unique_name argument allows multiple sanitizes and restores within the * same function, even nested is necessary. */ #define PHP_LIBXML_SANITIZE_GLOBALS(unique_name) \ int xml_old_loadsubset_##unique_name = xmlLoadExtDtdDefaultValue; \ xmlLoadExtDtdDefaultValue = 0; \ int xml_old_validate_##unique_name = xmlDoValidityCheckingDefaultValue; \ xmlDoValidityCheckingDefaultValue = 0; \ int xml_old_pedantic_##unique_name = xmlPedanticParserDefault(0); \ int xml_old_substitute_##unique_name = xmlSubstituteEntitiesDefault(0); \ int xml_old_linenrs_##unique_name = xmlLineNumbersDefault(0); \ int xml_old_blanks_##unique_name = xmlKeepBlanksDefault(1); #define PHP_LIBXML_RESTORE_GLOBALS(unique_name) \ xmlLoadExtDtdDefaultValue = xml_old_loadsubset_##unique_name; \ xmlDoValidityCheckingDefaultValue = xml_old_validate_##unique_name; \ (void) xmlPedanticParserDefault(xml_old_pedantic_##unique_name); \ (void) xmlSubstituteEntitiesDefault(xml_old_substitute_##unique_name); \ (void) xmlLineNumbersDefault(xml_old_linenrs_##unique_name); \ (void) xmlKeepBlanksDefault(xml_old_blanks_##unique_name); /* Alternative for above, working directly on the context and not setting globals. * Generally faster because no locking is involved, and this has the advantage that it sets the options to a known good value. */ static zend_always_inline void php_libxml_sanitize_parse_ctxt_options(xmlParserCtxtPtr ctxt) { ctxt->loadsubset = 0; ctxt->validate = 0; ctxt->pedantic = 0; ctxt->replaceEntities = 0; ctxt->linenumbers = 0; ctxt->keepBlanks = 1; ctxt->options = 0; } #else /* HAVE_LIBXML */ #define libxml_module_ptr NULL #endif #define phpext_libxml_ptr libxml_module_ptr #endif /* PHP_LIBXML_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ PK!=33tree.hnu[PK!ͫ(D D ilist.hnu[PK!եn xmlstring.hnu[PK!ՒSAX2.hnu[PK! _xmlschemas.hnu[PK!wM xmlmodule.hnu[PK!hՎ nxmlsave.hnu[PK!\8+ + ;pattern.hnu[PK!]pEpExpathInternals.hnu[PK!v[ OMuri.hnu[PK!ISr+Xxmlschemastypes.hnu[PK!P٧ƣ *jschematron.hnu[PK![,11  {xmlautomata.hnu[PK!HH&& wencoding.hnu[PK!J-J-8xmlIO.hnu[PK![22hash.hnu[PK!8   !threads.hnu[PK!Dn*^t)t) zHTMLparser.hnu[PK!mCC **nanoftp.hnu[PK!\C +relaxng.hnu[PK!eCdict.hnu[PK!W4 p.p.Kvalid.hnu[PK!TOO yxmlwriter.hnu[PK!!х66parserInternals.hnu[PK!q00 Cxmlreader.hnu[PK!gn n q1xmlexports.hnu[PK!@ ;chvalid.hnu[PK!e`` )Nnanohttp.hnu[PK!!x=b; ; Vxinclude.hnu[PK!S_$$8bxlink.hnu[PK![5k vxmlregexp.hnu[PK!ߛp ccatalog.hnu[PK!]# oHTMLtree.hnu[PK!4 ww 5debugXML.hnu[PK!;ę xmlunicode.hnu[PK!@C-OO ;globals.hnu[PK!i éentities.hnu[PK!parser.hnu[PK!<| xmlmemory.hnu[PK!%I׺SAX.hnu[PK!#ZZschemasInternals.hnu[PK!L xpointer.hnu[PK!F(99xpath.hnu[PK!a4 lUxmlversion.hnu[PK!bZw Bexmlerror.hnu[PK!Ou u #c14n.hnu[PK!5_))  php_libxml.hnu[PK// 3$