File indexing completed on 2025-02-22 10:41:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef __XML_SCHEMATRON_H__
0012 #define __XML_SCHEMATRON_H__
0013
0014 #include <libxml/xmlversion.h>
0015
0016 #ifdef LIBXML_SCHEMATRON_ENABLED
0017
0018 #include <libxml/xmlerror.h>
0019 #include <libxml/tree.h>
0020
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024
0025 typedef enum {
0026 XML_SCHEMATRON_OUT_QUIET = 1 << 0,
0027 XML_SCHEMATRON_OUT_TEXT = 1 << 1,
0028 XML_SCHEMATRON_OUT_XML = 1 << 2,
0029 XML_SCHEMATRON_OUT_ERROR = 1 << 3,
0030 XML_SCHEMATRON_OUT_FILE = 1 << 8,
0031 XML_SCHEMATRON_OUT_BUFFER = 1 << 9,
0032 XML_SCHEMATRON_OUT_IO = 1 << 10
0033 } xmlSchematronValidOptions;
0034
0035
0036
0037
0038 typedef struct _xmlSchematron xmlSchematron;
0039 typedef xmlSchematron *xmlSchematronPtr;
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
0060
0061
0062
0063
0064 typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
0065 typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
0066
0067 typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
0068 typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
0069
0070
0071
0072
0073 XMLPUBFUN xmlSchematronParserCtxtPtr
0074 xmlSchematronNewParserCtxt (const char *URL);
0075 XMLPUBFUN xmlSchematronParserCtxtPtr
0076 xmlSchematronNewMemParserCtxt(const char *buffer,
0077 int size);
0078 XMLPUBFUN xmlSchematronParserCtxtPtr
0079 xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
0080 XMLPUBFUN void
0081 xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096 XMLPUBFUN xmlSchematronPtr
0097 xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
0098 XMLPUBFUN void
0099 xmlSchematronFree (xmlSchematronPtr schema);
0100
0101
0102
0103 XMLPUBFUN void
0104 xmlSchematronSetValidStructuredErrors(
0105 xmlSchematronValidCtxtPtr ctxt,
0106 xmlStructuredErrorFunc serror,
0107 void *ctx);
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129 XMLPUBFUN xmlSchematronValidCtxtPtr
0130 xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
0131 int options);
0132 XMLPUBFUN void
0133 xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
0134 XMLPUBFUN int
0135 xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
0136 xmlDocPtr instance);
0137
0138 #ifdef __cplusplus
0139 }
0140 #endif
0141
0142 #endif
0143 #endif