ArborX


txmlcatalog

Longname: t xml catalog s   Open the Documentation Legend
Released: 8.13 
Created: 8.13 
See also: txmlvalid

Summary
XML Catalogs provide a mechanism for mapping from a unique identifier to a URI reference, and are used primarily to access DTDs and entity declarations.
Example (n/a)
No example is available for this feature.

Syntax (8.13)
txmlcatalog cat:s URI:s
cat:s Catalog stream name.
URI:s Catalog URI

For example, if the DOCTYPE declaration in an XML document contains the following:

  1
 <!DOCTYPE root PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.xml"> 2

Then libxml will be able to inspect the catalog file associated with the XML document and look up the entry matching the Public identifier to get the URI containing the required entities. Specific details on how to use Catalogs can be found from the Catalog entry in the glossary.

To associate an XML stream with a catalog, there is a macro txmlcatalog which will attaches the location of the catalog file to the stream so libxml can access it during parsing. Only one catalog file can be used per stream. If no catalog file is available, then libxml will first check the contents of the variable "^_cl_xmlcatalog" to see if this contains a path to a valid catalog file, other wise it will attempt to use normal relative path resolution to try and work out which file it needs to access to find the correct DTD or entity declaration.


Document created on 04-Oct-2005 (revision 1)