--- embedaddon/libxml2/doc/html/libxml-xmlschemas.html 2013/07/22 01:22:26 1.1.1.2 +++ embedaddon/libxml2/doc/html/libxml-xmlschemas.html 2014/06/15 19:53:36 1.1.1.3 @@ -47,10 +47,15 @@ The content of this structure is not made public by th
int xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr doc)
int xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename,
int options)
int xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,+
xmlNodePtr elem)
void xmlSchemaValidateSetFilename (xmlSchemaValidCtxtPtr vctxt,+
const char * filename)
void xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f,
void * ctxt)
int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
Function type: xmlSchemaValidityErrorFunc void xmlSchemaValidityErrorFunc (void * ctx,+
const char * msg,
... ...)
Function type: xmlSchemaValidityLocatorFunc +int xmlSchemaValidityLocatorFunc (void * ctx,
const char ** file,
unsigned long * line) +
Function type: xmlSchemaValidityWarningFunc void xmlSchemaValidityWarningFunc (void * ctx,@@ -162,11 +167,18 @@ The content of this structure is not made public by th
const char * msg,
... ...)
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 ctxt,
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. |
int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
+
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. Function: xmlSchemaValidateSetFilename
void xmlSchemaValidateSetFilename (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 Function: xmlSchemaValidateSetLocator
void xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
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 Function: xmlSchemaValidateStream
int xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
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
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
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
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