Blame gettext-tools/gnulib-lib/libxml/xmlschemas.in.h

Packit Bot 06c835
/*
Packit Bot 06c835
 * Summary: incomplete XML Schemas structure implementation
Packit Bot 06c835
 * Description: interface to the XML Schemas handling and schema validity
Packit Bot 06c835
 *              checking, it is incomplete right now.
Packit Bot 06c835
 *
Packit Bot 06c835
 * Copy: See Copyright for the status of this software.
Packit Bot 06c835
 *
Packit Bot 06c835
 * Author: Daniel Veillard
Packit Bot 06c835
 */
Packit Bot 06c835
Packit Bot 06c835
Packit Bot 06c835
#ifndef __XML_SCHEMA_H__
Packit Bot 06c835
#define __XML_SCHEMA_H__
Packit Bot 06c835
Packit Bot 06c835
#include <libxml/xmlversion.h>
Packit Bot 06c835
Packit Bot 06c835
#ifdef LIBXML_SCHEMAS_ENABLED
Packit Bot 06c835
Packit Bot 06c835
#include <libxml/tree.h>
Packit Bot 06c835
Packit Bot 06c835
#ifdef __cplusplus
Packit Bot 06c835
extern "C" {
Packit Bot 06c835
#endif
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * This error codes are obsolete; not used any more.
Packit Bot 06c835
 */
Packit Bot 06c835
typedef enum {
Packit Bot 06c835
    XML_SCHEMAS_ERR_OK		= 0,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOROOT	= 1,
Packit Bot 06c835
    XML_SCHEMAS_ERR_UNDECLAREDELEM,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTTOPLEVEL,
Packit Bot 06c835
    XML_SCHEMAS_ERR_MISSING,
Packit Bot 06c835
    XML_SCHEMAS_ERR_WRONGELEM,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTYPE,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOROLLBACK,
Packit Bot 06c835
    XML_SCHEMAS_ERR_ISABSTRACT,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTEMPTY,
Packit Bot 06c835
    XML_SCHEMAS_ERR_ELEMCONT,
Packit Bot 06c835
    XML_SCHEMAS_ERR_HAVEDEFAULT,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTNILLABLE,
Packit Bot 06c835
    XML_SCHEMAS_ERR_EXTRACONTENT,
Packit Bot 06c835
    XML_SCHEMAS_ERR_INVALIDATTR,
Packit Bot 06c835
    XML_SCHEMAS_ERR_INVALIDELEM,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTDETERMINIST,
Packit Bot 06c835
    XML_SCHEMAS_ERR_CONSTRUCT,
Packit Bot 06c835
    XML_SCHEMAS_ERR_INTERNAL,
Packit Bot 06c835
    XML_SCHEMAS_ERR_NOTSIMPLE,
Packit Bot 06c835
    XML_SCHEMAS_ERR_ATTRUNKNOWN,
Packit Bot 06c835
    XML_SCHEMAS_ERR_ATTRINVALID,
Packit Bot 06c835
    XML_SCHEMAS_ERR_VALUE,
Packit Bot 06c835
    XML_SCHEMAS_ERR_FACET,
Packit Bot 06c835
    XML_SCHEMAS_ERR_,
Packit Bot 06c835
    XML_SCHEMAS_ERR_XXX
Packit Bot 06c835
} xmlSchemaValidError;
Packit Bot 06c835
Packit Bot 06c835
/*
Packit Bot 06c835
* ATTENTION: Change xmlSchemaSetValidOptions's check
Packit Bot 06c835
* for invalid values, if adding to the validation
Packit Bot 06c835
* options below.
Packit Bot 06c835
*/
Packit Bot 06c835
/**
Packit Bot 06c835
 * xmlSchemaValidOption:
Packit Bot 06c835
 *
Packit Bot 06c835
 * This is the set of XML Schema validation options.
Packit Bot 06c835
 */
Packit Bot 06c835
typedef enum {
Packit Bot 06c835
    XML_SCHEMA_VAL_VC_I_CREATE			= 1<<0
Packit Bot 06c835
	/* Default/fixed: create an attribute node
Packit Bot 06c835
	* or an element's text node on the instance.
Packit Bot 06c835
	*/
Packit Bot 06c835
} xmlSchemaValidOption;
Packit Bot 06c835
Packit Bot 06c835
/*
Packit Bot 06c835
    XML_SCHEMA_VAL_XSI_ASSEMBLE			= 1<<1,
Packit Bot 06c835
	* assemble schemata using
Packit Bot 06c835
	* xsi:schemaLocation and
Packit Bot 06c835
	* xsi:noNamespaceSchemaLocation
Packit Bot 06c835
*/
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * The schemas related types are kept internal
Packit Bot 06c835
 */
Packit Bot 06c835
typedef struct _xmlSchema xmlSchema;
Packit Bot 06c835
typedef xmlSchema *xmlSchemaPtr;
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * xmlSchemaValidityErrorFunc:
Packit Bot 06c835
 * @ctx: the validation context
Packit Bot 06c835
 * @msg: the message
Packit Bot 06c835
 * @...: extra arguments
Packit Bot 06c835
 *
Packit Bot 06c835
 * Signature of an error callback from an XSD validation
Packit Bot 06c835
 */
Packit Bot 06c835
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
Packit Bot 06c835
                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * xmlSchemaValidityWarningFunc:
Packit Bot 06c835
 * @ctx: the validation context
Packit Bot 06c835
 * @msg: the message
Packit Bot 06c835
 * @...: extra arguments
Packit Bot 06c835
 *
Packit Bot 06c835
 * Signature of a warning callback from an XSD validation
Packit Bot 06c835
 */
Packit Bot 06c835
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
Packit Bot 06c835
                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * A schemas validation context
Packit Bot 06c835
 */
Packit Bot 06c835
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
Packit Bot 06c835
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
Packit Bot 06c835
Packit Bot 06c835
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
Packit Bot 06c835
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
Packit Bot 06c835
Packit Bot 06c835
/**
Packit Bot 06c835
 * xmlSchemaValidityLocatorFunc:
Packit Bot 06c835
 * @ctx: user provided context
Packit Bot 06c835
 * @file: returned file information
Packit Bot 06c835
 * @line: returned line information
Packit Bot 06c835
 *
Packit Bot 06c835
 * A schemas validation locator, a callback called by the validator.
Packit Bot 06c835
 * This is used when file or node informations are not available
Packit Bot 06c835
 * to find out what file and line number are affected
Packit Bot 06c835
 *
Packit Bot 06c835
 * Returns: 0 in case of success and -1 in case of error
Packit Bot 06c835
 */
Packit Bot 06c835
Packit Bot 06c835
typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
Packit Bot 06c835
                           const char **file, unsigned long *line);
