mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
doc: Adjust documentation of public structs
This commit is contained in:
@@ -41,34 +41,52 @@ typedef enum {
|
|||||||
XML_INTERNAL_PREDEFINED_ENTITY = 6
|
XML_INTERNAL_PREDEFINED_ENTITY = 6
|
||||||
} xmlEntityType;
|
} xmlEntityType;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* An unit of storage for an entity, contains the string, the value
|
* An entity declaration
|
||||||
* and the linkind data needed for the linking in the hash table.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _xmlEntity {
|
struct _xmlEntity {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
|
void *_private;
|
||||||
const xmlChar *name; /* Entity name */
|
/** XML_ENTITY_DECL, must be second ! */
|
||||||
struct _xmlNode *children; /* First child link */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* Last child link */
|
/** Entity name */
|
||||||
struct _xmlDtd *parent; /* -> DTD */
|
const xmlChar *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** First child link */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
/** 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;
|
||||||
|
|
||||||
xmlChar *orig; /* content without ref substitution */
|
/** content without ref substitution */
|
||||||
xmlChar *content; /* content or ndata if unparsed */
|
xmlChar *orig;
|
||||||
int length; /* the content length */
|
/** content or ndata if unparsed */
|
||||||
xmlEntityType etype; /* The entity type */
|
xmlChar *content;
|
||||||
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
/** the content length */
|
||||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
int length;
|
||||||
|
/** The entity type */
|
||||||
|
xmlEntityType etype;
|
||||||
|
/** External identifier for PUBLIC */
|
||||||
|
const xmlChar *ExternalID;
|
||||||
|
/** URI for a SYSTEM or PUBLIC Entity */
|
||||||
|
const xmlChar *SystemID;
|
||||||
|
|
||||||
struct _xmlEntity *nexte; /* unused */
|
/** unused */
|
||||||
const xmlChar *URI; /* the full URI as computed */
|
struct _xmlEntity *nexte;
|
||||||
int owner; /* unused */
|
/** the full URI as computed */
|
||||||
int flags; /* various flags */
|
const xmlChar *URI;
|
||||||
unsigned long expandedSize; /* expanded size */
|
/** unused */
|
||||||
|
int owner;
|
||||||
|
/** various flags */
|
||||||
|
int flags;
|
||||||
|
/** expanded size */
|
||||||
|
unsigned long expandedSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -90,8 +90,10 @@ typedef enum {
|
|||||||
XML_INPUT_NETWORK = (1 << 4)
|
XML_INPUT_NETWORK = (1 << 4)
|
||||||
} xmlParserInputFlags;
|
} xmlParserInputFlags;
|
||||||
|
|
||||||
|
/* Deprecated */
|
||||||
|
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* An xmlParserInput is an input flow for the XML processor.
|
* An xmlParserInput is an input flow for the XML processor.
|
||||||
* Each entity parsed is associated an xmlParserInput (except the
|
* Each entity parsed is associated an xmlParserInput (except the
|
||||||
* few predefined ones). This is the case both for internal entities
|
* few predefined ones). This is the case both for internal entities
|
||||||
@@ -99,14 +101,6 @@ typedef enum {
|
|||||||
* external entities - in which case we use the buf structure for
|
* external entities - in which case we use the buf structure for
|
||||||
* progressive reading and I18N conversions to the internal UTF-8 format.
|
* progressive reading and I18N conversions to the internal UTF-8 format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @param str the string to deallocate
|
|
||||||
*
|
|
||||||
* Callback for freeing some parser input allocations.
|
|
||||||
*/
|
|
||||||
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
|
|
||||||
|
|
||||||
struct _xmlParserInput {
|
struct _xmlParserInput {
|
||||||
/* Input buffer */
|
/* Input buffer */
|
||||||
xmlParserInputBufferPtr buf;
|
xmlParserInputBufferPtr buf;
|
||||||
@@ -144,11 +138,11 @@ struct _xmlParserInput {
|
|||||||
xmlEntityPtr entity XML_DEPRECATED_MEMBER;
|
xmlEntityPtr entity XML_DEPRECATED_MEMBER;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
*
|
|
||||||
* The parser can be asked to collect Node information, i.e. at what
|
* The parser can be asked to collect Node information, i.e. at what
|
||||||
* place in the file they were detected.
|
* place in the file they were detected.
|
||||||
* NOTE: This is off by default and not very well tested.
|
*
|
||||||
|
* NOTE: This feature is off by default and deprecated.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
|
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
|
||||||
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
|
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
|
||||||
@@ -242,16 +236,8 @@ typedef xmlParserErrors
|
|||||||
xmlResourceType type, xmlParserInputFlags flags,
|
xmlResourceType type, xmlParserInputFlags flags,
|
||||||
xmlParserInputPtr *out);
|
xmlParserInputPtr *out);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
*
|
|
||||||
* The parser context.
|
* The parser context.
|
||||||
* NOTE This doesn't completely define the parser state, the (current ?)
|
|
||||||
* design of the parser uses recursive function calls since this allow
|
|
||||||
* and easy mapping from the production rules of the specification
|
|
||||||
* to the actual code. The drawback is that the actual function call
|
|
||||||
* also reflect the parser state. However most of the parsing routines
|
|
||||||
* takes as the only argument the parser context pointer, so migrating
|
|
||||||
* to a state based parser for progressive parsing shouldn't be too hard.
|
|
||||||
*/
|
*/
|
||||||
struct _xmlParserCtxt {
|
struct _xmlParserCtxt {
|
||||||
/* The SAX handler */
|
/* The SAX handler */
|
||||||
@@ -501,8 +487,7 @@ struct _xmlParserCtxt {
|
|||||||
void *convCtxt XML_DEPRECATED_MEMBER;
|
void *convCtxt XML_DEPRECATED_MEMBER;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
*
|
|
||||||
* A SAX Locator.
|
* A SAX Locator.
|
||||||
*/
|
*/
|
||||||
struct _xmlSAXLocator {
|
struct _xmlSAXLocator {
|
||||||
@@ -512,12 +497,6 @@ struct _xmlSAXLocator {
|
|||||||
int (*getColumnNumber)(void *ctx);
|
int (*getColumnNumber)(void *ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* A SAX handler is bunch of callbacks called by the parser when processing
|
|
||||||
* of the input generate data or structure information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* resolveEntitySAXFunc:
|
* resolveEntitySAXFunc:
|
||||||
* @param ctx the user data (XML parser context)
|
* @param ctx the user data (XML parser context)
|
||||||
|
@@ -146,7 +146,7 @@ typedef xmlSchemaType *xmlSchemaTypePtr;
|
|||||||
typedef struct _xmlSchemaFacet xmlSchemaFacet;
|
typedef struct _xmlSchemaFacet xmlSchemaFacet;
|
||||||
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
|
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Annotation
|
* Annotation
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
|
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
|
||||||
@@ -242,7 +242,7 @@ struct _xmlSchemaAnnot {
|
|||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
|
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* An attribute definition.
|
* An attribute definition.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ struct _xmlSchemaAttribute {
|
|||||||
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
|
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Used to build a list of attribute uses on complexType definitions.
|
* Used to build a list of attribute uses on complexType definitions.
|
||||||
* WARNING: Deprecated; not used.
|
* WARNING: Deprecated; not used.
|
||||||
*/
|
*/
|
||||||
@@ -289,7 +289,7 @@ struct _xmlSchemaAttributeLink {
|
|||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
|
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Used to build a list of namespaces on wildcards.
|
* Used to build a list of namespaces on wildcards.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
|
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
|
||||||
@@ -299,7 +299,7 @@ struct _xmlSchemaWildcardNs {
|
|||||||
const xmlChar *value;/* the value */
|
const xmlChar *value;/* the value */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* xmlSchemaWildcard.
|
* xmlSchemaWildcard.
|
||||||
* A wildcard.
|
* A wildcard.
|
||||||
*/
|
*/
|
||||||
@@ -351,7 +351,7 @@ struct _xmlSchemaWildcard {
|
|||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
|
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* An attribute group definition.
|
* An attribute group definition.
|
||||||
*
|
*
|
||||||
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
|
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
|
||||||
@@ -378,7 +378,7 @@ struct _xmlSchemaAttributeGroup {
|
|||||||
void *attrUses;
|
void *attrUses;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Used to build a list of types (e.g. member types of
|
* Used to build a list of types (e.g. member types of
|
||||||
* simpleType with variety "union").
|
* simpleType with variety "union").
|
||||||
*/
|
*/
|
||||||
@@ -389,7 +389,7 @@ struct _xmlSchemaTypeLink {
|
|||||||
xmlSchemaTypePtr type;/* the linked type */
|
xmlSchemaTypePtr type;/* the linked type */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Used to build a list of facets.
|
* Used to build a list of facets.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
|
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
|
||||||
@@ -586,14 +586,16 @@ struct _xmlSchemaFacetLink {
|
|||||||
* The type was redefined.
|
* The type was redefined.
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
|
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* XML_SCHEMAS_TYPE_REDEFINING:
|
* XML_SCHEMAS_TYPE_REDEFINING:
|
||||||
*
|
*
|
||||||
* The type redefines an other type.
|
* The type redefines an other type.
|
||||||
*/
|
*/
|
||||||
/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
|
#define XML_SCHEMAS_TYPE_REDEFINING 1 << 31
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* _xmlSchemaType:
|
* _xmlSchemaType:
|
||||||
*
|
*
|
||||||
* Schemas type definition.
|
* Schemas type definition.
|
||||||
@@ -815,7 +817,7 @@ struct _xmlSchemaElement {
|
|||||||
* collapse the types of the facet
|
* collapse the types of the facet
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_FACET_COLLAPSE 3
|
#define XML_SCHEMAS_FACET_COLLAPSE 3
|
||||||
/**
|
/*
|
||||||
* A facet definition.
|
* A facet definition.
|
||||||
*/
|
*/
|
||||||
struct _xmlSchemaFacet {
|
struct _xmlSchemaFacet {
|
||||||
@@ -831,7 +833,7 @@ struct _xmlSchemaFacet {
|
|||||||
xmlRegexpPtr regexp; /* The regex for patterns */
|
xmlRegexpPtr regexp; /* The regex for patterns */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* A notation definition.
|
* A notation definition.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
||||||
@@ -913,7 +915,7 @@ struct _xmlSchemaNotation {
|
|||||||
* no target namespace.
|
* no target namespace.
|
||||||
*/
|
*/
|
||||||
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
|
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
|
||||||
/**
|
/*
|
||||||
* _xmlSchema:
|
* _xmlSchema:
|
||||||
*
|
*
|
||||||
* A Schemas definition
|
* A Schemas definition
|
||||||
|
@@ -90,9 +90,8 @@ typedef enum {
|
|||||||
} xmlBufferAllocationScheme;
|
} xmlBufferAllocationScheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* A buffer structure, this old construct is limited to 2GB and
|
* A buffer structure, this old construct is limited to 2GB and
|
||||||
* is being deprecated, use API with xmlBuf instead
|
* is being deprecated, use API with xmlBuf instead.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlBuffer xmlBuffer;
|
typedef struct _xmlBuffer xmlBuffer;
|
||||||
typedef xmlBuffer *xmlBufferPtr;
|
typedef xmlBuffer *xmlBufferPtr;
|
||||||
@@ -110,18 +109,14 @@ struct _xmlBuffer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* A buffer structure, new one, the actual structure internals are not public
|
* A buffer structure, new one, the actual structure internals are not public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _xmlBuf xmlBuf;
|
typedef struct _xmlBuf xmlBuf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* A pointer to a buffer structure, the actual structure internals are not
|
* A pointer to a buffer structure, the actual structure internals are not
|
||||||
* public
|
* public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef xmlBuf *xmlBufPtr;
|
typedef xmlBuf *xmlBufPtr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -216,17 +211,18 @@ typedef enum {
|
|||||||
#define XML_DOCB_DOCUMENT_NODE 21
|
#define XML_DOCB_DOCUMENT_NODE 21
|
||||||
/** @endcond */
|
/** @endcond */
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* A DTD Notation definition.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _xmlNotation xmlNotation;
|
typedef struct _xmlNotation xmlNotation;
|
||||||
typedef xmlNotation *xmlNotationPtr;
|
typedef xmlNotation *xmlNotationPtr;
|
||||||
|
/**
|
||||||
|
* A DTD Notation definition.
|
||||||
|
*/
|
||||||
struct _xmlNotation {
|
struct _xmlNotation {
|
||||||
const xmlChar *name; /* Notation name */
|
/** Notation name */
|
||||||
const xmlChar *PublicID; /* Public identifier, if any */
|
const xmlChar *name;
|
||||||
const xmlChar *SystemID; /* System identifier, if any */
|
/** Public identifier, if any */
|
||||||
|
const xmlChar *PublicID;
|
||||||
|
/** System identifier, if any */
|
||||||
|
const xmlChar *SystemID;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -267,31 +263,45 @@ struct _xmlEnumeration {
|
|||||||
const xmlChar *name; /* Enumeration name */
|
const xmlChar *name; /* Enumeration name */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* An Attribute declaration in a DTD.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _xmlAttribute xmlAttribute;
|
typedef struct _xmlAttribute xmlAttribute;
|
||||||
typedef xmlAttribute *xmlAttributePtr;
|
typedef xmlAttribute *xmlAttributePtr;
|
||||||
|
/**
|
||||||
|
* An Attribute declaration in a DTD.
|
||||||
|
*/
|
||||||
struct _xmlAttribute {
|
struct _xmlAttribute {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
|
void *_private;
|
||||||
const xmlChar *name; /* Attribute name */
|
/** XML_ATTRIBUTE_DECL, must be second ! */
|
||||||
struct _xmlNode *children; /* NULL */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* NULL */
|
/** Attribute name */
|
||||||
struct _xmlDtd *parent; /* -> DTD */
|
const xmlChar *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** NULL */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
/** NULL */
|
||||||
|
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;
|
||||||
|
|
||||||
struct _xmlAttribute *nexth; /* next in hash table */
|
/** next in hash table */
|
||||||
xmlAttributeType atype; /* The attribute type */
|
struct _xmlAttribute *nexth;
|
||||||
xmlAttributeDefault def; /* the default */
|
/** The attribute type */
|
||||||
const xmlChar *defaultValue; /* or the default value */
|
xmlAttributeType atype;
|
||||||
xmlEnumerationPtr tree; /* or the enumeration tree if any */
|
/** the default */
|
||||||
const xmlChar *prefix; /* the namespace prefix if any */
|
xmlAttributeDefault def;
|
||||||
const xmlChar *elem; /* Element holding the attribute */
|
/** or the default value */
|
||||||
|
const xmlChar *defaultValue;
|
||||||
|
/** or the enumeration tree if any */
|
||||||
|
xmlEnumerationPtr tree;
|
||||||
|
/** the namespace prefix if any */
|
||||||
|
const xmlChar *prefix;
|
||||||
|
/** Element holding the attribute */
|
||||||
|
const xmlChar *elem;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -314,22 +324,27 @@ typedef enum {
|
|||||||
XML_ELEMENT_CONTENT_PLUS
|
XML_ELEMENT_CONTENT_PLUS
|
||||||
} xmlElementContentOccur;
|
} xmlElementContentOccur;
|
||||||
|
|
||||||
|
typedef struct _xmlElementContent xmlElementContent;
|
||||||
|
typedef xmlElementContent *xmlElementContentPtr;
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* An XML Element content as stored after parsing an element definition
|
* An XML Element content as stored after parsing an element definition
|
||||||
* in a DTD.
|
* in a DTD.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _xmlElementContent xmlElementContent;
|
|
||||||
typedef xmlElementContent *xmlElementContentPtr;
|
|
||||||
struct _xmlElementContent {
|
struct _xmlElementContent {
|
||||||
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
|
/** PCDATA, ELEMENT, SEQ or OR */
|
||||||
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
|
xmlElementContentType type;
|
||||||
const xmlChar *name; /* Element name */
|
/** ONCE, OPT, MULT or PLUS */
|
||||||
struct _xmlElementContent *c1; /* first child */
|
xmlElementContentOccur ocur;
|
||||||
struct _xmlElementContent *c2; /* second child */
|
/** Element name */
|
||||||
struct _xmlElementContent *parent; /* parent */
|
const xmlChar *name;
|
||||||
const xmlChar *prefix; /* Namespace prefix */
|
/** first child */
|
||||||
|
struct _xmlElementContent *c1;
|
||||||
|
/** second child */
|
||||||
|
struct _xmlElementContent *c2;
|
||||||
|
/** parent */
|
||||||
|
struct _xmlElementContent *parent;
|
||||||
|
/** Namespace prefix */
|
||||||
|
const xmlChar *prefix;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -343,30 +358,42 @@ typedef enum {
|
|||||||
XML_ELEMENT_TYPE_ELEMENT
|
XML_ELEMENT_TYPE_ELEMENT
|
||||||
} xmlElementTypeVal;
|
} xmlElementTypeVal;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* An XML Element declaration from a DTD.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _xmlElement xmlElement;
|
typedef struct _xmlElement xmlElement;
|
||||||
typedef xmlElement *xmlElementPtr;
|
typedef xmlElement *xmlElementPtr;
|
||||||
|
/**
|
||||||
|
* An XML Element declaration from a DTD.
|
||||||
|
*/
|
||||||
struct _xmlElement {
|
struct _xmlElement {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
|
void *_private;
|
||||||
const xmlChar *name; /* Element name */
|
/** XML_ELEMENT_DECL, must be second ! */
|
||||||
struct _xmlNode *children; /* NULL */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* NULL */
|
/** Element name */
|
||||||
struct _xmlDtd *parent; /* -> DTD */
|
const xmlChar *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** NULL */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
/** NULL */
|
||||||
|
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;
|
||||||
|
|
||||||
xmlElementTypeVal etype; /* The type */
|
/** The type */
|
||||||
xmlElementContentPtr content; /* the allowed element content */
|
xmlElementTypeVal etype;
|
||||||
xmlAttributePtr attributes; /* List of the declared attributes */
|
/** the allowed element content */
|
||||||
const xmlChar *prefix; /* the namespace prefix if any */
|
xmlElementContentPtr content;
|
||||||
|
/** List of the declared attributes */
|
||||||
|
xmlAttributePtr attributes;
|
||||||
|
/** the namespace prefix if any */
|
||||||
|
const xmlChar *prefix;
|
||||||
#ifdef LIBXML_REGEXP_ENABLED
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
xmlRegexpPtr contModel; /* the validating regexp */
|
/** the validating regexp */
|
||||||
|
xmlRegexpPtr contModel;
|
||||||
#else
|
#else
|
||||||
void *contModel;
|
void *contModel;
|
||||||
#endif
|
#endif
|
||||||
@@ -381,99 +408,133 @@ struct _xmlElement {
|
|||||||
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
|
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
|
||||||
typedef xmlElementType xmlNsType;
|
typedef xmlElementType xmlNsType;
|
||||||
|
|
||||||
|
typedef struct _xmlNs xmlNs;
|
||||||
|
typedef xmlNs *xmlNsPtr;
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* An XML namespace.
|
* An XML namespace.
|
||||||
* Note that prefix == NULL is valid, it defines the default namespace
|
* Note that prefix == NULL is valid, it defines the default namespace
|
||||||
* within the subtree (until overridden).
|
* within the subtree (until overridden).
|
||||||
*
|
*
|
||||||
* xmlNsType is unified with xmlElementType.
|
* xmlNsType is unified with xmlElementType.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _xmlNs xmlNs;
|
|
||||||
typedef xmlNs *xmlNsPtr;
|
|
||||||
struct _xmlNs {
|
struct _xmlNs {
|
||||||
struct _xmlNs *next; /* next Ns link for this node */
|
/** next Ns link for this node */
|
||||||
xmlNsType type; /* global or local */
|
struct _xmlNs *next;
|
||||||
const xmlChar *href; /* URL for the namespace */
|
/** global or local */
|
||||||
const xmlChar *prefix; /* prefix for the namespace */
|
xmlNsType type;
|
||||||
void *_private; /* application data */
|
/** URL for the namespace */
|
||||||
struct _xmlDoc *context; /* normally an xmlDoc */
|
const xmlChar *href;
|
||||||
|
/** prefix for the namespace */
|
||||||
|
const xmlChar *prefix;
|
||||||
|
/** application data */
|
||||||
|
void *_private;
|
||||||
|
/** normally an xmlDoc */
|
||||||
|
struct _xmlDoc *context;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct _xmlDtd xmlDtd;
|
||||||
|
typedef xmlDtd *xmlDtdPtr;
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for
|
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for
|
||||||
* the internal subset and for the external subset.
|
* the internal subset and for the external subset.
|
||||||
*/
|
*/
|
||||||
typedef struct _xmlDtd xmlDtd;
|
|
||||||
typedef xmlDtd *xmlDtdPtr;
|
|
||||||
struct _xmlDtd {
|
struct _xmlDtd {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* XML_DTD_NODE, must be second ! */
|
void *_private;
|
||||||
const xmlChar *name; /* Name of the DTD */
|
/** XML_DTD_NODE, must be second ! */
|
||||||
struct _xmlNode *children; /* the value of the property link */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* last child link */
|
/** Name of the DTD */
|
||||||
struct _xmlDoc *parent; /* child->parent link */
|
const xmlChar *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** the value of the property link */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
/** last child link */
|
||||||
|
struct _xmlNode *last;
|
||||||
|
/** child->parent link */
|
||||||
|
struct _xmlDoc *parent;
|
||||||
|
/** next sibling link */
|
||||||
|
struct _xmlNode *next;
|
||||||
|
/** previous sibling link */
|
||||||
|
struct _xmlNode *prev;
|
||||||
|
/** the containing document */
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
|
||||||
/* End of common part */
|
/* End of common part */
|
||||||
void *notations; /* Hash table for notations if any */
|
|
||||||
void *elements; /* Hash table for elements if any */
|
/** Hash table for notations if any */
|
||||||
void *attributes; /* Hash table for attributes if any */
|
void *notations;
|
||||||
void *entities; /* Hash table for entities if any */
|
/** Hash table for elements if any */
|
||||||
const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
|
void *elements;
|
||||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
|
/** Hash table for attributes if any */
|
||||||
void *pentities; /* Hash table for param entities if any */
|
void *attributes;
|
||||||
|
/** Hash table for entities if any */
|
||||||
|
void *entities;
|
||||||
|
/** External identifier for PUBLIC DTD */
|
||||||
|
const xmlChar *ExternalID;
|
||||||
|
/** URI for a SYSTEM or PUBLIC DTD */
|
||||||
|
const xmlChar *SystemID;
|
||||||
|
/** Hash table for param entities if any */
|
||||||
|
void *pentities;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* An attribute on an XML node.
|
|
||||||
*/
|
|
||||||
typedef struct _xmlAttr xmlAttr;
|
typedef struct _xmlAttr xmlAttr;
|
||||||
typedef xmlAttr *xmlAttrPtr;
|
typedef xmlAttr *xmlAttrPtr;
|
||||||
struct _xmlAttr {
|
|
||||||
void *_private; /* application data */
|
|
||||||
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
|
|
||||||
const xmlChar *name; /* the name of the property */
|
|
||||||
struct _xmlNode *children; /* the value of the property */
|
|
||||||
struct _xmlNode *last; /* NULL */
|
|
||||||
struct _xmlNode *parent; /* child->parent link */
|
|
||||||
struct _xmlAttr *next; /* next sibling link */
|
|
||||||
struct _xmlAttr *prev; /* previous sibling link */
|
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
|
||||||
xmlNs *ns; /* pointer to the associated namespace */
|
|
||||||
xmlAttributeType atype; /* the attribute type if validating */
|
|
||||||
void *psvi; /* for type/PSVI information */
|
|
||||||
struct _xmlID *id; /* the ID struct */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* An attribute on an XML node.
|
||||||
* An XML ID instance.
|
|
||||||
*/
|
*/
|
||||||
|
struct _xmlAttr {
|
||||||
|
/** application data */
|
||||||
|
void *_private;
|
||||||
|
/** XML_ATTRIBUTE_NODE, must be second ! */
|
||||||
|
xmlElementType type;
|
||||||
|
/** the name of the property */
|
||||||
|
const xmlChar *name;
|
||||||
|
/** the value of the property */
|
||||||
|
struct _xmlNode *children;
|
||||||
|
/** NULL */
|
||||||
|
struct _xmlNode *last;
|
||||||
|
/** child->parent link */
|
||||||
|
struct _xmlNode *parent;
|
||||||
|
/** next sibling link */
|
||||||
|
struct _xmlAttr *next;
|
||||||
|
/** previous sibling link */
|
||||||
|
struct _xmlAttr *prev;
|
||||||
|
/** the containing document */
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
/** pointer to the associated namespace */
|
||||||
|
xmlNs *ns;
|
||||||
|
/** the attribute type if validating */
|
||||||
|
xmlAttributeType atype;
|
||||||
|
/** for type/PSVI information */
|
||||||
|
void *psvi;
|
||||||
|
/** the ID struct */
|
||||||
|
struct _xmlID *id;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _xmlID xmlID;
|
typedef struct _xmlID xmlID;
|
||||||
typedef xmlID *xmlIDPtr;
|
typedef xmlID *xmlIDPtr;
|
||||||
struct _xmlID {
|
|
||||||
struct _xmlID *next; /* next ID */
|
|
||||||
const xmlChar *value; /* The ID name */
|
|
||||||
xmlAttrPtr attr; /* The attribute holding it */
|
|
||||||
const xmlChar *name; /* The attribute if attr is not available */
|
|
||||||
int lineno; /* The line number if attr is not available */
|
|
||||||
struct _xmlDoc *doc; /* The document holding the ID */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* An XML ID instance.
|
||||||
* An XML IDREF instance.
|
|
||||||
*/
|
*/
|
||||||
|
struct _xmlID {
|
||||||
|
/** next ID */
|
||||||
|
struct _xmlID *next;
|
||||||
|
/** The ID name */
|
||||||
|
const xmlChar *value;
|
||||||
|
/** The attribute holding it */
|
||||||
|
xmlAttrPtr attr;
|
||||||
|
/** The attribute if attr is not available */
|
||||||
|
const xmlChar *name;
|
||||||
|
/** The line number if attr is not available */
|
||||||
|
int lineno;
|
||||||
|
/** The document holding the ID */
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _xmlRef xmlRef;
|
typedef struct _xmlRef xmlRef;
|
||||||
typedef xmlRef *xmlRefPtr;
|
typedef xmlRef *xmlRefPtr;
|
||||||
|
/*
|
||||||
|
* An XML IDREF instance.
|
||||||
|
*/
|
||||||
struct _xmlRef {
|
struct _xmlRef {
|
||||||
struct _xmlRef *next; /* next Ref */
|
struct _xmlRef *next; /* next Ref */
|
||||||
const xmlChar *value; /* The Ref name */
|
const xmlChar *value; /* The Ref name */
|
||||||
@@ -482,31 +543,47 @@ struct _xmlRef {
|
|||||||
int lineno; /* The line number if attr is not available */
|
int lineno; /* The line number if attr is not available */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* A node in an XML tree.
|
|
||||||
*/
|
|
||||||
typedef struct _xmlNode xmlNode;
|
typedef struct _xmlNode xmlNode;
|
||||||
typedef xmlNode *xmlNodePtr;
|
typedef xmlNode *xmlNodePtr;
|
||||||
|
/**
|
||||||
|
* A node in an XML tree.
|
||||||
|
*/
|
||||||
struct _xmlNode {
|
struct _xmlNode {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* type number, must be second ! */
|
void *_private;
|
||||||
const xmlChar *name; /* the name of the node, or the entity */
|
/** type number, must be second ! */
|
||||||
struct _xmlNode *children; /* parent->childs link */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* last child link */
|
/** the name of the node, or the entity */
|
||||||
struct _xmlNode *parent; /* child->parent link */
|
const xmlChar *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** parent->childs link */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* the containing document */
|
/** last child link */
|
||||||
|
struct _xmlNode *last;
|
||||||
|
/** child->parent link */
|
||||||
|
struct _xmlNode *parent;
|
||||||
|
/** next sibling link */
|
||||||
|
struct _xmlNode *next;
|
||||||
|
/** previous sibling link */
|
||||||
|
struct _xmlNode *prev;
|
||||||
|
/** the containing document */
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
|
||||||
/* End of common part */
|
/* End of common part */
|
||||||
xmlNs *ns; /* pointer to the associated namespace */
|
|
||||||
xmlChar *content; /* the content */
|
/** pointer to the associated namespace */
|
||||||
struct _xmlAttr *properties;/* properties list */
|
xmlNs *ns;
|
||||||
xmlNs *nsDef; /* namespace definitions on this node */
|
/** the content */
|
||||||
void *psvi; /* for type/PSVI information */
|
xmlChar *content;
|
||||||
unsigned short line; /* line number */
|
/** properties list */
|
||||||
unsigned short extra; /* extra data for XPath/XSLT */
|
struct _xmlAttr *properties;
|
||||||
|
/** namespace definitions on this node */
|
||||||
|
xmlNs *nsDef;
|
||||||
|
/** for type/PSVI information */
|
||||||
|
void *psvi;
|
||||||
|
/** line number */
|
||||||
|
unsigned short line;
|
||||||
|
/** extra data for XPath/XSLT */
|
||||||
|
unsigned short extra;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -548,46 +625,68 @@ typedef enum {
|
|||||||
XML_DOC_HTML = 1<<7
|
XML_DOC_HTML = 1<<7
|
||||||
} xmlDocProperties;
|
} xmlDocProperties;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* An XML document.
|
|
||||||
*/
|
|
||||||
typedef struct _xmlDoc xmlDoc;
|
typedef struct _xmlDoc xmlDoc;
|
||||||
typedef xmlDoc *xmlDocPtr;
|
typedef xmlDoc *xmlDocPtr;
|
||||||
|
/**
|
||||||
|
* An XML document.
|
||||||
|
*/
|
||||||
struct _xmlDoc {
|
struct _xmlDoc {
|
||||||
void *_private; /* application data */
|
/** application data */
|
||||||
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
|
void *_private;
|
||||||
char *name; /* name/filename/URI of the document */
|
/** XML_DOCUMENT_NODE, must be second ! */
|
||||||
struct _xmlNode *children; /* the document tree */
|
xmlElementType type;
|
||||||
struct _xmlNode *last; /* last child link */
|
/** name/filename/URI of the document */
|
||||||
struct _xmlNode *parent; /* child->parent link */
|
char *name;
|
||||||
struct _xmlNode *next; /* next sibling link */
|
/** the document tree */
|
||||||
struct _xmlNode *prev; /* previous sibling link */
|
struct _xmlNode *children;
|
||||||
struct _xmlDoc *doc; /* autoreference to itself */
|
/** last child link */
|
||||||
|
struct _xmlNode *last;
|
||||||
|
/** child->parent link */
|
||||||
|
struct _xmlNode *parent;
|
||||||
|
/** next sibling link */
|
||||||
|
struct _xmlNode *next;
|
||||||
|
/** previous sibling link */
|
||||||
|
struct _xmlNode *prev;
|
||||||
|
/** autoreference to itself */
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
|
||||||
/* End of common part */
|
/* End of common part */
|
||||||
int compression;/* level of zlib compression */
|
|
||||||
int standalone; /* standalone document (no external refs)
|
/** level of zlib compression */
|
||||||
1 if standalone="yes"
|
int compression;
|
||||||
0 if standalone="no"
|
/** standalone document (no external refs):
|
||||||
-1 if there is no XML declaration
|
1 if standalone="yes",
|
||||||
-2 if there is an XML declaration, but no
|
0 if standalone="no",
|
||||||
standalone attribute was specified */
|
-1 if there is no XML declaration,
|
||||||
struct _xmlDtd *intSubset; /* the document internal subset */
|
-2 if there is an XML declaration, but no
|
||||||
struct _xmlDtd *extSubset; /* the document external subset */
|
standalone attribute was specified */
|
||||||
struct _xmlNs *oldNs; /* Global namespace, the old way */
|
int standalone;
|
||||||
const xmlChar *version; /* the XML version string */
|
/** the document internal subset */
|
||||||
const xmlChar *encoding; /* actual encoding, if any */
|
struct _xmlDtd *intSubset;
|
||||||
void *ids; /* Hash table for ID attributes if any */
|
/** the document external subset */
|
||||||
void *refs; /* Hash table for IDREFs attributes if any */
|
struct _xmlDtd *extSubset;
|
||||||
const xmlChar *URL; /* The URI for that document */
|
/** Global namespace, the old way */
|
||||||
int charset; /* unused */
|
struct _xmlNs *oldNs;
|
||||||
struct _xmlDict *dict; /* dict used to allocate names or NULL */
|
/** the XML version string */
|
||||||
void *psvi; /* for type/PSVI information */
|
const xmlChar *version;
|
||||||
int parseFlags; /* set of xmlParserOption used to parse the
|
/** actual encoding, if any */
|
||||||
document */
|
const xmlChar *encoding;
|
||||||
int properties; /* set of xmlDocProperties for this document
|
/** Hash table for ID attributes if any */
|
||||||
set at the end of parsing */
|
void *ids;
|
||||||
|
/** Hash table for IDREFs attributes if any */
|
||||||
|
void *refs;
|
||||||
|
/** The URI for that document */
|
||||||
|
const xmlChar *URL;
|
||||||
|
/** unused */
|
||||||
|
int charset;
|
||||||
|
/** dict used to allocate names or NULL */
|
||||||
|
struct _xmlDict *dict;
|
||||||
|
/** for type/PSVI information */
|
||||||
|
void *psvi;
|
||||||
|
/** xmlParserOptions used to parse the document */
|
||||||
|
int parseFlags;
|
||||||
|
/** xmlDocProperties for this document set at the end of parsing */
|
||||||
|
int properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -609,8 +708,7 @@ typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
|
|||||||
const xmlChar *nsName,
|
const xmlChar *nsName,
|
||||||
const xmlChar *nsPrefix);
|
const xmlChar *nsPrefix);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
*
|
|
||||||
* Context for DOM wrapper-operations.
|
* Context for DOM wrapper-operations.
|
||||||
*/
|
*/
|
||||||
struct _xmlDOMWrapCtxt {
|
struct _xmlDOMWrapCtxt {
|
||||||
|
@@ -73,16 +73,18 @@ typedef enum {
|
|||||||
XPATH_RECURSION_LIMIT_EXCEEDED
|
XPATH_RECURSION_LIMIT_EXCEEDED
|
||||||
} xmlXPathError;
|
} xmlXPathError;
|
||||||
|
|
||||||
/*
|
|
||||||
* A node-set (an unordered collection of nodes without duplicates).
|
|
||||||
*/
|
|
||||||
typedef struct _xmlNodeSet xmlNodeSet;
|
typedef struct _xmlNodeSet xmlNodeSet;
|
||||||
typedef xmlNodeSet *xmlNodeSetPtr;
|
typedef xmlNodeSet *xmlNodeSetPtr;
|
||||||
|
/**
|
||||||
|
* A node-set (an unordered collection of nodes without duplicates).
|
||||||
|
*/
|
||||||
struct _xmlNodeSet {
|
struct _xmlNodeSet {
|
||||||
int nodeNr; /* number of nodes in the set */
|
/** number of nodes in the set */
|
||||||
int nodeMax; /* size of the array as allocated */
|
int nodeNr;
|
||||||
xmlNodePtr *nodeTab; /* array of nodes in no particular order */
|
/** size of the array as allocated */
|
||||||
/* @@ with_ns to check whether namespace nodes should be looked at @@ */
|
int nodeMax;
|
||||||
|
/** array of nodes in no particular order */
|
||||||
|
xmlNodePtr *nodeTab;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -114,11 +116,19 @@ typedef enum {
|
|||||||
|
|
||||||
typedef struct _xmlXPathObject xmlXPathObject;
|
typedef struct _xmlXPathObject xmlXPathObject;
|
||||||
typedef xmlXPathObject *xmlXPathObjectPtr;
|
typedef xmlXPathObject *xmlXPathObjectPtr;
|
||||||
|
/**
|
||||||
|
* An XPath object
|
||||||
|
*/
|
||||||
struct _xmlXPathObject {
|
struct _xmlXPathObject {
|
||||||
|
/** object type */
|
||||||
xmlXPathObjectType type;
|
xmlXPathObjectType type;
|
||||||
|
/** node set */
|
||||||
xmlNodeSetPtr nodesetval;
|
xmlNodeSetPtr nodesetval;
|
||||||
|
/** boolean */
|
||||||
int boolval;
|
int boolval;
|
||||||
|
/** number */
|
||||||
double floatval;
|
double floatval;
|
||||||
|
/** string */
|
||||||
xmlChar *stringval;
|
xmlChar *stringval;
|
||||||
void *user;
|
void *user;
|
||||||
int index;
|
int index;
|
||||||
@@ -126,21 +136,11 @@ struct _xmlXPathObject {
|
|||||||
int index2;
|
int index2;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @param obj an XPath object
|
|
||||||
* @param type the number of the target type
|
|
||||||
*
|
|
||||||
* A conversion function is associated to a type and used to cast
|
|
||||||
* the new type to primitive values.
|
|
||||||
*
|
|
||||||
* @returns -1 in case of error, 0 otherwise
|
|
||||||
*/
|
|
||||||
typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extra type: a name and a conversion function.
|
* unused
|
||||||
*/
|
*/
|
||||||
|
typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
|
||||||
typedef struct _xmlXPathType xmlXPathType;
|
typedef struct _xmlXPathType xmlXPathType;
|
||||||
typedef xmlXPathType *xmlXPathTypePtr;
|
typedef xmlXPathType *xmlXPathTypePtr;
|
||||||
struct _xmlXPathType {
|
struct _xmlXPathType {
|
||||||
@@ -149,9 +149,8 @@ struct _xmlXPathType {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extra variable: a name and a value.
|
* unused
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _xmlXPathVariable xmlXPathVariable;
|
typedef struct _xmlXPathVariable xmlXPathVariable;
|
||||||
typedef xmlXPathVariable *xmlXPathVariablePtr;
|
typedef xmlXPathVariable *xmlXPathVariablePtr;
|
||||||
struct _xmlXPathVariable {
|
struct _xmlXPathVariable {
|
||||||
@@ -159,20 +158,11 @@ struct _xmlXPathVariable {
|
|||||||
xmlXPathObjectPtr value; /* the value */
|
xmlXPathObjectPtr value; /* the value */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @param ctxt an XPath parser context
|
* unused
|
||||||
* @param nargs the number of arguments passed to the function
|
|
||||||
*
|
|
||||||
* An XPath evaluation function, the parameters are on the XPath context stack.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
|
typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
|
||||||
int nargs);
|
int nargs);
|
||||||
|
|
||||||
/*
|
|
||||||
* Extra function: a name and a evaluation function.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _xmlXPathFunct xmlXPathFunct;
|
typedef struct _xmlXPathFunct xmlXPathFunct;
|
||||||
typedef xmlXPathFunct *xmlXPathFuncPtr;
|
typedef xmlXPathFunct *xmlXPathFuncPtr;
|
||||||
struct _xmlXPathFunct {
|
struct _xmlXPathFunct {
|
||||||
@@ -180,24 +170,11 @@ struct _xmlXPathFunct {
|
|||||||
xmlXPathEvalFunc func; /* the evaluation function */
|
xmlXPathEvalFunc func; /* the evaluation function */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* @param ctxt the XPath interpreter context
|
* unused
|
||||||
* @param cur the previous node being explored on that axis
|
|
||||||
*
|
|
||||||
* An axis traversal function. To traverse an axis, the engine calls
|
|
||||||
* the first time with cur == NULL and repeat until the function returns
|
|
||||||
* NULL indicating the end of the axis traversal.
|
|
||||||
*
|
|
||||||
* @returns the next node in that axis or NULL if at the end of the axis.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
|
typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
|
||||||
xmlXPathObjectPtr cur);
|
xmlXPathObjectPtr cur);
|
||||||
|
|
||||||
/*
|
|
||||||
* Extra axis: a name and an axis function.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _xmlXPathAxis xmlXPathAxis;
|
typedef struct _xmlXPathAxis xmlXPathAxis;
|
||||||
typedef xmlXPathAxis *xmlXPathAxisPtr;
|
typedef xmlXPathAxis *xmlXPathAxisPtr;
|
||||||
struct _xmlXPathAxis {
|
struct _xmlXPathAxis {
|
||||||
@@ -265,7 +242,6 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
|
|||||||
#define XML_XPATH_NOVAR (1<<1)
|
#define XML_XPATH_NOVAR (1<<1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Expression evaluation occurs with respect to a context.
|
* Expression evaluation occurs with respect to a context.
|
||||||
* he context consists of:
|
* he context consists of:
|
||||||
* - a node (the context node)
|
* - a node (the context node)
|
||||||
@@ -279,71 +255,98 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
|
|||||||
* for an XPath evaluation so you may need to initialize it again
|
* for an XPath evaluation so you may need to initialize it again
|
||||||
* before the next call.
|
* before the next call.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _xmlXPathContext {
|
struct _xmlXPathContext {
|
||||||
xmlDocPtr doc; /* The current document */
|
/** The current document */
|
||||||
xmlNodePtr node; /* The current node */
|
xmlDocPtr doc;
|
||||||
|
/** The current node */
|
||||||
|
xmlNodePtr node;
|
||||||
|
|
||||||
int nb_variables_unused; /* unused (hash table) */
|
/* unused (hash table) */
|
||||||
int max_variables_unused; /* unused (hash table) */
|
int nb_variables_unused;
|
||||||
xmlHashTablePtr varHash; /* Hash table of defined variables */
|
/* unused (hash table) */
|
||||||
|
int max_variables_unused;
|
||||||
|
/* Hash table of defined variables */
|
||||||
|
xmlHashTablePtr varHash;
|
||||||
|
|
||||||
int nb_types; /* number of defined types */
|
/* number of defined types */
|
||||||
int max_types; /* max number of types */
|
int nb_types;
|
||||||
xmlXPathTypePtr types; /* Array of defined types */
|
/* max number of types */
|
||||||
|
int max_types;
|
||||||
|
/* Array of defined types */
|
||||||
|
xmlXPathTypePtr types;
|
||||||
|
|
||||||
int nb_funcs_unused; /* unused (hash table) */
|
/* unused (hash table) */
|
||||||
int max_funcs_unused; /* unused (hash table) */
|
int nb_funcs_unused;
|
||||||
xmlHashTablePtr funcHash; /* Hash table of defined funcs */
|
/* unused (hash table) */
|
||||||
|
int max_funcs_unused;
|
||||||
|
/* Hash table of defined funcs */
|
||||||
|
xmlHashTablePtr funcHash;
|
||||||
|
|
||||||
int nb_axis; /* number of defined axis */
|
/* number of defined axis */
|
||||||
int max_axis; /* max number of axis */
|
int nb_axis;
|
||||||
xmlXPathAxisPtr axis; /* Array of defined axis */
|
/* max number of axis */
|
||||||
|
int max_axis;
|
||||||
|
/* Array of defined axis */
|
||||||
|
xmlXPathAxisPtr axis;
|
||||||
|
|
||||||
/* the namespace nodes of the context node */
|
/* Array of namespaces */
|
||||||
xmlNsPtr *namespaces; /* Array of namespaces */
|
xmlNsPtr *namespaces;
|
||||||
int nsNr; /* number of namespace in scope */
|
/* number of namespace in scope */
|
||||||
void *user; /* function to free */
|
int nsNr;
|
||||||
|
/* function to free */
|
||||||
|
void *user;
|
||||||
|
|
||||||
/* extra variables */
|
/** the context size */
|
||||||
int contextSize; /* the context size */
|
int contextSize;
|
||||||
int proximityPosition; /* the proximity position */
|
/** the proximity position */
|
||||||
|
int proximityPosition;
|
||||||
|
|
||||||
/* extra stuff for XPointer */
|
/* is this an XPointer context? */
|
||||||
int xptr; /* is this an XPointer context? */
|
int xptr;
|
||||||
xmlNodePtr here; /* for here() */
|
/* for here() */
|
||||||
xmlNodePtr origin; /* for origin() */
|
xmlNodePtr here;
|
||||||
|
/* for origin() */
|
||||||
|
xmlNodePtr origin;
|
||||||
|
|
||||||
/* the set of namespace declarations in scope for the expression */
|
/* The namespaces hash table */
|
||||||
xmlHashTablePtr nsHash; /* The namespaces hash table */
|
xmlHashTablePtr nsHash;
|
||||||
xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
|
/* variable lookup func */
|
||||||
void *varLookupData; /* variable lookup data */
|
xmlXPathVariableLookupFunc varLookupFunc;
|
||||||
|
/* variable lookup data */
|
||||||
|
void *varLookupData;
|
||||||
|
|
||||||
/* Possibility to link in an extra item */
|
/* needed for XSLT */
|
||||||
void *extra; /* needed for XSLT */
|
void *extra;
|
||||||
|
|
||||||
/* The function name and URI when calling a function */
|
/* The function name when calling a function */
|
||||||
const xmlChar *function;
|
const xmlChar *function;
|
||||||
|
/* The namespace URI when calling a function */
|
||||||
const xmlChar *functionURI;
|
const xmlChar *functionURI;
|
||||||
|
|
||||||
/* function lookup function and data */
|
/* function lookup func */
|
||||||
xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
|
xmlXPathFuncLookupFunc funcLookupFunc;
|
||||||
void *funcLookupData; /* function lookup data */
|
/* function lookup data */
|
||||||
|
void *funcLookupData;
|
||||||
|
|
||||||
/* temporary namespace lists kept for walking the namespace axis */
|
/* Array of temp namespaces */
|
||||||
xmlNsPtr *tmpNsList; /* Array of namespaces */
|
xmlNsPtr *tmpNsList;
|
||||||
int tmpNsNr; /* number of namespaces in scope */
|
/* number of namespaces in scope */
|
||||||
|
int tmpNsNr;
|
||||||
|
|
||||||
/* error reporting mechanism */
|
/* user specific data block */
|
||||||
void *userData; /* user specific data block */
|
void *userData;
|
||||||
xmlStructuredErrorFunc error; /* the callback in case of errors */
|
/* the callback in case of errors */
|
||||||
xmlError lastError; /* the last error */
|
xmlStructuredErrorFunc error;
|
||||||
xmlNodePtr debugNode; /* the source node XSLT */
|
/* the last error */
|
||||||
|
xmlError lastError;
|
||||||
|
/* the source node XSLT */
|
||||||
|
xmlNodePtr debugNode;
|
||||||
|
|
||||||
/* dictionary */
|
/* dictionary if any */
|
||||||
xmlDictPtr dict; /* dictionary if any */
|
xmlDictPtr dict;
|
||||||
|
|
||||||
int flags; /* flags to control compilation */
|
/** flags to control compilation */
|
||||||
|
int flags;
|
||||||
|
|
||||||
/* Cache for reusal of XPath objects */
|
/* Cache for reusal of XPath objects */
|
||||||
void *cache;
|
void *cache;
|
||||||
@@ -362,27 +365,38 @@ typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
|
|||||||
typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
|
typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* An XPath parser context. It contains pure parsing information,
|
* An XPath parser context. It contains pure parsing information,
|
||||||
* an xmlXPathContext, and the stack of objects.
|
* an xmlXPathContext, and the stack of objects.
|
||||||
*/
|
*/
|
||||||
struct _xmlXPathParserContext {
|
struct _xmlXPathParserContext {
|
||||||
const xmlChar *cur; /* the current char being parsed */
|
/* the current char being parsed */
|
||||||
const xmlChar *base; /* the full expression */
|
const xmlChar *cur;
|
||||||
|
/* the full expression */
|
||||||
|
const xmlChar *base;
|
||||||
|
|
||||||
int error; /* error code */
|
/** error code */
|
||||||
|
int error;
|
||||||
|
|
||||||
xmlXPathContextPtr context; /* the evaluation context */
|
/** the evaluation context */
|
||||||
xmlXPathObjectPtr value; /* the current value */
|
xmlXPathContextPtr context;
|
||||||
int valueNr; /* number of values stacked */
|
/** the current value */
|
||||||
int valueMax; /* max number of values stacked */
|
xmlXPathObjectPtr value;
|
||||||
xmlXPathObjectPtr *valueTab; /* stack of values */
|
/* number of values stacked */
|
||||||
|
int valueNr;
|
||||||
|
/* max number of values stacked */
|
||||||
|
int valueMax;
|
||||||
|
/* stack of values */
|
||||||
|
xmlXPathObjectPtr *valueTab;
|
||||||
|
|
||||||
xmlXPathCompExprPtr comp; /* the precompiled expression */
|
/* the precompiled expression */
|
||||||
int xptr; /* it this an XPointer expression */
|
xmlXPathCompExprPtr comp;
|
||||||
xmlNodePtr ancestor; /* used for walking preceding axis */
|
/* it this an XPointer expression */
|
||||||
|
int xptr;
|
||||||
|
/* used for walking preceding axis */
|
||||||
|
xmlNodePtr ancestor;
|
||||||
|
|
||||||
int valueFrame; /* always zero for compatibility */
|
/* always zero for compatibility */
|
||||||
|
int valueFrame;
|
||||||
};
|
};
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
Reference in New Issue
Block a user