• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching +full:- +full:- +full:catalog

1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht…
3 …s="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset…
4 TD {font-family: Verdana,Arial,Helvetica}
5 BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
6 H1 {font-family: Verdana,Arial,Helvetica}
7 H2 {font-family: Verdana,Arial,Helvetica}
8 H3 {font-family: Verdana,Arial,Helvetica}
9 A:link, A:visited, A:active { text-decoration: underline }
10Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000…
15 <li><a href="#reference">How to tune catalog usage</a></li>
16 <li><a href="#validate">How to debug catalog processing</a></li>
21 </ol><h3><a name="General2" id="General2">General overview</a></h3><p>What is a catalog? Basically …
22 (a file or a remote resource) references another entity. The catalog lookup
30 <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p>
33 <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
37 <p>"http://www.oasis-open.org/committes/tr.xsl"</p>
39 <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p>
48 …better understood by reading <a href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a…
51 <li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML
54 </ul><p></p><h3><a name="Simple" id="Simple">Using catalog</a></h3><p>In a normal environment libxm…
55 catalog in /etc/xml/catalog, and assuming it has been correctly populated,
59 &lt;!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
60 …ook/xml/3.1.4/db3xml.dtd"&gt;</pre><p>When validating the document with libxml, the catalog will be
61 automatically consulted to lookup the public identifier "-//Norman Walsh//DTD
65 will fetch them from the local disk.</p><p style="font-size: 10pt"><strong>Note</strong>: Really do…
66 …lly old version, but is fine as an example.</p><p>Libxml2 will check the catalog each time that it…
72 &lt;!DOCTYPE catalog PUBLIC
73 "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
74 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
75 &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
76 &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
77 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
78 ...</pre><p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are
79 written in XML, there is a specific namespace for catalog elements
80 "urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this
81 catalog is a <code>public</code> mapping it allows to associate a Public
83 &lt;rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
91 &lt;delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
92 catalog="file:///usr/share/xml/docbook.xml"/&gt;
93 &lt;delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
94 catalog="file:///usr/share/xml/docbook.xml"/&gt;
95 &lt;delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
96 catalog="file:///usr/share/xml/docbook.xml"/&gt;
97 &lt;delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
98 catalog="file:///usr/share/xml/docbook.xml"/&gt;
99 &lt;delegateURI uriStartString="http://www.oasis-open.org/docbook/"
100 catalog="file:///usr/share/xml/docbook.xml"/&gt;
102 easier to maintain than a single catalog, based on Public Identifier, System
103 Identifier or URI prefixes it instructs the catalog software to look up
106 resolution of all DocBook references to the specific catalog in
108 references for DocBook 4.2.1 to a specific catalog installed at the same time
109 …name="reference" id="reference">How to tune catalog usage:</a></h3><p>The user can change the defa…
112 empty one should deactivate loading the default <code>/etc/xml/catalog</code>
113 default catalog</p><h3><a name="validate" id="validate">How to debug catalog processing:</a></h3><p…
114 make libxml2 output debugging information for each catalog operations, for
115 example:</p><pre>orchis:~/XML -&gt; xmllint --memory --noout test/ent2
117 orchis:~/XML -&gt; export XML_DEBUG_CATALOG=
118 orchis:~/XML -&gt; xmllint --memory --noout test/ent2
119 Failed to parse catalog /etc/xml/catalog
120 Failed to parse catalog /etc/xml/catalog
123 orchis:~/XML -&gt; </pre><p>The test/ent2 references an entity, running the parser from memory makes
126 made to load the <code>/etc/xml/catalog</code> but since it's not present the
127 resolution fails.</p><p>But the most advanced way to debug XML catalog processing is to use the
130 used for the regression tests:</p><pre>orchis:~/XML -&gt; ./xmlcatalog test/catalogs/docbook.xml \
131 "-//OASIS//DTD DocBook XML V4.1.2//EN"
132 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
133 orchis:~/XML -&gt; </pre><p>For debugging what is going on, adding one -v flags increase the verbos…
135 what elements are recognized at parsing):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -v test/catalogs/…
136 "-//OASIS//DTD DocBook XML V4.1.2//EN"
137 Parsing catalog test/catalogs/docbook.xml's content
138 Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
139 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
141 orchis:~/XML -&gt; </pre><p>A shell interface is also available to debug and process multiple queri…
142 (and for regression tests):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -shell test/catalogs/docbook.xm…
143 "-//OASIS//DTD DocBook XML V4.1.2//EN"
151 dump: print the current catalog state
155 &gt; public "-//OASIS//DTD DocBook XML V4.1.2//EN"
156 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
158 orchis:~/XML -&gt; </pre><p>This should be sufficient for most debugging purpose, this was actually
159 used heavily to debug the XML Catalog implementation itself.</p><h3><a name="Declaring" id="Declari…
161 to create a catalog the -create option provide this facility:</p><pre>orchis:~/XML -&gt; ./xmlcatal…
163 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
164 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
165 &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
166 orchis:~/XML -&gt; </pre><p>By default xmlcatalog does not overwrite the original catalog and save …
167 result on the standard output, this can be overridden using the -noout
168 option. The <code>-add</code> command allows to add entries in the
169 catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --noout --create --add "public" \
170 "-//OASIS//DTD DocBook XML V4.1.2//EN" \
171 http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
172 orchis:~/XML -&gt; cat tst.xml
174 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
175 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
176 &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
177 &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
178 uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
179 &lt;/catalog&gt;
180 orchis:~/XML -&gt; </pre><p>The <code>-add</code> option will always take 3 parameters even if some…
181 the XML Catalog constructs (like nextCatalog) will have only a single
182 argument, just pass a third empty string, it will be ignored.</p><p>Similarly the <code>-del</code>…
183 catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --del \
184 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
186 &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
187 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
188 &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
189 orchis:~/XML -&gt; </pre><p>The catalog is now empty. Note that the matching of <code>-del</code> is
192 catalog tree of resources.</p><h3><a name="implemento" id="implemento">The implementor corner quick…
194 automatically generated <a href="html/libxml-catalog.html">API page for
195 catalog support</a>.</p><p>The header for the catalog interfaces should be included as:</p><pre>#in…
197 libxml2 (Note: it is possible to completely override libxml2 default catalog
198 by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to
199 plug an application specific resolver).</p><p>Basically libxml2 support 2 catalog lists:</p><ul>
201 <li>a per-document catalog, this one is built if the document uses the
202 <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
206 used at startup to initialize the catalog, if the catalog should be
210 own catalog list if needed.</p><h4>Preferences setup:</h4><p>The XML Catalog spec requires the poss…
214 be forbidden, allowed for global catalog, for document catalog or both, the
218 Catalog specification they correspond to section 7 algorithms, they should
219 also work if you have loaded an SGML catalog with a simplified semantic.</p><p>xmlCatalogLocalResol…
220 operate on the document catalog list</p><h4>Cleanup and Miscellaneous:</h4><p>xmlCatalogCleanup() f…
221 the per-document equivalent.</p><p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically m…
222 first catalog in the global list, and xmlCatalogDump() allows to dump a
223 catalog state, those routines are primarily designed for xmlcatalog, I'm not
225 really useful.</p><p>The xmlParseCatalogFile() is a function used to load XML Catalog files,
226 it's similar as xmlParseFile() except it bypass all catalog lookups, it's
227 … useful for client tools.</p><h4>threaded environments:</h4><p>Since the catalog tree is built pro…
230 support.</p><p></p><h3><a name="Other" id="Other">Other resources</a></h3><p>The XML Catalog specif…
238 catalog proposal</a> from John Cowan</li>
240 Language</a> (RDDL) another catalog system but more oriented toward
242 …<li>the page from the OASIS Technical <a href="http://www.oasis-open.org/committees/entity/">Commi…
243 Resolution</a> who maintains XML Catalog, you will find pointers to the
245 providing XML Catalog support</li>
248 directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on