NAME
xmlcatalog - Command line tool to parse and manipulate XML or SGML cat-
alog files.SYNOPSIS
xxmmllccaattaalloogg [--sshheellll | --ccrreeaattee | --aadddd type orig replace | --ddeell values
| --nnoooouutt | --vveerrbboossee] [catalogfile] [entities]
IINNTTRROODDUUCCTTIIOONNxmlcatalog is a command line application allowing users to monitor and
manipulate XML and SGML catalogs. It is included in libxml2. Its functions can be invoked from a single command from the command line, or it can perform multiple functions in interactive mode. It can operate on both XML and SGML files. CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS--sshheellll filename
Run a shell allowing interactive queries on catalog file file-
name.--ccrreeaattee filename
Create a new XML catalog. Outputs to stdout, ignoring filenameunless --nnoooouutt is used, in which case it creates a new catalog
file filename.--aadddd 'type' 'orig' 'replace' filename
Add an entry to catalog file filename. type indicates the typeof entry. Possible types are 'public', 'system', 'rewriteSys-
tem', 'rewriteURI', 'delegatePublic', 'delegateSystem', and 'nextCatalog'. 'orig' is the original reference to be replaced, and 'replace' is the URI of the replacement entity to be used.The --aadddd option will not overwrite filename, outputting to std-
out, unless --nnoooouutt is used. The --aadddd will always take three
parameters even if some of the XML catalog constructs will have only a single argument.If the --aadddd option is used following the --ssggmmll option, only a
single argument, a filename, is used. This is used to add thename of a catalog file to an SGML supercatalog, a file that con-
tains references to other included SGML catalog files.--ddeell 'values' filename
Remove entries from the catalog file filename matching 'values'.The --ddeell option will not overwrite filename, outputting to std-
out, unless --nnoooouutt is used.
--nnoooouutt
Save output to the named file rather than outputting to stdout.--ssggmmll Uses SGML Super catalogs for -add and -del options
-vv or --vveerrbboossee
output debugging information. SSHHEELLLL CCOOMMMMAANNDDSSInvoking xmlcatalog with the --sshheellll filename option opens a command
line shell allowing interactive access to the catalog file identified by filename. Invoking the shell provides a command line prompt after which commands can be entered. ppuubblliicc 'PublicID' Execute a public identifier lookup of the catalog entry for'PublicID'. The corresponding entry will be output to the com-
mand line. ssyysstteemm 'SystemID' Execute a public identifier lookup of the catalog entry for'SystemID'. The corresponding entry will be output to the com-
mand line. aadddd 'type' 'orig' 'replace'Add an entry to the catalog file. type indicates the type of en-
try. Possible types are 'public', 'system', 'rewriteSystem','rewriteURI', 'delegatePublic', 'delegateSystem', and 'nextCata-
log'. 'orig' is the original reference to be replaced, and 're-
place' is the URI of the replacement entity to be used. ddeell 'values' Remove the catalog entry corresponding to 'values'. dduummpp Print the current catalog.ddeebbuugg Print debugging statements showing the steps xmlcatalog is exe-
cuting. qquuiieett Stop printing debugging statements. eexxiitt Quit the shell.RETURN VALUES
xmlcatalog's return codes provide information that can be used when
calling it from scripts. 0: normal 1: Failed to remove an entry from the catalog 2: Failed to save to the catalog, check file permissions 3: Failed to add an entry to the catalog 4: Failed to lookup and entry in the catalog CCAATTAALLOOGGSS Catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the XMLCATALOGFILESenvironment variable to a list of catalogs. An empty one should deacti-
vate loading the default /etc/xml/catalog default catalog. REFERENCES libxml web page: http://www.xmlsoft.org/ libxml catalog support web page: http://www.xmlsoft.org/catalog.html James Clark's SGML catalog page: http://www.jclark.com/sp/catalog.htmOASIS XML catalog specification: http://www.oasis-open.org/commit-
tees/entity/spec.html AUTHOR John Fleck. XMLCATALOG(1)