• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/xmlTypesC"
16      /include "libxmlrpg/tree"
17
18     d xmlSchematronValidOptions...
19     d                 s                   based(######typedef######)
20     d                                     like(xmlCenum)
21     d  XML_SCHEMATRON_OUT_QUIET...                                             Quiet no report
22     d                 c                   X'0001'
23     d  XML_SCHEMATRON_OUT_TEXT...                                              Build textual report
24     d                 c                   X'0002'
25     d  XML_SCHEMATRON_OUT_XML...                                               Output SVRL
26     d                 c                   X'0004'
27     d  XML_SCHEMATRON_OUT_ERROR...                                             Output to error func
28     d                 c                   X'0008'
29     d  XML_SCHEMATRON_OUT_FILE...                                              Output to file descr
30     d                 c                   X'0100'
31     d  XML_SCHEMATRON_OUT_BUFFER...                                            Output to a buffer
32     d                 c                   X'0200'
33     d  XML_SCHEMATRON_OUT_IO...                                                Output to I/O mech
34     d                 c                   X'0400'
35
36      * The schemas related types are kept internal
37
38     d xmlSchematronPtr...
39     d                 s               *   based(######typedef######)
40
41      * xmlSchematronValidityErrorFunc:
42      * @ctx: the validation context
43      * @msg: the message
44      * @...: extra arguments
45      *
46      * Signature of an error callback from a Schematron validation
47
48     d xmlSchematronValidityErrorFunc...
49     d                 s               *   based(######typedef######)
50     d                                     procptr
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
59     d xmlSchematronValidityWarningFunc...
60     d                 s               *   based(######typedef######)
61     d                                     procptr
62
63      * A schemas validation context
64
65     d xmlSchematronParserCtxtPtr...
66     d                 s               *   based(######typedef######)
67
68     d xmlSchematronValidCtxtPtr...
69     d                 s               *   based(######typedef######)
70
71      * Interfaces for parsing.
72
73     d xmlSchematronNewParserCtxt...
74     d                 pr                  extproc('xmlSchematronNewParserCtxt')
75     d                                     like(xmlSchematronParserCtxtPtr)
76     d  URL                            *   value options(*string)               const char *
77
78     d xmlSchematronNewMemParserCtxt...
79     d                 pr                  extproc(
80     d                                     'xmlSchematronNewMemParserCtxt')
81     d                                     like(xmlSchematronParserCtxtPtr)
82     d  buffer                         *   value options(*string)               const char *
83     d  size                               value like(xmlCint)
84
85     d xmlSchematronNewDocParserCtxt...
86     d                 pr                  extproc(
87     d                                     'xmlSchematronNewDocParserCtxt')
88     d                                     like(xmlSchematronParserCtxtPtr)
89     d  doc                                value like(xmlDocPtr)
90
91     d xmlSchematronFreeParserCtxt...
92     d                 pr                  extproc(
93     d                                     'xmlSchematronFreeParserCtxt')
94     d  ctxt                               value
95     d                                     like(xmlSchematronParserCtxtPtr)
96
97      /if defined(DISABLED)
98     d xmlSchematronSetParserErrors...
99     d                 pr                  extproc(
100     d                                     'xmlSchematronSetParserErrors')
101     d  ctxt                               value
102     d                                     like(xmlSchematronParserCtxtPtr)
103     d  err                                value
104     d                                     like(xmlSchematronValidityErrorFunc)
105     d  warn                               value like(
106     d                                       xmlSchematronValidityWarningFunc)
107     d  ctx                            *   value                                void *
108
109     d xmlSchematronGetParserErrors...
110     d                 pr                  extproc(
111     d                                     'xmlSchematronGetParserErrors')
112     d                                     like(xmlCint)
113     d  ctxt                               value
114     d                                     like(xmlSchematronParserCtxtPtr)
115     d  err                                like(xmlSchematronValidityErrorFunc)
116     d  warn                               like(
117     d                                       xmlSchematronValidityWarningFunc)
118     d  ctx                            *                                        void *(*)
119
120     d xmlSchematronIsValid...
121     d                 pr                  extproc('xmlSchematronIsValid')
122     d                                     like(xmlCint)
123     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
124      /endif
125
126     d xmlSchematronParse...
127     d                 pr                  extproc('xmlSchematronParse')
128     d                                     like(xmlSchematronPtr)
129     d  ctxt                               value
130     d                                     like(xmlSchematronParserCtxtPtr)
131
132     d xmlSchematronFree...
133     d                 pr                  extproc('xmlSchematronFree')
134     d  schema                             value like(xmlSchematronPtr)
135
136      * Interfaces for validating
137
138     d xmlSchematronSetValidStructuredErrors...
139     d                 pr                  extproc('xmlSchematronSetValidStruct-
140     d                                     uredErrors')
141     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
142     d  serror                             value like(xmlStructuredErrorFunc)
143     d  ctx                            *   value                                void *
144
145      /if defined(DISABLED)
146     d xmlSchematronSetValidErrors...
147     d                 pr                  extproc(
148     d                                     'xmlSchematronSetValidErrors')
149     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
150     d  err                                value
151     d                                     like(xmlSchematronValidityErrorFunc)
152     d  warn                               value like(
153     d                                     xmlSchematronValidityWarningFunc)
154     d  ctx                            *   value                                void *
155
156     d xmlSchematronGetValidErrors...
157     d                 pr                  extproc(
158     d                                     'xmlSchematronGetValidErrors')
159     d                                     like(xmlCint)
160     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
161     d  err                                like(xmlSchematronValidityErrorFunc)
162     d  warn                               like(
163     d                                       xmlSchematronValidityWarningFunc)
164     d  ctx                            *                                        void *(*)
165
166     d xmlSchematronSetValidOptions...
167     d                 pr                  extproc(
168     d                                     'xmlSchematronSetValidOptions')
169     d                                     like(xmlCint)
170     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
171     d  options                            value like(xmlCint)
172
173     d xmlSchematronValidCtxtGetOptions...
174     d                 pr                  extproc(
175     d                                     'xmlSchematronValidCtxtGetOptions')
176     d                                     like(xmlCint)
177     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
178
179     d xmlSchematronValidateOneElement...
180     d                 pr                  extproc(
181     d                                     'xmlSchematronValidateOneElement')
182     d                                     like(xmlCint)
183     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
184     d  elem                               value like(xmlNodePtr)
185      /endif
186
187     d xmlSchematronNewValidCtxt...
188     d                 pr                  extproc('xmlSchematronNewValidCtxt')
189     d                                     like(xmlSchematronValidCtxtPtr)
190     d  schema                             value like(xmlSchematronPtr)
191     d  options                            value like(xmlCint)
192
193     d xmlSchematronFreeValidCtxt...
194     d                 pr                  extproc('xmlSchematronFreeValidCtxt')
195     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
196
197     d xmlSchematronValidateDoc...
198     d                 pr                  extproc('xmlSchematronValidateDoc')
199     d                                     like(xmlCint)
200     d  ctxt                               value like(xmlSchematronValidCtxtPtr)
201     d  instance                           value like(xmlDocPtr)
202
203      /endif                                                                    _SCHEMATRON_ENABLED
204      /endif                                                                    XML_SCHEMATRON_H__
205