diff options
author | Mike Hommey <glandium@debian.org> | 2005-07-12 19:58:48 +0000 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2005-07-12 19:58:48 +0000 |
commit | 112cb5bb5475afec1c1cbf1d6728ce4880d0fee8 (patch) | |
tree | 6c34596134f8665ebc180f29b50915dc70bbe5c1 /include | |
parent | 0fc063df3ab2ad380d532d210dd1001de473e51b (diff) | |
download | libxml2-112cb5bb5475afec1c1cbf1d6728ce4880d0fee8.tar.gz |
Load /tmp/tmp.zfIyNk/libxml2-2.6.20 intoupstream/2.6.20
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.in | 1 | ||||
-rw-r--r-- | include/libxml/Makefile.in | 1 | ||||
-rw-r--r-- | include/libxml/parser.h | 2 | ||||
-rw-r--r-- | include/libxml/pattern.h | 16 | ||||
-rw-r--r-- | include/libxml/schemasInternals.h | 53 | ||||
-rw-r--r-- | include/libxml/tree.h | 33 | ||||
-rw-r--r-- | include/libxml/valid.h | 4 | ||||
-rw-r--r-- | include/libxml/xmlerror.h | 8 | ||||
-rw-r--r-- | include/libxml/xmlreader.h | 7 | ||||
-rw-r--r-- | include/libxml/xmlschemas.h | 24 | ||||
-rw-r--r-- | include/libxml/xmlschemastypes.h | 17 | ||||
-rw-r--r-- | include/libxml/xmlversion.h | 10 |
12 files changed, 155 insertions, 21 deletions
diff --git a/include/Makefile.in b/include/Makefile.in index 954474c..6c67be8 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -67,6 +67,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_THREAD_LIBS = @BASE_THREAD_LIBS@ C14N_OBJ = @C14N_OBJ@ CATALOG_OBJ = @CATALOG_OBJ@ CC = @CC@ diff --git a/include/libxml/Makefile.in b/include/libxml/Makefile.in index e08683a..bdcc706 100644 --- a/include/libxml/Makefile.in +++ b/include/libxml/Makefile.in @@ -71,6 +71,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_THREAD_LIBS = @BASE_THREAD_LIBS@ C14N_OBJ = @C14N_OBJ@ CATALOG_OBJ = @CATALOG_OBJ@ CC = @CC@ diff --git a/include/libxml/parser.h b/include/libxml/parser.h index e0de43f..7203ca3 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -836,10 +836,8 @@ XMLPUBFUN int XMLCALL xmlSubstituteEntitiesDefault(int val); XMLPUBFUN int XMLCALL xmlKeepBlanksDefault (int val); -#ifdef LIBXML_PUSH_ENABLED XMLPUBFUN void XMLCALL xmlStopParser (xmlParserCtxtPtr ctxt); -#endif /* LIBXML_PUSH_ENABLED */ XMLPUBFUN int XMLCALL xmlPedanticParserDefault(int val); XMLPUBFUN int XMLCALL diff --git a/include/libxml/pattern.h b/include/libxml/pattern.h index f801a37..e3ee76d 100644 --- a/include/libxml/pattern.h +++ b/include/libxml/pattern.h @@ -29,6 +29,20 @@ extern "C" { typedef struct _xmlPattern xmlPattern; typedef xmlPattern *xmlPatternPtr; +/** + * xmlPatternFlags: + * + * This is the set of options affecting the behaviour of pattern + * matching with this module + * + */ +typedef enum { + XML_PATTERN_DEFAULT = 0, /* simple pattern match */ + XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */ + XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */ + XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ +} xmlPatternFlags; + XMLPUBFUN void XMLCALL xmlFreePattern (xmlPatternPtr comp); @@ -38,7 +52,7 @@ XMLPUBFUN void XMLCALL XMLPUBFUN xmlPatternPtr XMLCALL xmlPatterncompile (const xmlChar *pattern, xmlDict *dict, - int flags, + xmlPatternFlags flags, const xmlChar **namespaces); XMLPUBFUN int XMLCALL xmlPatternMatch (xmlPatternPtr comp, diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h index 2c39a87..eb1f426 100644 --- a/include/libxml/schemasInternals.h +++ b/include/libxml/schemasInternals.h @@ -83,7 +83,7 @@ typedef enum { XML_SCHEMA_TYPE_FACET, XML_SCHEMA_TYPE_SIMPLE, XML_SCHEMA_TYPE_COMPLEX, - XML_SCHEMA_TYPE_SEQUENCE, + XML_SCHEMA_TYPE_SEQUENCE = 6, XML_SCHEMA_TYPE_CHOICE, XML_SCHEMA_TYPE_ALL, XML_SCHEMA_TYPE_SIMPLE_CONTENT, @@ -102,7 +102,7 @@ typedef enum { XML_SCHEMA_TYPE_IDC_UNIQUE, XML_SCHEMA_TYPE_IDC_KEY, XML_SCHEMA_TYPE_IDC_KEYREF, - XML_SCHEMA_TYPE_PARTICLE, + XML_SCHEMA_TYPE_PARTICLE = 25, XML_SCHEMA_FACET_MININCLUSIVE = 1000, XML_SCHEMA_FACET_MINEXCLUSIVE, XML_SCHEMA_FACET_MAXINCLUSIVE, @@ -521,7 +521,36 @@ struct _xmlSchemaFacetLink { * indicates that the type is invalid */ #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 - +/** + * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE: + * + * a whitespace-facet value of "preserve" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 +/** + * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE: + * + * a whitespace-facet value of "replace" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 +/** + * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE: + * + * a whitespace-facet value of "collapse" + */ +#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 +/** + * XML_SCHEMAS_TYPE_HAS_FACETS: + * + * has facets + */ +#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 +/** + * XML_SCHEMAS_TYPE_NORMVALUENEEDED: + * + * indicates if the facets (pattern) need a normalized value + */ +#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 /** * _xmlSchemaType: @@ -673,7 +702,19 @@ struct _xmlSchemaType { * substitution group exclusions: "restriction" */ #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 - +/** + * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD: + * + * the declaration is a substitution group head + */ +#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 +/** + * XML_SCHEMAS_ELEM_INTERNAL_CHECKED: + * + * this is set when the elem decl has been checked against + * all constraints + */ +#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 typedef struct _xmlSchemaElement xmlSchemaElement; typedef xmlSchemaElement *xmlSchemaElementPtr; @@ -699,7 +740,7 @@ struct _xmlSchemaElement { const xmlChar *substGroupNs; const xmlChar *scope; const xmlChar *value; - struct _xmlSchemaElement *refDecl; /* the element declaration if a particle */ + struct _xmlSchemaElement *refDecl; /* This will now be used for the substitution group affiliation */ xmlRegexpPtr contModel; xmlSchemaContentType contentType; const xmlChar *refPrefix; @@ -850,7 +891,7 @@ struct _xmlSchema { int preserve; /* whether to free the document */ int counter; /* used to give ononymous components unique names */ xmlHashTablePtr idcDef; - void *volatiles; /* Misc. helper items (e.g. reference items) */ + void *volatiles; /* Misc. helper items (e.g. reference items) */ }; XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 28d81e7..d995e5c 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -250,7 +250,6 @@ typedef enum { XML_ELEMENT_TYPE_ELEMENT } xmlElementTypeVal; - #ifdef __cplusplus } #endif @@ -509,6 +508,12 @@ struct _xmlDoc { void *psvi; /* for type/PSVI informations */ }; +typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; +typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; +struct _xmlDOMWrapCtxt { + void * _private; +}; + /** * xmlChildrenNode: * @@ -536,7 +541,7 @@ struct _xmlDoc { /* * Some helper functions */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) XMLPUBFUN int XMLCALL xmlValidateNCName (const xmlChar *value, int space); @@ -1114,6 +1119,30 @@ XMLPUBFUN int XMLCALL XMLPUBFUN void XMLCALL xmlSetCompressMode (int mode); +/* +* DOM-wrapper helper functions. +*/ +XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL + xmlDOMWrapNewCtxt (void); +XMLPUBFUN void XMLCALL + xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); +XMLPUBFUN int XMLCALL + xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, + xmlNodePtr elem, + int options); +XMLPUBFUN int XMLCALL + xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr sourceDoc, + xmlNodePtr node, + xmlDocPtr destDoc, + xmlNodePtr destParent, + int options); +XMLPUBFUN int XMLCALL + xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr node, + int options); + #ifdef __cplusplus } #endif diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 2e0ec3d..86e3fce 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -195,13 +195,13 @@ XMLPUBFUN void XMLCALL xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, - int glob); + int englob); #ifdef LIBXML_OUTPUT_ENABLED /* DEPRECATED */ XMLPUBFUN void XMLCALL xmlSprintfElementContent(char *buf, xmlElementContentPtr content, - int glob); + int englob); #endif /* LIBXML_OUTPUT_ENABLED */ /* DEPRECATED */ diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index 540a51e..04da1a6 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -195,10 +195,17 @@ typedef enum { XML_WAR_NS_URI, /* 99 */ XML_WAR_NS_URI_RELATIVE, /* 100 */ XML_ERR_MISSING_ENCODING, /* 101 */ + XML_WAR_SPACE_VALUE, /* 102 */ + XML_ERR_NOT_STANDALONE, /* 103 */ + XML_ERR_ENTITY_PROCESSING, /* 104 */ + XML_ERR_NOTATION_PROCESSING, /* 105 */ + XML_WAR_NS_COLUMN, /* 106 */ + XML_WAR_ENTITY_REDEFINED, /* 107 */ XML_NS_ERR_XML_NAMESPACE = 200, XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */ XML_NS_ERR_QNAME, /* 202 */ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */ + XML_NS_ERR_EMPTY, /* 204 */ XML_DTD_ATTRIBUTE_DEFAULT = 500, XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */ XML_DTD_ATTRIBUTE_VALUE, /* 502 */ @@ -752,6 +759,7 @@ typedef enum { XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */ + XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */ XML_MODULE_OPEN = 4900, /* 4900 */ XML_MODULE_CLOSE, /* 4901 */ XML_CHECK_FOUND_ELEMENT = 5000, diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h index 803f8e3..f016546 100644 --- a/include/libxml/xmlreader.h +++ b/include/libxml/xmlreader.h @@ -15,6 +15,7 @@ #include <libxml/xmlIO.h> #ifdef LIBXML_SCHEMAS_ENABLED #include <libxml/relaxng.h> +#include <libxml/xmlschemas.h> #endif #ifdef LIBXML_READER_ENABLED @@ -275,6 +276,12 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema); +XMLPUBFUN int XMLCALL + xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, + const char *xsd); +XMLPUBFUN int XMLCALL + xmlTextReaderSetSchema (xmlTextReaderPtr reader, + xmlSchemaPtr schema); #endif XMLPUBFUN const xmlChar * XMLCALL xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader); diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h index 0af2be5..6cecffd 100644 --- a/include/libxml/xmlschemas.h +++ b/include/libxml/xmlschemas.h @@ -114,10 +114,13 @@ XMLPUBFUN void XMLCALL xmlSchemaValidityWarningFunc warn, void *ctx); XMLPUBFUN int XMLCALL - xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt, + xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaValidityErrorFunc * err, xmlSchemaValidityWarningFunc * warn, void **ctx); +XMLPUBFUN int XMLCALL + xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); + XMLPUBFUN xmlSchemaPtr XMLCALL xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); XMLPUBFUN void XMLCALL @@ -156,12 +159,29 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem); -XMLPUBFUN int XMLCALL +XMLPUBFUN int XMLCALL xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc, xmlSAXHandlerPtr sax, void *user_data); +XMLPUBFUN int XMLCALL + xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt, + const char * filename, + int options); + +/* + * Interface to insert Schemas SAX velidation in a SAX stream + */ +typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct; +typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr; + +XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL + xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt, + xmlSAXHandlerPtr *sax, + void **user_data); +XMLPUBFUN int XMLCALL + xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); #ifdef __cplusplus } #endif diff --git a/include/libxml/xmlschemastypes.h b/include/libxml/xmlschemastypes.h index 18014fe..9a3a7a1 100644 --- a/include/libxml/xmlschemastypes.h +++ b/include/libxml/xmlschemastypes.h @@ -111,13 +111,28 @@ XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL xmlSchemaGetCanonValue (xmlSchemaValPtr val, const xmlChar **retValue); +XMLPUBFUN int XMLCALL + xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val, + const xmlChar **retValue, + xmlSchemaWhitespaceValueType ws); +XMLPUBFUN int XMLCALL + xmlSchemaValueAppend (xmlSchemaValPtr prev, + xmlSchemaValPtr cur); +XMLPUBFUN xmlSchemaValPtr XMLCALL + xmlSchemaValueGetNext (xmlSchemaValPtr cur); +XMLPUBFUN const xmlChar * XMLCALL + xmlSchemaValueGetAsString (xmlSchemaValPtr val); +XMLPUBFUN int XMLCALL + xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaNewStringValue (xmlSchemaValType type, const xmlChar *value); XMLPUBFUN xmlSchemaValPtr XMLCALL xmlSchemaNewNOTATIONValue (const xmlChar *name, const xmlChar *ns); - +XMLPUBFUN xmlSchemaValPtr XMLCALL + xmlSchemaNewQNameValue (const xmlChar *namespaceName, + const xmlChar *localName); XMLPUBFUN int XMLCALL xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, xmlSchemaWhitespaceValueType xws, diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h index b31beca..d6d6149 100644 --- a/include/libxml/xmlversion.h +++ b/include/libxml/xmlversion.h @@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.6.19" +#define LIBXML_DOTTED_VERSION "2.6.20" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 1002003 */ -#define LIBXML_VERSION 20619 +#define LIBXML_VERSION 20620 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "1002003" */ -#define LIBXML_VERSION_STRING "20619" +#define LIBXML_VERSION_STRING "20620" /** * LIBXML_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ -#define LIBXML_VERSION_EXTRA "-CVS2405" +#define LIBXML_VERSION_EXTRA "-CVS2521" /** * LIBXML_TEST_VERSION: @@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * Macro to check that the libxml version in use is compatible with * the version the software has been compiled against */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20619); +#define LIBXML_TEST_VERSION xmlCheckVersion(20620); #ifndef VMS #if 0 |