|
Packit |
423ecb |
|
|
Packit |
423ecb |
<html>
|
|
Packit |
423ecb |
<head>
|
|
Packit |
423ecb |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
Packit |
423ecb |
<title>schematron: XML Schemastron implementation</title>
|
|
Packit |
423ecb |
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
|
|
Packit |
423ecb |
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
|
|
Packit |
423ecb |
<link rel="up" href="general.html" title="API"/>
|
|
Packit |
423ecb |
<link rel="stylesheet" href="style.css" type="text/css"/>
|
|
Packit |
423ecb |
<link rel="chapter" href="general.html" title="API"/>
|
|
Packit |
423ecb |
</head>
|
|
Packit |
423ecb |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
libxml2 Reference Manual
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
schematron
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
schematron - XML Schemastron implementation
|
|
Packit |
423ecb |
interface to the XML Schematron validity checking.
|
|
Packit |
423ecb |
Author(s): Daniel Veillard
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Synopsis
|
|
Packit |
423ecb |
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
|
|
Packit |
423ecb |
typedef enum xmlSchematronValidOptions;
|
|
Packit |
423ecb |
typedef xmlSchematron * xmlSchematronPtr;
|
|
Packit |
423ecb |
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
|
|
Packit |
423ecb |
typedef struct _xmlSchematron xmlSchematron;
|
|
Packit |
423ecb |
typedef xmlSchematronValidCtxt * xmlSchematronValidCtxtPtr;
|
|
Packit |
423ecb |
typedef xmlSchematronParserCtxt * xmlSchematronParserCtxtPtr;
|
|
Packit |
423ecb |
int xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance);
|
|
Packit |
423ecb |
void xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
|
|
Packit |
423ecb |
xmlSchematronParserCtxtPtr xmlSchematronNewMemParserCtxt (const char * buffer, int size);
|
|
Packit |
423ecb |
typedef void xmlSchematronValidityErrorFunc (void * ctx, const char * msg, ... ...);
|
|
Packit |
423ecb |
xmlSchematronParserCtxtPtr xmlSchematronNewParserCtxt (const char * URL);
|
|
Packit |
423ecb |
typedef void xmlSchematronValidityWarningFunc (void * ctx, const char * msg, ... ...);
|
|
Packit |
423ecb |
void xmlSchematronFree (xmlSchematronPtr schema);
|
|
Packit |
423ecb |
void xmlSchematronSetValidStructuredErrors (xmlSchematronValidCtxtPtr ctxt, xmlStructuredErrorFunc serror, void * ctx);
|
|
Packit |
423ecb |
void xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
|
|
Packit |
423ecb |
xmlSchematronPtr xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
|
|
Packit |
423ecb |
xmlSchematronParserCtxtPtr xmlSchematronNewDocParserCtxt (xmlDocPtr doc);
|
|
Packit |
423ecb |
xmlSchematronValidCtxtPtr xmlSchematronNewValidCtxt (xmlSchematronPtr schema, int options);
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Description
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Details
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The content of this structure is not made public by the API.
|
|
Packit |
423ecb |
} xmlSchematron;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Structure xmlSchematronParserCtxtstruct _xmlSchematronParserCtxt {
|
|
Packit |
423ecb |
The content of this structure is not made public by the API.
|
|
Packit |
423ecb |
} xmlSchematronParserCtxt;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Structure xmlSchematronValidCtxtstruct _xmlSchematronValidCtxt {
|
|
Packit |
423ecb |
The content of this structure is not made public by the API.
|
|
Packit |
423ecb |
} xmlSchematronValidCtxt;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_QUIET = 1 /* quiet no report */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_TEXT = 2 /* build a textual report */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_XML = 4 /* output SVRL */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_ERROR = 8 /* output via xmlStructuredErrorFunc */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_FILE = 256 /* output to a file descriptor */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_BUFFER = 512 /* output to a buffer */
|
|
Packit |
423ecb |
XML_SCHEMATRON_OUT_IO = 1024 /* output to I/O mechanism */
|
|
Packit |
423ecb |
};
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Signature of an error callback from a Schematron validation
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the validation context | <tt>msg</tt>: | the message | <tt>...</tt>: | extra arguments |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Signature of a warning callback from a Schematron validation
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the validation context | <tt>msg</tt>: | the message | <tt>...</tt>: | extra arguments |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Deallocate a Schematron structure.
|
|
Packit |
423ecb |
<tt>schema</tt>: | a schema structure |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Free the resources associated to the schema parser context
|
|
Packit |
423ecb |
<tt>ctxt</tt>: | the schema parser context |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Free the resources associated to the schema validation context
|
|
Packit |
423ecb |
<tt>ctxt</tt>: | the schema validation context |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.
|
|
Packit |
423ecb |
<tt>doc</tt>: | a preparsed document tree | <tt>Returns</tt>: | the parser context or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.
|
|
Packit |
423ecb |
<tt>buffer</tt>: | a pointer to a char array containing the schemas | <tt>size</tt>: | the size of the array | <tt>Returns</tt>: | the parser context or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.
|
|
Packit |
423ecb |
<tt>URL</tt>: | the location of the schema | <tt>Returns</tt>: | the parser context or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an XML Schematrons validation context based on the given schema.
|
|
Packit |
423ecb |
<tt>schema</tt>: | a precompiled XML Schematrons | <tt>options</tt>: | a set of xmlSchematronValidOptions | <tt>Returns</tt>: | the validation context or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.
|
|
Packit |
423ecb |
<tt>ctxt</tt>: | a schema validation context | <tt>Returns</tt>: | the internal XML Schematron structure built from the resource or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Set the structured error callback
|
|
Packit |
423ecb |
<tt>ctxt</tt>: | a Schematron validation context | <tt>serror</tt>: | the structured error function | <tt>ctx</tt>: | the functions context |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Validate a tree instance against the schematron
|
|
Packit |
423ecb |
<tt>ctxt</tt>: | the schema validation context | <tt>instance</tt>: | the document instace tree | <tt>Returns</tt>: | 0 in case of success, -1 in case of internal error and an error count otherwise. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
</body>
|
|
Packit |
423ecb |
</html>
|