1 * Summary: Provide Canonical XML and Exclusive XML Canonicalization
2 * Description: the c14n modules provides a
4 * "Canonical XML" implementation
5 * http://www.w3.org/TR/xml-c14n
9 * "Exclusive XML Canonicalization" implementation
10 * http://www.w3.org/TR/xml-exc-c14n
12 * Copy: See Copyright for the status of this software.
14 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
16 /if not defined(XML_C14N_H__)
19 /include "libxmlrpg/xmlversion"
21 /if defined(LIBXML_C14N_ENABLED)
22 /if defined(LIBXML_OUTPUT_ENABLED)
24 /include "libxmlrpg/tree"
25 /include "libxmlrpg/xpath"
28 * http://www.w3.org/TR/xml-c14n
30 * Exclusive XML Canonicazation
31 * http://www.w3.org/TR/xml-exc-c14n
33 * Canonical form of an XML document could be created if and only if
34 * a) default attributes (if any) are added to all nodes
35 * b) all character and parsed entity references are resolved
36 * In order to achive this in libxml2 the document MUST be loaded with
37 * following global setings:
39 * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
40 * xmlSubstituteEntitiesDefault(1);
42 * or corresponding parser context setting:
43 * xmlParserCtxtPtr ctxt;
46 * ctxt->loadsubset = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
47 * ctxt->replaceEntities = 1;
52 * Predefined values for C14N modes
54 d xmlBufferAllocationScheme...
55 d xmlC14NMode s 10i 0 based(######typedef######) enum
56 d XML_C14N_1_0 c 0 Original C14N 1.0
57 d XML_C14N_EXCLUSIVE_1_0... Exclusive C14N 1.0
59 d XML_C14N_1_1 c 2 C14N 1.1 spec
62 d pr 10i 0 extproc('xmlC14NDocSaveTo')
63 d doc value like(xmlDocPtr)
64 d nodes value like(xmlNodeSetPtr)
66 d inclusive_ns_prefixes...
68 d with_comments 10i 0 value
69 d buf value like(xmlOutputBufferPtr)
71 d xmlC14NDocDumpMemory...
72 d pr 10i 0 extproc('xmlC14NDocDumpMemory')
73 d doc value like(xmlDocPtr)
74 d nodes value like(xmlNodeSetPtr)
76 d inclusive_ns_prefixes...
78 d with_comments 10i 0 value
79 d doc_txt_ptr * xmlChar *(*)
81 d xmlC14NDocSave pr 10i 0 extproc('xmlC14NDocSave')
82 d doc value like(xmlDocPtr)
83 d nodes value like(xmlNodeSetPtr)
85 d inclusive_ns_prefixes...
87 d with_comments 10i 0 value
88 d filename * value options(*string) const char *
89 d compression 10i 0 value
91 * This is the core C14N function
93 * xmlC14NIsVisibleCallback:
94 * @user_data: user data
95 * @node: the curent node
96 * @parent: the parent node
98 * Signature for a C14N callback on visible nodes
100 * Returns 1 if the node should be included
102 d xmlC14NIsVisibleCallback...
103 d s * based(######typedef######)
106 d xmlC14NExecute pr 10i 0 extproc('xmlC14NExecute')
107 d doc value like(xmlDocPtr)
108 d is_visible_callback...
109 d value like(xmlC14NIsVisibleCallback)
110 d user_data * value void *
112 d inclusive_ns_prefixes...
114 d with_comments 10i 0 value
115 d buf value like(xmlOutputBufferPtr)
117 /endif LIBXML_OUTPUT_ENABLD
118 /endif LIBXML_C14N_ENABLED