diff options
author | MDT 2001 John Fleck <jfleck@inkstain.net> | 2001-06-16 15:46:24 +0000 |
---|---|---|
committer | John Fleck <jfleck@src.gnome.org> | 2001-06-16 15:46:24 +0000 |
commit | 7cec9740f14a1c3a71adada52aef72742a622273 (patch) | |
tree | 03f8bf51376d85fc2fe75410ed67ca5ce4b4fc72 /doc/tutorial | |
parent | 4f38e9519c286b7e647ef842f72f05d94e0e2d07 (diff) | |
download | libxslt-7cec9740f14a1c3a71adada52aef72742a622273.tar.gz libxslt-7cec9740f14a1c3a71adada52aef72742a622273.tar.bz2 libxslt-7cec9740f14a1c3a71adada52aef72742a622273.zip |
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
Diffstat (limited to 'doc/tutorial')
-rw-r--r-- | doc/tutorial/libxslttutorial.html | 56 | ||||
-rw-r--r-- | doc/tutorial/libxslttutorial.xml | 35 |
2 files changed, 85 insertions, 6 deletions
diff --git a/doc/tutorial/libxslttutorial.html b/doc/tutorial/libxslttutorial.html index b7610ff9..ba5c2430 100644 --- a/doc/tutorial/libxslttutorial.html +++ b/doc/tutorial/libxslttutorial.html @@ -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"> diff --git a/doc/tutorial/libxslttutorial.xml b/doc/tutorial/libxslttutorial.xml index 6b09da3c..3bb89da8 100644 --- a/doc/tutorial/libxslttutorial.xml +++ b/doc/tutorial/libxslttutorial.xml @@ -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"> |