libxslt-documents.html   [plain text]


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
    </style><title>Module documents from libxslt</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C logo" /></a><a href="http://www.redhat.com"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/XSLT/"><img src="../Libxslt-Logo-180x168.gif" alt="Made with Libxslt Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XSLT C library for Gnome</h1><h2>Module documents from libxslt</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xslt/">Mail archive</a></li><li><a href="http://xmlsoft.org/">XML libxml</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxslt">Bug Tracker</a></li><li><a href="http://xsldbg.sourceforge.net/">Xsldbg Debugger</a></li><li><a href="http://www.mod-xslt.com/mod-xslt/">Apache module</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxslt-attributes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxslt-attributes.html">attributes</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">Home</a></th><th align="right"><a href="libxslt-extensions.html">extensions</a></th><td><a accesskey="n" href="libxslt-extensions.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>implements document loading and cache (multiple document() reference for the same resources must be equal. </p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xsltLoadType">xsltLoadType</a>
</pre><pre class="programlisting">Function type: <a href="#xsltDocLoaderFunc">xsltDocLoaderFunc</a>
xmlDocPtr	<a href="#xsltDocLoaderFunc">xsltDocLoaderFunc</a>	(const xmlChar * URI, <br />					 xmlDictPtr dict, <br />					 int options, <br />					 void * ctxt, <br />					 <a href="libxslt-documents.html#xsltLoadType">xsltLoadType</a> type)
</pre>
<pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	<a href="#xsltFindDocument">xsltFindDocument</a>	(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 xmlDocPtr doc)</pre>
<pre class="programlisting">void	<a href="#xsltFreeDocuments">xsltFreeDocuments</a>		(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt)</pre>
<pre class="programlisting">void	<a href="#xsltFreeStyleDocuments">xsltFreeStyleDocuments</a>		(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style)</pre>
<pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	<a href="#xsltLoadDocument">xsltLoadDocument</a>	(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 const xmlChar * URI)</pre>
<pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	<a href="#xsltLoadStyleDocument">xsltLoadStyleDocument</a>	(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style, <br />					 const xmlChar * URI)</pre>
<pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	<a href="#xsltNewDocument">xsltNewDocument</a>		(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 xmlDocPtr doc)</pre>
<pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	<a href="#xsltNewStyleDocument">xsltNewStyleDocument</a>	(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style, <br />					 xmlDocPtr doc)</pre>
<pre class="programlisting">void	<a href="#xsltSetLoaderFunc">xsltSetLoaderFunc</a>		(<a href="libxslt-documents.html#xsltDocLoaderFunc">xsltDocLoaderFunc</a> f)</pre>
<h2>Description</h2>
<h3>Enum <a name="xsltLoadType" id="xsltLoadType">xsltLoadType</a></h3><pre class="programlisting">Enum xsltLoadType {
    <a name="XSLT_LOAD_START" id="XSLT_LOAD_START">XSLT_LOAD_START</a> = 0 : loading for a top stylesheet
    <a name="XSLT_LOAD_STYLESHEET" id="XSLT_LOAD_STYLESHEET">XSLT_LOAD_STYLESHEET</a> = 1 : loading for a stylesheet include/import
    <a name="XSLT_LOAD_DOCUMENT" id="XSLT_LOAD_DOCUMENT">XSLT_LOAD_DOCUMENT</a> = 2 : loading document at transformation time
}
</pre><h3><a name="xsltDocLoaderFunc" id="xsltDocLoaderFunc"></a>Function type: xsltDocLoaderFunc</h3><pre class="programlisting">Function type: xsltDocLoaderFunc
xmlDocPtr	xsltDocLoaderFunc	(const xmlChar * URI, <br />					 xmlDictPtr dict, <br />					 int options, <br />					 void * ctxt, <br />					 <a href="libxslt-documents.html#xsltLoadType">xsltLoadType</a> type)
</pre><p>An <a href="libxslt-documents.html#xsltDocLoaderFunc">xsltDocLoaderFunc</a> is a signature for a function which can be registered to load document not provided by the compilation or transformation API themselve, for example when an xsl:import, xsl:include is found at compilation time or when a document() call is made at runtime.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI of the document to load</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary to use when parsing that document</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>parsing options, a set of xmlParserOption</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context, either a stylesheet or a transformation context</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxslt-documents.html#xsltLoadType">xsltLoadType</a> indicating the kind of loading required</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the document (which will be modified and freed by the engine later), or NULL in case of error.</td></tr></tbody></table></div><br />
<h3><a name="xsltFindDocument" id="xsltFindDocument"></a>Function: xsltFindDocument</h3><pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	xsltFindDocument	(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 xmlDocPtr doc)<br />
</pre><p>Try to find a document within the XSLT transformation context</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XSLT transformation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the desired <a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xsltFreeDocuments" id="xsltFreeDocuments"></a>Function: xsltFreeDocuments</h3><pre class="programlisting">void	xsltFreeDocuments		(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt)<br />
</pre><p>Free up all the space used by the loaded documents</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XSLT transformation context</td></tr></tbody></table></div><h3><a name="xsltFreeStyleDocuments" id="xsltFreeStyleDocuments"></a>Function: xsltFreeStyleDocuments</h3><pre class="programlisting">void	xsltFreeStyleDocuments		(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style)<br />
</pre><p>Free up all the space used by the loaded documents</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>an XSLT style sheet</td></tr></tbody></table></div><h3><a name="xsltLoadDocument" id="xsltLoadDocument"></a>Function: xsltLoadDocument</h3><pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	xsltLoadDocument	(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 const xmlChar * URI)<br />
</pre><p>Try to load a document (not a stylesheet) within the XSLT transformation context</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XSLT transformation context</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the computed URI of the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xsltLoadStyleDocument" id="xsltLoadStyleDocument"></a>Function: xsltLoadStyleDocument</h3><pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	xsltLoadStyleDocument	(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style, <br />					 const xmlChar * URI)<br />
</pre><p>Try to load a stylesheet document within the XSLT transformation context</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>an XSLT style sheet</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the computed URI of the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xsltNewDocument" id="xsltNewDocument"></a>Function: xsltNewDocument</h3><pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	xsltNewDocument		(<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br />					 xmlDocPtr doc)<br />
</pre><p>Register a new document, apply key computations</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XSLT transformation context (or NULL)</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handler to the document</td></tr></tbody></table></div><h3><a name="xsltNewStyleDocument" id="xsltNewStyleDocument"></a>Function: xsltNewStyleDocument</h3><pre class="programlisting"><a href="libxslt-xsltInternals.html#xsltDocumentPtr">xsltDocumentPtr</a>	xsltNewStyleDocument	(<a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style, <br />					 xmlDocPtr doc)<br />
</pre><p>Register a new document, apply key computations</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>an XSLT style sheet</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handler to the document</td></tr></tbody></table></div><h3><a name="xsltSetLoaderFunc" id="xsltSetLoaderFunc"></a>Function: xsltSetLoaderFunc</h3><pre class="programlisting">void	xsltSetLoaderFunc		(<a href="libxslt-documents.html#xsltDocLoaderFunc">xsltDocLoaderFunc</a> f)<br />
</pre><p>Set the new function to load document, if NULL it resets it to the default function.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the new function to handle document loading.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>