1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @file
*
* Schematron API for libxml-rs
*
* Native Rust implementation — drop-in replacement for libxml2's
* schematron.h. API follows upstream libxml2 Schematron support.
*/
#ifndef __XML_SCHEMATRON_H__
#define __XML_SCHEMATRON_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlSchematron:
*
* A Schematron schema (opaque type).
*/
typedef struct _xmlSchematron *xmlSchematronPtr;
typedef xmlSchematronPtr xmlSchematron;
/**
* xmlSchematronParserCtxt:
*
* A Schematron parser context (opaque type).
*/
typedef struct _xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
typedef xmlSchematronParserCtxtPtr xmlSchematronParserCtxt;
/**
* xmlSchematronValidCtxt:
*
* A Schematron validation context (opaque type).
*/
typedef struct _xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
typedef xmlSchematronValidCtxtPtr xmlSchematronValidCtxt;
/*
* Parser functions
*/
xmlSchematronParserCtxtPtr xmlSchematronNewParserCtxt(const char *URL);
xmlSchematronParserCtxtPtr xmlSchematronNewMemParserCtxt(const char *buffer, int size);
xmlSchematronPtr xmlSchematronParse(xmlSchematronParserCtxtPtr ctxt);
void xmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt);
void xmlSchematronFree(xmlSchematronPtr schema);
/*
* Validation functions
*/
xmlSchematronValidCtxtPtr xmlSchematronNewValidCtxt(xmlSchematronPtr schema);
void xmlSchematronFreeValidCtxt(xmlSchematronValidCtxtPtr ctxt);
int xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr doc);
#ifdef __cplusplus
}
#endif
#endif /* __XML_SCHEMATRON_H__ */