epoc32/include/stdapis/libxml2/libxml2_c14n.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    17  */
    18 
    19 /** @file 
    20 @publishedAll
    21 @released
    22 */
    23 #ifndef XML_C14N_H
    24 #define XML_C14N_H
    25 
    26 #if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED)
    27 
    28 #ifdef __cplusplus
    29 extern "C" {
    30 #endif /* __cplusplus */
    31 
    32 #include <stdapis/libxml2/libxml2_xmlversion.h>
    33 #include <stdapis/libxml2/libxml2_tree.h>
    34 #include <stdapis/libxml2/libxml2_xpath.h> 
    35 
    36 /*
    37  * XML Canonicazation
    38  * http://www.w3.org/TR/xml-c14n
    39  *
    40  * Exclusive XML Canonicazation
    41  * http://www.w3.org/TR/xml-exc-c14n
    42  *
    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:
    48  *
    49  *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
    50  *    xmlSubstituteEntitiesDefault(1);
    51  *
    52  * or corresponding parser context setting:
    53  *    xmlParserCtxtPtr ctxt;
    54  *
    55  *    ...
    56  *    ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
    57  *    ctxt->replaceEntities = 1;
    58  *    ...
    59  */
    60 
    61 
    62 XMLPUBFUN int XMLCALL
    63                 xmlC14NDocSaveTo        (xmlDocPtr doc,
    64                                          xmlNodeSetPtr nodes,
    65                                          int exclusive,
    66                                          xmlChar **inclusive_ns_prefixes,
    67                                          int with_comments,
    68                                          xmlOutputBufferPtr buf);
    69 
    70 XMLPUBFUN int XMLCALL
    71                 xmlC14NDocDumpMemory    (xmlDocPtr doc,
    72                                          xmlNodeSetPtr nodes,
    73                                          int exclusive,
    74                                          xmlChar **inclusive_ns_prefixes,
    75                                          int with_comments,
    76                                          xmlChar **doc_txt_ptr);
    77 
    78 XMLPUBFUN int XMLCALL
    79                 xmlC14NDocSave          (xmlDocPtr doc,
    80                                          xmlNodeSetPtr nodes,
    81                                          int exclusive,
    82                                          xmlChar **inclusive_ns_prefixes,
    83                                          int with_comments,
    84                                          const char* filename,
    85                                          int compression);
    86 
    87 
    88 /**
    89  * This is the core C14N function
    90  */
    91 typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
    92                                          xmlNodePtr node,
    93                                          xmlNodePtr parent);
    94 
    95 XMLPUBFUN int XMLCALL
    96                 xmlC14NExecute          (xmlDocPtr doc,
    97                                          xmlC14NIsVisibleCallback is_visible_callback,
    98                                          void* user_data,
    99                                          int exclusive,
   100                                          xmlChar **inclusive_ns_prefixes,
   101                                          int with_comments,
   102                                          xmlOutputBufferPtr buf);
   103 
   104 #ifdef __cplusplus
   105 }
   106 #endif /* __cplusplus */
   107 
   108 #endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED) */
   109 #endif /* XML_C14N_H */
   110