Annotation of XML/schema.h, revision 1.1
1.1 ! veillard 1: /*
! 2: * schema.h : interface to the XML Schema handling and schema validity checking
! 3: *
! 4: * See Copyright for the status of this software.
! 5: *
! 6: * Daniel.Veillard@w3.org
! 7: */
! 8:
! 9:
! 10: #ifndef __XML_SCHEMA_H__
! 11: #define __XML_SCHEMA_H__
! 12:
! 13: #include <libxml/tree.h>
! 14:
! 15: #ifdef __cplusplus
! 16: extern "C" {
! 17: #endif
! 18:
! 19:
! 20: /**
! 21: * The schemas related types are kept internal
! 22: */
! 23: typedef struct _xmlSchema xmlSchema;
! 24: typedef xmlSchema *xmlSchemaPtr;
! 25:
! 26: /**
! 27: * A schemas validation context
! 28: */
! 29: typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...);
! 30: typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...);
! 31:
! 32: typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
! 33: typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
! 34: struct _xmlSchemaValidCtxt {
! 35: void *userData; /* user specific data block */
! 36: xmlSchemaValidityErrorFunc error; /* the callback in case of errors */
! 37: xmlSchemaValidityWarningFunc warning;/* the callback in case of warning */
! 38:
! 39: xmlSchemaPtr schema; /* The schema in use */
! 40:
! 41: /* Node analysis stack used when validating within entities */
! 42: xmlNodePtr node; /* Current parsed Node */
! 43: int nodeNr; /* Depth of the parsing stack */
! 44: int nodeMax; /* Max depth of the parsing stack */
! 45: xmlNodePtr *nodeTab; /* array of nodes */
! 46: };
! 47:
! 48: /*
! 49: * Interfaces
! 50: */
! 51: xmlSchemaPtr xmlSchemaLoad (xmlSchemaValidCtxtPtr ctxt,
! 52: const char *URL);
! 53: void xmlSchemaFree (xmlSchemaPtr schema);
! 54: int xmlSchemaValidate (xmlSchemaValidCtxtPtr ctxt,
! 55: xmlNodePtr instance,
! 56: xmlSchemaPtr schema);
! 57: #ifdef __cplusplus
! 58: }
! 59: #endif
! 60: #endif /* __XML_SCHEMA_H__ */
Webmaster