mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +03:00
adding discussion of freeing memory, image files for callouts, link to
Sat Jun 16 09:27:27 MDT 2001 John Fleck <jfleck@inkstain.net> * updating tutorial: adding discussion of freeing memory, image files for callouts, link to xsltproc.c code
This commit is contained in:
committed by
John Fleck
parent
4f38e9519c
commit
7cec9740f1
@ -41,6 +41,8 @@
|
||||
</dt>
|
||||
<dt> <a href="#saveresult">Saving the result</a>
|
||||
</dt>
|
||||
<dt> <a href="#cleanup">Cleanup</a>
|
||||
</dt>
|
||||
</dl></dd>
|
||||
</dl>
|
||||
</div>
|
||||
@ -98,19 +100,24 @@
|
||||
stripped-down version of xsltproc designed to
|
||||
illustrate the functionality of libxslt.
|
||||
</p>
|
||||
<p>The full code for xsltproc is in
|
||||
<tt>xsltproc.c</tt> in the libxslt
|
||||
distribution. It also is available <a href="http://cvs.gnome.org/lxr/source/libxslt/libxslt/xsltproc.c" target="_top">on the
|
||||
web</a>.
|
||||
</p>
|
||||
<p>References:
|
||||
<div class="itemizedlist"><ul>
|
||||
<li><p>
|
||||
<a name="id2691185"></a>
|
||||
<a name="id2691214"></a>
|
||||
<a href="http://www.w3.org/XML/" target="_top">W3C XML page</a>
|
||||
</p></li>
|
||||
<li><p>
|
||||
<a name="id2691206"></a>
|
||||
<a name="id2691235"></a>
|
||||
<a href="http://www.w3.org/Style/XSL/" target="_top">W3C
|
||||
XSL page.</a>
|
||||
</p></li>
|
||||
<li><p>
|
||||
<a name="id2691227"></a>
|
||||
<a name="id2691256"></a>
|
||||
<a href="http://xmlsoft.org/XSLT/" target="_top">libxslt</a>
|
||||
</p></li>
|
||||
</ul></div>
|
||||
@ -127,11 +134,11 @@
|
||||
functions:
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li><p>
|
||||
<a name="id2691273"></a>parse the input file</p></li>
|
||||
<a name="id2691302"></a>parse the input file</p></li>
|
||||
<li><p>
|
||||
<a name="id2691282"></a>parse the stylesheet</p></li>
|
||||
<a name="id2691310"></a>parse the stylesheet</p></li>
|
||||
<li><p>
|
||||
<a name="id2691290"></a>apply the stylesheet</p></li>
|
||||
<a name="id2691319"></a>apply the stylesheet</p></li>
|
||||
</ol></div>
|
||||
</p>
|
||||
<div class="sect2">
|
||||
@ -227,6 +234,43 @@ xsltSaveResultToFile(stdout, res, cur);
|
||||
</pre>
|
||||
</p>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<a name="cleanup"></a>
|
||||
<div class="titlepage"><div><h3 class="title">
|
||||
<a name="cleanup"></a>
|
||||
<span class="title">Cleanup</span>
|
||||
</h3></div></div>
|
||||
<p>After you are finished, libxslt and
|
||||
libxml provide functions for deallocating
|
||||
memory.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<pre class="programlisting">
|
||||
xsltFreeStylesheet(cur);<a name="cleanupstylesheet"></a><img src="../images/callouts/1.png" alt="1" border="0">
|
||||
xmlFreeDoc(res);<a name="cleanupresults"></a><img src="../images/callouts/2.png" alt="2" border="0">
|
||||
xmlFreeDoc(doc);<a name="cleanupdoc"></a><img src="../images/callouts/3.png" alt="3" border="0">
|
||||
</pre>
|
||||
|
||||
<div class="calloutlist"><table border="0" summary="Callout list">
|
||||
<tr>
|
||||
<td width="5%" valign="top" align="left">
|
||||
<a href="#cleanupstylesheet"><img src="../images/callouts/1.png" alt="1" border="0"></a> </td>
|
||||
<td valign="top" align="left"><p>Free the memory used by your stylesheet.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="5%" valign="top" align="left">
|
||||
<a href="#cleanupresults"><img src="../images/callouts/2.png" alt="2" border="0"></a> </td>
|
||||
<td valign="top" align="left"><p>Free the memory used by the results document.</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="5%" valign="top" align="left">
|
||||
<a href="#cleanupdoc"><img src="../images/callouts/3.png" alt="3" border="0"></a> </td>
|
||||
<td valign="top" align="left"><p>Free the memory used by your original document.</p></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="thecode" class="appendix">
|
||||
<h2 class="title" style="clear: all">
|
||||
|
Reference in New Issue
Block a user