1
0
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:
MDT 2001 John Fleck
2001-06-16 15:46:24 +00:00
committed by John Fleck
parent 4f38e9519c
commit 7cec9740f1
13 changed files with 90 additions and 6 deletions

View File

@ -1,3 +1,8 @@
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
Sat Jun 16 15:23:43 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/variables.c: bug #56267 was still not fixed, forgot

BIN
doc/images/callouts/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
doc/images/callouts/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
doc/images/callouts/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

BIN
doc/images/callouts/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
doc/images/callouts/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

BIN
doc/images/callouts/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

BIN
doc/images/callouts/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

BIN
doc/images/callouts/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
doc/images/callouts/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

BIN
doc/images/callouts/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

View File

@ -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">

View File

@ -78,6 +78,12 @@
stripped-down version of <application>xsltproc</application> designed to
illustrate the functionality of <application>libxslt</application>.
</para>
<para>The full code for <application>xsltproc</application> is in
<filename>xsltproc.c</filename> in the <application>libxslt</application>
distribution. It also is available <ulink
url="http://cvs.gnome.org/lxr/source/libxslt/libxslt/xsltproc.c">on the
web</ulink>.
</para>
<para>References:
<itemizedlist>
@ -190,6 +196,35 @@ xsltSaveResultToFile(stdout, res, cur);
</para>
</sect2>
<sect2 id="cleanup">
<title>Cleanup</title>
<para>After you are finished, <application>libxslt</application> and
<application>libxml</application> provide functions for deallocating
memory.
</para>
<para>
<programlisting>
xsltFreeStylesheet(cur);<co id="cleanupstylesheet" />
xmlFreeDoc(res);<co id="cleanupresults" />
xmlFreeDoc(doc);<co id="cleanupdoc" />
</programlisting>
<calloutlist>
<callout arearefs="cleanupstylesheet">
<para>Free the memory used by your stylesheet.</para>
</callout>
<callout arearefs="cleanupresults">
<para>Free the memory used by the results document.</para>
</callout>
<callout arearefs="cleanupdoc">
<para>Free the memory used by your original document.</para>
</callout>
</calloutlist>
</para>
</sect2>
</sect1>
<appendix id="thecode">