  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-xmlsave.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-xmlschemastypes.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
xmlschemas    
    
xmlschemas - incomplete XML Schemas structure implementation
    
interface to the XML Schemas handling and schema validity checking, it is incomplete right now. 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
typedef libxml2-xmlschemas.html#xmlSchemaxmlSchema  * #xmlSchemaPtrxmlSchemaPtr ;
typedef struct _xmlSchemaParserCtxt 
#xmlSchemaParserCtxtxmlSchemaParserCtxt ;
typedef enum 
#xmlSchemaValidOptionxmlSchemaValidOption ;
typedef 
libxml2-xmlschemas.html#xmlSchemaSAXPlugStructxmlSchemaSAXPlugStruct  * #xmlSchemaSAXPlugPtrxmlSchemaSAXPlugPtr ;
typedef struct _xmlSchemaSAXPlug 
#xmlSchemaSAXPlugStructxmlSchemaSAXPlugStruct ;
typedef 
libxml2-xmlschemas.html#xmlSchemaValidCtxtxmlSchemaValidCtxt  * #xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr ;
typedef 
libxml2-xmlschemas.html#xmlSchemaParserCtxtxmlSchemaParserCtxt  * #xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr ;
typedef struct _xmlSchema 
#xmlSchemaxmlSchema ;
typedef enum 
#xmlSchemaValidErrorxmlSchemaValidError ;
typedef struct _xmlSchemaValidCtxt 
#xmlSchemaValidCtxtxmlSchemaValidCtxt ;
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	#xmlSchemaNewDocParserCtxtxmlSchemaNewDocParserCtxt 	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc);
int	
#xmlSchemaSAXUnplugxmlSchemaSAXUnplug 		( libxml2-xmlschemas.html#xmlSchemaSAXPlugPtrxmlSchemaSAXPlugPtr  plug);
libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr 	#xmlSchemaParsexmlSchemaParse 		( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt);
void	
#xmlSchemaFreeParserCtxtxmlSchemaFreeParserCtxt 		( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt);
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	#xmlSchemaNewParserCtxtxmlSchemaNewParserCtxt 	(const char * URL);
int	
#xmlSchemaIsValidxmlSchemaIsValid 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt);
typedef void 
#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc 	(void * ctx, 					 const char * msg, 					 ... ...);
libxml2-xmlschemas.html#xmlSchemaSAXPlugPtrxmlSchemaSAXPlugPtr 	#xmlSchemaSAXPlugxmlSchemaSAXPlug 	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 						 libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  * sax, 						 void ** user_data);
int	
#xmlSchemaValidateStreamxmlSchemaValidateStream 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlParserInputBufferPtrxmlParserInputBufferPtr  input, 					 libxml2-encoding.html#xmlCharEncodingxmlCharEncoding  enc, 					 libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  sax, 					 void * user_data);
int	
#xmlSchemaGetParserErrorsxmlSchemaGetParserErrors 	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  * err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  * warn, 					 void ** ctx);
int	
#xmlSchemaValidateOneElementxmlSchemaValidateOneElement 	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlNodePtrxmlNodePtr  elem);
void	
#xmlSchemaSetValidStructuredErrorsxmlSchemaSetValidStructuredErrors 	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 						 libxml2-xmlerror.html#xmlStructuredErrorFuncxmlStructuredErrorFunc  serror, 						 void * ctx);
void	
#xmlSchemaSetValidErrorsxmlSchemaSetValidErrors 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  warn, 					 void * ctx);
int	
#xmlSchemaValidCtxtGetOptionsxmlSchemaValidCtxtGetOptions 	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt);
int	
#xmlSchemaValidateFilexmlSchemaValidateFile 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 const char * filename, 					 int options);
int	
#xmlSchemaValidateDocxmlSchemaValidateDoc 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlDocPtrxmlDocPtr  instance);
void	
#xmlSchemaFreexmlSchemaFree 			( libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema);
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	#xmlSchemaNewMemParserCtxtxmlSchemaNewMemParserCtxt 	(const char * buffer, 							 int size);
int	
#xmlSchemaGetValidErrorsxmlSchemaGetValidErrors 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  * err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  * warn, 					 void ** ctx);
int	
#xmlSchemaSetValidOptionsxmlSchemaSetValidOptions 	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 int options);
void	
#xmlSchemaSetParserErrorsxmlSchemaSetParserErrors 	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  warn, 					 void * ctx);
typedef void 
#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc 	(void * ctx, 					 const char * msg, 					 ... ...);
void	
#xmlSchemaDumpxmlSchemaDump 			(FILE * output, 					 libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema);
void	
#xmlSchemaFreeValidCtxtxmlSchemaFreeValidCtxt 		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt);
void	
#xmlSchemaSetParserStructuredErrorsxmlSchemaSetParserStructuredErrors 	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 						 libxml2-xmlerror.html#xmlStructuredErrorFuncxmlStructuredErrorFunc  serror, 						 void * ctx);
libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr 	#xmlSchemaNewValidCtxtxmlSchemaNewValidCtxt 	( libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema);
    
    
      
