ff8ea625fdb72c53f6447fe74664533c388bc4e5
[platform/upstream/libxml2.git] / os400 / libxmlrpg / schematron.rpgle
1       * Summary: XML Schemastron implementation
2       * Description: interface to the XML Schematron validity checking.
3       *
4       * Copy: See Copyright for the status of this software.
5       *
6       * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
7
8       /if not defined(XML_SCHEMATRON_H__)
9       /define XML_SCHEMATRON_H__
10
11       /include "libxmlrpg/xmlversion"
12
13       /if defined(LIBXML_SCHEMATRON_ENABLED)
14
15       /include "libxmlrpg/tree"
16
17      d xmlSchematronValidOptions...
18      d                 s             10i 0 based(######typedef######)           enum
19      d  XML_SCHEMATRON_OUT_QUIET...                                             Quiet no report
20      d                 c                   X'0001'
21      d  XML_SCHEMATRON_OUT_TEXT...                                              Build textual report
22      d                 c                   X'0002'
23      d  XML_SCHEMATRON_OUT_XML...                                               Output SVRL
24      d                 c                   X'0004'
25      d  XML_SCHEMATRON_OUT_ERROR...                                             Output to error func
26      d                 c                   X'0008'
27      d  XML_SCHEMATRON_OUT_FILE...                                              Output to file descr
28      d                 c                   X'0100'
29      d  XML_SCHEMATRON_OUT_BUFFER...                                            Output to a buffer
30      d                 c                   X'0200'
31      d  XML_SCHEMATRON_OUT_IO...                                                Output to I/O mech
32      d                 c                   X'0400'
33
34       * The schemas related types are kept internal
35
36      d xmlSchematronPtr...
37      d                 s               *   based(######typedef######)
38
39       * xmlSchematronValidityErrorFunc:
40       * @ctx: the validation context
41       * @msg: the message
42       * @...: extra arguments
43       *
44       * Signature of an error callback from a Schematron validation
45
46      d xmlSchematronValidityErrorFunc...
47      d                 s               *   based(######typedef######)
48      d                                     procptr
49
50       * xmlSchematronValidityWarningFunc:
51       * @ctx: the validation context
52       * @msg: the message
53       * @...: extra arguments
54       *
55       * Signature of a warning callback from a Schematron validation
56
57      d xmlSchematronValidityWarningFunc...
58      d                 s               *   based(######typedef######)
59      d                                     procptr
60
61       * A schemas validation context
62
63      d xmlSchematronParserCtxtPtr...
64      d                 s               *   based(######typedef######)
65
66      d xmlSchematronValidCtxtPtr...
67      d                 s               *   based(######typedef######)
68
69       * Interfaces for parsing.
70
71      d xmlSchematronNewParserCtxt...
72      d                 pr                  extproc('xmlSchematronNewParserCtxt')
73      d                                     like(xmlSchematronParserCtxtPtr)
74      d  URL                            *   value options(*string)               const char *
75
76      d xmlSchematronNewMemParserCtxt...
77      d                 pr                  extproc(
78      d                                     'xmlSchematronNewMemParserCtxt')
79      d                                     like(xmlSchematronParserCtxtPtr)
80      d  buffer                         *   value options(*string)               const char *
81      d  size                         10i 0 value
82
83      d xmlSchematronNewDocParserCtxt...
84      d                 pr                  extproc(
85      d                                     'xmlSchematronNewDocParserCtxt')
86      d                                     like(xmlSchematronParserCtxtPtr)
87      d  doc                                value like(xmlDocPtr)
88
89      d xmlSchematronFreeParserCtxt...
90      d                 pr                  extproc(
91      d                                     'xmlSchematronFreeParserCtxt')
92      d  ctxt                               value
93      d                                     like(xmlSchematronParserCtxtPtr)
94
95       /if defined(DISABLED)
96      d xmlSchematronSetParserErrors...
97      d                 pr                  extproc(
98      d                                     'xmlSchematronSetParserErrors')
99      d  ctxt                               value
100      d                                     like(xmlSchematronParserCtxtPtr)
101      d  err                                value
102      d                                     like(xmlSchematronValidityErrorFunc)
103      d  warn                               value like(
104      d                                     xmlSchematronValidityWarningFunc)
105      d  ctx                            *   value                                void *
106
107      d xmlSchematronGetParserErrors...
108      d                 pr            10i 0 extproc(
109      d                                     'xmlSchematronGetParserErrors')
110      d  ctxt                               value
111      d                                     like(xmlSchematronParserCtxtPtr)
112      d  err                                like(xmlSchematronValidityErrorFunc)
113      d  warn                               like(
114      d                                       xmlSchematronValidityWarningFunc)
115      d  ctx                            *                                        void *(*)
116
117      d xmlSchematronIsValid...
118      d                 pr            10i 0 extproc('xmlSchematronIsValid')
119      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
120       /endif
121
122      d xmlSchematronParse...
123      d                 pr                  extproc('xmlSchematronParse')
124      d                                     like(xmlSchematronPtr)
125      d  ctxt                               value
126      d                                     like(xmlSchematronParserCtxtPtr)
127
128      d xmlSchematronFree...
129      d                 pr                  extproc('xmlSchematronFree')
130      d  schema                             value like(xmlSchematronPtr)
131
132       * Interfaces for validating
133
134      d xmlSchematronSetValidStructuredErrors...
135      d                 pr                  extproc('xmlSchematronSetValidStruct-
136      d                                     uredErrors')
137      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
138      d  serror                             value like(xmlStructuredErrorFunc)
139      d  ctx                            *   value                                void *
140
141       /if defined(DISABLED)
142      d xmlSchematronSetValidErrors...
143      d                 pr                  extproc(
144      d                                     'xmlSchematronSetValidErrors')
145      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
146      d  err                                value
147      d                                     like(xmlSchematronValidityErrorFunc)
148      d  warn                               value like(
149      d                                     xmlSchematronValidityWarningFunc)
150      d  ctx                            *   value                                void *
151
152      d xmlSchematronGetValidErrors...
153      d                 pr            10i 0 extproc(
154      d                                     'xmlSchematronGetValidErrors')
155      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
156      d  err                                like(xmlSchematronValidityErrorFunc)
157      d  warn                               like(
158      d                                       xmlSchematronValidityWarningFunc)
159      d  ctx                            *                                        void *(*)
160
161      d xmlSchematronSetValidOptions...
162      d                 pr            10i 0 extproc(
163      d                                     'xmlSchematronSetValidOptions')
164      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
165      d  options                      10i 0 value
166
167      d xmlSchematronValidCtxtGetOptions...
168      d                 pr            10i 0 extproc(
169      d                                     'xmlSchematronValidCtxtGetOptions')
170      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
171
172      d xmlSchematronValidateOneElement...
173      d                 pr            10i 0 extproc(
174      d                                     'xmlSchematronValidateOneElement')
175      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
176      d  elem                               value like(xmlNodePtr)
177       /endif
178
179      d xmlSchematronNewValidCtxt...
180      d                 pr                  extproc('xmlSchematronNewValidCtxt')
181      d                                     like(xmlSchematronValidCtxtPtr)
182      d  schema                             value like(xmlSchematronPtr)
183      d  options                      10i 0 value
184
185      d xmlSchematronFreeValidCtxt...
186      d                 pr                  extproc('xmlSchematronFreeValidCtxt')
187      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
188
189      d xmlSchematronValidateDoc...
190      d                 pr            10i 0 extproc('xmlSchematronValidateDoc')
191      d  ctxt                               value like(xmlSchematronValidCtxtPtr)
192      d  instance                           value like(xmlDocPtr)
193
194       /endif                                                                    _SCHEMATRON_ENABLED
195       /endif                                                                    XML_SCHEMATRON_H__