mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
improvement of the stylesheets, fixed a API generation problem, switched
* doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: improvement of the stylesheets, fixed a API generation problem, switched the stylesheet and Makefile to build the HTML output. * doc/html/*.html: complete update, ditched some old files, might introduce some breakage... Daniel
This commit is contained in:
@@ -1,172 +1,71 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>uri</title><meta name="generator" content="DocBook XSL Stylesheets V1.48"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
|
||||
.synopsis, .classsynopsis {
|
||||
background: #eeeeee;
|
||||
border: solid 1px #aaaaaa;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.programlisting {
|
||||
background: #eeeeff;
|
||||
border: solid 1px #aaaaff;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.variablelist {
|
||||
padding: 4px;
|
||||
margin-left: 3em;
|
||||
}
|
||||
.navigation {
|
||||
background: #ffeeee;
|
||||
border: solid 1px #ffaaaa;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.navigation a {
|
||||
color: #770000;
|
||||
}
|
||||
.navigation a:visited {
|
||||
color: #550000;
|
||||
}
|
||||
.navigation .title {
|
||||
font-size: 200%;
|
||||
}
|
||||
</style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="ch01.html" title="Libxml Programming Notes"><link rel="previous" href="libxml-chvalid.html" title="chvalid"><link rel="next" href="libxml-SAX2.html" title="SAX2"></head><body text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-chvalid.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-SAX2.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry"><a name="libxml-uri"></a><div class="titlepage"></div><div class="refnamediv"><h2>uri</h2><p>uri — </p></div><div class="refsynopsisdiv"><h2><h1 class="title"><a name="id2607872"></a>Synopsis</h1></h2><pre class="synopsis">
|
||||
<?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" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><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 uri from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" 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/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 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></h1><h2>Module uri from libxml2</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>Main 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 href="index.html">Home</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</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/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</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=libxml2">Bug Tracker</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"><h2>Table of Contents</h2><pre class="programlisting">int <a href="#xmlNormalizeURIPath">xmlNormalizeURIPath</a> (char * path)<br />
|
||||
</pre><pre class="programlisting">void <a href="#xmlPrintURI">xmlPrintURI</a> (FILE * stream, <br /> <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><pre class="programlisting">char * <a href="#xmlURIUnescapeString">xmlURIUnescapeString</a> (const char * str, <br /> int len, <br /> char * target)<br />
|
||||
</pre><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlParseURI">xmlParseURI</a> (const char * str)<br />
|
||||
</pre><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlCreateURI">xmlCreateURI</a> (void)<br />
|
||||
</pre><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscapeStr">xmlURIEscapeStr</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-tree.html#xmlChar">xmlChar</a> * list)<br />
|
||||
</pre><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * <a href="#xmlCanonicPath">xmlCanonicPath</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * path)<br />
|
||||
</pre><pre class="programlisting">void <a href="#xmlFreeURI">xmlFreeURI</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><pre class="programlisting">int <a href="#xmlParseURIReference">xmlParseURIReference</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br /> const char * str)<br />
|
||||
</pre><pre class="programlisting">Typedef <a href="libxml-uri.html#xmlURI">xmlURI</a> * <a name="xmlURIPtr" id="xmlURIPtr">xmlURIPtr</a>
|
||||
|
||||
|
||||
|
||||
struct <a href="libxml-uri.html#xmlURI">xmlURI</a>;
|
||||
typedef <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a>;
|
||||
<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="libxml-uri.html#xmlCreateURI">xmlCreateURI</a> (void);
|
||||
<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-uri.html#xmlBuildURI">xmlBuildURI</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
|
||||
const <a href="libxml-tree.html#xmlChar">xmlChar</a> *base);
|
||||
<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="libxml-uri.html#xmlParseURI">xmlParseURI</a> (const char *str);
|
||||
int <a href="libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri,
|
||||
const char *str);
|
||||
<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-uri.html#xmlSaveUri">xmlSaveUri</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
|
||||
void <a href="libxml-uri.html#xmlPrintURI">xmlPrintURI</a> (<GTKDOCLINK HREF="FILE-CAPS">FILE</GTKDOCLINK> *stream,
|
||||
<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
|
||||
<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
|
||||
const <a href="libxml-tree.html#xmlChar">xmlChar</a> *list);
|
||||
char* <a href="libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a> (const char *str,
|
||||
int len,
|
||||
char *target);
|
||||
int <a href="libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a> (char *path);
|
||||
<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-uri.html#xmlURIEscape">xmlURIEscape</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str);
|
||||
void <a href="libxml-uri.html#xmlFreeURI">xmlFreeURI</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
|
||||
<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *path);
|
||||
</pre></div><div class="refsect1"><h2>Description</h2><p>
|
||||
|
||||
</p></div><div class="refsect1"><h2>Details</h2><div class="refsect2"><h3><a name="xmlURI"></a>struct xmlURI</h3><pre class="programlisting">struct xmlURI {
|
||||
|
||||
char *scheme; /* the URI scheme */
|
||||
char *opaque; /* opaque part */
|
||||
char *authority; /* the authority part */
|
||||
char *server; /* the server part */
|
||||
char *user; /* the user part */
|
||||
int port; /* the port number */
|
||||
char *path; /* the path string */
|
||||
char *query; /* the query string */
|
||||
char *fragment; /* the fragment identifier */
|
||||
int cleanup; /* parsing potentially unclean URI */
|
||||
};
|
||||
</pre><p>
|
||||
A parsed URI reference. This is a struct containing the various fields
|
||||
as described in RFC 2396 but separated for further processing.</p><p>
|
||||
|
||||
</p></div><hr><div class="refsect2"><h3><a name="xmlURIPtr"></a>xmlURIPtr</h3><pre class="programlisting">typedef xmlURI *xmlURIPtr;
|
||||
</pre><p>
|
||||
|
||||
</p></div><hr><div class="refsect2"><h3><a name="xmlCreateURI"></a>xmlCreateURI ()</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlCreateURI (void);</pre><p>
|
||||
Simply creates an empty xmlURI</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>the new structure or NULL in case of error
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlBuildURI"></a>xmlBuildURI ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlBuildURI (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
|
||||
const <a href="libxml-tree.html#xmlChar">xmlChar</a> *base);</pre><p>
|
||||
Computes he final URI of the reference done by checking that
|
||||
the given URI is valid, and building the final URI using the
|
||||
base URI. This is processed according to section 5.2 of the
|
||||
RFC 2396
|
||||
</p><p>
|
||||
5.2. Resolving Relative References to Absolute Form</p><p>
|
||||
|
||||
</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 instance found in the document
|
||||
</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td> the base value
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>a new URI string (to be freed by the caller) or NULL in case
|
||||
of error.
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlParseURI"></a>xmlParseURI ()</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURI (const char *str);</pre><p>
|
||||
Parse an URI
|
||||
</p><p>
|
||||
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td> the URI string to analyze
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>a newly build xmlURIPtr or NULL in case of error
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlParseURIReference"></a>xmlParseURIReference ()</h3><pre class="programlisting">int xmlParseURIReference (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri,
|
||||
const char *str);</pre><p>
|
||||
Parse an URI reference string and fills in the appropriate fields
|
||||
of the <i><tt>uri</tt></i> structure
|
||||
</p><p>
|
||||
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td> pointer to an URI structure
|
||||
</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td> the string to analyze
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>0 or the error code
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlSaveUri"></a>xmlSaveUri ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlSaveUri (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);</pre><p>
|
||||
Save the URI as an escaped string</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td> pointer to an xmlURI
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>a new string (to be deallocated by caller)
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlPrintURI"></a>xmlPrintURI ()</h3><pre class="programlisting">void xmlPrintURI (<GTKDOCLINK HREF="FILE-CAPS">FILE</GTKDOCLINK> *stream,
|
||||
<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);</pre><p>
|
||||
Prints the URI in the stream <i><tt>steam</tt></i>.</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td> a FILE* for the output
|
||||
</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td> pointer to an xmlURI
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlURIEscapeStr"></a>xmlURIEscapeStr ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlURIEscapeStr (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str,
|
||||
const <a href="libxml-tree.html#xmlChar">xmlChar</a> *list);</pre><p>
|
||||
This routine escapes a string to hex, ignoring reserved characters (a-z)
|
||||
and the characters in the exception list.</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td> string to escape
|
||||
</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td> exception list string of chars not to escape
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>a new escaped string or NULL in case of error.
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlURIUnescapeString"></a>xmlURIUnescapeString ()</h3><pre class="programlisting">char* xmlURIUnescapeString (const char *str,
|
||||
int len,
|
||||
char *target);</pre><p>
|
||||
Unescaping routine, does not do validity checks !
|
||||
Output is direct unsigned char translation of <tt>XX</tt> values (no encoding)</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td> the string to unescape
|
||||
</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td> the length in bytes to unescape (or <= 0 to indicate full string)
|
||||
</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td> optional destination buffer
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>an copy of the string, but unescaped
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlNormalizeURIPath"></a>xmlNormalizeURIPath ()</h3><pre class="programlisting">int xmlNormalizeURIPath (char *path);</pre><p>
|
||||
Applies the 5 normalization steps to a path string--that is, RFC 2396
|
||||
Section 5.2, steps 6.c through 6.g.
|
||||
</p><p>
|
||||
Normalization occurs directly on the string, no new allocation is done</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td> pointer to the path string
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>0 or an error code
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlURIEscape"></a>xmlURIEscape ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlURIEscape (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *str);</pre><p>
|
||||
Escaping routine, does not do validity checks !
|
||||
It will try to escape the chars needing this, but this is heuristic
|
||||
based it's impossible to be sure.</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td> the string of the URI to escape
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>an copy of the string, but escaped
|
||||
|
||||
25 May 2001
|
||||
Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly
|
||||
according to RFC2396.
|
||||
- Carl Douglas
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlFreeURI"></a>xmlFreeURI ()</h3><pre class="programlisting">void xmlFreeURI (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri);</pre><p>
|
||||
Free up the xmlURI struct</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td> pointer to an xmlURI
|
||||
</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlCanonicPath"></a>xmlCanonicPath ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlCanonicPath (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *path);</pre><p>
|
||||
Constructs a canonic path from the specified path.</p><p>
|
||||
|
||||
</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td> the resource locator in a filesystem notation
|
||||
</td></tr><tr><td><span class="term"><span class="emphasis"><i>Returns</i></span> :</span></td><td>a new canonic path, or a duplicate of the path parameter if the
|
||||
construction fails. The caller is responsible for freeing the memory occupied
|
||||
by the returned string. If there is insufficient memory available, or the
|
||||
argument is NULL, the function returns NULL.
|
||||
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-chvalid.html"><b><<<EFBFBD>chvalid</b></a></td><td align="right"><a accesskey="n" href="libxml-SAX2.html"><b>SAX2<EFBFBD>>></b></a></td></tr></table></body></html>
|
||||
</pre><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * <a href="#xmlSaveUri">xmlSaveUri</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscape">xmlURIEscape</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * str)<br />
|
||||
</pre><pre class="programlisting">Structure <a name="xmlURI" id="xmlURI">xmlURI</a><br />struct _xmlURI {
|
||||
char * scheme : the URI scheme
|
||||
char * opaque : opaque part
|
||||
char * authority : the authority part
|
||||
char * server : the server part
|
||||
char * user : the user part
|
||||
int port : the port number
|
||||
char * path : the path string
|
||||
char * query : the query string
|
||||
char * fragment : the fragment identifier
|
||||
int cleanup : parsing potentially unclean URI
|
||||
}</pre><br /><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * <a href="#xmlBuildURI">xmlBuildURI</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-tree.html#xmlChar">xmlChar</a> * base)<br />
|
||||
</pre><h2>Description</h2>
|
||||
<h3><a name="xmlNormalizeURIPath" id="xmlNormalizeURIPath"></a>Function: xmlNormalizeURIPath</h3><pre class="programlisting">int xmlNormalizeURIPath (char * path)<br />
|
||||
</pre><p>Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>pointer to the path string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or an error code</td></tr></tbody></table></div><h3><a name="xmlPrintURI" id="xmlPrintURI"></a>Function: xmlPrintURI</h3><pre class="programlisting">void xmlPrintURI (FILE * stream, <br /> <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><p>Prints the URI in the stream @steam.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>a FILE* for the output</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div><h3><a name="xmlURIUnescapeString" id="xmlURIUnescapeString"></a>Function: xmlURIUnescapeString</h3><pre class="programlisting">char * xmlURIUnescapeString (const char * str, <br /> int len, <br /> char * target)<br />
|
||||
</pre><p>Unescaping routine, does not do validity checks ! Output is direct unsigned char translation of %XX values (no encoding)</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to unescape</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length in bytes to unescape (or <= 0 to indicate full string)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>optional destination buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an copy of the string, but unescaped</td></tr></tbody></table></div><h3><a name="xmlParseURI" id="xmlParseURI"></a>Function: xmlParseURI</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURI (const char * str)<br />
|
||||
</pre><p>Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the URI string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly build <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlCreateURI" id="xmlCreateURI"></a>Function: xmlCreateURI</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlCreateURI (void)<br />
|
||||
</pre><p>Simply creates an empty <a href="libxml-uri.html#xmlURI">xmlURI</a></p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlURIEscapeStr" id="xmlURIEscapeStr"></a>Function: xmlURIEscapeStr</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * xmlURIEscapeStr (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-tree.html#xmlChar">xmlChar</a> * list)<br />
|
||||
</pre><p>This routine escapes a string to hex, ignoring reserved <a href="libxml-SAX.html#characters">characters</a> (a-z) and the <a href="libxml-SAX.html#characters">characters</a> in the exception list.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>string to escape</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>exception list string of chars not to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new escaped string or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCanonicPath" id="xmlCanonicPath"></a>Function: xmlCanonicPath</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * xmlCanonicPath (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * path)<br />
|
||||
</pre><p>Constructs a canonic path from the specified path.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the resource locator in a filesystem notation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.</td></tr></tbody></table></div><h3><a name="xmlFreeURI" id="xmlFreeURI"></a>Function: xmlFreeURI</h3><pre class="programlisting">void xmlFreeURI (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><p>Free up the <a href="libxml-uri.html#xmlURI">xmlURI</a> struct</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div><h3><a name="xmlParseURIReference" id="xmlParseURIReference"></a>Function: xmlParseURIReference</h3><pre class="programlisting">int xmlParseURIReference (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br /> const char * str)<br />
|
||||
</pre><p>Parse an URI <a href="libxml-SAX.html#reference">reference</a> string and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an URI structure</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or the error code</td></tr></tbody></table></div><h3><a name="xmlSaveUri" id="xmlSaveUri"></a>Function: xmlSaveUri</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * xmlSaveUri (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
|
||||
</pre><p>Save the URI as an escaped string</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new string (to be deallocated by caller)</td></tr></tbody></table></div><h3><a name="xmlURIEscape" id="xmlURIEscape"></a>Function: xmlURIEscape</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * xmlURIEscape (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * str)<br />
|
||||
</pre><p>Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string of the URI to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an copy of the string, but escaped 25 May 2001 Uses <a href="libxml-uri.html#xmlParseURI">xmlParseURI</a> and <a href="libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a> to try to escape correctly according to RFC2396. - Carl Douglas</td></tr></tbody></table></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3><a name="xmlBuildURI" id="xmlBuildURI"></a>Function: xmlBuildURI</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a> * xmlBuildURI (const <a href="libxml-tree.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-tree.html#xmlChar">xmlChar</a> * base)<br />
|
||||
</pre><p>Computes he final URI of the <a href="libxml-SAX.html#reference">reference</a> done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form</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 instance found in the document</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI string (to be freed by the caller) or NULL in case of error.</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>
|
||||
|
Reference in New Issue
Block a user