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 ! =3 3 tree.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 ! ]pE pE xpathInternals.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 ! ISr xmlschemastypes.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 ! [,1 1
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&