deps/src/libxml2-2.9.1/doc/html/libxml-xmlschemas.html
| |
|
|
|
|
|
|
|
|
|
| API Menu | |
|
| API Indexes | |
|
| Related links | |
|
|
|
|
|
|
| | xmlsave | | API documentation | | The XML C parser and toolkit of Gnome | xmlschemastypes | |
interface to the XML Schemas handling and schema validity checking, it is incomplete right now.
Structure[xmlSchema](#xmlSchema)
struct _xmlSchema
Structure[xmlSchemaParserCtxt](#xmlSchemaParserCtxt)
struct _xmlSchemaParserCtxt
The content of this structure is not made public by the API.
Typedef[xmlSchemaParserCtxt](libxml-xmlschemas.html#xmlSchemaParserCtxt)*xmlSchemaParserCtxtPtr
Typedef[xmlSchema](libxml-xmlschemas.html#xmlSchema)*xmlSchemaPtr
Typedef[xmlSchemaSAXPlugStruct](libxml-xmlschemas.html#xmlSchemaSAXPlugStruct)*xmlSchemaSAXPlugPtr
Structure[xmlSchemaSAXPlugStruct](#xmlSchemaSAXPlugStruct)
struct _xmlSchemaSAXPlug
The content of this structure is not made public by the API.
Structure[xmlSchemaValidCtxt](#xmlSchemaValidCtxt)
struct _xmlSchemaValidCtxt
The content of this structure is not made public by the API.
Typedef[xmlSchemaValidCtxt](libxml-xmlschemas.html#xmlSchemaValidCtxt)*xmlSchemaValidCtxtPtr
Enum[xmlSchemaValidError](#xmlSchemaValidError)
Enum[xmlSchemaValidOption](#xmlSchemaValidOption)
void[xmlSchemaDump](#xmlSchemaDump)(FILE * output,
[xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
void[xmlSchemaFree](#xmlSchemaFree)([xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
void[xmlSchemaFreeParserCtxt](#xmlSchemaFreeParserCtxt)([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt)
void[xmlSchemaFreeValidCtxt](#xmlSchemaFreeValidCtxt)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
int[xmlSchemaGetParserErrors](#xmlSchemaGetParserErrors)([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)* err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)* warn,
void ** ctx)
int[xmlSchemaGetValidErrors](#xmlSchemaGetValidErrors)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)* err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)* warn,
void ** ctx)
int[xmlSchemaIsValid](#xmlSchemaIsValid)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)[xmlSchemaNewDocParserCtxt](#xmlSchemaNewDocParserCtxt)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)[xmlSchemaNewMemParserCtxt](#xmlSchemaNewMemParserCtxt)(const char * buffer,
int size)
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)[xmlSchemaNewParserCtxt](#xmlSchemaNewParserCtxt)(const char * URL)
[xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)[xmlSchemaNewValidCtxt](#xmlSchemaNewValidCtxt)([xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
[xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)[xmlSchemaParse](#xmlSchemaParse)([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt)
[xmlSchemaSAXPlugPtr](libxml-xmlschemas.html#xmlSchemaSAXPlugPtr)[xmlSchemaSAXPlug](#xmlSchemaSAXPlug)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSAXHandlerPtr](libxml-tree.html#xmlSAXHandlerPtr)* sax,
void ** user_data)
int[xmlSchemaSAXUnplug](#xmlSchemaSAXUnplug)([xmlSchemaSAXPlugPtr](libxml-xmlschemas.html#xmlSchemaSAXPlugPtr)plug)
void[xmlSchemaSetParserErrors](#xmlSchemaSetParserErrors)([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)warn,
void * ctx)
void[xmlSchemaSetParserStructuredErrors](#xmlSchemaSetParserStructuredErrors)([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlStructuredErrorFunc](libxml-xmlerror.html#xmlStructuredErrorFunc)serror,
void * ctx)
void[xmlSchemaSetValidErrors](#xmlSchemaSetValidErrors)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)warn,
void * ctx)
int[xmlSchemaSetValidOptions](#xmlSchemaSetValidOptions)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
int options)
void[xmlSchemaSetValidStructuredErrors](#xmlSchemaSetValidStructuredErrors)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlStructuredErrorFunc](libxml-xmlerror.html#xmlStructuredErrorFunc)serror,
void * ctx)
int[xmlSchemaValidCtxtGetOptions](#xmlSchemaValidCtxtGetOptions)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
[xmlParserCtxtPtr](libxml-tree.html#xmlParserCtxtPtr)[xmlSchemaValidCtxtGetParserCtxt](#xmlSchemaValidCtxtGetParserCtxt)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
int[xmlSchemaValidateDoc](#xmlSchemaValidateDoc)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
int[xmlSchemaValidateFile](#xmlSchemaValidateFile)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
const char * filename,
int options)
int[xmlSchemaValidateOneElement](#xmlSchemaValidateOneElement)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
void[xmlSchemaValidateSetFilename](#xmlSchemaValidateSetFilename)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)vctxt,
const char * filename)
void[xmlSchemaValidateSetLocator](#xmlSchemaValidateSetLocator)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)vctxt,
[xmlSchemaValidityLocatorFunc](libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc)f,
void * ctxt)
int[xmlSchemaValidateStream](#xmlSchemaValidateStream)([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlParserInputBufferPtr](libxml-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml-encoding.html#xmlCharEncoding)enc,
[xmlSAXHandlerPtr](libxml-tree.html#xmlSAXHandlerPtr)sax,
void * user_data)
Function type:[xmlSchemaValidityErrorFunc](#xmlSchemaValidityErrorFunc)void[xmlSchemaValidityErrorFunc](#xmlSchemaValidityErrorFunc)(void * ctx,
const char * msg,
... ...)
Function type:[xmlSchemaValidityLocatorFunc](#xmlSchemaValidityLocatorFunc)int[xmlSchemaValidityLocatorFunc](#xmlSchemaValidityLocatorFunc)(void * ctx,
const char ** file,
unsigned long * line)
Function type:[xmlSchemaValidityWarningFunc](#xmlSchemaValidityWarningFunc)void[xmlSchemaValidityWarningFunc](#xmlSchemaValidityWarningFunc)(void * ctx,
const char * msg,
... ...)
Structure xmlSchema
struct _xmlSchema {
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : schema name
const[xmlChar](libxml-xmlstring.html#xmlChar)* targetNamespace : the target namespace
const[xmlChar](libxml-xmlstring.html#xmlChar)* version
const[xmlChar](libxml-xmlstring.html#xmlChar)* id : Obsolete[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc[xmlSchemaAnnotPtr](libxml-schemasInternals.html#xmlSchemaAnnotPtr)annot
int flags[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)typeDecl[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)attrDecl[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)attrgrpDecl[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)elemDecl[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)notaDecl[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)schemasImports
void * _private : unused by the library for users or bind[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)groupDecl[xmlDictPtr](libxml-dict.html#xmlDictPtr)dict
void * includes : the includes, this is opaque for now
int preserve : whether to free the document
int counter : used to give ononymous components uniqu[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)idcDef : All identity-constraint defs.
void * volatiles : Obsolete
}
Structure xmlSchemaParserCtxt
struct _xmlSchemaParserCtxt {
The content of this structure is not made public by the API.
}
Structure xmlSchemaSAXPlugStruct
struct _xmlSchemaSAXPlug {
The content of this structure is not made public by the API.
}
Structure xmlSchemaValidCtxt
struct _xmlSchemaValidCtxt {
The content of this structure is not made public by the API.
}
Enum xmlSchemaValidError {XML\_SCHEMAS\_ERR\_OK= 0XML\_SCHEMAS\_ERR\_NOROOT= 1XML\_SCHEMAS\_ERR\_UNDECLAREDELEM= 2XML\_SCHEMAS\_ERR\_NOTTOPLEVEL= 3XML\_SCHEMAS\_ERR\_MISSING= 4XML\_SCHEMAS\_ERR\_WRONGELEM= 5XML\_SCHEMAS\_ERR\_NOTYPE= 6XML\_SCHEMAS\_ERR\_NOROLLBACK= 7XML\_SCHEMAS\_ERR\_ISABSTRACT= 8XML\_SCHEMAS\_ERR\_NOTEMPTY= 9XML\_SCHEMAS\_ERR\_ELEMCONT= 10XML\_SCHEMAS\_ERR\_HAVEDEFAULT= 11XML\_SCHEMAS\_ERR\_NOTNILLABLE= 12XML\_SCHEMAS\_ERR\_EXTRACONTENT= 13XML\_SCHEMAS\_ERR\_INVALIDATTR= 14XML\_SCHEMAS\_ERR\_INVALIDELEM= 15XML\_SCHEMAS\_ERR\_NOTDETERMINIST= 16XML\_SCHEMAS\_ERR\_CONSTRUCT= 17XML\_SCHEMAS\_ERR\_INTERNAL= 18XML\_SCHEMAS\_ERR\_NOTSIMPLE= 19XML\_SCHEMAS\_ERR\_ATTRUNKNOWN= 20XML\_SCHEMAS\_ERR\_ATTRINVALID= 21XML\_SCHEMAS\_ERR\_VALUE= 22XML\_SCHEMAS\_ERR\_FACET= 23XML\_SCHEMAS\_ERR\_= 24XML\_SCHEMAS\_ERR\_XXX= 25
}
Enum xmlSchemaValidOption {XML\_SCHEMA\_VAL\_VC\_I\_CREATE= 1 : Default/fixed: create an[attribute](libxml-SAX.html#attribute)node * or an element's text node on the instance. *
}
void xmlSchemaDump (FILE * output,
[xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
Dump a Schema structure.
| output: | the file output | | schema: | a schema structure |
void xmlSchemaFree ([xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
Deallocate a Schema structure.
| schema: | a schema structure |
void xmlSchemaFreeParserCtxt ([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt)
Free the resources associated to the schema parser context
| ctxt: | the schema parser context |
void xmlSchemaFreeValidCtxt ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
Free the resources associated to the schema validation context
| ctxt: | the schema validation context |
int xmlSchemaGetParserErrors ([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)* err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)* 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 |
int xmlSchemaGetValidErrors ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)* err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)* warn,
void ** ctx)
Get the error and warning callback informations
| ctxt: | a XML-Schema validation context | | err: | the error function result | | warn: | the warning function result | | ctx: | the functions context result | | Returns: | -1 in case of error and 0 otherwise |
int xmlSchemaIsValid ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
Check if any error was detected during validation.
| ctxt: | the schema validation context | | Returns: | 1 if valid so far, 0 if errors were detected, and -1 in case of internal error. |
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)xmlSchemaNewDocParserCtxt ([xmlDocPtr](libxml-tree.html#xmlDocPtr)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 |
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)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 |
[xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)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 |
[xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)xmlSchemaNewValidCtxt ([xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)schema)
Create an XML Schemas validation context based on the given schema.
| schema: | a precompiled XML Schemas | | Returns: | the validation context or NULL in case of error |
[xmlSchemaPtr](libxml-xmlschemas.html#xmlSchemaPtr)xmlSchemaParse ([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)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 |
[xmlSchemaSAXPlugPtr](libxml-xmlschemas.html#xmlSchemaSAXPlugPtr)xmlSchemaSAXPlug ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSAXHandlerPtr](libxml-tree.html#xmlSAXHandlerPtr)* sax,
void ** user_data)
Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.
| ctxt: | a schema validation context | | sax: | a pointer to the original xmlSAXHandlerPtr | | user_data: | a pointer to the original SAX user data pointer | | Returns: | a pointer to a data structure needed to unplug the validation layer or NULL in case of errors. |
int xmlSchemaSAXUnplug ([xmlSchemaSAXPlugPtr](libxml-xmlschemas.html#xmlSchemaSAXPlugPtr)plug)
Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.
| plug: | a data structure returned by xmlSchemaSAXPlug | | Returns: | 0 in case of success and -1 in case of failure. |
void xmlSchemaSetParserErrors ([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)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 |
void xmlSchemaSetParserStructuredErrors ([xmlSchemaParserCtxtPtr](libxml-xmlschemas.html#xmlSchemaParserCtxtPtr)ctxt,
[xmlStructuredErrorFunc](libxml-xmlerror.html#xmlStructuredErrorFunc)serror,
void * ctx)
Set the structured error callback
| ctxt: | a schema parser context | | serror: | the structured error function | | ctx: | the functions context |
void xmlSchemaSetValidErrors ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlSchemaValidityErrorFunc](libxml-xmlschemas.html#xmlSchemaValidityErrorFunc)err,
[xmlSchemaValidityWarningFunc](libxml-xmlschemas.html#xmlSchemaValidityWarningFunc)warn,
void * ctx)
Set the error and warning callback informations
| ctxt: | a schema validation context | | err: | the error function | | warn: | the warning function | | ctx: | the functions context |
int xmlSchemaSetValidOptions ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
int options)
Sets the options to be used during the validation.
| ctxt: | a schema validation context | | options: | a combination of xmlSchemaValidOption | | Returns: | 0 in case of success, -1 in case of an API error. |
void xmlSchemaSetValidStructuredErrors ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlStructuredErrorFunc](libxml-xmlerror.html#xmlStructuredErrorFunc)serror,
void * ctx)
Set the structured error callback
| ctxt: | a schema validation context | | serror: | the structured error function | | ctx: | the functions context |
int xmlSchemaValidCtxtGetOptions ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
Get the validation context options.
| ctxt: | a schema validation context | | Returns: | the option combination or -1 on error. |
[xmlParserCtxtPtr](libxml-tree.html#xmlParserCtxtPtr)xmlSchemaValidCtxtGetParserCtxt ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt)
allow access to the parser context of the schema validation context
| ctxt: | a schema validation context | | Returns: | the parser context of the schema validation context or NULL in case of error. |
int xmlSchemaValidateDoc ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
Validate a document tree in memory.
| ctxt: | a schema validation context | | doc: | a parsed document tree | | Returns: | 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlSchemaValidateFile ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
const char * filename,
int options)
Do a schemas validation of the given resource, it will use the SAX streamable validation internally.
| ctxt: | a schema validation context | | filename: | the URI of the instance | | options: | a future set of options, currently unused | | Returns: | 0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error. |
int xmlSchemaValidateOneElement ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
Validate a branch of a tree, starting with the given @elem.
| ctxt: | a schema validation context | | elem: | an element node | | Returns: | 0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error. |
void xmlSchemaValidateSetFilename ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)vctxt,
const char * filename)
Workaround to provide file error reporting information when this is not provided by current APIs
| vctxt: | the schema validation context | | filename: | the file name |
void xmlSchemaValidateSetLocator ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)vctxt,
[xmlSchemaValidityLocatorFunc](libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc)f,
void * ctxt)
Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.
| vctxt: | a schema validation context | | f: | the locator function pointer | | ctxt: | the locator context |
int xmlSchemaValidateStream ([xmlSchemaValidCtxtPtr](libxml-xmlschemas.html#xmlSchemaValidCtxtPtr)ctxt,
[xmlParserInputBufferPtr](libxml-tree.html#xmlParserInputBufferPtr)input,
[xmlCharEncoding](libxml-encoding.html#xmlCharEncoding)enc,
[xmlSAXHandlerPtr](libxml-tree.html#xmlSAXHandlerPtr)sax,
void * user_data)
Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.
| ctxt: | a schema validation context | | input: | the input to use for reading the data | | enc: | an optional encoding information | | sax: | a SAX handler for the resulting events | | user_data: | the context to provide to the SAX handler. | | Returns: | 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error. |
Function type: xmlSchemaValidityErrorFunc
void xmlSchemaValidityErrorFunc (void * ctx,
const char * msg,
... ...)
Signature of an error callback from an XSD validation
| ctx: | the validation context | | msg: | the message | | ...: | extra arguments |
Function type: xmlSchemaValidityLocatorFunc
int xmlSchemaValidityLocatorFunc (void * ctx,
const char ** file,
unsigned long * line)
A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected
| ctx: | user provided context | | file: | returned file information | | line: | returned line information | | Returns: | 0 in case of success and -1 in case of error |
Function type: xmlSchemaValidityWarningFunc
void xmlSchemaValidityWarningFunc (void * ctx,
const char * msg,
... ...)
Signature of a warning callback from an XSD validation
| ctx: | the validation context | | msg: | the message | | ...: | extra arguments |
|
|
|
|
|