blob: 963ed3749ac08b83245070e370afa4c42fd0dd92 [file] [log] [blame]
Patrick Monnerate083c302014-03-04 17:18:26 +01001 * Summary: Provide Canonical XML and Exclusive XML Canonicalization
2 * Description: the c14n modules provides a
3 *
4 * "Canonical XML" implementation
5 * http://www.w3.org/TR/xml-c14n
6 *
7 * and an
8 *
9 * "Exclusive XML Canonicalization" implementation
10 * http://www.w3.org/TR/xml-exc-c14n
11 *
12 * Copy: See Copyright for the status of this software.
13 *
14 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
15
16 /if not defined(XML_C14N_H__)
17 /define XML_C14N_H__
18
19 /include "libxmlrpg/xmlversion"
20
21 /if defined(LIBXML_C14N_ENABLED)
22 /if defined(LIBXML_OUTPUT_ENABLED)
23
Xin Lia136fc22016-07-26 14:22:54 -070024 /include "libxmlrpg/xmlTypesC"
Patrick Monnerate083c302014-03-04 17:18:26 +010025 /include "libxmlrpg/tree"
26 /include "libxmlrpg/xpath"
27
28 * XML Canonicazation
29 * http://www.w3.org/TR/xml-c14n
30 *
31 * Exclusive XML Canonicazation
32 * http://www.w3.org/TR/xml-exc-c14n
33 *
34 * Canonical form of an XML document could be created if and only if
35 * a) default attributes (if any) are added to all nodes
36 * b) all character and parsed entity references are resolved
37 * In order to achive this in libxml2 the document MUST be loaded with
38 * following global setings:
39 *
40 * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
41 * xmlSubstituteEntitiesDefault(1);
42 *
43 * or corresponding parser context setting:
44 * xmlParserCtxtPtr ctxt;
45 *
46 * ...
47 * ctxt->loadsubset = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
48 * ctxt->replaceEntities = 1;
49 * ...
50
51 * xmlC14NMode:
52 *
53 * Predefined values for C14N modes
54
55 d xmlBufferAllocationScheme...
Xin Lia136fc22016-07-26 14:22:54 -070056 d xmlC14NMode s based(######typedef######)
57 d like(xmlCenum)
Patrick Monnerate083c302014-03-04 17:18:26 +010058 d XML_C14N_1_0 c 0 Original C14N 1.0
59 d XML_C14N_EXCLUSIVE_1_0... Exclusive C14N 1.0
60 d c 1
61 d XML_C14N_1_1 c 2 C14N 1.1 spec
62
63 d xmlC14NDocSaveTo...
Xin Lia136fc22016-07-26 14:22:54 -070064 d pr extproc('xmlC14NDocSaveTo')
65 d like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010066 d doc value like(xmlDocPtr)
67 d nodes value like(xmlNodeSetPtr)
Xin Lia136fc22016-07-26 14:22:54 -070068 d mode value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010069 d inclusive_ns_prefixes...
Xin Lia136fc22016-07-26 14:22:54 -070070 d * options(*omit) xmlChar *(*)
71 d with_comments value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010072 d buf value like(xmlOutputBufferPtr)
73
74 d xmlC14NDocDumpMemory...
Xin Lia136fc22016-07-26 14:22:54 -070075 d pr extproc('xmlC14NDocDumpMemory')
76 d like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010077 d doc value like(xmlDocPtr)
78 d nodes value like(xmlNodeSetPtr)
Xin Lia136fc22016-07-26 14:22:54 -070079 d mode value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010080 d inclusive_ns_prefixes...
Xin Lia136fc22016-07-26 14:22:54 -070081 d * options(*omit) xmlChar *(*)
82 d with_comments value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010083 d doc_txt_ptr * xmlChar *(*)
84
Xin Lia136fc22016-07-26 14:22:54 -070085 d xmlC14NDocSave pr extproc('xmlC14NDocSave')
86 d like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010087 d doc value like(xmlDocPtr)
88 d nodes value like(xmlNodeSetPtr)
Xin Lia136fc22016-07-26 14:22:54 -070089 d mode value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010090 d inclusive_ns_prefixes...
Xin Lia136fc22016-07-26 14:22:54 -070091 d * options(*omit) xmlChar *(*)
92 d with_comments value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010093 d filename * value options(*string) const char *
Xin Lia136fc22016-07-26 14:22:54 -070094 d compression value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +010095
96 * This is the core C14N function
97
98 * xmlC14NIsVisibleCallback:
99 * @user_data: user data
100 * @node: the curent node
101 * @parent: the parent node
102 *
103 * Signature for a C14N callback on visible nodes
104 *
105 * Returns 1 if the node should be included
106
107 d xmlC14NIsVisibleCallback...
108 d s * based(######typedef######)
109 d procptr
110
Xin Lia136fc22016-07-26 14:22:54 -0700111 d xmlC14NExecute pr extproc('xmlC14NExecute')
112 d like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +0100113 d doc value like(xmlDocPtr)
114 d is_visible_callback...
115 d value like(xmlC14NIsVisibleCallback)
116 d user_data * value void *
Xin Lia136fc22016-07-26 14:22:54 -0700117 d mode value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +0100118 d inclusive_ns_prefixes...
Xin Lia136fc22016-07-26 14:22:54 -0700119 d * options(*omit) xmlChar *(*)
120 d with_comments value like(xmlCint)
Patrick Monnerate083c302014-03-04 17:18:26 +0100121 d buf value like(xmlOutputBufferPtr)
122
123 /endif LIBXML_OUTPUT_ENABLD
124 /endif LIBXML_C14N_ENABLED
125 /endif XML_C14N_H__