Packit Bot 06c835
Packit Bot 06c835
/*
Packit Bot 06c835
 * Interfaces for parsing.
Packit Bot 06c835
 */
Packit Bot 06c835
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaNewParserCtxt	(const char *URL);
Packit Bot 06c835
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaNewMemParserCtxt	(const char *buffer,
Packit Bot 06c835
					 int size);
Packit Bot 06c835
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaNewDocParserCtxt	(xmlDocPtr doc);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaFreeParserCtxt	(xmlSchemaParserCtxtPtr ctxt);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt,
Packit Bot 06c835
					 xmlSchemaValidityErrorFunc err,
Packit Bot 06c835
					 xmlSchemaValidityWarningFunc warn,
Packit Bot 06c835
					 void *ctx);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
Packit Bot 06c835
					 xmlStructuredErrorFunc serror,
Packit Bot 06c835
					 void *ctx);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
		xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
Packit Bot 06c835
					xmlSchemaValidityErrorFunc * err,
Packit Bot 06c835
					xmlSchemaValidityWarningFunc * warn,
Packit Bot 06c835
					void **ctx);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
		xmlSchemaIsValid	(xmlSchemaValidCtxtPtr ctxt);
Packit Bot 06c835
Packit Bot 06c835
XMLPUBFUN xmlSchemaPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaFree		(xmlSchemaPtr schema);
Packit Bot 06c835
#ifdef LIBXML_OUTPUT_ENABLED
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaDump		(FILE *output,
Packit Bot 06c835
					 xmlSchemaPtr schema);
Packit Bot 06c835
#endif /* LIBXML_OUTPUT_ENABLED */
Packit Bot 06c835
/*
Packit Bot 06c835
 * Interfaces for validating
Packit Bot 06c835
 */
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaSetValidErrors	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlSchemaValidityErrorFunc err,
Packit Bot 06c835
					 xmlSchemaValidityWarningFunc warn,
Packit Bot 06c835
					 void *ctx);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlStructuredErrorFunc serror,
Packit Bot 06c835
					 void *ctx);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaGetValidErrors	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlSchemaValidityErrorFunc *err,
Packit Bot 06c835
					 xmlSchemaValidityWarningFunc *warn,
Packit Bot 06c835
					 void **ctx);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 int options);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
            xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
Packit Bot 06c835
	                                 const char *filename);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
Packit Bot 06c835
Packit Bot 06c835
XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaNewValidCtxt	(xmlSchemaPtr schema);
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
	    xmlSchemaFreeValidCtxt	(xmlSchemaValidCtxtPtr ctxt);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaValidateDoc	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlDocPtr instance);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
            xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
			                 xmlNodePtr elem);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaValidateStream	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlParserInputBufferPtr input,
Packit Bot 06c835
					 xmlCharEncoding enc,
Packit Bot 06c835
					 xmlSAXHandlerPtr sax,
Packit Bot 06c835
					 void *user_data);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
	    xmlSchemaValidateFile	(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 const char * filename,
Packit Bot 06c835
					 int options);
Packit Bot 06c835
Packit Bot 06c835
XMLPUBFUN xmlParserCtxtPtr XMLCALL
Packit Bot 06c835
	    xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
Packit Bot 06c835
Packit Bot 06c835
/*
Packit Bot 06c835
 * Interface to insert Schemas SAX validation in a SAX stream
Packit Bot 06c835
 */
Packit Bot 06c835
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
Packit Bot 06c835
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
Packit Bot 06c835
Packit Bot 06c835
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
Packit Bot 06c835
            xmlSchemaSAXPlug		(xmlSchemaValidCtxtPtr ctxt,
Packit Bot 06c835
					 xmlSAXHandlerPtr *sax,
Packit Bot 06c835
					 void **user_data);
Packit Bot 06c835
XMLPUBFUN int XMLCALL
Packit Bot 06c835
            xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug);
Packit Bot 06c835
Packit Bot 06c835
Packit Bot 06c835
XMLPUBFUN void XMLCALL
Packit Bot 06c835
            xmlSchemaValidateSetLocator	(xmlSchemaValidCtxtPtr vctxt,
Packit Bot 06c835
					 xmlSchemaValidityLocatorFunc f,
Packit Bot 06c835
					 void *ctxt);
Packit Bot 06c835
Packit Bot 06c835
#ifdef __cplusplus
Packit Bot 06c835
}
Packit Bot 06c835
#endif
Packit Bot 06c835
Packit Bot 06c835
#endif /* LIBXML_SCHEMAS_ENABLED */
Packit Bot 06c835
#endif /* __XML_SCHEMA_H__ */