ReactOS 0.4.15-dev-7834-g00c4b3d
schematron.h
Go to the documentation of this file.
1/*
2 * Summary: XML Schematron 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
21extern "C" {
22#endif
23
24typedef 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
37typedef struct _xmlSchematron xmlSchematron;
38typedef xmlSchematron *xmlSchematronPtr;
39
48typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
49
58typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
59
63typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
64typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
65
66typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
67typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
68
69/*
70 * Interfaces for parsing.
71 */
72XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
73 xmlSchematronNewParserCtxt (const char *URL);
74XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
75 xmlSchematronNewMemParserCtxt(const char *buffer,
76 int size);
77XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
78 xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
80 xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
81/*****
82XMLPUBFUN void XMLCALL
83 xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
84 xmlSchematronValidityErrorFunc err,
85 xmlSchematronValidityWarningFunc warn,
86 void *ctx);
87XMLPUBFUN int XMLCALL
88 xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
89 xmlSchematronValidityErrorFunc * err,
90 xmlSchematronValidityWarningFunc * warn,
91 void **ctx);
92XMLPUBFUN int XMLCALL
93 xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
94 *****/
95XMLPUBFUN xmlSchematronPtr XMLCALL
96 xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
98 xmlSchematronFree (xmlSchematronPtr schema);
99/*
100 * Interfaces for validating
101 */
103 xmlSchematronSetValidStructuredErrors(
104 xmlSchematronValidCtxtPtr ctxt,
106 void *ctx);
107/******
108XMLPUBFUN void XMLCALL
109 xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
110 xmlSchematronValidityErrorFunc err,
111 xmlSchematronValidityWarningFunc warn,
112 void *ctx);
113XMLPUBFUN int XMLCALL
114 xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
115 xmlSchematronValidityErrorFunc *err,
116 xmlSchematronValidityWarningFunc *warn,
117 void **ctx);
118XMLPUBFUN int XMLCALL
119 xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
120 int options);
121XMLPUBFUN int XMLCALL
122 xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
123XMLPUBFUN int XMLCALL
124 xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
125 xmlNodePtr elem);
126 *******/
127
128XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
129 xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
130 int options);
132 xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
134 xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
136
137#ifdef __cplusplus
138}
139#endif
140
141#endif /* LIBXML_SCHEMATRON_ENABLED */
142#endif /* __XML_SCHEMATRON_H__ */
#define msg(x)
Definition: auth_time.c:54
static HINSTANCE instance
Definition: main.c:40
#define XMLCALL
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915
const WCHAR * schema
Definition: tree.h:551
void(XMLCDECL *) typedef void(XMLCALL * xmlStructuredErrorFunc)(void *userData, xmlErrorPtr error)
Definition: xmlerror.h:858
#define XMLPUBFUN
Definition: xmlexports.h:61