aboutsummaryrefslogtreecommitdiff
path: root/libxml2-2.9.10/os400/libxmlrpg/c14n.rpgle
blob: 963ed3749ac08b83245070e370afa4c42fd0dd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
      * Summary: Provide Canonical XML and Exclusive XML Canonicalization
      * Description: the c14n modules provides a
      *
      * "Canonical XML" implementation
      * http://www.w3.org/TR/xml-c14n
      *
      * and an
      *
      * "Exclusive XML Canonicalization" implementation
      * http://www.w3.org/TR/xml-exc-c14n
      *
      * Copy: See Copyright for the status of this software.
      *
      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.

      /if not defined(XML_C14N_H__)
      /define XML_C14N_H__

      /include "libxmlrpg/xmlversion"

      /if defined(LIBXML_C14N_ENABLED)
      /if defined(LIBXML_OUTPUT_ENABLED)

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

      * XML Canonicazation
      * http://www.w3.org/TR/xml-c14n
      *
      * Exclusive XML Canonicazation
      * http://www.w3.org/TR/xml-exc-c14n
      *
      * Canonical form of an XML document could be created if and only if
      *  a) default attributes (if any) are added to all nodes
      *  b) all character and parsed entity references are resolved
      * In order to achive this in libxml2 the document MUST be loaded with
      * following global setings:
      *
      *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
      *    xmlSubstituteEntitiesDefault(1);
      *
      * or corresponding parser context setting:
      *    xmlParserCtxtPtr ctxt;
      *
      *    ...
      *    ctxt->loadsubset = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
      *    ctxt->replaceEntities = 1;
      *    ...

      * xmlC14NMode:
      *
      * Predefined values for C14N modes

     d xmlBufferAllocationScheme...
     d xmlC14NMode     s                   based(######typedef######)
     d                                     like(xmlCenum)
     d  XML_C14N_1_0   c                   0                                    Original C14N 1.0
     d  XML_C14N_EXCLUSIVE_1_0...                                               Exclusive C14N 1.0
     d                 c                   1
     d  XML_C14N_1_1   c                   2                                    C14N 1.1 spec

     d xmlC14NDocSaveTo...
     d                 pr                  extproc('xmlC14NDocSaveTo')
     d                                     like(xmlCint)
     d  doc                                value like(xmlDocPtr)
     d  nodes                              value like(xmlNodeSetPtr)
     d  mode                               value like(xmlCint)
     d  inclusive_ns_prefixes...
     d                                 *   options(*omit)                       xmlChar *(*)
     d  with_comments                      value like(xmlCint)
     d  buf                                value like(xmlOutputBufferPtr)

     d xmlC14NDocDumpMemory...
     d                 pr                  extproc('xmlC14NDocDumpMemory')
     d                                     like(xmlCint)
     d  doc                                value like(xmlDocPtr)
     d  nodes                              value like(xmlNodeSetPtr)
     d  mode                               value like(xmlCint)
     d  inclusive_ns_prefixes...
     d                                 *   options(*omit)                       xmlChar *(*)
     d  with_comments                      value like(xmlCint)
     d  doc_txt_ptr                    *                                        xmlChar *(*)

     d xmlC14NDocSave  pr                  extproc('xmlC14NDocSave')
     d                                     like(xmlCint)
     d  doc                                value like(xmlDocPtr)
     d  nodes                              value like(xmlNodeSetPtr)
     d  mode                               value like(xmlCint)
     d  inclusive_ns_prefixes...
     d                                 *   options(*omit)                       xmlChar *(*)
     d  with_comments                      value like(xmlCint)
     d  filename                       *   value options(*string)               const char *
     d  compression                        value like(xmlCint)

      * This is the core C14N function

      * xmlC14NIsVisibleCallback:
      * @user_data: user data
      * @node: the curent node
      * @parent: the parent node
      *
      * Signature for a C14N callback on visible nodes
      *
      * Returns 1 if the node should be included

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

     d xmlC14NExecute  pr                  extproc('xmlC14NExecute')
     d                                     like(xmlCint)
     d  doc                                value like(xmlDocPtr)
     d  is_visible_callback...
     d                                     value like(xmlC14NIsVisibleCallback)
     d  user_data                      *   value                                void *
     d  mode                               value like(xmlCint)
     d  inclusive_ns_prefixes...
     d                                 *   options(*omit)                       xmlChar *(*)
     d  with_comments                      value like(xmlCint)
     d  buf                                value like(xmlOutputBufferPtr)

      /endif                                                                    LIBXML_OUTPUT_ENABLD
      /endif                                                                    LIBXML_C14N_ENABLED
      /endif                                                                    XML_C14N_H__