Paul Cercueil / libxml2

Dependents:   libiio

Committer:
pcercuei
Date:
Thu Aug 25 10:05:35 2016 +0000
Revision:
0:03b5121a232e
Add basic C files of libxml2 2.9.4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pcercuei 0:03b5121a232e 1 /*
pcercuei 0:03b5121a232e 2 * Summary: The DTD validation
pcercuei 0:03b5121a232e 3 * Description: API for the DTD handling and the validity checking
pcercuei 0:03b5121a232e 4 *
pcercuei 0:03b5121a232e 5 * Copy: See Copyright for the status of this software.
pcercuei 0:03b5121a232e 6 *
pcercuei 0:03b5121a232e 7 * Author: Daniel Veillard
pcercuei 0:03b5121a232e 8 */
pcercuei 0:03b5121a232e 9
pcercuei 0:03b5121a232e 10
pcercuei 0:03b5121a232e 11 #ifndef __XML_VALID_H__
pcercuei 0:03b5121a232e 12 #define __XML_VALID_H__
pcercuei 0:03b5121a232e 13
pcercuei 0:03b5121a232e 14 #include <libxml/xmlversion.h>
pcercuei 0:03b5121a232e 15 #include <libxml/xmlerror.h>
pcercuei 0:03b5121a232e 16 #include <libxml/tree.h>
pcercuei 0:03b5121a232e 17 #include <libxml/list.h>
pcercuei 0:03b5121a232e 18 #include <libxml/xmlautomata.h>
pcercuei 0:03b5121a232e 19 #include <libxml/xmlregexp.h>
pcercuei 0:03b5121a232e 20
pcercuei 0:03b5121a232e 21 #ifdef __cplusplus
pcercuei 0:03b5121a232e 22 extern "C" {
pcercuei 0:03b5121a232e 23 #endif
pcercuei 0:03b5121a232e 24
pcercuei 0:03b5121a232e 25 /*
pcercuei 0:03b5121a232e 26 * Validation state added for non-determinist content model.
pcercuei 0:03b5121a232e 27 */
pcercuei 0:03b5121a232e 28 typedef struct _xmlValidState xmlValidState;
pcercuei 0:03b5121a232e 29 typedef xmlValidState *xmlValidStatePtr;
pcercuei 0:03b5121a232e 30
pcercuei 0:03b5121a232e 31 /**
pcercuei 0:03b5121a232e 32 * xmlValidityErrorFunc:
pcercuei 0:03b5121a232e 33 * @ctx: usually an xmlValidCtxtPtr to a validity error context,
pcercuei 0:03b5121a232e 34 * but comes from ctxt->userData (which normally contains such
pcercuei 0:03b5121a232e 35 * a pointer); ctxt->userData can be changed by the user.
pcercuei 0:03b5121a232e 36 * @msg: the string to format *printf like vararg
pcercuei 0:03b5121a232e 37 * @...: remaining arguments to the format
pcercuei 0:03b5121a232e 38 *
pcercuei 0:03b5121a232e 39 * Callback called when a validity error is found. This is a message
pcercuei 0:03b5121a232e 40 * oriented function similar to an *printf function.
pcercuei 0:03b5121a232e 41 */
pcercuei 0:03b5121a232e 42 typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
pcercuei 0:03b5121a232e 43 const char *msg,
pcercuei 0:03b5121a232e 44 ...) LIBXML_ATTR_FORMAT(2,3);
pcercuei 0:03b5121a232e 45
pcercuei 0:03b5121a232e 46 /**
pcercuei 0:03b5121a232e 47 * xmlValidityWarningFunc:
pcercuei 0:03b5121a232e 48 * @ctx: usually an xmlValidCtxtPtr to a validity error context,
pcercuei 0:03b5121a232e 49 * but comes from ctxt->userData (which normally contains such
pcercuei 0:03b5121a232e 50 * a pointer); ctxt->userData can be changed by the user.
pcercuei 0:03b5121a232e 51 * @msg: the string to format *printf like vararg
pcercuei 0:03b5121a232e 52 * @...: remaining arguments to the format
pcercuei 0:03b5121a232e 53 *
pcercuei 0:03b5121a232e 54 * Callback called when a validity warning is found. This is a message
pcercuei 0:03b5121a232e 55 * oriented function similar to an *printf function.
pcercuei 0:03b5121a232e 56 */
pcercuei 0:03b5121a232e 57 typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
pcercuei 0:03b5121a232e 58 const char *msg,
pcercuei 0:03b5121a232e 59 ...) LIBXML_ATTR_FORMAT(2,3);
pcercuei 0:03b5121a232e 60
pcercuei 0:03b5121a232e 61 #ifdef IN_LIBXML
pcercuei 0:03b5121a232e 62 /**
pcercuei 0:03b5121a232e 63 * XML_CTXT_FINISH_DTD_0:
pcercuei 0:03b5121a232e 64 *
pcercuei 0:03b5121a232e 65 * Special value for finishDtd field when embedded in an xmlParserCtxt
pcercuei 0:03b5121a232e 66 */
pcercuei 0:03b5121a232e 67 #define XML_CTXT_FINISH_DTD_0 0xabcd1234
pcercuei 0:03b5121a232e 68 /**
pcercuei 0:03b5121a232e 69 * XML_CTXT_FINISH_DTD_1:
pcercuei 0:03b5121a232e 70 *
pcercuei 0:03b5121a232e 71 * Special value for finishDtd field when embedded in an xmlParserCtxt
pcercuei 0:03b5121a232e 72 */
pcercuei 0:03b5121a232e 73 #define XML_CTXT_FINISH_DTD_1 0xabcd1235
pcercuei 0:03b5121a232e 74 #endif
pcercuei 0:03b5121a232e 75
pcercuei 0:03b5121a232e 76 /*
pcercuei 0:03b5121a232e 77 * xmlValidCtxt:
pcercuei 0:03b5121a232e 78 * An xmlValidCtxt is used for error reporting when validating.
pcercuei 0:03b5121a232e 79 */
pcercuei 0:03b5121a232e 80 typedef struct _xmlValidCtxt xmlValidCtxt;
pcercuei 0:03b5121a232e 81 typedef xmlValidCtxt *xmlValidCtxtPtr;
pcercuei 0:03b5121a232e 82 struct _xmlValidCtxt {
pcercuei 0:03b5121a232e 83 void *userData; /* user specific data block */
pcercuei 0:03b5121a232e 84 xmlValidityErrorFunc error; /* the callback in case of errors */
pcercuei 0:03b5121a232e 85 xmlValidityWarningFunc warning; /* the callback in case of warning */
pcercuei 0:03b5121a232e 86
pcercuei 0:03b5121a232e 87 /* Node analysis stack used when validating within entities */
pcercuei 0:03b5121a232e 88 xmlNodePtr node; /* Current parsed Node */
pcercuei 0:03b5121a232e 89 int nodeNr; /* Depth of the parsing stack */
pcercuei 0:03b5121a232e 90 int nodeMax; /* Max depth of the parsing stack */
pcercuei 0:03b5121a232e 91 xmlNodePtr *nodeTab; /* array of nodes */
pcercuei 0:03b5121a232e 92
pcercuei 0:03b5121a232e 93 unsigned int finishDtd; /* finished validating the Dtd ? */
pcercuei 0:03b5121a232e 94 xmlDocPtr doc; /* the document */
pcercuei 0:03b5121a232e 95 int valid; /* temporary validity check result */
pcercuei 0:03b5121a232e 96
pcercuei 0:03b5121a232e 97 /* state state used for non-determinist content validation */
pcercuei 0:03b5121a232e 98 xmlValidState *vstate; /* current state */
pcercuei 0:03b5121a232e 99 int vstateNr; /* Depth of the validation stack */
pcercuei 0:03b5121a232e 100 int vstateMax; /* Max depth of the validation stack */
pcercuei 0:03b5121a232e 101 xmlValidState *vstateTab; /* array of validation states */
pcercuei 0:03b5121a232e 102
pcercuei 0:03b5121a232e 103 #ifdef LIBXML_REGEXP_ENABLED
pcercuei 0:03b5121a232e 104 xmlAutomataPtr am; /* the automata */
pcercuei 0:03b5121a232e 105 xmlAutomataStatePtr state; /* used to build the automata */
pcercuei 0:03b5121a232e 106 #else
pcercuei 0:03b5121a232e 107 void *am;
pcercuei 0:03b5121a232e 108 void *state;
pcercuei 0:03b5121a232e 109 #endif
pcercuei 0:03b5121a232e 110 };
pcercuei 0:03b5121a232e 111
pcercuei 0:03b5121a232e 112 /*
pcercuei 0:03b5121a232e 113 * ALL notation declarations are stored in a table.
pcercuei 0:03b5121a232e 114 * There is one table per DTD.
pcercuei 0:03b5121a232e 115 */
pcercuei 0:03b5121a232e 116
pcercuei 0:03b5121a232e 117 typedef struct _xmlHashTable xmlNotationTable;
pcercuei 0:03b5121a232e 118 typedef xmlNotationTable *xmlNotationTablePtr;
pcercuei 0:03b5121a232e 119
pcercuei 0:03b5121a232e 120 /*
pcercuei 0:03b5121a232e 121 * ALL element declarations are stored in a table.
pcercuei 0:03b5121a232e 122 * There is one table per DTD.
pcercuei 0:03b5121a232e 123 */
pcercuei 0:03b5121a232e 124
pcercuei 0:03b5121a232e 125 typedef struct _xmlHashTable xmlElementTable;
pcercuei 0:03b5121a232e 126 typedef xmlElementTable *xmlElementTablePtr;
pcercuei 0:03b5121a232e 127
pcercuei 0:03b5121a232e 128 /*
pcercuei 0:03b5121a232e 129 * ALL attribute declarations are stored in a table.
pcercuei 0:03b5121a232e 130 * There is one table per DTD.
pcercuei 0:03b5121a232e 131 */
pcercuei 0:03b5121a232e 132
pcercuei 0:03b5121a232e 133 typedef struct _xmlHashTable xmlAttributeTable;
pcercuei 0:03b5121a232e 134 typedef xmlAttributeTable *xmlAttributeTablePtr;
pcercuei 0:03b5121a232e 135
pcercuei 0:03b5121a232e 136 /*
pcercuei 0:03b5121a232e 137 * ALL IDs attributes are stored in a table.
pcercuei 0:03b5121a232e 138 * There is one table per document.
pcercuei 0:03b5121a232e 139 */
pcercuei 0:03b5121a232e 140
pcercuei 0:03b5121a232e 141 typedef struct _xmlHashTable xmlIDTable;
pcercuei 0:03b5121a232e 142 typedef xmlIDTable *xmlIDTablePtr;
pcercuei 0:03b5121a232e 143
pcercuei 0:03b5121a232e 144 /*
pcercuei 0:03b5121a232e 145 * ALL Refs attributes are stored in a table.
pcercuei 0:03b5121a232e 146 * There is one table per document.
pcercuei 0:03b5121a232e 147 */
pcercuei 0:03b5121a232e 148
pcercuei 0:03b5121a232e 149 typedef struct _xmlHashTable xmlRefTable;
pcercuei 0:03b5121a232e 150 typedef xmlRefTable *xmlRefTablePtr;
pcercuei 0:03b5121a232e 151
pcercuei 0:03b5121a232e 152 /* Notation */
pcercuei 0:03b5121a232e 153 XMLPUBFUN xmlNotationPtr XMLCALL
pcercuei 0:03b5121a232e 154 xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 155 xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 156 const xmlChar *name,
pcercuei 0:03b5121a232e 157 const xmlChar *PublicID,
pcercuei 0:03b5121a232e 158 const xmlChar *SystemID);
pcercuei 0:03b5121a232e 159 #ifdef LIBXML_TREE_ENABLED
pcercuei 0:03b5121a232e 160 XMLPUBFUN xmlNotationTablePtr XMLCALL
pcercuei 0:03b5121a232e 161 xmlCopyNotationTable (xmlNotationTablePtr table);
pcercuei 0:03b5121a232e 162 #endif /* LIBXML_TREE_ENABLED */
pcercuei 0:03b5121a232e 163 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 164 xmlFreeNotationTable (xmlNotationTablePtr table);
pcercuei 0:03b5121a232e 165 #ifdef LIBXML_OUTPUT_ENABLED
pcercuei 0:03b5121a232e 166 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 167 xmlDumpNotationDecl (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 168 xmlNotationPtr nota);
pcercuei 0:03b5121a232e 169 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 170 xmlDumpNotationTable (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 171 xmlNotationTablePtr table);
pcercuei 0:03b5121a232e 172 #endif /* LIBXML_OUTPUT_ENABLED */
pcercuei 0:03b5121a232e 173
pcercuei 0:03b5121a232e 174 /* Element Content */
pcercuei 0:03b5121a232e 175 /* the non Doc version are being deprecated */
pcercuei 0:03b5121a232e 176 XMLPUBFUN xmlElementContentPtr XMLCALL
pcercuei 0:03b5121a232e 177 xmlNewElementContent (const xmlChar *name,
pcercuei 0:03b5121a232e 178 xmlElementContentType type);
pcercuei 0:03b5121a232e 179 XMLPUBFUN xmlElementContentPtr XMLCALL
pcercuei 0:03b5121a232e 180 xmlCopyElementContent (xmlElementContentPtr content);
pcercuei 0:03b5121a232e 181 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 182 xmlFreeElementContent (xmlElementContentPtr cur);
pcercuei 0:03b5121a232e 183 /* the new versions with doc argument */
pcercuei 0:03b5121a232e 184 XMLPUBFUN xmlElementContentPtr XMLCALL
pcercuei 0:03b5121a232e 185 xmlNewDocElementContent (xmlDocPtr doc,
pcercuei 0:03b5121a232e 186 const xmlChar *name,
pcercuei 0:03b5121a232e 187 xmlElementContentType type);
pcercuei 0:03b5121a232e 188 XMLPUBFUN xmlElementContentPtr XMLCALL
pcercuei 0:03b5121a232e 189 xmlCopyDocElementContent(xmlDocPtr doc,
pcercuei 0:03b5121a232e 190 xmlElementContentPtr content);
pcercuei 0:03b5121a232e 191 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 192 xmlFreeDocElementContent(xmlDocPtr doc,
pcercuei 0:03b5121a232e 193 xmlElementContentPtr cur);
pcercuei 0:03b5121a232e 194 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 195 xmlSnprintfElementContent(char *buf,
pcercuei 0:03b5121a232e 196 int size,
pcercuei 0:03b5121a232e 197 xmlElementContentPtr content,
pcercuei 0:03b5121a232e 198 int englob);
pcercuei 0:03b5121a232e 199 #ifdef LIBXML_OUTPUT_ENABLED
pcercuei 0:03b5121a232e 200 /* DEPRECATED */
pcercuei 0:03b5121a232e 201 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 202 xmlSprintfElementContent(char *buf,
pcercuei 0:03b5121a232e 203 xmlElementContentPtr content,
pcercuei 0:03b5121a232e 204 int englob);
pcercuei 0:03b5121a232e 205 #endif /* LIBXML_OUTPUT_ENABLED */
pcercuei 0:03b5121a232e 206 /* DEPRECATED */
pcercuei 0:03b5121a232e 207
pcercuei 0:03b5121a232e 208 /* Element */
pcercuei 0:03b5121a232e 209 XMLPUBFUN xmlElementPtr XMLCALL
pcercuei 0:03b5121a232e 210 xmlAddElementDecl (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 211 xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 212 const xmlChar *name,
pcercuei 0:03b5121a232e 213 xmlElementTypeVal type,
pcercuei 0:03b5121a232e 214 xmlElementContentPtr content);
pcercuei 0:03b5121a232e 215 #ifdef LIBXML_TREE_ENABLED
pcercuei 0:03b5121a232e 216 XMLPUBFUN xmlElementTablePtr XMLCALL
pcercuei 0:03b5121a232e 217 xmlCopyElementTable (xmlElementTablePtr table);
pcercuei 0:03b5121a232e 218 #endif /* LIBXML_TREE_ENABLED */
pcercuei 0:03b5121a232e 219 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 220 xmlFreeElementTable (xmlElementTablePtr table);
pcercuei 0:03b5121a232e 221 #ifdef LIBXML_OUTPUT_ENABLED
pcercuei 0:03b5121a232e 222 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 223 xmlDumpElementTable (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 224 xmlElementTablePtr table);
pcercuei 0:03b5121a232e 225 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 226 xmlDumpElementDecl (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 227 xmlElementPtr elem);
pcercuei 0:03b5121a232e 228 #endif /* LIBXML_OUTPUT_ENABLED */
pcercuei 0:03b5121a232e 229
pcercuei 0:03b5121a232e 230 /* Enumeration */
pcercuei 0:03b5121a232e 231 XMLPUBFUN xmlEnumerationPtr XMLCALL
pcercuei 0:03b5121a232e 232 xmlCreateEnumeration (const xmlChar *name);
pcercuei 0:03b5121a232e 233 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 234 xmlFreeEnumeration (xmlEnumerationPtr cur);
pcercuei 0:03b5121a232e 235 #ifdef LIBXML_TREE_ENABLED
pcercuei 0:03b5121a232e 236 XMLPUBFUN xmlEnumerationPtr XMLCALL
pcercuei 0:03b5121a232e 237 xmlCopyEnumeration (xmlEnumerationPtr cur);
pcercuei 0:03b5121a232e 238 #endif /* LIBXML_TREE_ENABLED */
pcercuei 0:03b5121a232e 239
pcercuei 0:03b5121a232e 240 /* Attribute */
pcercuei 0:03b5121a232e 241 XMLPUBFUN xmlAttributePtr XMLCALL
pcercuei 0:03b5121a232e 242 xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 243 xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 244 const xmlChar *elem,
pcercuei 0:03b5121a232e 245 const xmlChar *name,
pcercuei 0:03b5121a232e 246 const xmlChar *ns,
pcercuei 0:03b5121a232e 247 xmlAttributeType type,
pcercuei 0:03b5121a232e 248 xmlAttributeDefault def,
pcercuei 0:03b5121a232e 249 const xmlChar *defaultValue,
pcercuei 0:03b5121a232e 250 xmlEnumerationPtr tree);
pcercuei 0:03b5121a232e 251 #ifdef LIBXML_TREE_ENABLED
pcercuei 0:03b5121a232e 252 XMLPUBFUN xmlAttributeTablePtr XMLCALL
pcercuei 0:03b5121a232e 253 xmlCopyAttributeTable (xmlAttributeTablePtr table);
pcercuei 0:03b5121a232e 254 #endif /* LIBXML_TREE_ENABLED */
pcercuei 0:03b5121a232e 255 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 256 xmlFreeAttributeTable (xmlAttributeTablePtr table);
pcercuei 0:03b5121a232e 257 #ifdef LIBXML_OUTPUT_ENABLED
pcercuei 0:03b5121a232e 258 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 259 xmlDumpAttributeTable (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 260 xmlAttributeTablePtr table);
pcercuei 0:03b5121a232e 261 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 262 xmlDumpAttributeDecl (xmlBufferPtr buf,
pcercuei 0:03b5121a232e 263 xmlAttributePtr attr);
pcercuei 0:03b5121a232e 264 #endif /* LIBXML_OUTPUT_ENABLED */
pcercuei 0:03b5121a232e 265
pcercuei 0:03b5121a232e 266 /* IDs */
pcercuei 0:03b5121a232e 267 XMLPUBFUN xmlIDPtr XMLCALL
pcercuei 0:03b5121a232e 268 xmlAddID (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 269 xmlDocPtr doc,
pcercuei 0:03b5121a232e 270 const xmlChar *value,
pcercuei 0:03b5121a232e 271 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 272 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 273 xmlFreeIDTable (xmlIDTablePtr table);
pcercuei 0:03b5121a232e 274 XMLPUBFUN xmlAttrPtr XMLCALL
pcercuei 0:03b5121a232e 275 xmlGetID (xmlDocPtr doc,
pcercuei 0:03b5121a232e 276 const xmlChar *ID);
pcercuei 0:03b5121a232e 277 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 278 xmlIsID (xmlDocPtr doc,
pcercuei 0:03b5121a232e 279 xmlNodePtr elem,
pcercuei 0:03b5121a232e 280 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 281 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 282 xmlRemoveID (xmlDocPtr doc,
pcercuei 0:03b5121a232e 283 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 284
pcercuei 0:03b5121a232e 285 /* IDREFs */
pcercuei 0:03b5121a232e 286 XMLPUBFUN xmlRefPtr XMLCALL
pcercuei 0:03b5121a232e 287 xmlAddRef (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 288 xmlDocPtr doc,
pcercuei 0:03b5121a232e 289 const xmlChar *value,
pcercuei 0:03b5121a232e 290 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 291 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 292 xmlFreeRefTable (xmlRefTablePtr table);
pcercuei 0:03b5121a232e 293 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 294 xmlIsRef (xmlDocPtr doc,
pcercuei 0:03b5121a232e 295 xmlNodePtr elem,
pcercuei 0:03b5121a232e 296 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 297 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 298 xmlRemoveRef (xmlDocPtr doc,
pcercuei 0:03b5121a232e 299 xmlAttrPtr attr);
pcercuei 0:03b5121a232e 300 XMLPUBFUN xmlListPtr XMLCALL
pcercuei 0:03b5121a232e 301 xmlGetRefs (xmlDocPtr doc,
pcercuei 0:03b5121a232e 302 const xmlChar *ID);
pcercuei 0:03b5121a232e 303
pcercuei 0:03b5121a232e 304 /**
pcercuei 0:03b5121a232e 305 * The public function calls related to validity checking.
pcercuei 0:03b5121a232e 306 */
pcercuei 0:03b5121a232e 307 #ifdef LIBXML_VALID_ENABLED
pcercuei 0:03b5121a232e 308 /* Allocate/Release Validation Contexts */
pcercuei 0:03b5121a232e 309 XMLPUBFUN xmlValidCtxtPtr XMLCALL
pcercuei 0:03b5121a232e 310 xmlNewValidCtxt(void);
pcercuei 0:03b5121a232e 311 XMLPUBFUN void XMLCALL
pcercuei 0:03b5121a232e 312 xmlFreeValidCtxt(xmlValidCtxtPtr);
pcercuei 0:03b5121a232e 313
pcercuei 0:03b5121a232e 314 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 315 xmlValidateRoot (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 316 xmlDocPtr doc);
pcercuei 0:03b5121a232e 317 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 318 xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 319 xmlDocPtr doc,
pcercuei 0:03b5121a232e 320 xmlElementPtr elem);
pcercuei 0:03b5121a232e 321 XMLPUBFUN xmlChar * XMLCALL
pcercuei 0:03b5121a232e 322 xmlValidNormalizeAttributeValue(xmlDocPtr doc,
pcercuei 0:03b5121a232e 323 xmlNodePtr elem,
pcercuei 0:03b5121a232e 324 const xmlChar *name,
pcercuei 0:03b5121a232e 325 const xmlChar *value);
pcercuei 0:03b5121a232e 326 XMLPUBFUN xmlChar * XMLCALL
pcercuei 0:03b5121a232e 327 xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 328 xmlDocPtr doc,
pcercuei 0:03b5121a232e 329 xmlNodePtr elem,
pcercuei 0:03b5121a232e 330 const xmlChar *name,
pcercuei 0:03b5121a232e 331 const xmlChar *value);
pcercuei 0:03b5121a232e 332 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 333 xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 334 xmlDocPtr doc,
pcercuei 0:03b5121a232e 335 xmlAttributePtr attr);
pcercuei 0:03b5121a232e 336 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 337 xmlValidateAttributeValue(xmlAttributeType type,
pcercuei 0:03b5121a232e 338 const xmlChar *value);
pcercuei 0:03b5121a232e 339 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 340 xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 341 xmlDocPtr doc,
pcercuei 0:03b5121a232e 342 xmlNotationPtr nota);
pcercuei 0:03b5121a232e 343 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 344 xmlValidateDtd (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 345 xmlDocPtr doc,
pcercuei 0:03b5121a232e 346 xmlDtdPtr dtd);
pcercuei 0:03b5121a232e 347 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 348 xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 349 xmlDocPtr doc);
pcercuei 0:03b5121a232e 350 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 351 xmlValidateDocument (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 352 xmlDocPtr doc);
pcercuei 0:03b5121a232e 353 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 354 xmlValidateElement (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 355 xmlDocPtr doc,
pcercuei 0:03b5121a232e 356 xmlNodePtr elem);
pcercuei 0:03b5121a232e 357 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 358 xmlValidateOneElement (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 359 xmlDocPtr doc,
pcercuei 0:03b5121a232e 360 xmlNodePtr elem);
pcercuei 0:03b5121a232e 361 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 362 xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 363 xmlDocPtr doc,
pcercuei 0:03b5121a232e 364 xmlNodePtr elem,
pcercuei 0:03b5121a232e 365 xmlAttrPtr attr,
pcercuei 0:03b5121a232e 366 const xmlChar *value);
pcercuei 0:03b5121a232e 367 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 368 xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 369 xmlDocPtr doc,
pcercuei 0:03b5121a232e 370 xmlNodePtr elem,
pcercuei 0:03b5121a232e 371 const xmlChar *prefix,
pcercuei 0:03b5121a232e 372 xmlNsPtr ns,
pcercuei 0:03b5121a232e 373 const xmlChar *value);
pcercuei 0:03b5121a232e 374 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 375 xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 376 xmlDocPtr doc);
pcercuei 0:03b5121a232e 377 #endif /* LIBXML_VALID_ENABLED */
pcercuei 0:03b5121a232e 378
pcercuei 0:03b5121a232e 379 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
pcercuei 0:03b5121a232e 380 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 381 xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 382 xmlDocPtr doc,
pcercuei 0:03b5121a232e 383 const xmlChar *notationName);
pcercuei 0:03b5121a232e 384 #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
pcercuei 0:03b5121a232e 385
pcercuei 0:03b5121a232e 386 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 387 xmlIsMixedElement (xmlDocPtr doc,
pcercuei 0:03b5121a232e 388 const xmlChar *name);
pcercuei 0:03b5121a232e 389 XMLPUBFUN xmlAttributePtr XMLCALL
pcercuei 0:03b5121a232e 390 xmlGetDtdAttrDesc (xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 391 const xmlChar *elem,
pcercuei 0:03b5121a232e 392 const xmlChar *name);
pcercuei 0:03b5121a232e 393 XMLPUBFUN xmlAttributePtr XMLCALL
pcercuei 0:03b5121a232e 394 xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 395 const xmlChar *elem,
pcercuei 0:03b5121a232e 396 const xmlChar *name,
pcercuei 0:03b5121a232e 397 const xmlChar *prefix);
pcercuei 0:03b5121a232e 398 XMLPUBFUN xmlNotationPtr XMLCALL
pcercuei 0:03b5121a232e 399 xmlGetDtdNotationDesc (xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 400 const xmlChar *name);
pcercuei 0:03b5121a232e 401 XMLPUBFUN xmlElementPtr XMLCALL
pcercuei 0:03b5121a232e 402 xmlGetDtdQElementDesc (xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 403 const xmlChar *name,
pcercuei 0:03b5121a232e 404 const xmlChar *prefix);
pcercuei 0:03b5121a232e 405 XMLPUBFUN xmlElementPtr XMLCALL
pcercuei 0:03b5121a232e 406 xmlGetDtdElementDesc (xmlDtdPtr dtd,
pcercuei 0:03b5121a232e 407 const xmlChar *name);
pcercuei 0:03b5121a232e 408
pcercuei 0:03b5121a232e 409 #ifdef LIBXML_VALID_ENABLED
pcercuei 0:03b5121a232e 410
pcercuei 0:03b5121a232e 411 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 412 xmlValidGetPotentialChildren(xmlElementContent *ctree,
pcercuei 0:03b5121a232e 413 const xmlChar **names,
pcercuei 0:03b5121a232e 414 int *len,
pcercuei 0:03b5121a232e 415 int max);
pcercuei 0:03b5121a232e 416
pcercuei 0:03b5121a232e 417 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 418 xmlValidGetValidElements(xmlNode *prev,
pcercuei 0:03b5121a232e 419 xmlNode *next,
pcercuei 0:03b5121a232e 420 const xmlChar **names,
pcercuei 0:03b5121a232e 421 int max);
pcercuei 0:03b5121a232e 422 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 423 xmlValidateNameValue (const xmlChar *value);
pcercuei 0:03b5121a232e 424 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 425 xmlValidateNamesValue (const xmlChar *value);
pcercuei 0:03b5121a232e 426 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 427 xmlValidateNmtokenValue (const xmlChar *value);
pcercuei 0:03b5121a232e 428 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 429 xmlValidateNmtokensValue(const xmlChar *value);
pcercuei 0:03b5121a232e 430
pcercuei 0:03b5121a232e 431 #ifdef LIBXML_REGEXP_ENABLED
pcercuei 0:03b5121a232e 432 /*
pcercuei 0:03b5121a232e 433 * Validation based on the regexp support
pcercuei 0:03b5121a232e 434 */
pcercuei 0:03b5121a232e 435 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 436 xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 437 xmlElementPtr elem);
pcercuei 0:03b5121a232e 438
pcercuei 0:03b5121a232e 439 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 440 xmlValidatePushElement (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 441 xmlDocPtr doc,
pcercuei 0:03b5121a232e 442 xmlNodePtr elem,
pcercuei 0:03b5121a232e 443 const xmlChar *qname);
pcercuei 0:03b5121a232e 444 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 445 xmlValidatePushCData (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 446 const xmlChar *data,
pcercuei 0:03b5121a232e 447 int len);
pcercuei 0:03b5121a232e 448 XMLPUBFUN int XMLCALL
pcercuei 0:03b5121a232e 449 xmlValidatePopElement (xmlValidCtxtPtr ctxt,
pcercuei 0:03b5121a232e 450 xmlDocPtr doc,
pcercuei 0:03b5121a232e 451 xmlNodePtr elem,
pcercuei 0:03b5121a232e 452 const xmlChar *qname);
pcercuei 0:03b5121a232e 453 #endif /* LIBXML_REGEXP_ENABLED */
pcercuei 0:03b5121a232e 454 #endif /* LIBXML_VALID_ENABLED */
pcercuei 0:03b5121a232e 455 #ifdef __cplusplus
pcercuei 0:03b5121a232e 456 }
pcercuei 0:03b5121a232e 457 #endif
pcercuei 0:03b5121a232e 458 #endif /* __XML_VALID_H__ */
pcercuei 0:03b5121a232e 459