• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>xinclude: implementation of XInclude</title>
5<meta name="generator" content="Libxml2 devhelp stylesheet">
6<link rel="start" href="index.html" title="libxml2 Reference Manual">
7<link rel="up" href="general.html" title="API">
8<link rel="stylesheet" href="style.css" type="text/css">
9<link rel="chapter" href="general.html" title="API">
10</head>
11<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
12<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
13<td><a accesskey="p" href="libxml2-valid.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
14<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
15<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
16<td><a accesskey="n" href="libxml2-xlink.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
17<th width="100%" align="center">libxml2 Reference Manual</th>
18</tr></table>
19<h2><span class="refentrytitle">xinclude</span></h2>
20<p>xinclude - implementation of XInclude</p>
21<p>API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003</p>
22<p>Author(s): Daniel Veillard </p>
23<div class="refsynopsisdiv">
24<h2>Synopsis</h2>
25<pre class="synopsis">#define <a href="#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a>;
26#define <a href="#XINCLUDE_HREF">XINCLUDE_HREF</a>;
27#define <a href="#XINCLUDE_NODE">XINCLUDE_NODE</a>;
28#define <a href="#XINCLUDE_NS">XINCLUDE_NS</a>;
29#define <a href="#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a>;
30#define <a href="#XINCLUDE_PARSE">XINCLUDE_PARSE</a>;
31#define <a href="#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a>;
32#define <a href="#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a>;
33#define <a href="#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a>;
34#define <a href="#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a>;
35typedef struct _xmlXIncludeCtxt <a href="#xmlXIncludeCtxt">xmlXIncludeCtxt</a>;
36typedef <a href="libxml2-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a> * <a href="#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a>;
37void	<a href="#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a>		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt);
38<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a>	<a href="#xmlXIncludeNewContext">xmlXIncludeNewContext</a>	(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
39int	<a href="#xmlXIncludeProcess">xmlXIncludeProcess</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
40int	<a href="#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a>		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 int flags);
41int	<a href="#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a>	(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 int flags, <br>					 void * data);
42int	<a href="#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a>		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
43int	<a href="#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a>		(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree);
44int	<a href="#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a>	(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br>					 int flags);
45int	<a href="#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a>	(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br>					 int flags, <br>					 void * data);
46int	<a href="#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a>		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br>					 int flags);
47</pre>
48</div>
49<div class="refsect1" lang="en"><h2>Description</h2></div>
50<div class="refsect1" lang="en">
51<h2>Details</h2>
52<div class="refsect2" lang="en">
53<div class="refsect2" lang="en">
54<h3>
55<a name="XINCLUDE_FALLBACK">Macro </a>XINCLUDE_FALLBACK</h3>
56<pre class="programlisting">#define <a href="#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a>;
57</pre>
58<p>Macro defining "fallback"</p>
59</div>
60<hr>
61<div class="refsect2" lang="en">
62<h3>
63<a name="XINCLUDE_HREF">Macro </a>XINCLUDE_HREF</h3>
64<pre class="programlisting">#define <a href="#XINCLUDE_HREF">XINCLUDE_HREF</a>;
65</pre>
66<p>Macro defining "href"</p>
67</div>
68<hr>
69<div class="refsect2" lang="en">
70<h3>
71<a name="XINCLUDE_NODE">Macro </a>XINCLUDE_NODE</h3>
72<pre class="programlisting">#define <a href="#XINCLUDE_NODE">XINCLUDE_NODE</a>;
73</pre>
74<p>Macro defining "include"</p>
75</div>
76<hr>
77<div class="refsect2" lang="en">
78<h3>
79<a name="XINCLUDE_NS">Macro </a>XINCLUDE_NS</h3>
80<pre class="programlisting">#define <a href="#XINCLUDE_NS">XINCLUDE_NS</a>;
81</pre>
82<p>Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude</p>
83</div>
84<hr>
85<div class="refsect2" lang="en">
86<h3>
87<a name="XINCLUDE_OLD_NS">Macro </a>XINCLUDE_OLD_NS</h3>
88<pre class="programlisting">#define <a href="#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a>;
89</pre>
90<p>Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude</p>
91</div>
92<hr>
93<div class="refsect2" lang="en">
94<h3>
95<a name="XINCLUDE_PARSE">Macro </a>XINCLUDE_PARSE</h3>
96<pre class="programlisting">#define <a href="#XINCLUDE_PARSE">XINCLUDE_PARSE</a>;
97</pre>
98<p>Macro defining "parse"</p>
99</div>
100<hr>
101<div class="refsect2" lang="en">
102<h3>
103<a name="XINCLUDE_PARSE_ENCODING">Macro </a>XINCLUDE_PARSE_ENCODING</h3>
104<pre class="programlisting">#define <a href="#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a>;
105</pre>
106<p>Macro defining "encoding"</p>
107</div>
108<hr>
109<div class="refsect2" lang="en">
110<h3>
111<a name="XINCLUDE_PARSE_TEXT">Macro </a>XINCLUDE_PARSE_TEXT</h3>
112<pre class="programlisting">#define <a href="#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a>;
113</pre>
114<p>Macro defining "text"</p>
115</div>
116<hr>
117<div class="refsect2" lang="en">
118<h3>
119<a name="XINCLUDE_PARSE_XML">Macro </a>XINCLUDE_PARSE_XML</h3>
120<pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a>;
121</pre>
122<p>Macro defining "xml"</p>
123</div>
124<hr>
125<div class="refsect2" lang="en">
126<h3>
127<a name="XINCLUDE_PARSE_XPOINTER">Macro </a>XINCLUDE_PARSE_XPOINTER</h3>
128<pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a>;
129</pre>
130<p>Macro defining "xpointer"</p>
131</div>
132<hr>
133<div class="refsect2" lang="en">
134<h3>
135<a name="xmlXIncludeCtxt">Structure </a>xmlXIncludeCtxt</h3>
136<pre class="programlisting">struct _xmlXIncludeCtxt {
137The content of this structure is not made public by the API.
138} xmlXIncludeCtxt;
139</pre>
140<p></p>
141</div>
142<hr>
143<div class="refsect2" lang="en">
144<h3>
145<a name="xmlXIncludeCtxtPtr">Typedef </a>xmlXIncludeCtxtPtr</h3>
146<pre class="programlisting"><a href="libxml2-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a> * xmlXIncludeCtxtPtr;
147</pre>
148<p></p>
149</div>
150<hr>
151<div class="refsect2" lang="en">
152<h3>
153<a name="xmlXIncludeFreeContext"></a>xmlXIncludeFreeContext ()</h3>
154<pre class="programlisting">void	xmlXIncludeFreeContext		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt)<br>
155</pre>
156<p>Free an XInclude context</p>
157<div class="variablelist"><table border="0">
158<col align="left">
159<tbody><tr>
160<td><span class="term"><i><tt>ctxt</tt></i>:</span></td>
161<td>the XInclude context</td>
162</tr></tbody>
163</table></div>
164</div>
165<hr>
166<div class="refsect2" lang="en">
167<h3>
168<a name="xmlXIncludeNewContext"></a>xmlXIncludeNewContext ()</h3>
169<pre class="programlisting"><a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a>	xmlXIncludeNewContext	(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br>
170</pre>
171<p>Creates a new XInclude context</p>
172<div class="variablelist"><table border="0">
173<col align="left">
174<tbody>
175<tr>
176<td><span class="term"><i><tt>doc</tt></i>:</span></td>
177<td>an XML Document</td>
178</tr>
179<tr>
180<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
181<td>the new set</td>
182</tr>
183</tbody>
184</table></div>
185</div>
186<hr>
187<div class="refsect2" lang="en">
188<h3>
189<a name="xmlXIncludeProcess"></a>xmlXIncludeProcess ()</h3>
190<pre class="programlisting">int	xmlXIncludeProcess		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br>
191</pre>
192<p>Implement the XInclude substitution on the XML document @doc</p>
193<div class="variablelist"><table border="0">
194<col align="left">
195<tbody>
196<tr>
197<td><span class="term"><i><tt>doc</tt></i>:</span></td>
198<td>an XML document</td>
199</tr>
200<tr>
201<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
202<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
203</tr>
204</tbody>
205</table></div>
206</div>
207<hr>
208<div class="refsect2" lang="en">
209<h3>
210<a name="xmlXIncludeProcessFlags"></a>xmlXIncludeProcessFlags ()</h3>
211<pre class="programlisting">int	xmlXIncludeProcessFlags		(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 int flags)<br>
212</pre>
213<p>Implement the XInclude substitution on the XML document @doc</p>
214<div class="variablelist"><table border="0">
215<col align="left">
216<tbody>
217<tr>
218<td><span class="term"><i><tt>doc</tt></i>:</span></td>
219<td>an XML document</td>
220</tr>
221<tr>
222<td><span class="term"><i><tt>flags</tt></i>:</span></td>
223<td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td>
224</tr>
225<tr>
226<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
227<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
228</tr>
229</tbody>
230</table></div>
231</div>
232<hr>
233<div class="refsect2" lang="en">
234<h3>
235<a name="xmlXIncludeProcessFlagsData"></a>xmlXIncludeProcessFlagsData ()</h3>
236<pre class="programlisting">int	xmlXIncludeProcessFlagsData	(<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br>					 int flags, <br>					 void * data)<br>
237</pre>
238<p>Implement the XInclude substitution on the XML document @doc</p>
239<div class="variablelist"><table border="0">
240<col align="left">
241<tbody>
242<tr>
243<td><span class="term"><i><tt>doc</tt></i>:</span></td>
244<td>an XML document</td>
245</tr>
246<tr>
247<td><span class="term"><i><tt>flags</tt></i>:</span></td>
248<td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td>
249</tr>
250<tr>
251<td><span class="term"><i><tt>data</tt></i>:</span></td>
252<td>application data that will be passed to the parser context in the _private field of the parser context(s)</td>
253</tr>
254<tr>
255<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
256<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
257</tr>
258</tbody>
259</table></div>
260</div>
261<hr>
262<div class="refsect2" lang="en">
263<h3>
264<a name="xmlXIncludeProcessNode"></a>xmlXIncludeProcessNode ()</h3>
265<pre class="programlisting">int	xmlXIncludeProcessNode		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br>					 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br>
266</pre>
267<p>Implement the XInclude substitution for the given subtree reusing the information and data coming from the given context.</p>
268<div class="variablelist"><table border="0">
269<col align="left">
270<tbody>
271<tr>
272<td><span class="term"><i><tt>ctxt</tt></i>:</span></td>
273<td>an existing XInclude context</td>
274</tr>
275<tr>
276<td><span class="term"><i><tt>node</tt></i>:</span></td>
277<td>a node in an XML document</td>
278</tr>
279<tr>
280<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
281<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
282</tr>
283</tbody>
284</table></div>
285</div>
286<hr>
287<div class="refsect2" lang="en">
288<h3>
289<a name="xmlXIncludeProcessTree"></a>xmlXIncludeProcessTree ()</h3>
290<pre class="programlisting">int	xmlXIncludeProcessTree		(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br>
291</pre>
292<p>Implement the XInclude substitution for the given subtree</p>
293<div class="variablelist"><table border="0">
294<col align="left">
295<tbody>
296<tr>
297<td><span class="term"><i><tt>tree</tt></i>:</span></td>
298<td>a node in an XML document</td>
299</tr>
300<tr>
301<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
302<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
303</tr>
304</tbody>
305</table></div>
306</div>
307<hr>
308<div class="refsect2" lang="en">
309<h3>
310<a name="xmlXIncludeProcessTreeFlags"></a>xmlXIncludeProcessTreeFlags ()</h3>
311<pre class="programlisting">int	xmlXIncludeProcessTreeFlags	(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br>					 int flags)<br>
312</pre>
313<p>Implement the XInclude substitution for the given subtree</p>
314<div class="variablelist"><table border="0">
315<col align="left">
316<tbody>
317<tr>
318<td><span class="term"><i><tt>tree</tt></i>:</span></td>
319<td>a node in an XML document</td>
320</tr>
321<tr>
322<td><span class="term"><i><tt>flags</tt></i>:</span></td>
323<td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td>
324</tr>
325<tr>
326<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
327<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
328</tr>
329</tbody>
330</table></div>
331</div>
332<hr>
333<div class="refsect2" lang="en">
334<h3>
335<a name="xmlXIncludeProcessTreeFlagsData"></a>xmlXIncludeProcessTreeFlagsData ()</h3>
336<pre class="programlisting">int	xmlXIncludeProcessTreeFlagsData	(<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br>					 int flags, <br>					 void * data)<br>
337</pre>
338<p>Implement the XInclude substitution on the XML node @tree</p>
339<div class="variablelist"><table border="0">
340<col align="left">
341<tbody>
342<tr>
343<td><span class="term"><i><tt>tree</tt></i>:</span></td>
344<td>an XML node</td>
345</tr>
346<tr>
347<td><span class="term"><i><tt>flags</tt></i>:</span></td>
348<td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td>
349</tr>
350<tr>
351<td><span class="term"><i><tt>data</tt></i>:</span></td>
352<td>application data that will be passed to the parser context in the _private field of the parser context(s)</td>
353</tr>
354<tr>
355<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
356<td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td>
357</tr>
358</tbody>
359</table></div>
360</div>
361<hr>
362<div class="refsect2" lang="en">
363<h3>
364<a name="xmlXIncludeSetFlags"></a>xmlXIncludeSetFlags ()</h3>
365<pre class="programlisting">int	xmlXIncludeSetFlags		(<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br>					 int flags)<br>
366</pre>
367<p>Set the flags used for further processing of XML resources.</p>
368<div class="variablelist"><table border="0">
369<col align="left">
370<tbody>
371<tr>
372<td><span class="term"><i><tt>ctxt</tt></i>:</span></td>
373<td>an XInclude processing context</td>
374</tr>
375<tr>
376<td><span class="term"><i><tt>flags</tt></i>:</span></td>
377<td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td>
378</tr>
379<tr>
380<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
381<td>0 in case of success and -1 in case of error.</td>
382</tr>
383</tbody>
384</table></div>
385</div>
386<hr>
387</div>
388</div>
389</body>
390</html>
391