2 * Summary: Provide Canonical XML and Exclusive XML Canonicalization
3 * Description: the c14n modules provides a
5 * "Canonical XML" implementation
6 * http://www.w3.org/TR/xml-c14n
10 * "Exclusive XML Canonicalization" implementation
11 * http://www.w3.org/TR/xml-exc-c14n
13 * Copy: See Copyright for the status of this software.
15 * Author: Aleksey Sanin <aleksey@aleksey.com>
16 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
26 #if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED)
30 #endif /* __cplusplus */
32 #include <stdapis/libxml2/libxml2_xmlversion.h>
33 #include <stdapis/libxml2/libxml2_tree.h>
34 #include <stdapis/libxml2/libxml2_xpath.h>
38 * http://www.w3.org/TR/xml-c14n
40 * Exclusive XML Canonicazation
41 * http://www.w3.org/TR/xml-exc-c14n
43 * Canonical form of an XML document could be created if and only if
44 * a) default attributes (if any) are added to all nodes
45 * b) all character and parsed entity references are resolved
46 * In order to achive this in libxml2 the document MUST be loaded with
47 * following global setings:
49 * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
50 * xmlSubstituteEntitiesDefault(1);
52 * or corresponding parser context setting:
53 * xmlParserCtxtPtr ctxt;
56 * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
57 * ctxt->replaceEntities = 1;
63 xmlC14NDocSaveTo (xmlDocPtr doc,
66 xmlChar **inclusive_ns_prefixes,
68 xmlOutputBufferPtr buf);
71 xmlC14NDocDumpMemory (xmlDocPtr doc,
74 xmlChar **inclusive_ns_prefixes,
76 xmlChar **doc_txt_ptr);
79 xmlC14NDocSave (xmlDocPtr doc,
82 xmlChar **inclusive_ns_prefixes,
89 * This is the core C14N function
91 typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
96 xmlC14NExecute (xmlDocPtr doc,
97 xmlC14NIsVisibleCallback is_visible_callback,
100 xmlChar **inclusive_ns_prefixes,
102 xmlOutputBufferPtr buf);
106 #endif /* __cplusplus */
108 #endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED) */
109 #endif /* XML_C14N_H */