/*
* Summary: The DTD validation
* Description: API for the DTD handling and the validity checking
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_VALID_H__
#define __XML_VALID_H__
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlautomata.h>
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Validation state added for non-determinist content model.
*/
/**
* xmlValidityErrorFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
const char *msg,
...);
/**
* xmlValidityWarningFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
const char *msg,
...);
#ifdef IN_LIBXML
/**
* XML_CTXT_FINISH_DTD_0:
*
* Special value for finishDtd field when embedded in an xmlParserCtxt
*/
/**
* XML_CTXT_FINISH_DTD_1:
*
* Special value for finishDtd field when embedded in an xmlParserCtxt
*/
#endif
/*
* xmlValidCtxt:
* An xmlValidCtxt is used for error reporting when validating.
*/
struct _xmlValidCtxt {
/* Node analysis stack used when validating within entities */
/* state state used for non-determinist content validation */
#ifdef LIBXML_REGEXP_ENABLED
#else
void *am;
void *state;
#endif
};
/*
* ALL notation declarations are stored in a table.
* There is one table per DTD.
*/
/*
* ALL element declarations are stored in a table.
* There is one table per DTD.
*/
/*
* ALL attribute declarations are stored in a table.
* There is one table per DTD.
*/
/*
* ALL IDs attributes are stored in a table.
* There is one table per document.
*/
/*
* ALL Refs attributes are stored in a table.
* There is one table per document.
*/
/* Notation */
#ifdef LIBXML_TREE_ENABLED
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
/* the new versions with doc argument */
xmlSnprintfElementContent(char *buf,
int size,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
xmlSprintfElementContent(char *buf,
int englob);
#endif /* LIBXML_OUTPUT_ENABLED */
/* DEPRECATED */
/* Element */
#ifdef LIBXML_TREE_ENABLED
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
#ifdef LIBXML_TREE_ENABLED
#endif /* LIBXML_TREE_ENABLED */
/* Attribute */
const xmlChar *defaultValue,
#ifdef LIBXML_TREE_ENABLED
#endif /* LIBXML_TREE_ENABLED */
#ifdef LIBXML_OUTPUT_ENABLED
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
/* IDREFs */
/**
* The public function calls related to validity checking.
*/
#ifdef LIBXML_VALID_ENABLED
xmlNewValidCtxt(void);
#endif /* LIBXML_VALID_ENABLED */
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
const xmlChar *notationName);
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
#ifdef LIBXML_VALID_ENABLED
int *len,
int max);
int max);
#ifdef LIBXML_REGEXP_ENABLED
/*
* Validation based on the regexp support
*/
int len);
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* LIBXML_VALID_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_VALID_H__ */