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