diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-01-23 18:29:16 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-01-23 18:29:16 +0000 |
commit | 6eadf63ca646866fde6e4df8720e4bdced351a42 (patch) | |
tree | 877dd48d7831d1e2b8f597cce37d818155a90866 /include | |
parent | 814a76db87a2c7a0edf7d701859c8885fc5fa30b (diff) | |
download | android_external_libxml2-6eadf63ca646866fde6e4df8720e4bdced351a42.tar.gz android_external_libxml2-6eadf63ca646866fde6e4df8720e4bdced351a42.tar.bz2 android_external_libxml2-6eadf63ca646866fde6e4df8720e4bdced351a42.zip |
First commit of the new Relax-NG validation code, not generally useful
* Makefile.am configure.in relaxng.c include/libxml/relaxng.h:
First commit of the new Relax-NG validation code, not generally
useful yet.
* test/relaxng/* result/relaxng/*: current state of the regression
tests
Daniel
Diffstat (limited to 'include')
-rw-r--r-- | include/libxml/relaxng.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h new file mode 100644 index 00000000..1264d34a --- /dev/null +++ b/include/libxml/relaxng.h @@ -0,0 +1,62 @@ +/* + * relaxng.h: header for the implementation of the Relax-NG validation + * + * See Copyright for the status of this software. + * + * daniel@veillard.com + */ + +#ifndef __XML_RELAX_NG__ +#define __XML_RELAX_NG__ + +#include <libxml/hash.h> + +typedef struct _xmlRelaxNG xmlRelaxNG; +typedef xmlRelaxNG *xmlRelaxNGPtr; + + +/** + * A schemas validation context + */ +typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...); +typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...); + +typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt; +typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr; + +typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt; +typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr; + +/* + * Interfaces for parsing. + */ +xmlRelaxNGParserCtxtPtr xmlRelaxNGNewParserCtxt (const char *URL); +xmlRelaxNGParserCtxtPtr xmlRelaxNGNewMemParserCtxt(const char *buffer, + int size); +void xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); +void xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc err, + xmlRelaxNGValidityWarningFunc warn, + void *ctx); +xmlRelaxNGPtr xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); +void xmlRelaxNGFree (xmlRelaxNGPtr schema); +void xmlRelaxNGDump (FILE *output, + xmlRelaxNGPtr schema); +/* + * Interfaces for validating + */ +void xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, + xmlRelaxNGValidityErrorFunc err, + xmlRelaxNGValidityWarningFunc warn, + void *ctx); +xmlRelaxNGValidCtxtPtr xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); +void xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); +int xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt, + xmlDocPtr instance); +int xmlRelaxNGValidateStream(xmlRelaxNGValidCtxtPtr ctxt, + xmlParserInputBufferPtr input, + xmlCharEncoding enc, + xmlSAXHandlerPtr sax, + void *user_data); +void xmlRelaxNGCleanupTypes (void); +#endif /* __XML_RELAX_NG__ */ |