Description
    
    
      
Details
      
        
Structure xmlSchema
struct _xmlSchema {
    const 
libxml2-xmlstring.html#xmlCharxmlChar  *	name	: schema name
    const 
libxml2-xmlstring.html#xmlCharxmlChar  *	targetNamespace	: the target namespace
    const 
libxml2-xmlstring.html#xmlCharxmlChar  *	version
    const 
libxml2-xmlstring.html#xmlCharxmlChar  *	id	: Obsolete
    
libxml2-tree.html#xmlDocPtrxmlDocPtr 	doc
    
libxml2-schemasInternals.html#xmlSchemaAnnotPtrxmlSchemaAnnotPtr 	annot
    int	flags
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	typeDecl
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	attrDecl
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	attrgrpDecl
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	elemDecl
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	notaDecl
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	schemasImports
    void *	_private	: unused by the library for users or bindings
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	groupDecl
    
libxml2-dict.html#xmlDictPtrxmlDictPtr 	dict
    void *	includes	: the includes, this is opaque for now
    int	preserve	: whether to free the document
    int	counter	: used to give ononymous components unique names
    
libxml2-hash.html#xmlHashTablePtrxmlHashTablePtr 	idcDef	: All identity-constraint defs.
    void *	volatiles	: Obsolete
} xmlSchema;
        
        
Structure xmlSchemaParserCtxt
struct _xmlSchemaParserCtxt {
The content of this structure is not made public by the API.
} xmlSchemaParserCtxt;
        
        
Typedef xmlSchemaParserCtxtPtr
libxml2-xmlschemas.html#xmlSchemaParserCtxtxmlSchemaParserCtxt  * xmlSchemaParserCtxtPtr;
        
        
Typedef xmlSchemaPtr
libxml2-xmlschemas.html#xmlSchemaxmlSchema  * xmlSchemaPtr;
        
        
Typedef xmlSchemaSAXPlugPtr
libxml2-xmlschemas.html#xmlSchemaSAXPlugStructxmlSchemaSAXPlugStruct  * xmlSchemaSAXPlugPtr;
        
        
Structure xmlSchemaSAXPlugStruct
struct _xmlSchemaSAXPlug {
The content of this structure is not made public by the API.
} xmlSchemaSAXPlugStruct;
        
        
Structure xmlSchemaValidCtxt
struct _xmlSchemaValidCtxt {
The content of this structure is not made public by the API.
} xmlSchemaValidCtxt;
        
        
Typedef xmlSchemaValidCtxtPtr
libxml2-xmlschemas.html#xmlSchemaValidCtxtxmlSchemaValidCtxt  * xmlSchemaValidCtxtPtr;
        
        
Enum xmlSchemaValidError
enum #xmlSchemaValidErrorxmlSchemaValidError  {
    
XML_SCHEMAS_ERR_OK  = 0
    
XML_SCHEMAS_ERR_NOROOT  = 1
    
XML_SCHEMAS_ERR_UNDECLAREDELEM  = 2
    
