Tag
Hash :
6eadf63c
Author :
Date :
2003-01-23T18:29:16
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
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
/*
* 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__ */