Eneboo - Documentación para desarrolladores
src/libdigidoc/libxml2/include/libxml/schematron.h
Ir a la documentación de este archivo.
00001 /*
00002  * Summary: XML Schemastron implementation
00003  * Description: interface to the XML Schematron validity checking.
00004  *
00005  * Copy: See Copyright for the status of this software.
00006  *
00007  * Author: Daniel Veillard
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,  /* quiet no report */
00026     XML_SCHEMATRON_OUT_TEXT = 1 << 1,   /* build a textual report */
00027     XML_SCHEMATRON_OUT_XML = 1 << 2,    /* output SVRL */
00028     XML_SCHEMATRON_OUT_ERROR = 1 << 3,  /* output via xmlStructuredErrorFunc */
00029     XML_SCHEMATRON_OUT_FILE = 1 << 8,   /* output to a file descriptor */
00030     XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
00031     XML_SCHEMATRON_OUT_IO = 1 << 10     /* output to I/O mechanism */
00032 } xmlSchematronValidOptions;
00033 
00037 typedef struct _xmlSchematron xmlSchematron;
00038 typedef xmlSchematron *xmlSchematronPtr;
00039 
00048 typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
00049 
00058 typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
00059 
00063 typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
00064 typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
00065 
00066 typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
00067 typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
00068 
00069 /*
00070  * Interfaces for parsing.
00071  */
00072 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
00073             xmlSchematronNewParserCtxt  (const char *URL);
00074 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
00075             xmlSchematronNewMemParserCtxt(const char *buffer,
00076                                          int size);
00077 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
00078             xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
00079 XMLPUBFUN void XMLCALL          
00080             xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
00081 /*****
00082 XMLPUBFUN void XMLCALL          
00083             xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
00084                                          xmlSchematronValidityErrorFunc err,
00085                                          xmlSchematronValidityWarningFunc warn,
00086                                          void *ctx);
00087 XMLPUBFUN int XMLCALL
00088                 xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
00089                                         xmlSchematronValidityErrorFunc * err,
00090                                         xmlSchematronValidityWarningFunc * warn,
00091                                         void **ctx);
00092 XMLPUBFUN int XMLCALL
00093                 xmlSchematronIsValid    (xmlSchematronValidCtxtPtr ctxt);
00094  *****/
00095 XMLPUBFUN xmlSchematronPtr XMLCALL      
00096             xmlSchematronParse          (xmlSchematronParserCtxtPtr ctxt);
00097 XMLPUBFUN void XMLCALL          
00098             xmlSchematronFree           (xmlSchematronPtr schema);
00099 /*
00100  * Interfaces for validating
00101  */
00102 XMLPUBFUN void XMLCALL
00103             xmlSchematronSetValidStructuredErrors(
00104                                           xmlSchematronValidCtxtPtr ctxt,
00105                                           xmlStructuredErrorFunc serror,
00106                                           void *ctx);
00107 /******
00108 XMLPUBFUN void XMLCALL          
00109             xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
00110                                          xmlSchematronValidityErrorFunc err,
00111                                          xmlSchematronValidityWarningFunc warn,
00112                                          void *ctx);
00113 XMLPUBFUN int XMLCALL
00114             xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
00115                                          xmlSchematronValidityErrorFunc *err,
00116                                          xmlSchematronValidityWarningFunc *warn,
00117                                          void **ctx);
00118 XMLPUBFUN int XMLCALL
00119             xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
00120                                          int options);
00121 XMLPUBFUN int XMLCALL
00122             xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
00123 XMLPUBFUN int XMLCALL
00124             xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
00125                                          xmlNodePtr elem);
00126  *******/
00127 
00128 XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL     
00129             xmlSchematronNewValidCtxt   (xmlSchematronPtr schema,
00130                                          int options);
00131 XMLPUBFUN void XMLCALL                  
00132             xmlSchematronFreeValidCtxt  (xmlSchematronValidCtxtPtr ctxt);
00133 XMLPUBFUN int XMLCALL                   
00134             xmlSchematronValidateDoc    (xmlSchematronValidCtxtPtr ctxt,
00135                                          xmlDocPtr instance);
00136 
00137 #ifdef __cplusplus
00138 }
00139 #endif
00140 
00141 #endif /* LIBXML_SCHEMATRON_ENABLED */
00142 #endif /* __XML_SCHEMATRON_H__ */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'