XML_SCHEMAS_ERR_NOTTOPLEVEL  = 3
    
XML_SCHEMAS_ERR_MISSING  = 4
    
XML_SCHEMAS_ERR_WRONGELEM  = 5
    
XML_SCHEMAS_ERR_NOTYPE  = 6
    
XML_SCHEMAS_ERR_NOROLLBACK  = 7
    
XML_SCHEMAS_ERR_ISABSTRACT  = 8
    
XML_SCHEMAS_ERR_NOTEMPTY  = 9
    
XML_SCHEMAS_ERR_ELEMCONT  = 10
    
XML_SCHEMAS_ERR_HAVEDEFAULT  = 11
    
XML_SCHEMAS_ERR_NOTNILLABLE  = 12
    
XML_SCHEMAS_ERR_EXTRACONTENT  = 13
    
XML_SCHEMAS_ERR_INVALIDATTR  = 14
    
XML_SCHEMAS_ERR_INVALIDELEM  = 15
    
XML_SCHEMAS_ERR_NOTDETERMINIST  = 16
    
XML_SCHEMAS_ERR_CONSTRUCT  = 17
    
XML_SCHEMAS_ERR_INTERNAL  = 18
    
XML_SCHEMAS_ERR_NOTSIMPLE  = 19
    
XML_SCHEMAS_ERR_ATTRUNKNOWN  = 20
    
XML_SCHEMAS_ERR_ATTRINVALID  = 21
    
XML_SCHEMAS_ERR_VALUE  = 22
    
XML_SCHEMAS_ERR_FACET  = 23
    
XML_SCHEMAS_ERR_  = 24
    
XML_SCHEMAS_ERR_XXX  = 25
};
        
        
Enum xmlSchemaValidOption
enum #xmlSchemaValidOptionxmlSchemaValidOption  {
    
XML_SCHEMA_VAL_VC_I_CREATE  = 1 /*  Default/fixed: create an attribute node * or an element's text node on the instance. * */
};
        
        
Function type xmlSchemaValidityErrorFunc
void	xmlSchemaValidityErrorFunc	(void * ctx, 					 const char * msg, 					 ... ...) ctx: msg: ...:         
        
Function type xmlSchemaValidityWarningFunc
void	xmlSchemaValidityWarningFunc	(void * ctx, 					 const char * msg, 					 ... ...) ctx: msg: ...:         
        
xmlSchemaDump ()
void	xmlSchemaDump			(FILE * output, 					 libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema)Dump a Schema structure.
output: the file output schema: a schema structure         
        
xmlSchemaFree ()
void	xmlSchemaFree			( libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema)Deallocate a Schema structure.
schema: a schema structure         
        
xmlSchemaFreeParserCtxt ()
void	xmlSchemaFreeParserCtxt		( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt)Free the resources associated to the schema parser context
ctxt: the schema parser context         
        
xmlSchemaFreeValidCtxt ()
void	xmlSchemaFreeValidCtxt		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt) ctxt:         
        
xmlSchemaGetParserErrors ()
int	xmlSchemaGetParserErrors	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  * err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  * warn, 					 void ** ctx)Get the callback information used to handle errors for a parser context
ctxt: a XMl-Schema parser context err: the error callback result warn: the warning callback result ctx: contextual data for the callbacks result Returns: -1 in case of failure, 0 otherwise         
        
xmlSchemaGetValidErrors ()
int	xmlSchemaGetValidErrors		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  * err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  * warn, 					 void ** ctx) ctxt: err: warn: ctx: Returns:         
        
xmlSchemaIsValid ()
int	xmlSchemaIsValid		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt) ctxt: Returns:         
        
