|
libxml2
|
XML Schematron implementation. More...
Typedefs | |
| typedef struct _xmlSchematron | xmlSchematron |
| Schematron schema. | |
| typedef void(* | xmlSchematronValidityErrorFunc) (void *ctx, const char *msg,...) |
| Signature of an error callback from a Schematron validation. | |
| typedef void(* | xmlSchematronValidityWarningFunc) (void *ctx, const char *msg,...) |
| Signature of a warning callback from a Schematron validation. | |
| typedef struct _xmlSchematronParserCtxt | xmlSchematronParserCtxt |
| Schematron parser context. | |
| typedef struct _xmlSchematronValidCtxt | xmlSchematronValidCtxt |
| Schematron validation context. | |
Enumerations | |
| enum | xmlSchematronValidOptions |
| Schematron validation options. More... | |
Functions | |
| xmlSchematronParserCtxt * | xmlSchematronNewParserCtxt (const char *URL) |
| Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file. | |
| xmlSchematronParserCtxt * | xmlSchematronNewMemParserCtxt (const char *buffer, int size) |
| Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file. | |
| xmlSchematronParserCtxt * | xmlSchematronNewDocParserCtxt (xmlDoc *doc) |
| Create an XML Schematrons parse context for that document. | |
| void | xmlSchematronFreeParserCtxt (xmlSchematronParserCtxt *ctxt) |
| Free the resources associated to the schema parser context. | |
| xmlSchematron * | xmlSchematronParse (xmlSchematronParserCtxt *ctxt) |
| parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances. | |
| void | xmlSchematronFree (xmlSchematron *schema) |
| Deallocate a Schematron structure. | |
| void | xmlSchematronSetValidStructuredErrors (xmlSchematronValidCtxt *ctxt, xmlStructuredErrorFunc serror, void *ctx) |
| Set the structured error callback. | |
| xmlSchematronValidCtxt * | xmlSchematronNewValidCtxt (xmlSchematron *schema, int options) |
| Create an XML Schematrons validation context based on the given schema. | |
| void | xmlSchematronFreeValidCtxt (xmlSchematronValidCtxt *ctxt) |
| Free the resources associated to the schema validation context. | |
| int | xmlSchematronValidateDoc (xmlSchematronValidCtxt *ctxt, xmlDoc *instance) |
| Validate a tree instance against the schematron. | |
XML Schematron implementation.
interface to the XML Schematron validity checking.
| typedef void(* xmlSchematronValidityErrorFunc) (void *ctx, const char *msg,...) |
Signature of an error callback from a Schematron validation.
| ctx | the validation context |
| msg | the message |
| ... | extra arguments |
| typedef void(* xmlSchematronValidityWarningFunc) (void *ctx, const char *msg,...) |
Signature of a warning callback from a Schematron validation.
| ctx | the validation context |
| msg | the message |
| ... | extra arguments |
Schematron validation options.
| Enumerator | |
|---|---|
| XML_SCHEMATRON_OUT_QUIET | quiet no report |
| XML_SCHEMATRON_OUT_TEXT | build a textual report |
| XML_SCHEMATRON_OUT_XML | output SVRL |
| XML_SCHEMATRON_OUT_ERROR | output via xmlStructuredErrorFunc |
| XML_SCHEMATRON_OUT_FILE | output to a file descriptor |
| XML_SCHEMATRON_OUT_BUFFER | output to a buffer |
| XML_SCHEMATRON_OUT_IO | output to I/O mechanism |
| void xmlSchematronFree | ( | xmlSchematron * | schema | ) |
Deallocate a Schematron structure.
| schema | a schema structure |
| void xmlSchematronFreeParserCtxt | ( | xmlSchematronParserCtxt * | ctxt | ) |
Free the resources associated to the schema parser context.
| ctxt | the schema parser context |
| void xmlSchematronFreeValidCtxt | ( | xmlSchematronValidCtxt * | ctxt | ) |
Free the resources associated to the schema validation context.
| ctxt | the schema validation context |
| xmlSchematronParserCtxt * xmlSchematronNewDocParserCtxt | ( | xmlDoc * | doc | ) |
Create an XML Schematrons parse context for that document.
NB. The document may be modified during the parsing process.
| doc | a preparsed document tree |
| xmlSchematronParserCtxt * xmlSchematronNewMemParserCtxt | ( | const char * | buffer, |
| int | size ) |
Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.
| buffer | a pointer to a char array containing the schemas |
| size | the size of the array |
| xmlSchematronParserCtxt * xmlSchematronNewParserCtxt | ( | const char * | URL | ) |
Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.
| URL | the location of the schema |
| xmlSchematronValidCtxt * xmlSchematronNewValidCtxt | ( | xmlSchematron * | schema, |
| int | options ) |
Create an XML Schematrons validation context based on the given schema.
| schema | a precompiled XML Schematrons |
| options | a set of xmlSchematronValidOptions |
| xmlSchematron * xmlSchematronParse | ( | xmlSchematronParserCtxt * | ctxt | ) |
parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances.
| ctxt | a schema validation context |
| void xmlSchematronSetValidStructuredErrors | ( | xmlSchematronValidCtxt * | ctxt, |
| xmlStructuredErrorFunc | serror, | ||
| void * | ctx ) |
Set the structured error callback.
| ctxt | a Schematron validation context |
| serror | the structured error function |
| ctx | the functions context |
| int xmlSchematronValidateDoc | ( | xmlSchematronValidCtxt * | ctxt, |
| xmlDoc * | instance ) |
Validate a tree instance against the schematron.
| ctxt | the schema validation context |
| instance | the document instance tree |