webengine/osswebengine/WebCore/platform/symbian/Libxml2/Libxml2_c14n.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * Summary: Provide Canonical XML and Exclusive XML Canonicalization
       
     3  * Description: the c14n modules provides a
       
     4  *
       
     5  * "Canonical XML" implementation 
       
     6  * http://www.w3.org/TR/xml-c14n
       
     7  * 
       
     8  * and an
       
     9  *
       
    10  * "Exclusive XML Canonicalization" implementation
       
    11  * http://www.w3.org/TR/xml-exc-c14n
       
    12  
       
    13  * Copy: See Copyright for the status of this software.
       
    14  * 
       
    15  * Author: Aleksey Sanin <aleksey@aleksey.com>
       
    16  */
       
    17 #ifndef __XML_C14N_H__
       
    18 #define __XML_C14N_H__    
       
    19 #ifdef LIBXML_OUTPUT_ENABLED
       
    20 
       
    21 #ifdef __cplusplus
       
    22 extern "C" {
       
    23 #endif /* __cplusplus */ 
       
    24 
       
    25 #include "Libxml2_xmlversion.h"
       
    26 #include "Libxml2_tree.h"
       
    27 #include "Libxml2_xpath.h" 
       
    28 
       
    29 /*
       
    30  * XML Canonicazation
       
    31  * http://www.w3.org/TR/xml-c14n
       
    32  *
       
    33  * Exclusive XML Canonicazation
       
    34  * http://www.w3.org/TR/xml-exc-c14n
       
    35  *
       
    36  * Canonical form of an XML document could be created if and only if
       
    37  *  a) default attributes (if any) are added to all nodes
       
    38  *  b) all character and parsed entity references are resolved
       
    39  * In order to achive this in libxml2 the document MUST be loaded with 
       
    40  * following global setings:
       
    41  *    
       
    42  *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
       
    43  *    xmlSubstituteEntitiesDefault(1);
       
    44  *
       
    45  * or corresponding parser context setting:
       
    46  *    xmlParserCtxtPtr ctxt;
       
    47  *    
       
    48  *    ... 
       
    49  *    ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
       
    50  *    ctxt->replaceEntities = 1;
       
    51  *    ...
       
    52  */
       
    53 
       
    54 
       
    55 XMLPUBFUN int XMLCALL 		
       
    56 		xmlC14NDocSaveTo	(xmlDocPtr doc,
       
    57 					 xmlNodeSetPtr nodes,
       
    58 					 int exclusive,
       
    59 					 xmlChar **inclusive_ns_prefixes,
       
    60 					 int with_comments, 
       
    61 					 xmlOutputBufferPtr buf);
       
    62 
       
    63 XMLPUBFUN int XMLCALL
       
    64 		xmlC14NDocDumpMemory	(xmlDocPtr doc,
       
    65 					 xmlNodeSetPtr nodes,
       
    66 					 int exclusive,
       
    67 					 xmlChar **inclusive_ns_prefixes,
       
    68 					 int with_comments, 
       
    69 					 xmlChar **doc_txt_ptr);
       
    70 
       
    71 XMLPUBFUN int XMLCALL
       
    72 		xmlC14NDocSave		(xmlDocPtr doc,
       
    73 					 xmlNodeSetPtr nodes,
       
    74 					 int exclusive,
       
    75 					 xmlChar **inclusive_ns_prefixes,
       
    76 					 int with_comments, 
       
    77 					 const char* filename,
       
    78 					 int compression);
       
    79 
       
    80 
       
    81 /**
       
    82  * This is the core C14N function
       
    83  */
       
    84 typedef int (*xmlC14NIsVisibleCallback)	(void* user_data, 
       
    85 					 xmlNodePtr node,
       
    86 					 xmlNodePtr parent);
       
    87 
       
    88 XMLPUBFUN int XMLCALL
       
    89 		xmlC14NExecute		(xmlDocPtr doc,
       
    90 					 xmlC14NIsVisibleCallback is_visible_callback,
       
    91 					 void* user_data,				 
       
    92 					 int exclusive,
       
    93 					 xmlChar **inclusive_ns_prefixes,
       
    94 					 int with_comments, 
       
    95 					 xmlOutputBufferPtr buf);
       
    96 
       
    97 #ifdef __cplusplus
       
    98 }
       
    99 #endif /* __cplusplus */
       
   100 
       
   101 #endif /* LIBXML_OUTPUT_ENABLED */
       
   102 #endif /* __XML_C14N_H__ */
       
   103