Viewing file: libxml-xmlschemas.html (26.96 KB) -rw-r--r-- Select action/file-type: (+ ) | (+ ) | (+ ) | Code (+ ) | Session (+ ) | (+ ) | SDB (+ ) | (+ ) | (+ ) | (+ ) | (+ ) | (+ ) |xmlschemas Synopsis
enum xmlSchemaValidError ;
struct xmlSchema ;
typedef xmlSchemaPtr ;
void (*xmlSchemaValidityErrorFunc ) (void *ctx,
const char *msg,
...);
void (*xmlSchemaValidityWarningFunc ) (void *ctx,
const char *msg,
...);
struct xmlSchemaParserCtxt ;
typedef xmlSchemaParserCtxtPtr ;
struct xmlSchemaValidCtxt ;
typedef xmlSchemaValidCtxtPtr ;
xmlSchemaParserCtxtPtr xmlSchemaNewParserCtxt
(const char *URL);
void xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
void xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
xmlSchemaPtr xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
void xmlSchemaFree (xmlSchemaPtr schema);
void xmlSchemaDump (FILE *output,
xmlSchemaPtr schema);
void xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
xmlSchemaValidCtxtPtr xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
void xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
int xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance);
int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void *user_data);
Details enum xmlSchemaValidErrortypedef enum {
XML_SCHEMAS_ERR_OK = 0,
XML_SCHEMAS_ERR_NOROOT = 1,
XML_SCHEMAS_ERR_UNDECLAREDELEM,
XML_SCHEMAS_ERR_NOTTOPLEVEL,
XML_SCHEMAS_ERR_MISSING,
XML_SCHEMAS_ERR_WRONGELEM,
XML_SCHEMAS_ERR_NOTYPE,
XML_SCHEMAS_ERR_NOROLLBACK,
XML_SCHEMAS_ERR_ISABSTRACT,
XML_SCHEMAS_ERR_NOTEMPTY,
XML_SCHEMAS_ERR_ELEMCONT,
XML_SCHEMAS_ERR_HAVEDEFAULT,
XML_SCHEMAS_ERR_NOTNILLABLE,
XML_SCHEMAS_ERR_EXTRACONTENT,
XML_SCHEMAS_ERR_INVALIDATTR,
XML_SCHEMAS_ERR_INVALIDELEM,
XML_SCHEMAS_ERR_NOTDETERMINIST,
XML_SCHEMAS_ERR_CONSTRUCT,
XML_SCHEMAS_ERR_INTERNAL,
XML_SCHEMAS_ERR_NOTSIMPLE,
XML_SCHEMAS_ERR_ATTRUNKNOWN,
XML_SCHEMAS_ERR_ATTRINVALID,
XML_SCHEMAS_ERR_,
XML_SCHEMAS_ERR_XXX
} xmlSchemaValidError;
struct xmlSchemastruct xmlSchema {
xmlChar *name; /* schema name */
xmlChar *targetNamespace; /* the target namespace */
xmlChar *version;
xmlChar *id;
xmlDocPtr doc;
xmlSchemaAnnotPtr annot;
int flags;
xmlHashTablePtr typeDecl;
xmlHashTablePtr attrDecl;
xmlHashTablePtr attrgrpDecl;
xmlHashTablePtr elemDecl;
xmlHashTablePtr notaDecl;
};
xmlSchemaPtrtypedef xmlSchema *xmlSchemaPtr;
xmlSchemaValidityErrorFunc ()void (*xmlSchemaValidityErrorFunc) (void *ctx,
const char *msg,
...);
xmlSchemaValidityWarningFunc ()void (*xmlSchemaValidityWarningFunc) (void *ctx,
const char *msg,
...);
struct xmlSchemaParserCtxtstruct xmlSchemaParserCtxt;
xmlSchemaParserCtxtPtrtypedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
struct xmlSchemaValidCtxtstruct xmlSchemaValidCtxt;
A Schemas validation context
xmlSchemaValidCtxtPtrtypedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
xmlSchemaNewParserCtxt ()Create an XML Schemas parse context for that file/resource expected
to contain an XML Schemas file.
xmlSchemaFreeParserCtxt ()Free the resources associated to the schema parser context
xmlSchemaSetParserErrors ()
xmlSchemaParse ()Load, XML parse a schema definition resource and build an internal
XML Shema struture which can be used to validate instances.
*WARNING* this interface is highly subject to change
xmlSchemaFree ()Deallocate a Schema structure.
xmlSchemaDump ()Dump a Schema structure.
xmlSchemaSetValidErrors ()Set the error and warning callback informations
xmlSchemaNewValidCtxt ()Create an XML Schemas validation context based on the given schema
xmlSchemaFreeValidCtxt ()Free the resources associated to the schema validation context
xmlSchemaValidateDoc ()Validate a document tree in memory.
xmlSchemaValidateStream ()Validate a document tree in memory.