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
66
67
/**
* @file
*
* RELAX NG API for libxml-rs
*
* Native Rust implementation — drop-in replacement for libxml2's
* relaxng.h. API follows upstream libxml2 RELAX NG support.
*/
#ifndef __XML_RELAXNG_H__
#define __XML_RELAXNG_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlRelaxNG:
*
* A RELAX NG schema (opaque type).
*/
typedef struct _xmlRelaxNG *xmlRelaxNGPtr;
typedef xmlRelaxNGPtr xmlRelaxNG;
/**
* xmlRelaxNGParserCtxt:
*
* A RELAX NG parser context (opaque type).
*/
typedef struct _xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
typedef xmlRelaxNGParserCtxtPtr xmlRelaxNGParserCtxt;
/**
* xmlRelaxNGValidCtxt:
*
* A RELAX NG validation context (opaque type).
*/
typedef struct _xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
typedef xmlRelaxNGValidCtxtPtr xmlRelaxNGValidCtxt;
/*
* Parser functions
*/
xmlRelaxNGParserCtxtPtr xmlRelaxNGNewParserCtxt(const char *URL);
xmlRelaxNGParserCtxtPtr xmlRelaxNGNewMemParserCtxt(const char *buffer, int size);
xmlRelaxNGPtr xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt);
void xmlRelaxNGFreeParserCtxt(xmlRelaxNGParserCtxtPtr ctxt);
void xmlRelaxNGFree(xmlRelaxNGPtr schema);
/*
* Validation functions
*/
xmlRelaxNGValidCtxtPtr xmlRelaxNGNewValidCtxt(xmlRelaxNGPtr schema);
void xmlRelaxNGFreeValidCtxt(xmlRelaxNGValidCtxtPtr ctxt);
int xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc);
int xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
#ifdef __cplusplus
}
#endif
#endif /* __XML_RELAXNG_H__ */