1 * Summary: incomplete XML Schemas structure implementation
2 * Description: interface to the XML Schemas handling and schema validity
3 * checking, it is incomplete right now.
5 * Copy: See Copyright for the status of this software.
7 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
9 /if not defined(XML_SCHEMA_H__)
10 /define XML_SCHEMA_H__
12 /include "libxmlrpg/xmlversion"
14 /if defined(LIBXML_SCHEMAS_ENABLED)
16 /include "libxmlrpg/tree"
18 * This error codes are obsolete; not used any more.
20 d xmlSchemaValidError...
21 d s 10i 0 based(######typedef######) enum
22 d XML_SCHEMAS_ERR_OK...
24 d XML_SCHEMAS_ERR_NOROOT...
26 d XML_SCHEMAS_ERR_UNDECLAREDELEM...
28 d XML_SCHEMAS_ERR_NOTTOPLEVEL...
30 d XML_SCHEMAS_ERR_MISSING...
32 d XML_SCHEMAS_ERR_WRONGELEM...
34 d XML_SCHEMAS_ERR_NOTYPE...
36 d XML_SCHEMAS_ERR_NOROLLBACK...
38 d XML_SCHEMAS_ERR_ISABSTRACT...
40 d XML_SCHEMAS_ERR_NOTEMPTY...
42 d XML_SCHEMAS_ERR_ELEMCONT...
44 d XML_SCHEMAS_ERR_HAVEDEFAULT...
46 d XML_SCHEMAS_ERR_NOTNILLABLE...
48 d XML_SCHEMAS_ERR_EXTRACONTENT...
50 d XML_SCHEMAS_ERR_INVALIDATTR...
52 d XML_SCHEMAS_ERR_INVALIDELEM...
54 d XML_SCHEMAS_ERR_NOTDETERMINIST...
56 d XML_SCHEMAS_ERR_CONSTRUCT...
58 d XML_SCHEMAS_ERR_INTERNAL...
60 d XML_SCHEMAS_ERR_NOTSIMPLE...
62 d XML_SCHEMAS_ERR_ATTRUNKNOWN...
64 d XML_SCHEMAS_ERR_ATTRINVALID...
66 d XML_SCHEMAS_ERR_VALUE...
68 d XML_SCHEMAS_ERR_FACET...
72 d XML_SCHEMAS_ERR_XXX...
75 * ATTENTION: Change xmlSchemaSetValidOptions's check
76 * for invalid values, if adding to the validation
79 * xmlSchemaValidOption:
81 * This is the set of XML Schema validation options.
83 d xmlSchemaValidOption...
84 d s 10i 0 based(######typedef######) enum
86 * Default/fixed: create an attribute node
87 * or an element's text node on the instance.
89 d XML_SCHEMA_VAL_VC_I_CREATE...
93 * assemble schemata using
94 * xsi:schemaLocation and
95 * xsi:noNamespaceSchemaLocation
97 d XML_SCHEMA_VAL_XSI_ASSEMBLE...
101 * The schemas related types are kept internal
103 d xmlSchemaPtr s * based(######typedef######)
105 * xmlSchemaValidityErrorFunc:
106 * @ctx: the validation context
108 * @...: extra arguments
110 * Signature of an error callback from an XSD validation
112 d xmlSchemaValidityErrorFunc...
113 d s * based(######typedef######)
116 * xmlSchemaValidityWarningFunc:
117 * @ctx: the validation context
119 * @...: extra arguments
121 * Signature of a warning callback from an XSD validation
123 d xmlSchemaValidityWarningFunc...
124 d s * based(######typedef######)
127 * A schemas validation context
129 d xmlSchemaParserCtxtPtr...
130 d s * based(######typedef######)
132 d xmlSchemaValidCtxtPtr...
133 d s * based(######typedef######)
135 * xmlSchemaValidityLocatorFunc:
136 * @ctx: user provided context
137 * @file: returned file information
138 * @line: returned line information
140 * A schemas validation locator, a callback called by the validator.
141 * This is used when file or node informations are not available
142 * to find out what file and line number are affected
144 * Returns: 0 in case of success and -1 in case of error
146 d xmlSchemaValidityLocatorFunc...
147 d s * based(######typedef######)
150 * Interfaces for parsing.
152 d xmlSchemaNewParserCtxt...
153 d pr extproc('xmlSchemaNewParserCtxt')
154 d like(xmlSchemaParserCtxtPtr)
155 d URL * value options(*string) const char *
157 d xmlSchemaNewMemParserCtxt...
158 d pr extproc('xmlSchemaNewMemParserCtxt')
159 d like(xmlSchemaParserCtxtPtr)
160 d buffer * value options(*string) const char *
163 d xmlSchemaNewDocParserCtxt...
164 d pr extproc('xmlSchemaNewDocParserCtxt')
165 d like(xmlSchemaParserCtxtPtr)
166 d doc value like(xmlDocPtr)
168 d xmlSchemaFreeParserCtxt...
169 d pr extproc('xmlSchemaFreeParserCtxt')
170 d ctxt value like(xmlSchemaParserCtxtPtr)
172 d xmlSchemaSetParserErrors...
173 d pr extproc('xmlSchemaSetParserErrors')
174 d ctxt value like(xmlSchemaParserCtxtPtr)
176 d like(xmlSchemaValidityErrorFunc)
178 d like(xmlSchemaValidityWarningFunc)
181 d xmlSchemaSetParserStructuredErrors...
183 d 'xmlSchemaSetParserStructuredErrors')
184 d ctxt value like(xmlSchemaParserCtxtPtr)
185 d serror value like(xmlStructuredErrorFunc)
188 d xmlSchemaGetParserErrors...
189 d pr 10i 0 extproc('xmlSchemaGetParserErrors')
190 d ctxt value like(xmlSchemaParserCtxtPtr)
191 d err like(xmlSchemaValidityErrorFunc)
192 d warn like(xmlSchemaValidityWarningFunc)
195 d xmlSchemaIsValid...
196 d pr 10i 0 extproc('xmlSchemaIsValid')
197 d ctxt value like(xmlSchemaValidCtxtPtr)
199 d xmlSchemaParse pr extproc('xmlSchemaParse')
201 d ctxt value like(xmlSchemaParserCtxtPtr)
203 d xmlSchemaFree pr extproc('xmlSchemaFree')
204 d schema value like(xmlSchemaPtr)
206 /if defined(LIBXML_OUTPUT_ENABLED)
207 d xmlSchemaDump pr extproc('xmlSchemaDump')
208 d output * value FILE *
209 d schema value like(xmlSchemaPtr)
210 /endif LIBXML_OUTPUT_ENABLD
212 * Interfaces for validating
214 d xmlSchemaSetValidErrors...
215 d pr extproc('xmlSchemaSetValidErrors')
216 d ctxt value like(xmlSchemaValidCtxtPtr)
218 d like(xmlSchemaValidityErrorFunc)
220 d like(xmlSchemaValidityWarningFunc)
223 d xmlSchemaSetValidStructuredErrors...
225 d 'xmlSchemaSetValidStructuredErrors')
226 d ctxt value like(xmlSchemaValidCtxtPtr)
227 d serror value like(xmlStructuredErrorFunc)
230 d xmlSchemaGetValidErrors...
231 d pr 10i 0 extproc('xmlSchemaGetValidErrors')
232 d ctxt value like(xmlSchemaValidCtxtPtr)
233 d err like(xmlSchemaValidityErrorFunc)
234 d warn like(xmlSchemaValidityWarningFunc)
237 d xmlSchemaSetValidOptions...
238 d pr 10i 0 extproc('xmlSchemaSetValidOptions')
239 d ctxt value like(xmlSchemaValidCtxtPtr)
240 d options 10i 0 value
242 d xmlSchemaValidateSetFilename...
244 d 'xmlSchemaValidateSetFilename')
245 d vctxt value like(xmlSchemaValidCtxtPtr)
246 d filename * value options(*string) const char *
248 d xmlSchemaValidCtxtGetOptions...
250 d 'xmlSchemaValidCtxtGetOptions')
251 d ctxt value like(xmlSchemaValidCtxtPtr)
253 d xmlSchemaNewValidCtxt...
254 d pr extproc('xmlSchemaNewValidCtxt')
255 d like(xmlSchemaValidCtxtPtr)
256 d schema value like(xmlSchemaPtr)
258 d xmlSchemaFreeValidCtxt...
259 d pr extproc('xmlSchemaFreeValidCtxt')
260 d ctxt value like(xmlSchemaValidCtxtPtr)
262 d xmlSchemaValidateDoc...
263 d pr 10i 0 extproc('xmlSchemaValidateDoc')
264 d ctxt value like(xmlSchemaValidCtxtPtr)
265 d instance value like(xmlDocPtr)
267 d xmlSchemaValidateOneElement...
269 d 'xmlSchemaValidateOneElement')
270 d ctxt value like(xmlSchemaValidCtxtPtr)
271 d elem value like(xmlNodePtr)
273 d xmlSchemaValidateStream...
274 d pr 10i 0 extproc('xmlSchemaValidateStream')
275 d ctxt value like(xmlSchemaValidCtxtPtr)
276 d input value like(xmlParserInputBufferPtr)
277 d enc value like(xmlCharEncoding)
278 d sax value like(xmlSAXHandlerPtr)
279 d user_data * value void *
281 d xmlSchemaValidateFile...
282 d pr 10i 0 extproc('xmlSchemaValidateFile')
283 d ctxt value like(xmlSchemaValidCtxtPtr)
284 d filename * value options(*string) const char *
285 d options 10i 0 value
287 d xmlSchemaValidCtxtGetParserCtxt...
289 d 'xmlSchemaValidCtxtGetParserCtxt')
290 d like(xmlParserCtxtPtr)
291 d ctxt value like(xmlSchemaValidCtxtPtr)
293 * Interface to insert Schemas SAX validation in a SAX stream
295 d xmlSchemaSAXPlugPtr...
296 d s * based(######typedef######)
298 d xmlSchemaSAXPlug...
299 d pr extproc('xmlSchemaSAXPlug')
300 d like(xmlSchemaSAXPlugPtr)
301 d ctxt value like(xmlSchemaValidCtxtPtr)
302 d sax like(xmlSAXHandlerPtr)
303 d user_data * void *(*)
305 d xmlSchemaSAXUnplug...
306 d pr 10i 0 extproc('xmlSchemaSAXUnplug')
307 d plug value like(xmlSchemaSAXPlugPtr)
309 d xmlSchemaValidateSetLocator...
311 d 'xmlSchemaValidateSetLocator')
312 d vctxt value like(xmlSchemaValidCtxtPtr)
314 d like(xmlSchemaValidityLocatorFunc)
315 d ctxt * value void *
317 /endif LIBXML_SCHEMAS_ENBLD
318 /endif XML_SCHEMA_H__