libxml2-catalog.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5. <title>catalog: interfaces to the Catalog handling system</title>
  6. <meta name="generator" content="Libxml2 devhelp stylesheet"/>
  7. <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
  8. <link rel="up" href="general.html" title="API"/>
  9. <link rel="stylesheet" href="style.css" type="text/css"/>
  10. <link rel="chapter" href="general.html" title="API"/>
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
  14. <tr valign="middle">
  15. <td>
  16. <a accesskey="p" href="libxml2-c14n.html">
  17. <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
  18. </a>
  19. </td>
  20. <td>
  21. <a accesskey="u" href="general.html">
  22. <img src="up.png" width="24" height="24" border="0" alt="Up"/>
  23. </a>
  24. </td>
  25. <td>
  26. <a accesskey="h" href="index.html">
  27. <img src="home.png" width="24" height="24" border="0" alt="Home"/>
  28. </a>
  29. </td>
  30. <td>
  31. <a accesskey="n" href="libxml2-chvalid.html">
  32. <img src="right.png" width="24" height="24" border="0" alt="Next"/>
  33. </a>
  34. </td>
  35. <th width="100%" align="center">libxml2 Reference Manual</th>
  36. </tr>
  37. </table>
  38. <h2>
  39. <span class="refentrytitle">catalog</span>
  40. </h2>
  41. <p>catalog - interfaces to the Catalog handling system</p>
  42. <p>the catalog module implements the support for XML Catalogs and SGML catalogs </p>
  43. <p>Author(s): Daniel Veillard </p>
  44. <div class="refsynopsisdiv">
  45. <h2>Synopsis</h2>
  46. <pre class="synopsis">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
  47. #define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
  48. typedef enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a>;
  49. typedef enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a>;
  50. typedef struct _xmlCatalog <a href="#xmlCatalog">xmlCatalog</a>;
  51. typedef <a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * <a href="#xmlCatalogPtr">xmlCatalogPtr</a>;
  52. void <a href="#xmlFreeCatalog">xmlFreeCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
  53. void <a href="#xmlLoadCatalogs">xmlLoadCatalogs</a> (const char * pathss);
  54. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  55. int <a href="#xmlACatalogAdd">xmlACatalogAdd</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
  56. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
  57. <a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> <a href="#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a> (void);
  58. int <a href="#xmlACatalogRemove">xmlACatalogRemove</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
  59. <a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> <a href="#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a> (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer);
  60. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveURI">xmlACatalogResolveURI</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
  61. int <a href="#xmlCatalogAdd">xmlCatalogAdd</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
  62. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
  63. const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetSystem">xmlCatalogGetSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  64. void <a href="#xmlInitializeCatalog">xmlInitializeCatalog</a> (void);
  65. int <a href="#xmlLoadCatalog">xmlLoadCatalog</a> (const char * filename);
  66. int <a href="#xmlCatalogRemove">xmlCatalogRemove</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
  67. int <a href="#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
  68. void <a href="#xmlACatalogDump">xmlACatalogDump</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out);
  69. void <a href="#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a> (void * catalogs);
  70. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolve">xmlACatalogResolve</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  71. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  72. <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a> (const char * filename);
  73. int <a href="#xmlCatalogConvert">xmlCatalogConvert</a> (void);
  74. const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetPublic">xmlCatalogGetPublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
  75. <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadACatalog">xmlLoadACatalog</a> (const char * filename);
  76. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  77. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
  78. int <a href="#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
  79. void * <a href="#xmlCatalogAddLocal">xmlCatalogAddLocal</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL);
  80. <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlNewCatalog">xmlNewCatalog</a> (int sgml);
  81. <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseCatalogFile">xmlParseCatalogFile</a> (const char * filename);
  82. int <a href="#xmlCatalogSetDebug">xmlCatalogSetDebug</a> (int level);
  83. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolve">xmlCatalogResolve</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
  84. void <a href="#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a> (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow);
  85. void <a href="#xmlCatalogDump">xmlCatalogDump</a> (FILE * out);
  86. void <a href="#xmlCatalogCleanup">xmlCatalogCleanup</a> (void);
  87. <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveURI">xmlCatalogResolveURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
  88. </pre>
  89. </div>
  90. <div class="refsect1" lang="en">
  91. <h2>Description</h2>
  92. </div>
  93. <div class="refsect1" lang="en">
  94. <h2>Details</h2>
  95. <div class="refsect2" lang="en">
  96. <div class="refsect2" lang="en"><h3><a name="XML_CATALOGS_NAMESPACE">Macro </a>XML_CATALOGS_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
  97. </pre><p>The namespace for the XML Catalogs elements.</p>
  98. </div>
  99. <hr/>
  100. <div class="refsect2" lang="en"><h3><a name="XML_CATALOG_PI">Macro </a>XML_CATALOG_PI</h3><pre class="programlisting">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
  101. </pre><p>The specific XML Catalog Processing Instuction name.</p>
  102. </div>
  103. <hr/>
  104. <div class="refsect2" lang="en"><h3><a name="xmlCatalog">Structure </a>xmlCatalog</h3><pre class="programlisting">struct _xmlCatalog {
  105. The content of this structure is not made public by the API.
  106. } xmlCatalog;
  107. </pre><p/>
  108. </div>
  109. <hr/>
  110. <div class="refsect2" lang="en"><h3><a name="xmlCatalogAllow">Enum </a>xmlCatalogAllow</h3><pre class="programlisting">enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a> {
  111. <a name="XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a> = 0
  112. <a name="XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a> = 1
  113. <a name="XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a> = 2
  114. <a name="XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a> = 3
  115. };
  116. </pre><p/>
  117. </div>
  118. <hr/>
  119. <div class="refsect2" lang="en"><h3><a name="xmlCatalogPrefer">Enum </a>xmlCatalogPrefer</h3><pre class="programlisting">enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a> {
  120. <a name="XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a> = 0
  121. <a name="XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> = 1
  122. <a name="XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a> = 2
  123. };
  124. </pre><p/>
  125. </div>
  126. <hr/>
  127. <div class="refsect2" lang="en"><h3><a name="xmlCatalogPtr">Typedef </a>xmlCatalogPtr</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * xmlCatalogPtr;
  128. </pre><p/>
  129. </div>
  130. <hr/>
  131. <div class="refsect2" lang="en"><h3><a name="xmlACatalogAdd"/>xmlACatalogAdd ()</h3><pre class="programlisting">int xmlACatalogAdd (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
  132. </pre><p>Add an entry in the catalog, it may overwrite existing but different entries.</p>
  133. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
  134. <hr/>
  135. <div class="refsect2" lang="en"><h3><a name="xmlACatalogDump"/>xmlACatalogDump ()</h3><pre class="programlisting">void xmlACatalogDump (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out)<br/>
  136. </pre><p>Dump the given catalog to the given file.</p>
  137. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
  138. <hr/>
  139. <div class="refsect2" lang="en"><h3><a name="xmlACatalogRemove"/>xmlACatalogRemove ()</h3><pre class="programlisting">int xmlACatalogRemove (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
  140. </pre><p>Remove an entry from the catalog</p>
  141. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
  142. <hr/>
  143. <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolve"/>xmlACatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolve (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  144. </pre><p>Do a complete resolution lookup of an External Identifier</p>
  145. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  146. <hr/>
  147. <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolvePublic"/>xmlACatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolvePublic (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
  148. </pre><p>Try to lookup the catalog local <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID in that catalog</p>
  149. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
  150. <hr/>
  151. <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveSystem"/>xmlACatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveSystem (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  152. </pre><p>Try to lookup the catalog resource for a system ID</p>
  153. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
  154. <hr/>
  155. <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveURI"/>xmlACatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveURI (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
  156. </pre><p>Do a complete resolution lookup of an URI</p>
  157. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  158. <hr/>
  159. <div class="refsect2" lang="en"><h3><a name="xmlCatalogAdd"/>xmlCatalogAdd ()</h3><pre class="programlisting">int xmlCatalogAdd (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
  160. </pre><p>Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();</p>
  161. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
  162. <hr/>
  163. <div class="refsect2" lang="en"><h3><a name="xmlCatalogAddLocal"/>xmlCatalogAddLocal ()</h3><pre class="programlisting">void * xmlCatalogAddLocal (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL)<br/>
  164. </pre><p>Add the new entry to the catalog list</p>
  165. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to a new local catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the updated list</td></tr></tbody></table></div></div>
  166. <hr/>
  167. <div class="refsect2" lang="en"><h3><a name="xmlCatalogCleanup"/>xmlCatalogCleanup ()</h3><pre class="programlisting">void xmlCatalogCleanup (void)<br/>
  168. </pre><p>Free up all the memory associated with catalogs</p>
  169. </div>
  170. <hr/>
  171. <div class="refsect2" lang="en"><h3><a name="xmlCatalogConvert"/>xmlCatalogConvert ()</h3><pre class="programlisting">int xmlCatalogConvert (void)<br/>
  172. </pre><p>Convert all the SGML catalog entries as XML ones</p>
  173. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
  174. <hr/>
  175. <div class="refsect2" lang="en"><h3><a name="xmlCatalogDump"/>xmlCatalogDump ()</h3><pre class="programlisting">void xmlCatalogDump (FILE * out)<br/>
  176. </pre><p>Dump all the global catalog content to the given file.</p>
  177. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
  178. <hr/>
  179. <div class="refsect2" lang="en"><h3><a name="xmlCatalogFreeLocal"/>xmlCatalogFreeLocal ()</h3><pre class="programlisting">void xmlCatalogFreeLocal (void * catalogs)<br/>
  180. </pre><p>Free up the memory associated to the catalog list</p>
  181. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr></tbody></table></div></div>
  182. <hr/>
  183. <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetDefaults"/>xmlCatalogGetDefaults ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> xmlCatalogGetDefaults (void)<br/>
  184. </pre><p>Used to get the user preference w.r.t. to what catalogs should be accepted</p>
  185. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> value</td></tr></tbody></table></div></div>
  186. <hr/>
  187. <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetPublic"/>xmlCatalogGetPublic ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetPublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
  188. </pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</p>
  189. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
  190. <hr/>
  191. <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetSystem"/>xmlCatalogGetSystem ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  192. </pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()</p>
  193. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
  194. <hr/>
  195. <div class="refsect2" lang="en"><h3><a name="xmlCatalogIsEmpty"/>xmlCatalogIsEmpty ()</h3><pre class="programlisting">int xmlCatalogIsEmpty (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
  196. </pre><p>Check is a catalog is empty</p>
  197. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the catalog is empty, 0 if not, amd -1 in case of error.</td></tr></tbody></table></div></div>
  198. <hr/>
  199. <div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolve"/>xmlCatalogLocalResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolve (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  200. </pre><p>Do a complete resolution lookup of an External Identifier using a document's private catalog list</p>
  201. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  202. <hr/>
  203. <div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolveURI"/>xmlCatalogLocalResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolveURI (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
  204. </pre><p>Do a complete resolution lookup of an URI using a document's private catalog list</p>
  205. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  206. <hr/>
  207. <div class="refsect2" lang="en"><h3><a name="xmlCatalogRemove"/>xmlCatalogRemove ()</h3><pre class="programlisting">int xmlCatalogRemove (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
  208. </pre><p>Remove an entry from the catalog</p>
  209. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
  210. <hr/>
  211. <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolve"/>xmlCatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolve (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  212. </pre><p>Do a complete resolution lookup of an External Identifier</p>
  213. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  214. <hr/>
  215. <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolvePublic"/>xmlCatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolvePublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
  216. </pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID</p>
  217. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
  218. <hr/>
  219. <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveSystem"/>xmlCatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
  220. </pre><p>Try to lookup the catalog resource for a system ID</p>
  221. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
  222. <hr/>
  223. <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveURI"/>xmlCatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
  224. </pre><p>Do a complete resolution lookup of an URI</p>
  225. <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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
  226. <hr/>
  227. <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDebug"/>xmlCatalogSetDebug ()</h3><pre class="programlisting">int xmlCatalogSetDebug (int level)<br/>
  228. </pre><p>Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it</p>
  229. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the debug level of catalogs required</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the catalog debugging level</td></tr></tbody></table></div></div>
  230. <hr/>
  231. <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaultPrefer"/>xmlCatalogSetDefaultPrefer ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> xmlCatalogSetDefaultPrefer (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer)<br/>
  232. </pre><p>Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are <a href="libxml2-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> or <a href="libxml2-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a></p>
  233. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prefer</tt></i>:</span></td><td>the default preference for delegation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the default preference for delegation</td></tr></tbody></table></div></div>
  234. <hr/>
  235. <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaults"/>xmlCatalogSetDefaults ()</h3><pre class="programlisting">void xmlCatalogSetDefaults (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow)<br/>
  236. </pre><p>Used to set the user preference w.r.t. to what catalogs should be accepted</p>
  237. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>allow</tt></i>:</span></td><td>what catalogs should be accepted</td></tr></tbody></table></div></div>
  238. <hr/>
  239. <div class="refsect2" lang="en"><h3><a name="xmlConvertSGMLCatalog"/>xmlConvertSGMLCatalog ()</h3><pre class="programlisting">int xmlConvertSGMLCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
  240. </pre><p>Convert all the SGML catalog entries as XML ones</p>
  241. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>the catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
  242. <hr/>
  243. <div class="refsect2" lang="en"><h3><a name="xmlFreeCatalog"/>xmlFreeCatalog ()</h3><pre class="programlisting">void xmlFreeCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
  244. </pre><p>Free the memory allocated to a Catalog</p>
  245. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr></tbody></table></div></div>
  246. <hr/>
  247. <div class="refsect2" lang="en"><h3><a name="xmlInitializeCatalog"/>xmlInitializeCatalog ()</h3><pre class="programlisting">void xmlInitializeCatalog (void)<br/>
  248. </pre><p>Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
  249. </div>
  250. <hr/>
  251. <div class="refsect2" lang="en"><h3><a name="xmlLoadACatalog"/>xmlLoadACatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadACatalog (const char * filename)<br/>
  252. </pre><p>Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.</p>
  253. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
  254. <hr/>
  255. <div class="refsect2" lang="en"><h3><a name="xmlLoadCatalog"/>xmlLoadCatalog ()</h3><pre class="programlisting">int xmlLoadCatalog (const char * filename)<br/>
  256. </pre><p>Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
  257. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success -1 in case of error</td></tr></tbody></table></div></div>
  258. <hr/>
  259. <div class="refsect2" lang="en"><h3><a name="xmlLoadCatalogs"/>xmlLoadCatalogs ()</h3><pre class="programlisting">void xmlLoadCatalogs (const char * pathss)<br/>
  260. </pre><p>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
  261. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pathss</tt></i>:</span></td><td>a list of directories separated by a colon or a space.</td></tr></tbody></table></div></div>
  262. <hr/>
  263. <div class="refsect2" lang="en"><h3><a name="xmlLoadSGMLSuperCatalog"/>xmlLoadSGMLSuperCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadSGMLSuperCatalog (const char * filename)<br/>
  264. </pre><p>Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.</p>
  265. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
  266. <hr/>
  267. <div class="refsect2" lang="en"><h3><a name="xmlNewCatalog"/>xmlNewCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlNewCatalog (int sgml)<br/>
  268. </pre><p>create a new Catalog.</p>
  269. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sgml</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
  270. <hr/>
  271. <div class="refsect2" lang="en"><h3><a name="xmlParseCatalogFile"/>xmlParseCatalogFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseCatalogFile (const char * filename)<br/>
  272. </pre><p>parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.</p>
  273. <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div></div>
  274. <hr/>
  275. </div>
  276. </div>
  277. </body>
  278. </html>