Eneboo - Documentación para desarrolladores
src/libdigidoc/libxml2/include/libxml/c14n.h
Ir a la documentación de este archivo.
00001 /*
00002  * Summary: Provide Canonical XML and Exclusive XML Canonicalization
00003  * Description: the c14n modules provides a
00004  *
00005  * "Canonical XML" implementation
00006  * http://www.w3.org/TR/xml-c14n
00007  *
00008  * and an
00009  *
00010  * "Exclusive XML Canonicalization" implementation
00011  * http://www.w3.org/TR/xml-exc-c14n
00012 
00013  * Copy: See Copyright for the status of this software.
00014  *
00015  * Author: Aleksey Sanin <aleksey@aleksey.com>
00016  */
00017 #ifndef __XML_C14N_H__
00018 #define __XML_C14N_H__
00019 #ifdef LIBXML_C14N_ENABLED
00020 #ifdef LIBXML_OUTPUT_ENABLED
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif /* __cplusplus */
00025 
00026 #include <libxml/xmlversion.h>
00027 #include <libxml/tree.h>
00028 #include <libxml/xpath.h>
00029 
00030 /*
00031  * XML Canonicazation
00032  * http://www.w3.org/TR/xml-c14n
00033  *
00034  * Exclusive XML Canonicazation
00035  * http://www.w3.org/TR/xml-exc-c14n
00036  *
00037  * Canonical form of an XML document could be created if and only if
00038  *  a) default attributes (if any) are added to all nodes
00039  *  b) all character and parsed entity references are resolved
00040  * In order to achive this in libxml2 the document MUST be loaded with
00041  * following global setings:
00042  *
00043  *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
00044  *    xmlSubstituteEntitiesDefault(1);
00045  *
00046  * or corresponding parser context setting:
00047  *    xmlParserCtxtPtr ctxt;
00048  *
00049  *    ...
00050  *    ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
00051  *    ctxt->replaceEntities = 1;
00052  *    ...
00053  */
00054 
00055 /*
00056  * xmlC14NMode:
00057  * 
00058  * Predefined values for C14N modes
00059  *
00060  */
00061 typedef enum {
00062     XML_C14N_1_0            = 0,    /* Origianal C14N 1.0 spec */
00063     XML_C14N_EXCLUSIVE_1_0  = 1,    /* Exclusive C14N 1.0 spec */
00064     XML_C14N_1_1            = 2     /* C14N 1.1 spec */
00065 } xmlC14NMode;
00066 
00067 XMLPUBFUN int XMLCALL
00068                 xmlC14NDocSaveTo        (xmlDocPtr doc,
00069                                          xmlNodeSetPtr nodes,
00070                                          int mode, /* a xmlC14NMode */
00071                                          xmlChar **inclusive_ns_prefixes,
00072                                          int with_comments,
00073                                          xmlOutputBufferPtr buf);
00074 
00075 XMLPUBFUN int XMLCALL
00076                 xmlC14NDocDumpMemory    (xmlDocPtr doc,
00077                                          xmlNodeSetPtr nodes,
00078                                          int mode, /* a xmlC14NMode */
00079                                          xmlChar **inclusive_ns_prefixes,
00080                                          int with_comments,
00081                                          xmlChar **doc_txt_ptr);
00082 
00083 XMLPUBFUN int XMLCALL
00084                 xmlC14NDocSave          (xmlDocPtr doc,
00085                                          xmlNodeSetPtr nodes,
00086                                          int mode, /* a xmlC14NMode */
00087                                          xmlChar **inclusive_ns_prefixes,
00088                                          int with_comments,
00089                                          const char* filename,
00090                                          int compression);
00091 
00092 
00106 typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
00107                                          xmlNodePtr node,
00108                                          xmlNodePtr parent);
00109 
00110 XMLPUBFUN int XMLCALL
00111                 xmlC14NExecute          (xmlDocPtr doc,
00112                                          xmlC14NIsVisibleCallback is_visible_callback,
00113                                          void* user_data,
00114                                          int mode, /* a xmlC14NMode */
00115                                          xmlChar **inclusive_ns_prefixes,
00116                                          int with_comments,
00117                                          xmlOutputBufferPtr buf);
00118 
00119 #ifdef __cplusplus
00120 }
00121 #endif /* __cplusplus */
00122 
00123 #endif /* LIBXML_OUTPUT_ENABLED */
00124 #endif /* LIBXML_C14N_ENABLED */
00125 #endif /* __XML_C14N_H__ */
00126 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'