• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1      * Summary: the core parser module
2      * Description: Interfaces, constants and types related to the XML parser
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_PARSER_H__)
9      /define XML_PARSER_H__
10
11      /include "libxmlrpg/xmlversion"
12      /include "libxmlrpg/xmlTypesC"
13      /include "libxmlrpg/tree"
14      /include "libxmlrpg/dict"
15      /include "libxmlrpg/hash"
16      /include "libxmlrpg/valid"
17      /include "libxmlrpg/entities"
18      /include "libxmlrpg/xmlerror"
19      /include "libxmlrpg/xmlstring"
20
21      * XML_DEFAULT_VERSION:
22      *
23      * The default version of XML used: 1.0
24
25     d XML_DEFAULT_VERSION...
26     d                 c                   '1.0'
27
28      * xmlParserInput:
29      *
30      * An xmlParserInput is an input flow for the XML processor.
31      * Each entity parsed is associated an xmlParserInput (except the
32      * few predefined ones). This is the case both for internal entities
33      * - in which case the flow is already completely in memory - or
34      * external entities - in which case we use the buf structure for
35      * progressive reading and I18N conversions to the internal UTF-8 format.
36
37      * xmlParserInputDeallocate:
38      * @str:  the string to deallocate
39      *
40      * Callback for freeing some parser input allocations.
41
42     d xmlParserInputDeallocate...
43     d                 s               *   based(######typedef######)
44     d                                     procptr
45
46      * Input buffer
47
48     d xmlParserInput  ds                  based(xmlParserInputPtr)
49     d                                     align qualified
50     d  buf                                like(xmlParserInputBufferPtr)        UTF-8 encoded buffer
51     d  filename                       *                                        const char *
52     d  directory                      *                                        const char *
53     d  base                           *                                        const char *
54     d  cur                            *                                        const char *
55     d  end                            *                                        const char *
56     d  length                             like(xmlCint)                        Length if known
57     d  line                               like(xmlCint)                        Current line
58     d  col                                like(xmlCint)                        Current column
59      *
60      * NOTE: consumed is only tested for equality in the parser code,
61      *       so even if there is an overflow this should not give troubles
62      *       for parsing very large instances.
63      *
64     d  consumed                           like(xmlCulong)                      # consumed xmlChars
65     d  free                               like(xmlParserInputDeallocate)       base deallocator
66     d  encoding                       *                                        const xmlChar *
67     d  version                        *                                        const xmlChar *
68     d  standalone                         like(xmlCint)                        Standalone entity ?
69     d  id                                 like(xmlCint)                        Entity unique ID
70
71      * xmlParserNodeInfo:
72      *
73      * The parser can be asked to collect Node informations, i.e. at what
74      * place in the file they were detected.
75      * NOTE: This is off by default and not very well tested.
76
77     d xmlParserNodeInfoPtr...
78     d                 s               *   based(######typedef######)
79
80     d xmlParserNodeInfo...
81     d                 ds                  based(xmlParserNodeInfoPtr)
82     d                                     align qualified
83     d  node                               like(xmlNodePtr)                     const
84      * Position & line # that text that created the node begins & ends on
85     d  begin_pos                          like(xmlCulong)
86     d  begin_line                         like(xmlCulong)
87     d  end_pos                            like(xmlCulong)
88     d  end_line                           like(xmlCulong)
89
90     d xmlParserNodeInfoSeqPtr...
91     d                 s               *   based(######typedef######)
92
93     d xmlParserNodeInfoSeq...
94     d                 ds                  based(xmlParserNodeInfoSeqPtr)
95     d                                     align qualified
96     d  maximum                            like(xmlCulong)
97     d  length                             like(xmlCulong)
98     d  buffer                             like(xmlParserNodeInfoPtr)
99
100      * xmlParserInputState:
101      *
102      * The parser is now working also as a state based parser.
103      * The recursive one use the state info for entities processing.
104
105     d xmlParserInputState...
106     d                 s                   based(######typedef######)
107     d                                     like(xmlCenum)
108     d  XML_PARSER_EOF...                                                       Nothing to parse
109     d                 c                   -1
110     d  XML_PARSER_START...                                                     Nothing parsed
111     d                 c                   0
112     d  XML_PARSER_MISC...                                                      Misc* b4 int subset
113     d                 c                   1
114     d  XML_PARSER_PI  c                   2                                    In proc instr
115     d  XML_PARSER_DTD...                                                       In some DTD content
116     d                 c                   3
117     d  XML_PARSER_PROLOG...                                                    Misc* after int sbst
118     d                 c                   4
119     d  XML_PARSER_COMMENT...                                                   Within a comment
120     d                 c                   5
121     d  XML_PARSER_START_TAG...                                                 Within a start tag
122     d                 c                   6
123     d  XML_PARSER_CONTENT...                                                   Within the content
124     d                 c                   7
125     d  XML_PARSER_CDATA_SECTION...                                             Within a CDATA
126     d                 c                   8
127     d  XML_PARSER_END_TAG...                                                   Within a closing tag
128     d                 c                   9
129     d  XML_PARSER_ENTITY_DECL...                                               In an entity decl
130     d                 c                   10
131     d  XML_PARSER_ENTITY_VALUE...                                              In entity decl value
132     d                 c                   11
133     d  XML_PARSER_ATTRIBUTE_VALUE...                                           In attribute value
134     d                 c                   12
135     d  XML_PARSER_SYSTEM_LITERAL...                                            In a SYSTEM value
136     d                 c                   13
137     d  XML_PARSER_EPILOG...                                                    Last end tag Misc*
138     d                 c                   14
139     d  XML_PARSER_IGNORE...                                                    In IGNORED section
140     d                 c                   15
141     d  XML_PARSER_PUBLIC_LITERAL...                                            In a PUBLIC value
142     d                 c                   16
143
144      * XML_DETECT_IDS:
145      *
146      * Bit in the loadsubset context field to tell to do ID/REFs lookups.
147      * Use it to initialize xmlLoadExtDtdDefaultValue.
148
149     d XML_DETECT_IDS  c                   2
150
151      * XML_COMPLETE_ATTRS:
152      *
153      * Bit in the loadsubset context field to tell to do complete the
154      * elements attributes lists with the ones defaulted from the DTDs.
155      * Use it to initialize xmlLoadExtDtdDefaultValue.
156
157     d XML_COMPLETE_ATTRS...
158     d                 c                   4
159
160      * XML_SKIP_IDS:
161      *
162      * Bit in the loadsubset context field to tell to not do ID/REFs
163      *   registration.
164      * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
165
166     d XML_SKIP_IDS    c                   8
167
168      * xmlParserMode:
169      *
170      * A parser can operate in various modes
171
172     d xmlParserMode   s                   based(######typedef######)
173     d                                     like(xmlCenum)
174     d  XML_PARSE_UNKNOWN...
175     d                 c                   0
176     d  XML_PARSE_DOM...
177     d                 c                   1
178     d  XML_PARSE_SAX...
179     d                 c                   2
180     d  XML_PARSE_PUSH_DOM...
181     d                 c                   3
182     d  XML_PARSE_PUSH_SAX...
183     d                 c                   4
184     d  XML_PARSE_READER...
185     d                 c                   5
186
187      * xmlParserCtxt:
188      *
189      * The parser context.
190      * NOTE This doesn't completely define the parser state, the (current ?)
191      *      design of the parser uses recursive function calls since this allow
192      *      and easy mapping from the production rules of the specification
193      *      to the actual code. The drawback is that the actual function call
194      *      also reflect the parser state. However most of the parsing routines
195      *      takes as the only argument the parser context pointer, so migrating
196      *      to a state based parser for progressive parsing shouldn't be too
197      *      hard.
198
199     d xmlParserCtxt   ds                  based(xmlParserCtxtPtr)
200     d                                     align qualified
201     d  sax                                like(xmlSAXHandlerPtr)               The SAX handler
202     d  userData                       *                                        SAX only-4 DOM build
203     d  myDoc                              like(xmlDocPtr)                      Document being built
204     d  wellFormed                         like(xmlCint)                        Well formed doc ?
205     d  replaceEntities...                                                      Replace entities ?
206     d                                     like(xmlCint)
207     d  version                        *                                        const xmlChar *
208     d  encoding                       *                                        const xmlChar *
209     d  standalone                         like(xmlCint)                        Standalone document
210     d  html                               like(xmlCint)                        HTML state/type
211      *
212      * Input stream stack
213      *
214     d  input                              like(xmlParserInputPtr)              Current input stream
215     d  inputNr                            like(xmlCint)                        # current in streams
216     d  inputMax                           like(xmlCint)                        Max # of in streams
217     d  inputTab                       *                                        xmlParserInputPtr *
218      *
219      * Node analysis stack only used for DOM building
220      *
221     d  node                               like(xmlNodePtr)                     Current parsed node
222     d  nodeNr                             like(xmlCint)                        Parsing stack depth
223     d  nodeMax                            like(xmlCint)                        Max stack depth
224     d  nodeTab                        *                                        xmlNodePtr *
225      *
226     d  record_info                        like(xmlCint)                        Keep node info ?
227     d  node_seq                           likeds(xmlParserNodeInfoSeq)         Parsed nodes info
228      *
229     d  errNo                              like(xmlCint)                        Error code
230      *
231     d  hasExternalSubset...
232     d                                     like(xmlCint)
233     d  hasPErefs                          like(xmlCint)
234     d  external                           like(xmlCint)                        Parsing ext. entity?
235      *
236     d  valid                              like(xmlCint)                        Valid document ?
237     d  validate                           like(xmlCint)                        Try to validate ?
238     d  vctxt                              likeds(xmlValidCtxt)                 Validity context
239      *
240     d  instate                            like(xmlParserInputState)            Current input type
241     d  token                              like(xmlCint)                        Next look-ahead char
242      *
243     d  directory                      *                                        char *
244      *
245      * Node name stack
246      *
247     d  name                           *                                        const xmlChar *
248     d  nameNr                             like(xmlCint)                        Parsing stack depth
249     d  nameMax                            like(xmlCint)                        Max stack depth
250     d  nameTab                        *                                        const xmlChar * *
251      *
252     d  nbChars                            like(xmlClong)                       # xmlChars processed
253     d  checkIndex                         like(xmlClong)                       4 progressive parse
254     d  keepBlanks                         like(xmlCint)                        Ugly but ...
255     d  disableSAX                         like(xmlCint)                        Disable SAX cllbacks
256     d  inSubset                           like(xmlCint)                        In int 1/ext 2 sbset
257     d  intSubName                     *                                        const xmlChar *
258     d  extSubURI                      *                                        const xmlChar *
259     d  extSubSytem                    *                                        const xmlChar *
260      *
261      * xml:space values
262      *
263     d  space                          *                                        int *
264     d  spaceNr                            like(xmlCint)                        Parsing stack depth
265     d  spaceMax                           like(xmlCint)                        Max stack depth
266     d  spaceTab                       *                                        int *
267      *
268     d  depth                              like(xmlCint)                        To detect loops
269     d  entity                             like(xmlParserInputPtr)              To check boundaries
270     d  charset                            like(xmlCint)                        In-memory content
271     d  nodelen                            like(xmlCint)                        Speed up parsing
272     d  nodemem                            like(xmlCint)                        Speed up parsing
273     d  pedantic                           like(xmlCint)                        Enb. pedantic warng
274     d  #private                       *                                        void *
275      *
276     d  loadsubset                         like(xmlCint)                        Load ext. subset ?
277     d  linenumbers                        like(xmlCint)                        Set line numbers ?
278     d  catalogs                       *                                        void *
279     d  recovery                           like(xmlCint)                        Run in recovery mode
280     d  progressive                        like(xmlCint)                        Progressive parsing?
281     d  dict                               like(xmlDictPtr)                     Parser dictionary
282     d  atts                           *                                        const xmlChar *
283     d  maxatts                            like(xmlCint)                        Above array size
284     d  docdict                            like(xmlCint)                        Use dictionary ?
285      *
286      * pre-interned strings
287      *
288     d  str_xml                        *                                        const xmlChar *
289     d  str_xmlns                      *                                        const xmlChar *
290     d  str_xml_ms                     *                                        const xmlChar *
291      *
292      * Everything below is used only by the new SAX mode
293      *
294     d  sax2                               like(xmlCint)                        New SAX mode ?
295     d  nsNr                               like(xmlCint)                        # inherited nmspaces
296     d  nsMax                              like(xmlCint)                        Array size
297     d  nsTab                          *                                        const xmlChar *
298     d  attallocs                      *                                        int *
299     d  pushTab                        *                                        void *
300     d  attsDefault                        like(xmlHashTablePtr)                Defaulted attrs
301     d  attsSpecial                        like(xmlHashTablePtr)                non-CDATA attrs
302     d  nsWellFormed                       like(xmlCint)                        Doc namespace OK ?
303     d  options                            like(xmlCint)                        Extra options
304      *
305      * Those fields are needed only for treaming parsing so far
306      *
307     d  dictNames                          like(xmlCint)                        Dict names in tree ?
308     d  freeElemsNr                        like(xmlCint)                        # free element nodes
309     d  freeElems                          like(xmlNodePtr)                     Free elem nodes list
310     d  freeAttrsNr                        like(xmlCint)                        # free attr. nodes
311     d  freeAttrs                          like(xmlAttrPtr)                     Free attr noes list
312      *
313      * the complete error informations for the last error.
314      *
315     d  lastError                          likeds(xmlError)
316     d  parseMode                          like(xmlParserMode)                  The parser mode
317     d  nbentities                         like(xmlCulong)                      # entity references
318     d  sizeentities                       like(xmlCulong)                      Parsed entities size
319      *
320      * for use by HTML non-recursive parser
321      *
322     d  nodeInfo                           like(xmlParserNodeInfoPtr)           Current NodeInfo
323     d  nodeInfoNr                         like(xmlCint)                        Parsing stack depth
324     d  nodeInfoMax                        like(xmlCint)                        Max stack depth
325     d  nodeInfoTab                    *                                        xmlParserNodeInfo *
326      *
327     d  input_id                           like(xmlCint)                        Label inputs ?
328     d  sizeentcopy                        like(xmlCulong)                      Entity copy volume
329
330      * xmlSAXLocator:
331      *
332      * A SAX Locator.
333
334     d xmlSAXLocator   ds                  based(xmlSAXLocatorPtr)
335     d                                     align qualified
336     d  getPublicId                    *   procptr
337     d  getSystemId                    *   procptr
338     d  getLineNumber                  *   procptr
339     d  getColumnNumber...
340     d                                 *   procptr
341
342      * xmlSAXHandler:
343      *
344      * A SAX handler is bunch of callbacks called by the parser when
345      * processing of the input generate data or structure informations.
346
347      * resolveEntitySAXFunc:
348      * @ctx:  the user data (XML parser context)
349      * @publicId: The public ID of the entity
350      * @systemId: The system ID of the entity
351      *
352      * Callback:
353      * The entity loader, to control the loading of external entities,
354      * the application can either:
355      *    - override this resolveEntity() callback in the SAX block
356      *    - or better use the xmlSetExternalEntityLoader() function to
357      *      set up it's own entity resolution routine
358      *
359      * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
360
361     d resolveEntitySAXFunc...
362     d                 s               *   based(######typedef######)
363     d                                     procptr
364
365      * internalSubsetSAXFunc:
366      * @ctx:  the user data (XML parser context)
367      * @name:  the root element name
368      * @ExternalID:  the external ID
369      * @SystemID:  the SYSTEM ID (e.g. filename or URL)
370      *
371      * Callback on internal subset declaration.
372
373     d internalSubsetSAXFunc...
374     d                 s               *   based(######typedef######)
375     d                                     procptr
376
377      * externalSubsetSAXFunc:
378      * @ctx:  the user data (XML parser context)
379      * @name:  the root element name
380      * @ExternalID:  the external ID
381      * @SystemID:  the SYSTEM ID (e.g. filename or URL)
382      *
383      * Callback on external subset declaration.
384
385     d externalSubsetSAXFunc...
386     d                 s               *   based(######typedef######)
387     d                                     procptr
388
389      * getEntitySAXFunc:
390      * @ctx:  the user data (XML parser context)
391      * @name: The entity name
392      *
393      * Get an entity by name.
394      *
395      * Returns the xmlEntityPtr if found.
396
397     d getEntitySAXFunc...
398     d                 s               *   based(######typedef######)
399     d                                     procptr
400
401      * getParameterEntitySAXFunc:
402      * @ctx:  the user data (XML parser context)
403      * @name: The entity name
404      *
405      * Get a parameter entity by name.
406      *
407      * Returns the xmlEntityPtr if found.
408
409     d getParameterEntitySAXFunc...
410     d                 s               *   based(######typedef######)
411     d                                     procptr
412
413      * entityDeclSAXFunc:
414      * @ctx:  the user data (XML parser context)
415      * @name:  the entity name
416      * @type:  the entity type
417      * @publicId: The public ID of the entity
418      * @systemId: The system ID of the entity
419      * @content: the entity value (without processing).
420      *
421      * An entity definition has been parsed.
422
423     d entityDeclSAXFunc...
424     d                 s               *   based(######typedef######)
425     d                                     procptr
426
427      * notationDeclSAXFunc:
428      * @ctx:  the user data (XML parser context)
429      * @name: The name of the notation
430      * @publicId: The public ID of the entity
431      * @systemId: The system ID of the entity
432      *
433      * What to do when a notation declaration has been parsed.
434
435     d notationDeclSAXFunc...
436     d                 s               *   based(######typedef######)
437     d                                     procptr
438
439      * attributeDeclSAXFunc:
440      * @ctx:  the user data (XML parser context)
441      * @elem:  the name of the element
442      * @fullname:  the attribute name
443      * @type:  the attribute type
444      * @def:  the type of default value
445      * @defaultValue: the attribute default value
446      * @tree:  the tree of enumerated value set
447      *
448      * An attribute definition has been parsed.
449
450     d attributeDeclSAXFunc...
451     d                 s               *   based(######typedef######)
452     d                                     procptr
453
454      * elementDeclSAXFunc:
455      * @ctx:  the user data (XML parser context)
456      * @name:  the element name
457      * @type:  the element type
458      * @content: the element value tree
459      *
460      * An element definition has been parsed.
461
462     d elementDeclSAXFunc...
463     d                 s               *   based(######typedef######)
464     d                                     procptr
465
466      * unparsedEntityDeclSAXFunc:
467      * @ctx:  the user data (XML parser context)
468      * @name: The name of the entity
469      * @publicId: The public ID of the entity
470      * @systemId: The system ID of the entity
471      * @notationName: the name of the notation
472      *
473      * What to do when an unparsed entity declaration is parsed.
474
475     d unparsedEntityDeclSAXFunc...
476     d                 s               *   based(######typedef######)
477     d                                     procptr
478
479      * setDocumentLocatorSAXFunc:
480      * @ctx:  the user data (XML parser context)
481      * @loc: A SAX Locator
482      *
483      * Receive the document locator at startup, actually xmlDefaultSAXLocator.
484      * Everything is available on the context, so this is useless in our case.
485
486     d setDocumentLocatorSAXFunc...
487     d                 s               *   based(######typedef######)
488     d                                     procptr
489
490      * startDocumentSAXFunc:
491      * @ctx:  the user data (XML parser context)
492      *
493      * Called when the document start being processed.
494
495     d startDocumentSAXFunc...
496     d                 s               *   based(######typedef######)
497     d                                     procptr
498
499      * endDocumentSAXFunc:
500      * @ctx:  the user data (XML parser context)
501      *
502      * Called when the document end has been detected.
503
504     d endDocumentSAXFunc...
505     d                 s               *   based(######typedef######)
506     d                                     procptr
507
508      * startElementSAXFunc:
509      * @ctx:  the user data (XML parser context)
510      * @name:  The element name, including namespace prefix
511      * @atts:  An array of name/value attributes pairs, NULL terminated
512      *
513      * Called when an opening tag has been processed.
514
515     d startElementSAXFunc...
516     d                 s               *   based(######typedef######)
517     d                                     procptr
518
519      * endElementSAXFunc:
520      * @ctx:  the user data (XML parser context)
521      * @name:  The element name
522      *
523      * Called when the end of an element has been detected.
524
525     d endElementSAXFunc...
526     d                 s               *   based(######typedef######)
527     d                                     procptr
528
529      * attributeSAXFunc:
530      * @ctx:  the user data (XML parser context)
531      * @name:  The attribute name, including namespace prefix
532      * @value:  The attribute value
533      *
534      * Handle an attribute that has been read by the parser.
535      * The default handling is to convert the attribute into an
536      * DOM subtree and past it in a new xmlAttr element added to
537      * the element.
538
539     d attributeSAXFunc...
540     d                 s               *   based(######typedef######)
541     d                                     procptr
542
543      * referenceSAXFunc:
544      * @ctx:  the user data (XML parser context)
545      * @name:  The entity name
546      *
547      * Called when an entity reference is detected.
548
549     d referenceSAXFunc...
550     d                 s               *   based(######typedef######)
551     d                                     procptr
552
553      * charactersSAXFunc:
554      * @ctx:  the user data (XML parser context)
555      * @ch:  a xmlChar string
556      * @len: the number of xmlChar
557      *
558      * Receiving some chars from the parser.
559
560     d charactersSAXFunc...
561     d                 s               *   based(######typedef######)
562     d                                     procptr
563
564      * ignorableWhitespaceSAXFunc:
565      * @ctx:  the user data (XML parser context)
566      * @ch:  a xmlChar string
567      * @len: the number of xmlChar
568      *
569      * Receiving some ignorable whitespaces from the parser.
570      * UNUSED: by default the DOM building will use characters.
571
572     d ignorableWhitespaceSAXFunc...
573     d                 s               *   based(######typedef######)
574     d                                     procptr
575
576      * processingInstructionSAXFunc:
577      * @ctx:  the user data (XML parser context)
578      * @target:  the target name
579      * @data: the PI data's
580      *
581      * A processing instruction has been parsed.
582
583     d processingInstructionSAXFunc...
584     d                 s               *   based(######typedef######)
585     d                                     procptr
586
587      * commentSAXFunc:
588      * @ctx:  the user data (XML parser context)
589      * @value:  the comment content
590      *
591      * A comment has been parsed.
592
593     d commentSAXFunc...
594     d                 s               *   based(######typedef######)
595     d                                     procptr
596
597      * cdataBlockSAXFunc:
598      * @ctx:  the user data (XML parser context)
599      * @value:  The pcdata content
600      * @len:  the block length
601      *
602      * Called when a pcdata block has been parsed.
603
604     d cdataBlockSAXFunc...
605     d                 s               *   based(######typedef######)
606     d                                     procptr
607
608      * warningSAXFunc:
609      * @ctx:  an XML parser context
610      * @msg:  the message to display/transmit
611      * @...:  extra parameters for the message display
612      *
613      * Display and format a warning messages, callback.
614
615     d warningSAXFunc...
616     d                 s               *   based(######typedef######)
617     d                                     procptr
618
619      * errorSAXFunc:
620      * @ctx:  an XML parser context
621      * @msg:  the message to display/transmit
622      * @...:  extra parameters for the message display
623      *
624      * Display and format an error messages, callback.
625
626     d errorSAXFunc...
627     d                 s               *   based(######typedef######)
628     d                                     procptr
629
630      * fatalErrorSAXFunc:
631      * @ctx:  an XML parser context
632      * @msg:  the message to display/transmit
633      * @...:  extra parameters for the message display
634      *
635      * Display and format fatal error messages, callback.
636      * Note: so far fatalError() SAX callbacks are not used, error()
637      *       get all the callbacks for errors.
638
639     d fatalErrorSAXFunc...
640     d                 s               *   based(######typedef######)
641     d                                     procptr
642
643      * isStandaloneSAXFunc:
644      * @ctx:  the user data (XML parser context)
645      *
646      * Is this document tagged standalone?
647      *
648      * Returns 1 if true
649
650     d isStandaloneSAXFunc...
651     d                 s               *   based(######typedef######)
652     d                                     procptr
653
654      * hasInternalSubsetSAXFunc:
655      * @ctx:  the user data (XML parser context)
656      *
657      * Does this document has an internal subset.
658      *
659      * Returns 1 if true
660
661     d hasInternalSubsetSAXFunc...
662     d                 s               *   based(######typedef######)
663     d                                     procptr
664
665      * hasExternalSubsetSAXFunc:
666      * @ctx:  the user data (XML parser context)
667      *
668      * Does this document has an external subset?
669      *
670      * Returns 1 if true
671
672     d hasExternalSubsetSAXFunc...
673     d                 s               *   based(######typedef######)
674     d                                     procptr
675
676      ************************************************************************
677      *                                                                      *
678      *                      The SAX version 2 API extensions                *
679      *                                                                      *
680      ************************************************************************
681
682      * XML_SAX2_MAGIC:
683      *
684      * Special constant found in SAX2 blocks initialized fields
685
686     d XML_SAX2_MAGIC  c                   X'DEEDBEAF'
687
688      * startElementNsSAX2Func:
689      * @ctx:           the user data (XML parser context)
690      * @localname:     the local name of the element
691      * @prefix:        the element namespace prefix if available
692      * @URI:           the element namespace name if available
693      * @nb_namespaces: number of namespace definitions on that node
694      * @namespaces:    pointer to the array of prefix/URI pairs namespace
695      *                 definitions
696      * @nb_attributes:  the number of attributes on that node
697      * @nb_defaulted:   the number of defaulted attributes. The defaulted
698      *                  ones are at the end of the array
699      * @attributes:     pointer to the array of
700      *                  (localname/prefix/URI/value/end) attribute values.
701      *
702      * SAX2 callback when an element start has been detected by the parser.
703      * It provides the namespace informations for the element, as well as
704      * the new namespace declarations on the element.
705
706     d startElementNsSAX2Func...
707     d                 s               *   based(######typedef######)
708     d                                     procptr
709
710      * endElementNsSAX2Func:
711      * @ctx:  the user data (XML parser context)
712      * @localname:  the local name of the element
713      * @prefix:  the element namespace prefix if available
714      * @URI:  the element namespace name if available
715      *
716      * SAX2 callback when an element end has been detected by the parser.
717      * It provides the namespace informations for the element.
718
719     d endElementNsSAX2Func...
720     d                 s               *   based(######typedef######)
721     d                                     procptr
722
723     d xmlSAXHandler   ds                  based(xmlSAXHandlerPtr)
724     d                                     align qualified
725     d  internalSubset...
726     d                                     like(internalSubsetSAXFunc)
727     d  isStandalone                       like(isStandaloneSAXFunc)
728     d  hasInternalSubset...
729     d                                     like(hasInternalSubsetSAXFunc)
730     d  hasExternalSubset...
731     d                                     like(hasExternalSubsetSAXFunc)
732     d  resolveEntity                      like(resolveEntitySAXFunc)
733     d  getEntity                          like(getEntitySAXFunc)
734     d  entityDecl                         like(entityDeclSAXFunc)
735     d  notationDecl                       like(notationDeclSAXFunc)
736     d  attributeDecl                      like(attributeDeclSAXFunc)
737     d  elementDecl                        like(elementDeclSAXFunc)
738     d  unparsedEntityDecl...
739     d                                     like(unparsedEntityDeclSAXFunc)
740     d  setDocumentLocator...
741     d                                     like(setDocumentLocatorSAXFunc)
742     d  startDocument                      like(startDocumentSAXFunc)
743     d  endDocument                        like(endDocumentSAXFunc)
744     d  startElement                       like(startElementSAXFunc)
745     d  endElement                         like(endElementSAXFunc)
746     d  reference                          like(referenceSAXFunc)
747     d  characters                         like(charactersSAXFunc)
748     d  ignorableWhitespace...
749     d                                     like(ignorableWhitespaceSAXFunc)
750     d  processingInstruction...
751     d                                     like(processingInstructionSAXFunc)
752     d  comment                            like(commentSAXFunc)
753     d  warning                            like(warningSAXFunc)
754     d  error                              like(errorSAXFunc)
755     d  fatalError                         like(fatalErrorSAXFunc)
756     d  getParameterEntity...
757     d                                     like(getParameterEntitySAXFunc)
758     d  cdataBlock                         like(cdataBlockSAXFunc)
759     d  externalSubset...
760     d                                     like(externalSubsetSAXFunc)
761     d  initialized                        like(xmlCuint)
762      *
763      * The following fields are extensions available only on version 2
764      *
765     d  #private                       *                                        void *
766     d  startElementNs...
767     d                                     like(startElementNsSAX2Func)
768     d  endELementNs                       like(endElementNsSAX2Func)
769     d  serror                             like(xmlStructuredErrorFunc)
770
771      * SAX Version 1
772
773     d xmlSAXHandlerV1Ptr...
774     d                 s               *   based(######typedef######)
775
776     d xmlSAXHandlerV1...
777     d                 ds                  based(xmlSAXHandlerV1Ptr)
778     d                                     align qualified
779     d  internalSubset...
780     d                                     like(internalSubsetSAXFunc)
781     d  isStandalone                       like(isStandaloneSAXFunc)
782     d  hasInternalSubset...
783     d                                     like(hasInternalSubsetSAXFunc)
784     d  hasExternalSubset...
785     d                                     like(hasExternalSubsetSAXFunc)
786     d  resolveEntity                      like(resolveEntitySAXFunc)
787     d  getEntity                          like(getEntitySAXFunc)
788     d  entityDecl                         like(entityDeclSAXFunc)
789     d  notationDecl                       like(notationDeclSAXFunc)
790     d  attributeDecl                      like(attributeDeclSAXFunc)
791     d  elementDecl                        like(elementDeclSAXFunc)
792     d  unparsedEntityDecl...
793     d                                     like(unparsedEntityDeclSAXFunc)
794     d  setDocumentLocator...
795     d                                     like(setDocumentLocatorSAXFunc)
796     d  startDocument                      like(startDocumentSAXFunc)
797     d  endDocument                        like(endDocumentSAXFunc)
798     d  startElement                       like(startElementSAXFunc)
799     d  endElement                         like(endElementSAXFunc)
800     d  reference                          like(referenceSAXFunc)
801     d  characters                         like(charactersSAXFunc)
802     d  ignorableWhitespace...
803     d                                     like(ignorableWhitespaceSAXFunc)
804     d  processingInstruction...
805     d                                     like(processingInstructionSAXFunc)
806     d  comment                            like(commentSAXFunc)
807     d  warning                            like(warningSAXFunc)
808     d  error                              like(errorSAXFunc)
809     d  fatalError                         like(fatalErrorSAXFunc)
810     d  getParameterEntity...
811     d                                     like(getParameterEntitySAXFunc)
812     d  cdataBlock                         like(cdataBlockSAXFunc)
813     d  externalSubset...
814     d                                     like(externalSubsetSAXFunc)
815     d  initialized                        like(xmlCuint)
816
817      * xmlExternalEntityLoader:
818      * @URL: The System ID of the resource requested
819      * @ID: The Public ID of the resource requested
820      * @context: the XML parser context
821      *
822      * External entity loaders types.
823      *
824      * Returns the entity input parser.
825
826     d xmlExternalEntityLoader...
827     d                 s               *   based(######typedef######)
828     d                                     procptr
829
830      /include "libxmlrpg/encoding"
831      /include "libxmlrpg/xmlIO"
832      /include "libxmlrpg/globals"
833
834      * Init/Cleanup
835
836     d xmlInitParser   pr                  extproc('xmlInitParser')
837
838     d xmlCleanupParser...
839     d                 pr                  extproc('xmlCleanupParser')
840
841      * Input functions
842
843     d xmlParserInputRead...
844     d                 pr                  extproc('xmlParserInputRead')
845     d                                     like(xmlCint)
846     d  in                                 value like(xmlParserInputPtr)
847     d  len                                value like(xmlCint)
848
849     d xmlParserInputGrow...
850     d                 pr                  extproc('xmlParserInputGrow')
851     d                                     like(xmlCint)
852     d  in                                 value like(xmlParserInputPtr)
853     d  len                                value like(xmlCint)
854
855      * Basic parsing Interfaces
856
857      /if defined(LIBXML_SAX1_ENABLED)
858     d xmlParseDoc     pr                  extproc('xmlParseDoc')
859     d                                     like(xmlDocPtr)
860     d  cur                            *   value options(*string)               const xmlChar *
861
862     d xmlParseFile    pr                  extproc('xmlParseFile')
863     d                                     like(xmlDocPtr)
864     d  filename                       *   value options(*string)               const char *
865
866     d xmlParseMemory  pr                  extproc('xmlParseMemory')
867     d                                     like(xmlDocPtr)
868     d  buffer                         *   value options(*string)               const char *
869     d  size                               value like(xmlCint)
870      /endif                                                                    LIBXML_SAX1_ENABLED
871
872     d xmlSubstituteEntitiesDefault...
873     d                 pr                  extproc(
874     d                                      'xmlSubstituteEntitiesDefault')
875     d                                     like(xmlCint)
876     d  val                                value like(xmlCint)
877
878     d xmlKeepBlanksDefault...
879     d                 pr                  extproc('xmlKeepBlanksDefault')
880     d                                     like(xmlCint)
881     d  val                                value like(xmlCint)
882
883     d xmlStopParser   pr                  extproc('xmlStopParser')
884     d  ctxt                               value like(xmlParserCtxtPtr)
885
886     d xmlPedanticParserDefault...
887     d                 pr                  extproc('xmlPedanticParserDefault')
888     d                                     like(xmlCint)
889     d  val                                value like(xmlCint)
890
891     d xmlLineNumbersDefault...
892     d                 pr                  extproc('xmlLineNumbersDefault')
893     d                                     like(xmlCint)
894     d  val                                value like(xmlCint)
895
896      /if defined(LIBXML_SAX1_ENABLED)
897      * Recovery mode
898
899     d xmlRecoverDoc   pr                  extproc('xmlRecoverDoc')
900     d                                     like(xmlDocPtr)
901     d  cur                            *   value options(*string)               const xmlChar *
902
903     d xmlRecoverMemory...
904     d                 pr                  extproc('xmlRecoverMemory')
905     d                                     like(xmlDocPtr)
906     d  buffer                         *   value options(*string)               const char *
907     d  size                               value like(xmlCint)
908
909     d xmlRecoverFile  pr                  extproc('xmlRecoverFile')
910     d                                     like(xmlDocPtr)
911     d  filename                       *   value options(*string)               const char *
912      /endif                                                                    LIBXML_SAX1_ENABLED
913
914      * Less common routines and SAX interfaces
915
916     d xmlParseDocument...
917     d                 pr                  extproc('xmlParseDocument')
918     d                                     like(xmlCint)
919     d  ctxt                               value like(xmlParserCtxtPtr)
920
921     d xmlParseExtParsedEnt...
922     d                 pr                  extproc('xmlParseExtParsedEnt')
923     d                                     like(xmlCint)
924     d  ctxt                               value like(xmlParserCtxtPtr)
925
926      /if defined(LIBXML_SAX1_ENABLED)
927     d xmlSAXUserParseFile...
928     d                 pr                  extproc('xmlSAXUserParseFile')
929     d                                     like(xmlCint)
930     d  sax                                value like(xmlSAXHandlerPtr)
931     d  user_data                      *   value                                void *
932     d  filename                       *   value options(*string)               const char *
933
934     d xmlSAXUserParseMemory...
935     d                 pr                  extproc('xmlSAXUserParseMemory')
936     d                                     like(xmlCint)
937     d  sax                                value like(xmlSAXHandlerPtr)
938     d  user_data                      *   value                                void *
939     d  buffer                         *   value options(*string)               const char *
940     d  size                               value like(xmlCint)
941
942     d xmlSAXParseDoc  pr                  extproc('xmlSAXParseDoc')
943     d                                     like(xmlDocPtr)
944     d  sax                                value like(xmlSAXHandlerPtr)
945     d  cur                            *   value options(*string)               const xmlChar *
946     d  recovery                           value like(xmlCint)
947
948     d xmlSAXParseMemory...
949     d                 pr                  extproc('xmlSAXParseMemory')
950     d                                     like(xmlDocPtr)
951     d  sax                                value like(xmlSAXHandlerPtr)
952     d  buffer                         *   value options(*string)               const char *
953     d  size                               value like(xmlCint)
954     d  recovery                           value like(xmlCint)
955
956     d xmlSAXParseMemoryWithData...
957     d                 pr                  extproc('xmlSAXParseMemoryWithData')
958     d                                     like(xmlDocPtr)
959     d  sax                                value like(xmlSAXHandlerPtr)
960     d  buffer                         *   value options(*string)               const char *
961     d  size                               value like(xmlCint)
962     d  recovery                           value like(xmlCint)
963     d  data                           *   value                                void *
964
965     d xmlSAXParseFile...
966     d                 pr                  extproc('xmlSAXParseFile')
967     d                                     like(xmlDocPtr)
968     d  sax                                value like(xmlSAXHandlerPtr)
969     d  filename                       *   value options(*string)               const char *
970     d  recovery                           value like(xmlCint)
971
972     d xmlSAXParseFileWithData...
973     d                 pr                  extproc('xmlSAXParseFileWithData')
974     d                                     like(xmlDocPtr)
975     d  sax                                value like(xmlSAXHandlerPtr)
976     d  filename                       *   value options(*string)               const char *
977     d  recovery                           value like(xmlCint)
978     d  data                           *   value                                void *
979
980     d xmlSAXParseEntity...
981     d                 pr                  extproc('xmlSAXParseEntity')
982     d                                     like(xmlDocPtr)
983     d  sax                                value like(xmlSAXHandlerPtr)
984     d  filename                       *   value options(*string)               const char *
985
986     d xmlParseEntity...
987     d                 pr                  extproc('xmlParseEntity')
988     d                                     like(xmlDocPtr)
989     d  filename                       *   value options(*string)               const char *
990      /endif                                                                    LIBXML_SAX1_ENABLED
991
992      /if defined(LIBXML_VALID_ENABLED)
993     d xmlSAXParseDTD  pr                  extproc('xmlSAXParseDTD')
994     d                                     like(xmlDtdPtr)
995     d  sax                                value like(xmlSAXHandlerPtr)
996     d  ExternalID                     *   value options(*string)               const xmlChar *
997     d  SystemID                       *   value options(*string)               const xmlChar *
998
999     d xmlParseDTD     pr                  extproc('xmlParseDTD')
1000     d                                     like(xmlDtdPtr)
1001     d  ExternalID                     *   value options(*string)               const xmlChar *
1002     d  SystemID                       *   value options(*string)               const xmlChar *
1003
1004     d xmlIOParseDTD   pr                  extproc('xmlIOParseDTD')
1005     d                                     like(xmlDtdPtr)
1006     d  sax                                value like(xmlSAXHandlerPtr)
1007     d  input                              value like(xmlParserInputBufferPtr)
1008     d  enc                                value like(xmlCharEncoding)
1009      /endif                                                                    LIBXML_VALID_ENABLED
1010
1011      /if defined(LIBXML_SAX1_ENABLED)
1012     d xmlParseBalancedChunkMemory...
1013     d                 pr                  extproc(
1014     d                                      'xmlParseBalancedChunkMemory')
1015     d                                     like(xmlCint)
1016     d  doc                                value like(xmlDocPtr)
1017     d  sax                                value like(xmlSAXHandlerPtr)
1018     d  user_data                      *   value                                void *
1019     d  depth                              value like(xmlCint)
1020     d  user_data                      *   value                                void *
1021     d  string                         *   value options(*string)               const xmlChar *
1022     d  lst                            *   value                                xmlNodePtr *
1023      /endif                                                                    LIBXML_SAX1_ENABLED
1024
1025     d xmlParseInNodeContext...
1026     d                 pr                  extproc('xmlParseInNodeContext')
1027     d                                     like(xmlParserErrors)
1028     d  node                               value like(xmlNodePtr)
1029     d  data                           *   value options(*string)               const char *
1030     d  datalen                            value like(xmlCint)
1031     d  options                            value like(xmlCint)
1032     d  lst                            *   value                                xmlNodePtr *
1033
1034      /if defined(LIBXML_SAX1_ENABLED)
1035     d xmlParseBalancedChunkMemoryRecover...
1036     d                 pr                  extproc(
1037     d                                     'xmlParseBalancedChunkMemoryRecover')
1038     d                                     like(xmlCint)
1039     d  doc                                value like(xmlDocPtr)
1040     d  sax                                value like(xmlSAXHandlerPtr)
1041     d  user_data                      *   value                                void *
1042     d  depth                              value like(xmlCint)
1043     d  string                         *   value options(*string)               const xmlChar *
1044     d  lst                            *   value                                xmlNodePtr *
1045     d  recover                            value like(xmlCint)
1046
1047     d xmlParseExternalEntity...
1048     d                 pr                  extproc('xmlParseExternalEntity')
1049     d                                     like(xmlCint)
1050     d  doc                                value like(xmlDocPtr)
1051     d  sax                                value like(xmlSAXHandlerPtr)
1052     d  user_data                      *   value                                void *
1053     d  depth                              value like(xmlCint)
1054     d  URL                            *   value options(*string)               const xmlChar *
1055     d  ID                             *   value options(*string)               const xmlChar *
1056     d  lst                            *   value                                xmlNodePtr *
1057      /endif                                                                    LIBXML_SAX1_ENABLED
1058
1059     d xmlParseCtxtExternalEntity...
1060     d                 pr                  extproc('xmlParseCtxtExternalEntity')
1061     d                                     like(xmlCint)
1062     d  sax                                value like(xmlSAXHandlerPtr)
1063     d  URL                            *   value options(*string)               const xmlChar *
1064     d  ID                             *   value options(*string)               const xmlChar *
1065     d  lst                            *   value                                xmlNodePtr *
1066
1067      * Parser contexts handling.
1068
1069     d xmlNewParserCtxt...
1070     d                 pr                  extproc('xmlNewParserCtxt')
1071     d                                     like(xmlParserCtxtPtr)
1072
1073     d xmlInitParserCtxt...
1074     d                 pr                  extproc('xmlInitParserCtxt')
1075     d                                     like(xmlCint)
1076     d  ctxt                               value like(xmlParserCtxtPtr)
1077
1078     d xmlClearParserCtxt...
1079     d                 pr                  extproc('xmlClearParserCtxt')
1080     d  ctxt                               value like(xmlParserCtxtPtr)
1081
1082     d xmlFreeParserCtxt...
1083     d                 pr                  extproc('xmlFreeParserCtxt')
1084     d  ctxt                               value like(xmlParserCtxtPtr)
1085
1086      /if defined(LIBXML_SAX1_ENABLED)
1087     d xmlSetupParserForBuffer...
1088     d                 pr                  extproc('xmlSetupParserForBuffer')
1089     d  ctxt                               value like(xmlParserCtxtPtr)
1090     d  buffer                         *   value options(*string)               const xmlChar *
1091     d  filename                       *   value options(*string)               const char *
1092      /endif                                                                    LIBXML_SAX1_ENABLED
1093
1094     d xmlCreateDocParserCtxt...
1095     d                 pr                  extproc('xmlCreateDocParserCtxt')
1096     d                                     like(xmlParserCtxtPtr)
1097     d  cur                            *   value options(*string)               const xmlChar *
1098
1099      /if defined(LIBXML_LEGACY_ENABLED)
1100      * Reading/setting optional parsing features.
1101
1102     d xmlGetFeaturesList...
1103     d                 pr                  extproc('xmlGetFeaturesList')
1104     d                                     like(xmlCint)
1105     d  len                                like(xmlCint)
1106     d  result                         *                                        const char *(*)
1107
1108     d xmlGetFeature   pr                  extproc('xmlGetFeature')
1109     d                                     like(xmlCint)
1110     d  ctxt                               value like(xmlParserCtxtPtr)
1111     d  name                           *   value options(*string)               const char *
1112     d  result                         *   value                                void *
1113
1114     d xmlSetFeature   pr                  extproc('xmlSetFeature')
1115     d                                     like(xmlCint)
1116     d  ctxt                               value like(xmlParserCtxtPtr)
1117     d  name                           *   value options(*string)               const char *
1118     d  result                         *   value                                void *
1119      /endif                                                                    LIBXML_LEGACY_ENABLD
1120
1121      /if defined(LIBXML_PUSH_ENABLED)
1122      * Interfaces for the Push mode.
1123
1124     d xmlCreatePushParserCtxt...
1125     d                 pr                  extproc('xmlCreatePushParserCtxt')
1126     d                                     like(xmlParserCtxtPtr)
1127     d  sax                                value like(xmlSAXHandlerPtr)
1128     d  user_data                      *   value                                void *
1129     d  chunk                          *   value options(*string)               const char *
1130     d  size                               value like(xmlCint)
1131     d  filename                       *   value options(*string)               const char *
1132
1133     d xmlParseChunk   pr                  extproc('xmlParseChunk')
1134     d                                     like(xmlCint)
1135     d  ctxt                               value like(xmlParserCtxtPtr)
1136     d  chunk                          *   value options(*string)               const char *
1137     d  size                               value like(xmlCint)
1138     d  terminate                          value like(xmlCint)
1139      /endif                                                                    LIBXML_PUSH_ENABLED
1140
1141      * Special I/O mode.
1142
1143     d xmlCreateIOParserCtxt...
1144     d                 pr                  extproc('xmlCreateIOParserCtxt')
1145     d                                     like(xmlParserCtxtPtr)
1146     d  sax                                value like(xmlSAXHandlerPtr)
1147     d  user_data                      *   value                                void *
1148     d  ioread                             value like(xmlInputReadCallback)
1149     d  ioclose                            value like(xmlInputCloseCallback)
1150     d  ioctx                          *   value                                void *
1151     d  enc                                value like(xmlCharEncoding)
1152
1153     d xmlNewIOInputStream...
1154     d                 pr                  extproc('xmlNewIOInputStream')
1155     d                                     like(xmlParserInputPtr)
1156     d  ctxt                               value like(xmlParserCtxtPtr)
1157     d  input                              value like(xmlParserInputBufferPtr)
1158     d  enc                                value like(xmlCharEncoding)
1159
1160      * Node infos.
1161
1162     d xmlParserFindNodeInfo...
1163     d                 pr              *   extproc('xmlParserFindNodeInfo')     xmlParserNodeInfo *
1164     d  ctxt                               value like(xmlParserCtxtPtr)
1165     d  node                               value like(xmlNodePtr)               const
1166
1167     d xmlInitNodeInfoSeq...
1168     d                 pr                  extproc('xmlInitNodeInfoSeq')
1169     d  seq                                value like(xmlParserNodeInfoSeqPtr)
1170
1171     d xmlClearNodeInfoSeq...
1172     d                 pr                  extproc('xmlClearNodeInfoSeq')
1173     d  seq                                value like(xmlParserNodeInfoSeqPtr)
1174
1175     d xmlParserFindNodeInfoIndex...
1176     d                 pr                  extproc('xmlParserFindNodeInfoIndex')
1177     d                                     like(xmlCulong)
1178     d  seq                                value like(xmlParserNodeInfoSeqPtr)
1179     d  node                               value like(xmlNodePtr)               const
1180
1181     d xmlParserAddNodeInfo...
1182     d                 pr                  extproc('xmlParserAddNodeInfo')
1183     d  ctxt                               value like(xmlParserCtxtPtr)
1184     d  info                               value like(xmlParserNodeInfoPtr)     const
1185
1186      * External entities handling actually implemented in xmlIO.
1187
1188     d xmlSetExternalEntityLoader...
1189     d                 pr                  extproc('xmlSetExternalEntityLoader')
1190     d  f                                  value like(xmlExternalEntityLoader)
1191
1192     d xmlGetExternalEntityLoader...
1193     d                 pr                  extproc('xmlGetExternalEntityLoader')
1194     d                                     like(xmlExternalEntityLoader)
1195
1196     d xmlLoadExternalEntity...
1197     d                 pr                  extproc('xmlLoadExternalEntity')
1198     d                                     like(xmlParserInputPtr)
1199     d  URL                            *   value options(*string)               const char *
1200     d  ID                             *   value options(*string)               const char *
1201     d  ctxt                               value like(xmlParserCtxtPtr)
1202
1203      * Index lookup, actually implemented in the encoding module
1204
1205     d xmlByteConsumed...
1206     d                 pr                  extproc('xmlByteConsumed')
1207     d                                     like(xmlClong)
1208     d  ctxt                               value like(xmlParserCtxtPtr)
1209
1210      * New set of simpler/more flexible APIs
1211
1212      * xmlParserOption:
1213      *
1214      * This is the set of XML parser options that can be passed down
1215      * to the xmlReadDoc() and similar calls.
1216
1217     d xmlParserOption...
1218     d                 s                   based(######typedef######)
1219     d                                     like(xmlCenum)
1220     d  XML_PARSE_RECOVER...                                                    Recover on errors
1221     d                 c                   X'00000001'
1222     d  XML_PARSE_NOENT...                                                      Substitute entities
1223     d                 c                   X'00000002'
1224     d  XML_PARSE_DTDLOAD...                                                    Load external subset
1225     d                 c                   X'00000004'
1226     d  XML_PARSE_DTDATTR...                                                    Default DTD attrs
1227     d                 c                   X'00000008'
1228     d  XML_PARSE_DTDVALID...                                                   Validate with DTD
1229     d                 c                   X'00000010'
1230     d  XML_PARSE_NOERROR...                                                    Suppress err reports
1231     d                 c                   X'00000020'
1232     d  XML_PARSE_NOWARNING...                                                  Suppr warn reports
1233     d                 c                   X'00000040'
1234     d  XML_PARSE_PEDANTIC...                                                   Pedantic err report
1235     d                 c                   X'00000080'
1236     d  XML_PARSE_NOBLANKS...                                                   Remove blank nodes
1237     d                 c                   X'00000100'
1238     d  XML_PARSE_SAX1...                                                       Use SAX1 internally
1239     d                 c                   X'00000200'
1240     d  XML_PARSE_XINCLUDE...                                                   Impl XInclude subst
1241     d                 c                   X'00000400'
1242     d  XML_PARSE_NONET...                                                      Forbid netwrk access
1243     d                 c                   X'00000800'
1244     d  XML_PARSE_NODICT...                                                     No contxt dict reuse
1245     d                 c                   X'00001000'
1246     d  XML_PARSE_NSCLEAN...                                                    Rmv redndnt ns decls
1247     d                 c                   X'00002000'
1248     d  XML_PARSE_NOCDATA...                                                    CDATA as text nodes
1249     d                 c                   X'00004000'
1250     d  XML_PARSE_NOXINCNODE...                                                 No XINCL START/END
1251     d                 c                   X'00008000'
1252     d  XML_PARSE_COMPACT...                                                    Compact text nodes
1253     d                 c                   X'00010000'
1254     d  XML_PARSE_OLD10...                                                      B4 upd5 compatible
1255     d                 c                   X'00020000'
1256     d  XML_PARSE_NOBASEFIX...                                                  No XINC xml:base fix
1257     d                 c                   X'00040000'
1258     d  XML_PARSE_HUGE...                                                       No parsing limit
1259     d                 c                   X'00080000'
1260     d  XML_PARSE_OLDSAX...                                                     Use SAX2 b4 2.7.0
1261     d                 c                   X'00100000'
1262     d  XML_PARSE_IGNORE_ENC...                                                 No int doc code hint
1263     d                 c                   X'00200000'
1264     d  XML_PARSE_BIG_LINES...                                                  Big line#-->PSVI fld
1265     d                 c                   X'00400000'
1266
1267     d xmlCtxtReset    pr                  extproc('xmlCtxtReset')
1268     d  ctxt                               value like(xmlParserCtxtPtr)
1269
1270     d xmlCtxtResetPush...
1271     d                 pr                  extproc('xmlCtxtResetPush')
1272     d                                     like(xmlCint)
1273     d  ctxt                               value like(xmlParserCtxtPtr)
1274     d  chunk                          *   value options(*string)               const char *
1275     d  size                               value like(xmlCint)
1276     d  filename                       *   value options(*string)               const char *
1277     d  encoding                       *   value options(*string)               const char *
1278
1279     d xmlCtxtUseOptions...
1280     d                 pr                  extproc('xmlCtxtUseOptions')
1281     d                                     like(xmlCint)
1282     d  ctxt                               value like(xmlParserCtxtPtr)
1283     d  options                            value like(xmlCint)
1284
1285     d xmlReadDoc      pr                  extproc('xmlReadDoc')
1286     d                                     like(xmlDocPtr)
1287     d  cur                            *   value options(*string)               const xmlChar *
1288     d  URL                            *   value options(*string)               const char *
1289     d  encoding                       *   value options(*string)               const char *
1290     d  options                            value like(xmlCint)
1291
1292     d xmlReadFile     pr                  extproc('xmlReadFile')
1293     d                                     like(xmlDocPtr)
1294     d  URL                            *   value options(*string)               const char *
1295     d  encoding                       *   value options(*string)               const char *
1296     d  options                            value like(xmlCint)
1297
1298     d xmlReadMemory   pr                  extproc('xmlReadMemory')
1299     d                                     like(xmlDocPtr)
1300     d  buffer                         *   value options(*string)               const char *
1301     d  size                               value like(xmlCint)
1302     d  URL                            *   value options(*string)               const char *
1303     d  encoding                       *   value options(*string)               const char *
1304     d  options                            value like(xmlCint)
1305
1306     d xmlReadFd       pr                  extproc('xmlReadFd')
1307     d                                     like(xmlDocPtr)
1308     d  fd                                 value like(xmlCint)
1309     d  URL                            *   value options(*string)               const char *
1310     d  encoding                       *   value options(*string)               const char *
1311     d  options                            value like(xmlCint)
1312
1313     d xmlReadIO       pr                  extproc('xmlReadIO')
1314     d                                     like(xmlDocPtr)
1315     d  ioread                             value like(xmlInputReadCallback)
1316     d  ioclose                            value like(xmlInputCloseCallback)
1317     d  ioctx                          *   value                                void *
1318     d  URL                            *   value options(*string)               const char *
1319     d  encoding                       *   value options(*string)               const char *
1320     d  options                            value like(xmlCint)
1321
1322     d xmlCtxtReadDoc  pr                  extproc('xmlCtxtReadDoc')
1323     d                                     like(xmlDocPtr)
1324     d  ctxt                               value like(xmlParserCtxtPtr)
1325     d  cur                            *   value options(*string)               const xmlChar *
1326     d  URL                            *   value options(*string)               const char *
1327     d  encoding                       *   value options(*string)               const char *
1328     d  options                            value like(xmlCint)
1329
1330     d xmlCtxtReadFile...
1331     d                 pr                  extproc('xmlCtxtReadFile')
1332     d                                     like(xmlDocPtr)
1333     d  ctxt                               value like(xmlParserCtxtPtr)
1334     d  filename                       *   value options(*string)               const char *
1335     d  encoding                       *   value options(*string)               const char *
1336     d  options                            value like(xmlCint)
1337
1338     d xmlCtxtReadMemory...
1339     d                 pr                  extproc('xmlCtxtReadMemory')
1340     d                                     like(xmlDocPtr)
1341     d  ctxt                               value like(xmlParserCtxtPtr)
1342     d  buffer                         *   value options(*string)               const char *
1343     d  size                               value like(xmlCint)
1344     d  URL                            *   value options(*string)               const char *
1345     d  encoding                       *   value options(*string)               const char *
1346     d  options                            value like(xmlCint)
1347
1348     d xmlCtxtReadFd   pr                  extproc('xmlCtxtReadFd')
1349     d                                     like(xmlDocPtr)
1350     d  ctxt                               value like(xmlParserCtxtPtr)
1351     d  fd                                 value like(xmlCint)
1352     d  URL                            *   value options(*string)               const char *
1353     d  encoding                       *   value options(*string)               const char *
1354     d  options                            value like(xmlCint)
1355
1356     d xmlCtxtReadIO   pr                  extproc('xmlCtxtReadIO')
1357     d                                     like(xmlDocPtr)
1358     d  ctxt                               value like(xmlParserCtxtPtr)
1359     d  ioread                             value like(xmlInputReadCallback)
1360     d  ioclose                            value like(xmlInputCloseCallback)
1361     d  ioctx                          *   value                                void *
1362     d  URL                            *   value options(*string)               const char *
1363     d  encoding                       *   value options(*string)               const char *
1364     d  options                            value like(xmlCint)
1365
1366      * Library wide options
1367
1368      * xmlFeature:
1369      *
1370      * Used to examine the existance of features that can be enabled
1371      * or disabled at compile-time.
1372      * They used to be called XML_FEATURE_xxx but this clashed with Expat
1373
1374     d xmlFeature      s                   based(######typedef######)
1375     d                                     like(xmlCenum)
1376     d  XML_WITH_THREAD...
1377     d                 c                   1
1378     d  XML_WITH_TREE  c                   2
1379     d  XML_WITH_OUTPUT...
1380     d                 c                   3
1381     d  XML_WITH_PUSH  c                   4
1382     d  XML_WITH_READER...
1383     d                 c                   5
1384     d  XML_WITH_PATTERN...
1385     d                 c                   6
1386     d  XML_WITH_WRITER...
1387     d                 c                   7
1388     d  XML_WITH_SAX1  c                   8
1389     d  XML_WITH_FTP   c                   9
1390     d  XML_WITH_HTTP  c                   10
1391     d  XML_WITH_VALID...
1392     d                 c                   11
1393     d  XML_WITH_HTML  c                   12
1394     d  XML_WITH_LEGACY...
1395     d                 c                   13
1396     d  XML_WITH_C14N  c                   14
1397     d  XML_WITH_CATALOG...
1398     d                 c                   15
1399     d  XML_WITH_XPATH...
1400     d                 c                   16
1401     d  XML_WITH_XPTR  c                   17
1402     d  XML_WITH_XINCLUDE...
1403     d                 c                   18
1404     d  XML_WITH_ICONV...
1405     d                 c                   19
1406     d  XML_WITH_ISO8859X...
1407     d                 c                   20
1408     d  XML_WITH_UNICODE...
1409     d                 c                   21
1410     d  XML_WITH_REGEXP...
1411     d                 c                   22
1412     d  XML_WITH_AUTOMATA...
1413     d                 c                   23
1414     d  XML_WITH_EXPR  c                   24
1415     d  XML_WITH_SCHEMAS...
1416     d                 c                   25
1417     d  XML_WITH_SCHEMATRON...
1418     d                 c                   26
1419     d  XML_WITH_MODULES...
1420     d                 c                   27
1421     d  XML_WITH_DEBUG...
1422     d                 c                   28
1423     d  XML_WITH_DEBUG_MEM...
1424     d                 c                   29
1425     d  XML_WITH_DEBUG_RUN...
1426     d                 c                   30
1427     d  XML_WITH_ZLIB  c                   31
1428     d  XML_WITH_ICU   c                   32
1429     d  XML_WITH_LZMA  c                   33
1430     d  XML_WITH_NONE  c                   99999
1431
1432     d xmlHasFeature   pr                  extproc('xmlHasFeature')
1433     d                                     like(xmlCint)
1434     d  feature                            value like(xmlFeature)
1435
1436      /endif                                                                    XML_PARSER_H__
1437