VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/libxml/schematron.h@ 107935

Last change on this file since 107935 was 105420, checked in by vboxsync, 7 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1/*
2 * Summary: XML Schematron implementation
3 * Description: interface to the XML Schematron validity checking.
4 *
5 * Copy: See Copyright for the status of this software.
6 *
7 * Author: Daniel Veillard
8 */
9
10
11#ifndef __XML_SCHEMATRON_H__
12#define __XML_SCHEMATRON_H__
13
14#include <libxml/xmlversion.h>
15
16#ifdef LIBXML_SCHEMATRON_ENABLED
17
18#include <libxml/xmlerror.h>
19#include <libxml/tree.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25typedef enum {
26 XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
27 XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
28 XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
29 XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
30 XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
31 XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
32 XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
33} xmlSchematronValidOptions;
34
35/**
36 * The schemas related types are kept internal
37 */
38typedef struct _xmlSchematron xmlSchematron;
39typedef xmlSchematron *xmlSchematronPtr;
40
41/**
42 * xmlSchematronValidityErrorFunc:
43 * @ctx: the validation context
44 * @msg: the message
45 * @...: extra arguments
46 *
47 * Signature of an error callback from a Schematron validation
48 */
49typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
50
51/**
52 * xmlSchematronValidityWarningFunc:
53 * @ctx: the validation context
54 * @msg: the message
55 * @...: extra arguments
56 *
57 * Signature of a warning callback from a Schematron validation
58 */
59typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
60
61/**
62 * A schemas validation context
63 */
64typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
65typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
66
67typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
68typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
69
70/*
71 * Interfaces for parsing.
72 */
73XMLPUBFUN xmlSchematronParserCtxtPtr
74 xmlSchematronNewParserCtxt (const char *URL);
75XMLPUBFUN xmlSchematronParserCtxtPtr
76 xmlSchematronNewMemParserCtxt(const char *buffer,
77 int size);
78XMLPUBFUN xmlSchematronParserCtxtPtr
79 xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
80XMLPUBFUN void
81 xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
82/*****
83XMLPUBFUN void
84 xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
85 xmlSchematronValidityErrorFunc err,
86 xmlSchematronValidityWarningFunc warn,
87 void *ctx);
88XMLPUBFUN int
89 xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
90 xmlSchematronValidityErrorFunc * err,
91 xmlSchematronValidityWarningFunc * warn,
92 void **ctx);
93XMLPUBFUN int
94 xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
95 *****/
96XMLPUBFUN xmlSchematronPtr
97 xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
98XMLPUBFUN void
99 xmlSchematronFree (xmlSchematronPtr schema);
100/*
101 * Interfaces for validating
102 */
103XMLPUBFUN void
104 xmlSchematronSetValidStructuredErrors(
105 xmlSchematronValidCtxtPtr ctxt,
106 xmlStructuredErrorFunc serror,
107 void *ctx);
108/******
109XMLPUBFUN void
110 xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
111 xmlSchematronValidityErrorFunc err,
112 xmlSchematronValidityWarningFunc warn,
113 void *ctx);
114XMLPUBFUN int
115 xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
116 xmlSchematronValidityErrorFunc *err,
117 xmlSchematronValidityWarningFunc *warn,
118 void **ctx);
119XMLPUBFUN int
120 xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
121 int options);
122XMLPUBFUN int
123 xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
124XMLPUBFUN int
125 xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
126 xmlNodePtr elem);
127 *******/
128
129XMLPUBFUN xmlSchematronValidCtxtPtr
130 xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
131 int options);
132XMLPUBFUN void
133 xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
134XMLPUBFUN int
135 xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
136 xmlDocPtr instance);
137
138#ifdef __cplusplus
139}
140#endif
141
142#endif /* LIBXML_SCHEMATRON_ENABLED */
143#endif /* __XML_SCHEMATRON_H__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette