epoc32/include/stdapis/libxml2/libxml2_xmlschemas.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_xmlschemas.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,130 @@
     1.4 +/*
     1.5 + * Summary: incomplete XML Schemas structure implementation
     1.6 + * Description: interface to the XML Schemas handling and schema validity
     1.7 + *              checking, it is incomplete right now.
     1.8 + *
     1.9 + * Copy: See Copyright for the status of this software.
    1.10 + *
    1.11 + * Author: Daniel Veillard
    1.12 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    1.13 + */
    1.14 +
    1.15 +/** @file
    1.16 +@publishedAll
    1.17 +@released
    1.18 +*/
    1.19 +
    1.20 +#ifndef XML_SCHEMA_H
    1.21 +#define XML_SCHEMA_H
    1.22 +
    1.23 +#include <stdapis/libxml2/libxml2_xmlversion.h>
    1.24 +
    1.25 +#ifdef LIBXML_SCHEMAS_ENABLED
    1.26 +
    1.27 +#include <stdapis/libxml2/libxml2_tree.h>
    1.28 +
    1.29 +#ifdef __cplusplus
    1.30 +extern "C" {
    1.31 +#endif
    1.32 +
    1.33 +typedef enum {
    1.34 +    XML_SCHEMAS_ERR_OK          = 0,
    1.35 +    XML_SCHEMAS_ERR_NOROOT      = 1,
    1.36 +    XML_SCHEMAS_ERR_UNDECLAREDELEM,
    1.37 +    XML_SCHEMAS_ERR_NOTTOPLEVEL,
    1.38 +    XML_SCHEMAS_ERR_MISSING,
    1.39 +    XML_SCHEMAS_ERR_WRONGELEM,
    1.40 +    XML_SCHEMAS_ERR_NOTYPE,
    1.41 +    XML_SCHEMAS_ERR_NOROLLBACK,
    1.42 +    XML_SCHEMAS_ERR_ISABSTRACT,
    1.43 +    XML_SCHEMAS_ERR_NOTEMPTY,
    1.44 +    XML_SCHEMAS_ERR_ELEMCONT,
    1.45 +    XML_SCHEMAS_ERR_HAVEDEFAULT,
    1.46 +    XML_SCHEMAS_ERR_NOTNILLABLE,
    1.47 +    XML_SCHEMAS_ERR_EXTRACONTENT,
    1.48 +    XML_SCHEMAS_ERR_INVALIDATTR,
    1.49 +    XML_SCHEMAS_ERR_INVALIDELEM,
    1.50 +    XML_SCHEMAS_ERR_NOTDETERMINIST,
    1.51 +    XML_SCHEMAS_ERR_CONSTRUCT,
    1.52 +    XML_SCHEMAS_ERR_INTERNAL,
    1.53 +    XML_SCHEMAS_ERR_NOTSIMPLE,
    1.54 +    XML_SCHEMAS_ERR_ATTRUNKNOWN,
    1.55 +    XML_SCHEMAS_ERR_ATTRINVALID,
    1.56 +    XML_SCHEMAS_ERR_VALUE,
    1.57 +    XML_SCHEMAS_ERR_FACET,
    1.58 +    XML_SCHEMAS_ERR_,
    1.59 +    XML_SCHEMAS_ERR_XXX
    1.60 +} xmlSchemaValidError;
    1.61 +
    1.62 +
    1.63 +/**
    1.64 + * The schemas related types are kept internal
    1.65 + */
    1.66 +typedef struct _xmlSchema xmlSchema;
    1.67 +typedef xmlSchema *xmlSchemaPtr;
    1.68 +
    1.69 +/**
    1.70 + * A schemas validation context
    1.71 + */
    1.72 +typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
    1.73 +typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
    1.74 +
    1.75 +typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
    1.76 +typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
    1.77 +
    1.78 +typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
    1.79 +typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
    1.80 +
    1.81 +/*
    1.82 + * Interfaces for parsing.
    1.83 + */
    1.84 +XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
    1.85 +            xmlSchemaNewParserCtxt      (const char *URL);
    1.86 +XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
    1.87 +            xmlSchemaNewMemParserCtxt   (const char *buffer,
    1.88 +                                         int size);
    1.89 +XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
    1.90 +            xmlSchemaNewDocParserCtxt   (xmlDocPtr doc);
    1.91 +XMLPUBFUN void XMLCALL
    1.92 +            xmlSchemaFreeParserCtxt     (xmlSchemaParserCtxtPtr ctxt);
    1.93 +XMLPUBFUN void XMLCALL
    1.94 +            xmlSchemaSetParserErrors    (xmlSchemaParserCtxtPtr ctxt,
    1.95 +                                         xmlSchemaValidityErrorFunc err,
    1.96 +                                         xmlSchemaValidityWarningFunc warn,
    1.97 +                                         void *ctx);
    1.98 +XMLPUBFUN xmlSchemaPtr XMLCALL
    1.99 +            xmlSchemaParse              (xmlSchemaParserCtxtPtr ctxt);
   1.100 +XMLPUBFUN void XMLCALL
   1.101 +            xmlSchemaFree               (xmlSchemaPtr schema);
   1.102 +#ifdef LIBXML_OUTPUT_ENABLED
   1.103 +XMLPUBFUN void XMLCALL
   1.104 +            xmlSchemaDump               (FILE *output,
   1.105 +                                         xmlSchemaPtr schema);
   1.106 +#endif /* LIBXML_OUTPUT_ENABLED */
   1.107 +/*
   1.108 + * Interfaces for validating
   1.109 + */
   1.110 +XMLPUBFUN void XMLCALL
   1.111 +            xmlSchemaSetValidErrors     (xmlSchemaValidCtxtPtr ctxt,
   1.112 +                                         xmlSchemaValidityErrorFunc err,
   1.113 +                                         xmlSchemaValidityWarningFunc warn,
   1.114 +                                         void *ctx);
   1.115 +XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
   1.116 +            xmlSchemaNewValidCtxt       (xmlSchemaPtr schema);
   1.117 +XMLPUBFUN void XMLCALL
   1.118 +            xmlSchemaFreeValidCtxt      (xmlSchemaValidCtxtPtr ctxt);
   1.119 +XMLPUBFUN int XMLCALL
   1.120 +            xmlSchemaValidateDoc        (xmlSchemaValidCtxtPtr ctxt,
   1.121 +                                         xmlDocPtr instance);
   1.122 +XMLPUBFUN int XMLCALL
   1.123 +            xmlSchemaValidateStream     (xmlSchemaValidCtxtPtr ctxt,
   1.124 +                                         xmlParserInputBufferPtr input,
   1.125 +                                         xmlCharEncoding enc,
   1.126 +                                         xmlSAXHandlerPtr sax,
   1.127 +                                         void *user_data);
   1.128 +#ifdef __cplusplus
   1.129 +}
   1.130 +#endif
   1.131 +
   1.132 +#endif /* LIBXML_SCHEMAS_ENABLED */
   1.133 +#endif /* XML_SCHEMA_H */