ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

xmlschemas.h
Go to the documentation of this file.
00001 /*
00002  * Summary: incomplete XML Schemas structure implementation
00003  * Description: interface to the XML Schemas handling and schema validity
00004  *              checking, it is incomplete right now.
00005  *
00006  * Copy: See Copyright for the status of this software.
00007  *
00008  * Author: Daniel Veillard
00009  */
00010 
00011 
00012 #ifndef __XML_SCHEMA_H__
00013 #define __XML_SCHEMA_H__
00014 
00015 #include <libxml/xmlversion.h>
00016 
00017 #ifdef LIBXML_SCHEMAS_ENABLED
00018 
00019 #include <libxml/tree.h>
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00028 typedef enum {
00029     XML_SCHEMAS_ERR_OK      = 0,
00030     XML_SCHEMAS_ERR_NOROOT  = 1,
00031     XML_SCHEMAS_ERR_UNDECLAREDELEM,
00032     XML_SCHEMAS_ERR_NOTTOPLEVEL,
00033     XML_SCHEMAS_ERR_MISSING,
00034     XML_SCHEMAS_ERR_WRONGELEM,
00035     XML_SCHEMAS_ERR_NOTYPE,
00036     XML_SCHEMAS_ERR_NOROLLBACK,
00037     XML_SCHEMAS_ERR_ISABSTRACT,
00038     XML_SCHEMAS_ERR_NOTEMPTY,
00039     XML_SCHEMAS_ERR_ELEMCONT,
00040     XML_SCHEMAS_ERR_HAVEDEFAULT,
00041     XML_SCHEMAS_ERR_NOTNILLABLE,
00042     XML_SCHEMAS_ERR_EXTRACONTENT,
00043     XML_SCHEMAS_ERR_INVALIDATTR,
00044     XML_SCHEMAS_ERR_INVALIDELEM,
00045     XML_SCHEMAS_ERR_NOTDETERMINIST,
00046     XML_SCHEMAS_ERR_CONSTRUCT,
00047     XML_SCHEMAS_ERR_INTERNAL,
00048     XML_SCHEMAS_ERR_NOTSIMPLE,
00049     XML_SCHEMAS_ERR_ATTRUNKNOWN,
00050     XML_SCHEMAS_ERR_ATTRINVALID,
00051     XML_SCHEMAS_ERR_VALUE,
00052     XML_SCHEMAS_ERR_FACET,
00053     XML_SCHEMAS_ERR_,
00054     XML_SCHEMAS_ERR_XXX
00055 } xmlSchemaValidError;
00056 
00057 /*
00058 * ATTENTION: Change xmlSchemaSetValidOptions's check
00059 * for invalid values, if adding to the validation
00060 * options below.
00061 */
00067 typedef enum {
00068     XML_SCHEMA_VAL_VC_I_CREATE          = 1<<0
00069     /* Default/fixed: create an attribute node
00070     * or an element's text node on the instance.
00071     */
00072 } xmlSchemaValidOption;
00073 
00074 /*
00075     XML_SCHEMA_VAL_XSI_ASSEMBLE         = 1<<1,
00076     * assemble schemata using
00077     * xsi:schemaLocation and
00078     * xsi:noNamespaceSchemaLocation
00079 */
00080 
00084 typedef struct _xmlSchema xmlSchema;
00085 typedef xmlSchema *xmlSchemaPtr;
00086 
00095 typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
00096 
00105 typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
00106 
00110 typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
00111 typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
00112 
00113 typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
00114 typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
00115 
00116 /*
00117  * Interfaces for parsing.
00118  */
00119 XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
00120         xmlSchemaNewParserCtxt  (const char *URL);
00121 XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
00122         xmlSchemaNewMemParserCtxt   (const char *buffer,
00123                      int size);
00124 XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
00125         xmlSchemaNewDocParserCtxt   (xmlDocPtr doc);
00126 XMLPUBFUN void XMLCALL
00127         xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
00128 XMLPUBFUN void XMLCALL
00129         xmlSchemaSetParserErrors    (xmlSchemaParserCtxtPtr ctxt,
00130                      xmlSchemaValidityErrorFunc err,
00131                      xmlSchemaValidityWarningFunc warn,
00132                      void *ctx);
00133 XMLPUBFUN void XMLCALL
00134         xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
00135                      xmlStructuredErrorFunc serror,
00136                      void *ctx);
00137 XMLPUBFUN int XMLCALL
00138         xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
00139                     xmlSchemaValidityErrorFunc * err,
00140                     xmlSchemaValidityWarningFunc * warn,
00141                     void **ctx);
00142 XMLPUBFUN int XMLCALL
00143         xmlSchemaIsValid    (xmlSchemaValidCtxtPtr ctxt);
00144 
00145 XMLPUBFUN xmlSchemaPtr XMLCALL
00146         xmlSchemaParse      (xmlSchemaParserCtxtPtr ctxt);
00147 XMLPUBFUN void XMLCALL
00148         xmlSchemaFree       (xmlSchemaPtr schema);
00149 #ifdef LIBXML_OUTPUT_ENABLED
00150 XMLPUBFUN void XMLCALL
00151         xmlSchemaDump       (FILE *output,
00152                      xmlSchemaPtr schema);
00153 #endif /* LIBXML_OUTPUT_ENABLED */
00154 /*
00155  * Interfaces for validating
00156  */
00157 XMLPUBFUN void XMLCALL
00158         xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
00159                      xmlSchemaValidityErrorFunc err,
00160                      xmlSchemaValidityWarningFunc warn,
00161                      void *ctx);
00162 XMLPUBFUN void XMLCALL
00163         xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
00164                      xmlStructuredErrorFunc serror,
00165                      void *ctx);
00166 XMLPUBFUN int XMLCALL
00167         xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
00168                      xmlSchemaValidityErrorFunc *err,
00169                      xmlSchemaValidityWarningFunc *warn,
00170                      void **ctx);
00171 XMLPUBFUN int XMLCALL
00172         xmlSchemaSetValidOptions    (xmlSchemaValidCtxtPtr ctxt,
00173                      int options);
00174 XMLPUBFUN int XMLCALL
00175         xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
00176 
00177 XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
00178         xmlSchemaNewValidCtxt   (xmlSchemaPtr schema);
00179 XMLPUBFUN void XMLCALL
00180         xmlSchemaFreeValidCtxt  (xmlSchemaValidCtxtPtr ctxt);
00181 XMLPUBFUN int XMLCALL
00182         xmlSchemaValidateDoc    (xmlSchemaValidCtxtPtr ctxt,
00183                      xmlDocPtr instance);
00184 XMLPUBFUN int XMLCALL
00185             xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
00186                              xmlNodePtr elem);
00187 XMLPUBFUN int XMLCALL
00188         xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
00189                      xmlParserInputBufferPtr input,
00190                      xmlCharEncoding enc,
00191                      xmlSAXHandlerPtr sax,
00192                      void *user_data);
00193 XMLPUBFUN int XMLCALL
00194         xmlSchemaValidateFile   (xmlSchemaValidCtxtPtr ctxt,
00195                      const char * filename,
00196                      int options);
00197 
00198 XMLPUBFUN xmlParserCtxtPtr XMLCALL
00199         xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
00200 
00201 /*
00202  * Interface to insert Schemas SAX validation in a SAX stream
00203  */
00204 typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
00205 typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
00206 
00207 XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
00208             xmlSchemaSAXPlug        (xmlSchemaValidCtxtPtr ctxt,
00209                      xmlSAXHandlerPtr *sax,
00210                      void **user_data);
00211 XMLPUBFUN int XMLCALL
00212             xmlSchemaSAXUnplug      (xmlSchemaSAXPlugPtr plug);
00213 #ifdef __cplusplus
00214 }
00215 #endif
00216 
00217 #endif /* LIBXML_SCHEMAS_ENABLED */
00218 #endif /* __XML_SCHEMA_H__ */

Generated on Sun May 27 2012 04:33:15 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.