00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 #ifndef __XML_SCHEMATRON_H__
00012 #define __XML_SCHEMATRON_H__
00013 
00014 #include <libxml/xmlversion.h>
00015 
00016 #ifdef LIBXML_SCHEMATRON_ENABLED
00017 
00018 #include <libxml/tree.h>
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 typedef enum {
00025     XML_SCHEMATRON_OUT_QUIET = 1 << 0,  
00026     XML_SCHEMATRON_OUT_TEXT = 1 << 1,   
00027     XML_SCHEMATRON_OUT_XML = 1 << 2,    
00028     XML_SCHEMATRON_OUT_FILE = 1 << 8,   
00029     XML_SCHEMATRON_OUT_BUFFER = 1 << 9, 
00030     XML_SCHEMATRON_OUT_IO = 1 << 10 
00031 } xmlSchematronValidOptions;
00032 
00036 typedef struct _xmlSchematron xmlSchematron;
00037 typedef xmlSchematron *xmlSchematronPtr;
00038 
00042 typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
00043 typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
00044 
00045 typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
00046 typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
00047 
00048 typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
00049 typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
00050 
00051 
00052 
00053 
00054 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
00055         xmlSchematronNewParserCtxt  (const char *URL);
00056 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
00057         xmlSchematronNewMemParserCtxt(const char *buffer,
00058                      int size);
00059 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
00060         xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
00061 XMLPUBFUN void XMLCALL      
00062         xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 XMLPUBFUN xmlSchematronPtr XMLCALL  
00078         xmlSchematronParse      (xmlSchematronParserCtxtPtr ctxt);
00079 XMLPUBFUN void XMLCALL      
00080         xmlSchematronFree       (xmlSchematronPtr schema);
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL 
00111         xmlSchematronNewValidCtxt   (xmlSchematronPtr schema,
00112                          int options);
00113 XMLPUBFUN void XMLCALL          
00114         xmlSchematronFreeValidCtxt  (xmlSchematronValidCtxtPtr ctxt);
00115 XMLPUBFUN int XMLCALL           
00116         xmlSchematronValidateDoc    (xmlSchematronValidCtxtPtr ctxt,
00117                      xmlDocPtr instance);
00118 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif 
00124 #endif