[All Packages]  [This Package]

Class: XMLSchema

This class contains top-level methods for invoking the schema processor.


Method Index

initialize Initialize Schema Processor
load Load an additional Schema file
target Return target namespace URI
terminate Terminate Schema Processor
validate Validate an instance document against a Schema

Methods

initialize

Function:
Initialize Schema Processor

 
Prototype:
uword initialize(XMLParser *parser)

 
Arguments:
parser -- XMLParser object used for allocating memory

 
Returns:
uword -- Error code, 0 for success

load

Function:
Explicitly load a schema (if not already loaded); returns a pointer to the schema, new or old. It is not usually necessary to use this method, as the URL of a default schema may be passed directly to the validate method.

 
Prototype:
uword load(oratext *uri, oratext *nsp, Schema **schema)

 
Arguments:
uri -- URI of Schema
nsp -- Namespace of Schema (may be NULL)
schema -- Returned pointed to schema

 
Returns:
uword -- Error code, 0 for success

validate

Function:
Validates an instance document against a Schema

 
Prototype:
uword validate(Element *root, oratext *url)

 
Arguments:
root -- root element of the document returned by parser.getDocumentElement()
url -- URL of default schema (optional)

 
Returns:
uword -- Error code, 0 on success

 

target

Function:
Return its target namespace URI given a Schema handle (returned by load())

 
Prototype:
oratext *target(Schema *schema)

 
Arguments:
schema -- Schema handle as returned by load() method

 
Returns:
target namespace URI
 

terminate

Function:
Terminate Schema Processor, tear down, free memory, etc

 
Prototype:
void terminate(void)

 
Arguments:
None

 
Returns:
void