1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_c14n.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,110 @@
1.4 +/*
1.5 + * Summary: Provide Canonical XML and Exclusive XML Canonicalization
1.6 + * Description: the c14n modules provides a
1.7 + *
1.8 + * "Canonical XML" implementation
1.9 + * http://www.w3.org/TR/xml-c14n
1.10 + *
1.11 + * and an
1.12 + *
1.13 + * "Exclusive XML Canonicalization" implementation
1.14 + * http://www.w3.org/TR/xml-exc-c14n
1.15 +
1.16 + * Copy: See Copyright for the status of this software.
1.17 + *
1.18 + * Author: Aleksey Sanin <aleksey@aleksey.com>
1.19 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.20 + */
1.21 +
1.22 +/** @file
1.23 +@publishedAll
1.24 +@released
1.25 +*/
1.26 +#ifndef XML_C14N_H
1.27 +#define XML_C14N_H
1.28 +
1.29 +#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED)
1.30 +
1.31 +#ifdef __cplusplus
1.32 +extern "C" {
1.33 +#endif /* __cplusplus */
1.34 +
1.35 +#include <stdapis/libxml2/libxml2_xmlversion.h>
1.36 +#include <stdapis/libxml2/libxml2_tree.h>
1.37 +#include <stdapis/libxml2/libxml2_xpath.h>
1.38 +
1.39 +/*
1.40 + * XML Canonicazation
1.41 + * http://www.w3.org/TR/xml-c14n
1.42 + *
1.43 + * Exclusive XML Canonicazation
1.44 + * http://www.w3.org/TR/xml-exc-c14n
1.45 + *
1.46 + * Canonical form of an XML document could be created if and only if
1.47 + * a) default attributes (if any) are added to all nodes
1.48 + * b) all character and parsed entity references are resolved
1.49 + * In order to achive this in libxml2 the document MUST be loaded with
1.50 + * following global setings:
1.51 + *
1.52 + * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
1.53 + * xmlSubstituteEntitiesDefault(1);
1.54 + *
1.55 + * or corresponding parser context setting:
1.56 + * xmlParserCtxtPtr ctxt;
1.57 + *
1.58 + * ...
1.59 + * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
1.60 + * ctxt->replaceEntities = 1;
1.61 + * ...
1.62 + */
1.63 +
1.64 +
1.65 +XMLPUBFUN int XMLCALL
1.66 + xmlC14NDocSaveTo (xmlDocPtr doc,
1.67 + xmlNodeSetPtr nodes,
1.68 + int exclusive,
1.69 + xmlChar **inclusive_ns_prefixes,
1.70 + int with_comments,
1.71 + xmlOutputBufferPtr buf);
1.72 +
1.73 +XMLPUBFUN int XMLCALL
1.74 + xmlC14NDocDumpMemory (xmlDocPtr doc,
1.75 + xmlNodeSetPtr nodes,
1.76 + int exclusive,
1.77 + xmlChar **inclusive_ns_prefixes,
1.78 + int with_comments,
1.79 + xmlChar **doc_txt_ptr);
1.80 +
1.81 +XMLPUBFUN int XMLCALL
1.82 + xmlC14NDocSave (xmlDocPtr doc,
1.83 + xmlNodeSetPtr nodes,
1.84 + int exclusive,
1.85 + xmlChar **inclusive_ns_prefixes,
1.86 + int with_comments,
1.87 + const char* filename,
1.88 + int compression);
1.89 +
1.90 +
1.91 +/**
1.92 + * This is the core C14N function
1.93 + */
1.94 +typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
1.95 + xmlNodePtr node,
1.96 + xmlNodePtr parent);
1.97 +
1.98 +XMLPUBFUN int XMLCALL
1.99 + xmlC14NExecute (xmlDocPtr doc,
1.100 + xmlC14NIsVisibleCallback is_visible_callback,
1.101 + void* user_data,
1.102 + int exclusive,
1.103 + xmlChar **inclusive_ns_prefixes,
1.104 + int with_comments,
1.105 + xmlOutputBufferPtr buf);
1.106 +
1.107 +#ifdef __cplusplus
1.108 +}
1.109 +#endif /* __cplusplus */
1.110 +
1.111 +#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_C14N_ENABLED) */
1.112 +#endif /* XML_C14N_H */
1.113 +