added Info.plist
[TestXSLT.git] / libxml2 / doc / html / libxml-c14n.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>c14n</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
2         .synopsis, .classsynopsis {
3             background: #eeeeee;
4             border: solid 1px #aaaaaa;
5             padding: 0.5em;
6         }
7         .programlisting {
8             background: #eeeeff;
9             border: solid 1px #aaaaff;
10             padding: 0.5em;
11         }
12         .variablelist {
13             padding: 4px;
14             margin-left: 3em;
15         }
16         .navigation {
17             background: #ffeeee;
18             border: solid 1px #ffaaaa;
19             margin-top: 0.5em;
20             margin-bottom: 0.5em;
21         }
22         .navigation a {
23             color: #770000;
24         }
25         .navigation a:visited {
26             color: #550000;
27         }
28         .navigation .title {
29             font-size: 200%;
30         }
31       </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-catalog.html" title="catalog"><link rel="next" href="libxml-threads.html" title="threads"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-catalog.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-c14n"></a><div class="titlepage"></div><div class="refnamediv"><h2>c14n</h2><p>c14n &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
32
33
34
35 int         <a href="libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a>                (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
36                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
37                                              int exclusive,
38                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
39                                              int with_comments,
40                                              <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
41 int         <a href="libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a>            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
42                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
43                                              int exclusive,
44                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
45                                              int with_comments,
46                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **doc_txt_ptr);
47 int         <a href="libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a>                  (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
48                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
49                                              int exclusive,
50                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
51                                              int with_comments,
52                                              const char *filename,
53                                              int compression);
54 int         (<a href="libxml-c14n.html#xmlC14NIsVisibleCallback">*xmlC14NIsVisibleCallback</a>)     (void *user_data,
55                                              <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node,
56                                              <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
57 int         <a href="libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a>                  (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
58                                              <a href="libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback,
59                                              void *user_data,
60                                              int exclusive,
61                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
62                                              int with_comments,
63                                              <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
64 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
65
66 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlC14NDocSaveTo"></a>xmlC14NDocSaveTo ()</h3><pre class="programlisting">int         xmlC14NDocSaveTo                (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
67                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
68                                              int exclusive,
69                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
70                                              int with_comments,
71                                              <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);</pre><p>
72 Dumps the canonized image of given XML document into the provided buffer.
73 For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
74 "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p><p>
75
76 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>          the XML document for canonization
77 </td></tr><tr><td><span class="term"><i><tt>nodes</tt></i> :</span></td><td>            the nodes set to be included in the canonized image
78                 or NULL if all document nodes should be included
79 </td></tr><tr><td><span class="term"><i><tt>exclusive</tt></i> :</span></td><td>                the exclusive flag (0 - non-exclusive canonicalization;
80                 otherwise - exclusive canonicalization)
81 </td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i> :</span></td><td> the list of inclusive namespace prefixes 
82                 ended with a NULL or NULL if there is no
83                 inclusive namespaces (only for exclusive 
84                 canonicalization, ignored otherwise)
85 </td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i> :</span></td><td>    include comments in the result (!=0) or not (==0)
86 </td></tr><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td>              the output buffer to store canonical XML; this 
87                 buffer MUST have encoder==NULL because C14N requires
88                 UTF-8 output
89 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>non-negative value on success or a negative value on fail  
90 </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlC14NDocDumpMemory"></a>xmlC14NDocDumpMemory ()</h3><pre class="programlisting">int         xmlC14NDocDumpMemory            (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
91                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
92                                              int exclusive,
93                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
94                                              int with_comments,
95                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **doc_txt_ptr);</pre><p>
96 Dumps the canonized image of given XML document into memory.
97 For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
98 "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p><p>
99
100 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>          the XML document for canonization
101 </td></tr><tr><td><span class="term"><i><tt>nodes</tt></i> :</span></td><td>            the nodes set to be included in the canonized image
102                 or NULL if all document nodes should be included
103 </td></tr><tr><td><span class="term"><i><tt>exclusive</tt></i> :</span></td><td>                the exclusive flag (0 - non-exclusive canonicalization;
104                 otherwise - exclusive canonicalization)
105 </td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i> :</span></td><td> the list of inclusive namespace prefixes 
106                 ended with a NULL or NULL if there is no
107                 inclusive namespaces (only for exclusive 
108                 canonicalization, ignored otherwise)
109 </td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i> :</span></td><td>    include comments in the result (!=0) or not (==0)
110 </td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i> :</span></td><td>      the memory pointer for allocated canonical XML text;
111                 the caller of this functions is responsible for calling
112                 <a href="libxml-globals.html#xmlFree">xmlFree</a>() to free allocated memory 
113 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written on success or a negative value on fail  
114 </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlC14NDocSave"></a>xmlC14NDocSave ()</h3><pre class="programlisting">int         xmlC14NDocSave                  (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
115                                              <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes,
116                                              int exclusive,
117                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
118                                              int with_comments,
119                                              const char *filename,
120                                              int compression);</pre><p>
121 Dumps the canonized image of given XML document into the file.
122 For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
123 "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p><p>
124
125 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>          the XML document for canonization
126 </td></tr><tr><td><span class="term"><i><tt>nodes</tt></i> :</span></td><td>            the nodes set to be included in the canonized image
127                 or NULL if all document nodes should be included
128 </td></tr><tr><td><span class="term"><i><tt>exclusive</tt></i> :</span></td><td>                the exclusive flag (0 - non-exclusive canonicalization;
129                 otherwise - exclusive canonicalization)
130 </td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i> :</span></td><td> the list of inclusive namespace prefixes 
131                 ended with a NULL or NULL if there is no
132                 inclusive namespaces (only for exclusive 
133                 canonicalization, ignored otherwise)
134 </td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i> :</span></td><td>    include comments in the result (!=0) or not (==0)
135 </td></tr><tr><td><span class="term"><i><tt>filename</tt></i> :</span></td><td>                 the filename to store canonical XML image
136 </td></tr><tr><td><span class="term"><i><tt>compression</tt></i> :</span></td><td>      the compression level (zlib requred): 
137                         -1 - libxml default,
138                          0 - uncompressed, 
139                         &gt;0 - compression level
140 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of bytes written success or a negative value on fail  
141 </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlC14NIsVisibleCallback"></a>xmlC14NIsVisibleCallback ()</h3><pre class="programlisting">int         (*xmlC14NIsVisibleCallback)     (void *user_data,
142                                              <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node,
143                                              <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent);</pre><p>
144
145 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>user_data</tt></i> :</span></td><td>
146 </td></tr><tr><td><span class="term"><i><tt>node</tt></i> :</span></td><td>
147 </td></tr><tr><td><span class="term"><i><tt>parent</tt></i> :</span></td><td>
148 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
149
150
151 </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlC14NExecute"></a>xmlC14NExecute ()</h3><pre class="programlisting">int         xmlC14NExecute                  (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
152                                              <a href="libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback,
153                                              void *user_data,
154                                              int exclusive,
155                                              <a href="libxml-tree.html#xmlChar">xmlChar</a> **inclusive_ns_prefixes,
156                                              int with_comments,
157                                              <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);</pre><p>
158 Dumps the canonized image of given XML document into the provided buffer.
159 For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
160 "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p><p>
161
162 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>doc</tt></i> :</span></td><td>          the XML document for canonization
163 </td></tr><tr><td><span class="term"><i><tt>is_visible_callback</tt></i> :</span></td><td>the function to use to determine is node visible 
164                 or not
165 </td></tr><tr><td><span class="term"><i><tt>user_data</tt></i> :</span></td><td>                the first parameter for <i><tt>is_visible_callback</tt></i> function
166                 (in most cases, it is nodes set)
167 </td></tr><tr><td><span class="term"><i><tt>exclusive</tt></i> :</span></td><td>                the exclusive flag (0 - non-exclusive canonicalization;
168                 otherwise - exclusive canonicalization)
169 </td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i> :</span></td><td> the list of inclusive namespace prefixes 
170                 ended with a NULL or NULL if there is no
171                 inclusive namespaces (only for exclusive 
172                 canonicalization, ignored otherwise)
173 </td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i> :</span></td><td>    include comments in the result (!=0) or not (==0)
174 </td></tr><tr><td><span class="term"><i><tt>buf</tt></i> :</span></td><td>              the output buffer to store canonical XML; this 
175                 buffer MUST have encoder==NULL because C14N requires
176                 UTF-8 output
177 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>non-negative value on success or a negative value on fail  
178 </td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-catalog.html"><b>&lt;&lt; catalog</b></a></td><td align="right"><a accesskey="n" href="libxml-threads.html"><b>threads &gt;&gt;</b></a></td></tr></table></body></html>