xmlSchemaNewDocParserCtxt ()
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	xmlSchemaNewDocParserCtxt	( libxml2-tree.html#xmlDocPtrxmlDocPtr  doc)Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.
doc: a preparsed document tree Returns: the parser context or NULL in case of error         
        
xmlSchemaNewMemParserCtxt ()
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	xmlSchemaNewMemParserCtxt	(const char * buffer, 							 int size)Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.
buffer: a pointer to a char array containing the schemas size: the size of the array Returns: the parser context or NULL in case of error         
        
xmlSchemaNewParserCtxt ()
libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr 	xmlSchemaNewParserCtxt	(const char * URL)Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.
URL: the location of the schema Returns: the parser context or NULL in case of error         
        
xmlSchemaNewValidCtxt ()
libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr 	xmlSchemaNewValidCtxt	( libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr  schema) schema: Returns:         
        
xmlSchemaParse ()
libxml2-xmlschemas.html#xmlSchemaPtrxmlSchemaPtr 	xmlSchemaParse		( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt)parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.
ctxt: a schema validation context Returns: the internal XML Schema structure built from the resource or NULL in case of error         
        
xmlSchemaSAXPlug ()
libxml2-xmlschemas.html#xmlSchemaSAXPlugPtrxmlSchemaSAXPlugPtr 	xmlSchemaSAXPlug	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 						 libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  * sax, 						 void ** user_data) ctxt: sax: user_data: Returns:         
        
xmlSchemaSAXUnplug ()
int	xmlSchemaSAXUnplug		( libxml2-xmlschemas.html#xmlSchemaSAXPlugPtrxmlSchemaSAXPlugPtr  plug) plug: Returns:         
        
xmlSchemaSetParserErrors ()
void	xmlSchemaSetParserErrors	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  warn, 					 void * ctx)Set the callback functions used to handle errors for a validation context
ctxt: a schema validation context err: the error callback warn: the warning callback ctx: contextual data for the callbacks         
        
xmlSchemaSetParserStructuredErrors ()
void	xmlSchemaSetParserStructuredErrors	( libxml2-xmlschemas.html#xmlSchemaParserCtxtPtrxmlSchemaParserCtxtPtr  ctxt, 						 libxml2-xmlerror.html#xmlStructuredErrorFuncxmlStructuredErrorFunc  serror, 						 void * ctx)Set the structured error callback
ctxt: a schema parser context serror: the structured error function ctx: the functions context         
        
xmlSchemaSetValidErrors ()
void	xmlSchemaSetValidErrors		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-xmlschemas.html#xmlSchemaValidityErrorFuncxmlSchemaValidityErrorFunc  err, 					 libxml2-xmlschemas.html#xmlSchemaValidityWarningFuncxmlSchemaValidityWarningFunc  warn, 					 void * ctx) ctxt: err: warn: ctx:         
        
xmlSchemaSetValidOptions ()
int	xmlSchemaSetValidOptions	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 int options) ctxt: options: Returns:         
        
xmlSchemaSetValidStructuredErrors ()
void	xmlSchemaSetValidStructuredErrors	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 						 libxml2-xmlerror.html#xmlStructuredErrorFuncxmlStructuredErrorFunc  serror, 						 void * ctx) ctxt: serror: ctx:         
        
xmlSchemaValidCtxtGetOptions ()
int	xmlSchemaValidCtxtGetOptions	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt) ctxt: Returns:         
        
xmlSchemaValidateDoc ()
int	xmlSchemaValidateDoc		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlDocPtrxmlDocPtr  instance) ctxt: instance: Returns:         
        
xmlSchemaValidateFile ()
int	xmlSchemaValidateFile		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 const char * filename, 					 int options) ctxt: filename: options: Returns:         
        
xmlSchemaValidateOneElement ()
int	xmlSchemaValidateOneElement	( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlNodePtrxmlNodePtr  elem) ctxt: elem: Returns:         
        
xmlSchemaValidateStream ()
int	xmlSchemaValidateStream		( libxml2-xmlschemas.html#xmlSchemaValidCtxtPtrxmlSchemaValidCtxtPtr  ctxt, 					 libxml2-tree.html#xmlParserInputBufferPtrxmlParserInputBufferPtr  input, 					 libxml2-encoding.html#xmlCharEncodingxmlCharEncoding  enc, 					 libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  sax, 					 void * user_data) ctxt: input: enc: sax: user_data: Returns:         
      
    
  
