ReactOS  0.4.14-dev-55-g2da92ac
schematron.h
Go to the documentation of this file.
1 /*
2  * Summary: XML Schemastron implementation
3  * Description: interface to the XML Schematron validity checking.
4  *
5  * Copy: See Copyright for the status of this software.
6  *
7  * Author: Daniel Veillard
8  */
9 
10 
11 #ifndef __XML_SCHEMATRON_H__
12 #define __XML_SCHEMATRON_H__
13 
14 #include <libxml/xmlversion.h>
15 
16 #ifdef LIBXML_SCHEMATRON_ENABLED
17 
18 #include <libxml/tree.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef enum {
25  XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
26  XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
27  XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
28  XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
29  XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
30  XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
31  XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
32 } xmlSchematronValidOptions;
33 
37 typedef struct _xmlSchematron xmlSchematron;
38 typedef xmlSchematron *xmlSchematronPtr;
39 
48 typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
49 
58 typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
59 
63 typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
64 typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
65 
66 typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
67 typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
68 
69 /*
70  * Interfaces for parsing.
71  */
72 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
73  xmlSchematronNewParserCtxt (const char *URL);
74 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
75  xmlSchematronNewMemParserCtxt(const char *buffer,
76  int size);
77 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
78  xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
79 XMLPUBFUN void XMLCALL
80  xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
81 /*****
82 XMLPUBFUN void XMLCALL
83  xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
84  xmlSchematronValidityErrorFunc err,
85  xmlSchematronValidityWarningFunc warn,
86  void *ctx);
87 XMLPUBFUN int XMLCALL
88  xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
89  xmlSchematronValidityErrorFunc * err,
90  xmlSchematronValidityWarningFunc * warn,
91  void **ctx);
92 XMLPUBFUN int XMLCALL
93  xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
94  *****/
95 XMLPUBFUN xmlSchematronPtr XMLCALL
96  xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
97 XMLPUBFUN void XMLCALL
98  xmlSchematronFree (xmlSchematronPtr schema);
99 /*
100  * Interfaces for validating
101  */
102 XMLPUBFUN void XMLCALL
103  xmlSchematronSetValidStructuredErrors(
104  xmlSchematronValidCtxtPtr ctxt,
105  xmlStructuredErrorFunc serror,
106  void *ctx);
107 /******
108 XMLPUBFUN void XMLCALL
109  xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
110  xmlSchematronValidityErrorFunc err,
111  xmlSchematronValidityWarningFunc warn,
112  void *ctx);
113 XMLPUBFUN int XMLCALL
114  xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
115  xmlSchematronValidityErrorFunc *err,
116  xmlSchematronValidityWarningFunc *warn,
117  void **ctx);
118 XMLPUBFUN int XMLCALL
119  xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
120  int options);
121 XMLPUBFUN int XMLCALL
122  xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
123 XMLPUBFUN int XMLCALL
124  xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
125  xmlNodePtr elem);
126  *******/
127 
128 XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
129  xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
130  int options);
131 XMLPUBFUN void XMLCALL
132  xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
133 XMLPUBFUN int XMLCALL
134  xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* LIBXML_SCHEMATRON_ENABLED */
142 #endif /* __XML_SCHEMATRON_H__ */
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLuint buffer
Definition: glext.h:5915
#define XMLPUBFUN
Definition: xmlexports.h:30
GLsizeiptr size
Definition: glext.h:5919
static HINSTANCE instance
Definition: main.c:40
const WCHAR * schema
Definition: tree.h:551
#define msg(x)
Definition: auth_time.c:54
#define XMLCALL