From 112cb5bb5475afec1c1cbf1d6728ce4880d0fee8 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 12 Jul 2005 19:58:48 +0000 Subject: Load /tmp/tmp.zfIyNk/libxml2-2.6.20 into packages/libxml2/branches/upstream/current. --- doc/html/libxml-xmlschemas.html | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'doc/html/libxml-xmlschemas.html') diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html index 69cbc50..201b09b 100644 --- a/doc/html/libxml-xmlschemas.html +++ b/doc/html/libxml-xmlschemas.html @@ -10,11 +10,14 @@ A:link, A:visited, A:active { text-decoration: underline } Module xmlschemas from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlschemas from libxml2

API Menu
API Indexes
Related links

interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

Table of Contents

Structure xmlSchema
struct _xmlSchema + Module xmlschemas from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlschemas from libxml2

API Menu
API Indexes
Related links

interface to the XML Schemas handling and schema validity checking, it is incomplete right now.

Table of Contents

Structure xmlSchema
struct _xmlSchema
Structure xmlSchemaParserCtxt
struct _xmlSchemaParserCtxt The content of this structure is not made public by the API.
Typedef xmlSchemaParserCtxt * xmlSchemaParserCtxtPtr
 
Typedef xmlSchema * xmlSchemaPtr
+
Typedef xmlSchemaSAXPlugStruct * xmlSchemaSAXPlugPtr
+
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.
Typedef xmlSchemaValidCtxt * xmlSchemaValidCtxtPtr
@@ -26,16 +29,20 @@ The content of this structure is not made public by the API.
 
void	xmlSchemaFreeValidCtxt		(xmlSchemaValidCtxtPtr ctxt)
int	xmlSchemaGetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx)
int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void ** ctx)
+
int	xmlSchemaIsValid		(xmlSchemaValidCtxtPtr ctxt)
xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)
xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
int size)
xmlSchemaParserCtxtPtr	xmlSchemaNewParserCtxt	(const char * URL)
xmlSchemaValidCtxtPtr	xmlSchemaNewValidCtxt	(xmlSchemaPtr schema)
xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)
+
xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
xmlSAXHandlerPtr * sax,
void ** user_data)
+
int	xmlSchemaSAXUnplug		(xmlSchemaSAXPlugPtr plug)
void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)
void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)
int	xmlSchemaSetValidOptions	(xmlSchemaValidCtxtPtr ctxt, 
int options)
int	xmlSchemaValidCtxtGetOptions	(xmlSchemaValidCtxtPtr ctxt)
int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
xmlDocPtr doc)
+
int	xmlSchemaValidateFile		(xmlSchemaValidCtxtPtr ctxt, 
const char * filename,
int options)
int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
xmlNodePtr elem)
int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
Function type: xmlSchemaValidityErrorFunc
@@ -69,6 +76,8 @@ void	xmlSchemaValidityWarningFunc	(v
     void *	volatiles	: Misc. helper items (e.g. reference item
 }

Structure xmlSchemaParserCtxt

Structure xmlSchemaParserCtxt
struct _xmlSchemaParserCtxt { The content of this structure is not made public by the API. +}

Structure xmlSchemaSAXPlugStruct

Structure xmlSchemaSAXPlugStruct
struct _xmlSchemaSAXPlug { +The content of this structure is not made public by the API. }

Structure xmlSchemaValidCtxt

Structure xmlSchemaValidCtxt
struct _xmlSchemaValidCtxt { The content of this structure is not made public by the API. }

Enum xmlSchemaValidError

Enum xmlSchemaValidError {
@@ -114,7 +123,9 @@ The content of this structure is not made public by the API.
 

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

Function: xmlSchemaGetValidErrors

int	xmlSchemaGetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc * err,
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

Function: xmlSchemaNewDocParserCtxt

xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(xmlDocPtr doc)
+
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

Function: xmlSchemaIsValid

int	xmlSchemaIsValid		(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.

Function: xmlSchemaNewDocParserCtxt

xmlSchemaParserCtxtPtr	xmlSchemaNewDocParserCtxt	(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

Function: xmlSchemaNewMemParserCtxt

xmlSchemaParserCtxtPtr	xmlSchemaNewMemParserCtxt	(const char * buffer, 
int size)

Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.

@@ -124,7 +135,11 @@ The content of this structure is not made public by the API.

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

Function: xmlSchemaParse

xmlSchemaPtr	xmlSchemaParse		(xmlSchemaParserCtxtPtr ctxt)

parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances. *WARNING* this interface is highly subject to change

-
ctxt:a schema validation context
Returns:the internal XML Schema structure built from the resource or NULL in case of error

Function: xmlSchemaSetParserErrors

void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)
+
ctxt:a schema validation context
Returns:the internal XML Schema structure built from the resource or NULL in case of error

Function: xmlSchemaSAXPlug

xmlSchemaSAXPlugPtr	xmlSchemaSAXPlug	(xmlSchemaValidCtxtPtr ctxt, 
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.

Function: xmlSchemaSAXUnplug

int	xmlSchemaSAXUnplug		(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.

Function: xmlSchemaSetParserErrors

void	xmlSchemaSetParserErrors	(xmlSchemaParserCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
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

Function: xmlSchemaSetValidErrors

void	xmlSchemaSetValidErrors		(xmlSchemaValidCtxtPtr ctxt, 
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void * ctx)

Set the error and warning callback informations

@@ -134,10 +149,12 @@ The content of this structure is not made public by the API.

Get the validation context options.

ctxt:a schema validation context
Returns:the option combination or -1 on error.

Function: xmlSchemaValidateDoc

int	xmlSchemaValidateDoc		(xmlSchemaValidCtxtPtr ctxt, 
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.

Function: xmlSchemaValidateOneElement

int	xmlSchemaValidateOneElement	(xmlSchemaValidCtxtPtr ctxt, 
xmlNodePtr elem)
+
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.

Function: xmlSchemaValidateFile

int	xmlSchemaValidateFile		(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.

Function: xmlSchemaValidateOneElement

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.

Function: xmlSchemaValidateStream

int	xmlSchemaValidateStream		(xmlSchemaValidCtxtPtr ctxt, 
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void * user_data)
-

Validate a document tree in memory.

+

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,
... ...)

ctx:
msg:
...:

-- cgit v1.2.3