2 * relaxng.h: header for the implementation of the Relax-NG validation
4 * See Copyright for the status of this software.
9 #ifndef __XML_RELAX_NG__
10 #define __XML_RELAX_NG__
12 #include <libxml/hash.h>
14 typedef struct _xmlRelaxNG xmlRelaxNG;
15 typedef xmlRelaxNG *xmlRelaxNGPtr;
19 * A schemas validation context
21 typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...);
22 typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...);
24 typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
25 typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
27 typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
28 typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
31 * Interfaces for parsing.
33 xmlRelaxNGParserCtxtPtr xmlRelaxNGNewParserCtxt (const char *URL);
34 xmlRelaxNGParserCtxtPtr xmlRelaxNGNewMemParserCtxt(const char *buffer,
36 void xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
37 void xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
38 xmlRelaxNGValidityErrorFunc err,
39 xmlRelaxNGValidityWarningFunc warn,
41 xmlRelaxNGPtr xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
42 void xmlRelaxNGFree (xmlRelaxNGPtr schema);
43 void xmlRelaxNGDump (FILE *output,
44 xmlRelaxNGPtr schema);
45 void xmlRelaxNGDumpTree (FILE * output,
46 xmlRelaxNGPtr schema);
48 * Interfaces for validating
50 void xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
51 xmlRelaxNGValidityErrorFunc err,
52 xmlRelaxNGValidityWarningFunc warn,
54 xmlRelaxNGValidCtxtPtr xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
55 void xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
56 int xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
58 int xmlRelaxNGValidateStream(xmlRelaxNGValidCtxtPtr ctxt,
59 xmlParserInputBufferPtr input,
63 void xmlRelaxNGCleanupTypes (void);
64 #endif /* __XML_RELAX_NG__ */