aboutsummaryrefslogtreecommitdiff
path: root/libxml2-2.9.10/os400/libxmlrpg/debugXML.rpgle
blob: 81826bcf8293ff5c17920e187c3eaca157ff24f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
      * Summary: Tree debugging APIs
      * Description: Interfaces to a set of routines used for debugging the tree
      *              produced by the XML parser.
      *
      * Copy: See Copyright for the status of this software.
      *
      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.

      /if not defined(DEBUG_XML__)
      /define DEBUG_XML__

      /include "libxmlrpg/xmlversion"

      /if defined(LIBXML_DEBUG_ENABLED)

      /include "libxmlrpg/xmlTypesC"
      /include "libxmlrpg/tree"
      /include "libxmlrpg/xpath"

      * The standard Dump routines.

     d xmlDebugDumpString...
     d                 pr                  extproc('xmlDebugDumpString')
     d  output                         *   value                                FILE *
     d  str                            *   value options(*string)               const xmlChar *

     d xmlDebugDumpAttr...
     d                 pr                  extproc('xmlDebugDumpAttr')
     d  output                         *   value                                FILE *
     d  attr                               value like(xmlAttrPtr)
     d  depth                              value like(xmlCint)

     d xmlDebugDumpAttrList...
     d                 pr                  extproc('xmlDebugDumpAttrList')
     d  output                         *   value                                FILE *
     d  attr                               value like(xmlAttrPtr)
     d  depth                              value like(xmlCint)

     d xmlDebugDumpOneNode...
     d                 pr                  extproc('xmlDebugDumpOneNode')
     d  output                         *   value                                FILE *
     d  node                               value like(xmlNodePtr)
     d  depth                              value like(xmlCint)

     d xmlDebugDumpNode...
     d                 pr                  extproc('xmlDebugDumpNode')
     d  output                         *   value                                FILE *
     d  node                               value like(xmlNodePtr)
     d  depth                              value like(xmlCint)

     d xmlDebugDumpNodeList...
     d                 pr                  extproc('xmlDebugDumpNodeList')
     d  output                         *   value                                FILE *
     d  node                               value like(xmlNodePtr)
     d  depth                              value like(xmlCint)

     d xmlDebugDumpDocumentHead...
     d                 pr                  extproc('xmlDebugDumpDocumentHead')
     d  output                         *   value                                FILE *
     d  doc                                value like(xmlDocPtr)

     d xmlDebugDumpDocument...
     d                 pr                  extproc('xmlDebugDumpDocument')
     d  output                         *   value                                FILE *
     d  doc                                value like(xmlDocPtr)

     d xmlDebugDumpDTD...
     d                 pr                  extproc('xmlDebugDumpDTD')
     d  output                         *   value                                FILE *
     d  dtd                                value like(xmlDtdPtr)

     d xmlDebugDumpEntities...
     d                 pr                  extproc('xmlDebugDumpEntities')
     d  output                         *   value                                FILE *
     d  doc                                value like(xmlDocPtr)

      ****************************************************************
      *                                                              *
      *                      Checking routines                       *
      *                                                              *
      ****************************************************************

     d xmlDebugCheckDocument...
     d                 pr                  extproc('xmlDebugCheckDocument')
     d                                     like(xmlCint)
     d  output                         *   value                                FILE *
     d  doc                                value like(xmlDocPtr)

      ****************************************************************
      *                                                              *
      *                      XML shell helpers                       *
      *                                                              *
      ****************************************************************

     d xmlLsOneNode    pr                  extproc('xmlLsOneNode')
     d  output                         *   value                                FILE *
     d  node                               value like(xmlNodePtr)

     d xmlLsCountNode  pr                  extproc('xmlLsCountNode')
     d                                     like(xmlCint)
     d  node                               value like(xmlNodePtr)

     d xmlBoolToText   pr              *   extproc('xmlBoolToText')             const char *
     d  boolval                            value like(xmlCint)

      ****************************************************************
      *                                                              *
      *       The XML shell related structures and functions         *
      *                                                              *
      ****************************************************************

      /if defined(LIBXML_XPATH_ENABLED)

      * xmlShellReadlineFunc:
      * @prompt:  a string prompt
      *
      * This is a generic signature for the XML shell input function.
      *
      * Returns a string which will be freed by the Shell.

     d xmlShellReadlineFunc...
     d                 s               *   based(######typedef######)
     d                                     procptr

      * xmlShellCtxt:
      *
      * A debugging shell context.
      * TODO: add the defined function tables.

     d xmlShellCtxtPtr...
     d                 s               *   based(######typedef######)

     d xmlSchellCtxt   ds                  based(xmlShellCtxtPtr)
     d                                     align qualified
     d  filename                       *                                        char *
     d  doc                                like(xmlDocPtr)
     d  node                               like(xmlNodePtr)
     d  pctxt                              like(xmlXPathContextPtr)
     d  loaded                             like(xmlCint)
     d  output                         *                                        FILE *
     d  input                              like(xmlShellReadlineFunc)

      * xmlShellCmd:
      * @ctxt:  a shell context
      * @arg:  a string argument
      * @node:  a first node
      * @node2:  a second node
      *
      * This is a generic signature for the XML shell functions.
      *
      * Returns an int, negative returns indicating errors.

     d xmlShellCmd     s               *   based(######typedef######)
     d                                     procptr

     d xmlShellPrintXPathError...
     d                 pr                  extproc('xmlShellPrintXPathError')
     d  errorType                          value like(xmlCint)
     d  arg                            *   value options(*string)               const char *

     d xmlShellPrintXPathResult...
     d                 pr                  extproc('xmlShellPrintXPathResult')
     d  list                               value like(xmlXPathObjectPtr)

     d xmlShellList    pr                  extproc('xmlShellList')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  arg                            *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellBase    pr                  extproc('xmlShellBase')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  arg                            *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellDir     pr                  extproc('xmlShellDir')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  arg                            *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellLoad    pr                  extproc('xmlShellLoad')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  filename                       *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

      /if defined(LIBXML_OUTPUT_ENABLED)
     d xmlShellPrintNode...
     d                 pr                  extproc('xmlShellPrintNode')
     d  node                               value like(xmlNodePtr)

     d xmlShellCat     pr                  extproc('xmlShellCat')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  arg                            *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellWrite   pr                  extproc('xmlShellWrite')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  filename                       *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellSave    pr                  extproc('xmlShellSave')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  filename                       *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)
      /endif                                                                    LIBXML_OUTPUT_ENABLD

      /if defined(LIBXML_VALID_ENABLED)
     d xmlShellValidate...
     d                 pr                  extproc('xmlShellValidate')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  dtd                            *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)
      /endif                                                                    LIBXML_VALID_ENABLED

     d xmlShellDu      pr                  extproc('xmlShellDu')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  arg                            *   value options(*string)               char *
     d  tree                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

     d xmlShellPwd     pr                  extproc('xmlShellPwd')
     d                                     like(xmlCint)
     d  ctxt                               value like(xmlShellCtxtPtr)
     d  buffer                         *   value options(*string)               char *
     d  node                               value like(xmlNodePtr)
     d  node2                              value like(xmlNodePtr)

      * The Shell interface.

     d xmlShell        pr                  extproc('xmlShell')
     d  doc                                value like(xmlDocPtr)
     d  filename                       *   value options(*string)               char *
     d  input                              value like(xmlShellReadlineFunc)
     d  output                         *   value                                FILE *

      /endif                                                                    LIBXML_XPATH_ENABLED
      /endif                                                                    LIBXML_DEBUG_ENABLED
      /endif                                                                    DEBUG_XML__