Hash :
febcca40
Author :
Date :
2003-02-16T15:44:18
more bug-hunting added --tree to dump the intermediate rng tree patch from * relaxng.c: more bug-hunting * testRelax.c include/libxml/relaxng.h: added --tree to dump the intermediate rng tree * python/generator.py: patch from Stephane Bidoul to fix the generator on python < 2.2 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 63 64
/*
* 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);
void xmlRelaxNGDumpTree (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__ */