2011-10-19 22:08:03 +03:00
'\" t
. \" Title: xmlcatalog
. \" Author: John Fleck <jfleck@inkstain.net>
. \" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
. \" Date: $Date$
. \" Manual: xmlcatalog Manual
. \" Source: libxml2
. \" Language: English
. \"
.TH "XMLCATALOG" "1" "$Date$" "libxml2" "xmlcatalog Manual"
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2006-04-06 08:22:51 +00:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2011-10-19 22:08:03 +03:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
2006-04-06 08:22:51 +00:00
.SH "NAME"
2011-10-19 22:08:03 +03:00
xmlcatalog \- Command line tool to parse and manipulate XML or SGML catalog files\& .
2001-10-06 02:40:10 +00:00
.SH "SYNOPSIS"
2011-10-19 22:08:03 +03:00
.HP \w '\fBxmlcatalog\fR\ 'u
\fB xmlcatalog\fR [\fB \- \- sgml\fR | \fB \- \- shell\fR | \fB \- \- create\fR | \fB \- \- del\ \fR \fB \fI VALUE(S)\fR \fR | [\ \fB \- \- add\ \fR \fB \fI TYPE\fR \fR \fB \ \fR \fB \fI ORIG\fR \fR \fB \ \fR \fB \fI REPLACE\fR \fR \fB \ \fR \ |\ \fB \- \- add\ \fR \fB \fI FILENAME\fR \fR ] | \fB \- \- noout\fR | \fB \- \- no\- super\- update\fR | [\fB \- v\fR \ |\ \fB \- \- verbose\fR ]] {\fI CATALOGFILE\fR } {\fI ENTITIES\fR ...}
2006-04-06 08:22:51 +00:00
.SH "DESCRIPTION"
.PP
2011-10-19 22:08:03 +03:00
2006-04-06 08:22:51 +00:00
\fB xmlcatalog\fR
is a command line application allowing users to monitor and manipulate
XML
and
SGML
2011-10-19 22:08:03 +03:00
catalogs\& . It is included in
\fB libxml\fR (3)\& .
2006-04-06 08:22:51 +00:00
.PP
2011-10-19 22:08:03 +03:00
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
2006-04-06 08:22:51 +00:00
XML
and
SGML
2011-10-19 22:08:03 +03:00
files\& .
2006-04-06 08:22:51 +00:00
.SH "OPTIONS"
.PP
2011-10-19 22:08:03 +03:00
2006-04-06 08:22:51 +00:00
\fB xmlcatalog\fR
accepts the following options (in alphabetical order):
2011-10-19 22:08:03 +03:00
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- add \fR \fB \fI TYPE\fR \fR \fB \fR \fB \fI ORIG\fR \fR \fB \fR \fB \fI REPLACE\fR \fR \fB \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Add an entry to
2011-10-19 22:08:03 +03:00
CATALOGFILE\& .
2006-04-06 08:22:51 +00:00
\fI TYPE\fR
2011-10-19 22:08:03 +03:00
indicates the type of entry\& . Possible types are:
\fI public\fR , \fI system\fR , \fI uri\fR , \fI rewriteSystem\fR , \fI rewriteURI\fR , \fI delegatePublic\fR , \fI delegateSystem\fR , \fI delegateURI\fR , \fI nextCatalog\fR \& .
2006-04-06 08:22:51 +00:00
\fI ORIG\fR
is the original reference to be replaced, and
\fI REPLACE\fR
is the
URI
2011-10-19 22:08:03 +03:00
of the replacement entity to be used\& . The
2006-04-06 08:22:51 +00:00
\fB \- \- add\fR
option will not overwrite
2011-10-19 22:08:03 +03:00
CATALOGFILE, outputting to
stdout, unless
2006-04-06 08:22:51 +00:00
\fB \- \- noout\fR
2011-10-19 22:08:03 +03:00
is used\& . The
2006-04-06 08:22:51 +00:00
\fB \- \- add\fR
will always take three parameters even if some of the
XML
2011-10-19 22:08:03 +03:00
catalog constructs will have only a single argument\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- add \fR \fB \fI FILENAME\fR \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
If the
\fB \- \- add\fR
option is used following the
\fB \- \- sgml\fR
option, only a single argument, a
2011-10-19 22:08:03 +03:00
\fI FILENAME\fR , is used\& . This is used to add the name of a catalog file to an
2006-04-06 08:22:51 +00:00
SGML
supercatalog, a file that contains references to other included
SGML
2011-10-19 22:08:03 +03:00
catalog files\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- create\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Create a new
XML
2011-10-19 22:08:03 +03:00
catalog\& . Outputs to
stdout, ignoring
2006-04-06 08:22:51 +00:00
\fI filename\fR
unless
2004-02-27 03:26:30 +00:00
\fB \- \- noout\fR
2006-04-06 08:22:51 +00:00
is used, in which case it creates a new catalog file
2011-10-19 22:08:03 +03:00
\fI filename\fR \& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- del \fR \fB \fI VALUE(S)\fR \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Remove entries from
\fI CATALOGFILE\fR
matching
2011-10-19 22:08:03 +03:00
\fI VALUE(S)\fR \& . The
2006-04-06 08:22:51 +00:00
\fB \- \- del\fR
option will not overwrite
\fI CATALOGFILE\fR , outputting to
2011-10-19 22:08:03 +03:00
stdout, unless
2006-04-06 08:22:51 +00:00
\fB \- \- noout\fR
2011-10-19 22:08:03 +03:00
is used\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- noout\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Save output to the named file rather than outputting to
2011-10-19 22:08:03 +03:00
stdout\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- no\- super\- update\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Do not update the
SGML
2011-10-19 22:08:03 +03:00
super catalog\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- \- shell\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Run a shell allowing interactive queries on catalog file
2011-10-19 22:08:03 +03:00
\fI CATALOGFILE\fR \& . For the set of available commands see
the section called \(lq SHELL COMMANDS\(rq \& .
.RE
.PP
2004-02-27 03:26:30 +00:00
\fB \- \- sgml\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Uses
SGML
super catalogs for
\fB \- \- add\fR
and
\fB \- \- del\fR
2011-10-19 22:08:03 +03:00
options\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB \- v\fR , \fB \- \- verbose\fR
2011-10-19 22:08:03 +03:00
.RS 4
Output debugging information\& .
.RE
2001-10-06 02:40:10 +00:00
.SH "SHELL COMMANDS"
2001-09-03 15:14:19 +00:00
.PP
2006-04-06 08:22:51 +00:00
Invoking
\fB xmlcatalog\fR
with the
\fB \- \- shell \fR \fB \fI CATALOGFILE\fR \fR
option opens a command line shell allowing interactive access to the catalog file identified by
2011-10-19 22:08:03 +03:00
\fI CATALOGFILE\fR \& . Invoking the shell provides a command line prompt after which the following commands (described in alphabetical order) can be entered\& .
.PP
2006-04-06 08:22:51 +00:00
\fB add \fR \fB \fI TYPE\fR \fR \fB \fR \fB \fI ORIG\fR \fR \fB \fR \fB \fI REPLACE\fR \fR \fB \fR
2011-10-19 22:08:03 +03:00
.RS 4
Add an entry to the catalog file\& .
2006-04-06 08:22:51 +00:00
\fI TYPE\fR
2011-10-19 22:08:03 +03:00
indicates the type of entry\& . Possible types are:
\fI public\fR , \fI system\fR , \fI uri\fR , \fI rewriteSystem\fR , \fI rewriteURI\fR , \fI delegatePublic\fR , \fI delegateSystem\fR , \fI delegateURI\fR , \fI nextCatalog\fR \& .
2006-04-06 08:22:51 +00:00
\fI ORIG\fR
is the original reference to be replaced, and
\fI REPLACE\fR
is the
URI
2011-10-19 22:08:03 +03:00
of the replacement entity to be used\& . The
2006-04-06 08:22:51 +00:00
\fB \- \- add\fR
option will not overwrite
2011-10-19 22:08:03 +03:00
CATALOGFILE, outputting to
stdout, unless
2006-04-06 08:22:51 +00:00
\fB \- \- noout\fR
2011-10-19 22:08:03 +03:00
is used\& . The
2006-04-06 08:22:51 +00:00
\fB \- \- add\fR
will always take three parameters even if some of the
XML
2011-10-19 22:08:03 +03:00
catalog constructs will have only a single argument\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB debug\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Print debugging statements showing the steps
\fB xmlcatalog\fR
2011-10-19 22:08:03 +03:00
is executing\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB del \fR \fB \fI VALUE(S)\fR \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 08:22:51 +00:00
Remove the catalog entry corresponding to
2011-10-19 22:08:03 +03:00
\fI VALUE(S)\fR \& .
.RE
.PP
2001-10-06 22:30:16 +00:00
\fB dump\fR
2011-10-19 22:08:03 +03:00
.RS 4
Print the current catalog\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB exit\fR
2011-10-19 22:08:03 +03:00
.RS 4
Quit the shell\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB public \fR \fB \fI PUBLIC\- ID\fR \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-08-21 08:34:11 +00:00
Execute a Formal Public Identifier look\- up of the catalog entry for
2011-10-19 22:08:03 +03:00
\fI PUBLIC\- ID\fR \& . The corresponding entry will be output to the command line\& .
.RE
.PP
2001-10-06 22:30:16 +00:00
\fB quiet\fR
2011-10-19 22:08:03 +03:00
.RS 4
Stop printing debugging statements\& .
.RE
.PP
2006-04-06 08:22:51 +00:00
\fB system \fR \fB \fI SYSTEM\- ID\fR \fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-08-21 08:34:11 +00:00
Execute a Formal Public Identifier look\- up of the catalog entry for
2011-10-19 22:08:03 +03:00
\fI SYSTEM\- ID\fR \& . The corresponding entry will be output to the command line\& .
.RE
2006-04-06 08:22:51 +00:00
.SH "ENVIRONMENT"
2011-10-19 22:08:03 +03:00
.PP
2006-04-06 08:22:51 +00:00
\fB XML_CATALOG_FILES\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-08-21 08:34:11 +00:00
XML
2011-10-19 22:08:03 +03:00
catalog behavior can be changed by redirecting queries to the user\* (Aqs own set of catalogs\& . This can be done by setting the
2006-04-06 08:22:51 +00:00
\fB XML_CATALOG_FILES\fR
2011-10-19 22:08:03 +03:00
environment variable to a list of catalogs\& . An empty one should deactivate loading the default
/etc/xml/catalog
catalog\& .
.RE
2006-04-06 08:22:51 +00:00
.SH "DIAGNOSTICS"
.PP
2011-10-19 22:08:03 +03:00
2006-08-21 08:34:11 +00:00
\fB xmlcatalog\fR
2011-10-19 22:08:03 +03:00
return codes provide information that can be used when calling it from scripts\& .
.PP
2006-04-06 12:57:09 +00:00
\fB 0\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 12:57:09 +00:00
No error
2011-10-19 22:08:03 +03:00
.RE
.PP
2006-04-06 12:57:09 +00:00
\fB 1\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 12:57:09 +00:00
Failed to remove an entry from the catalog
2011-10-19 22:08:03 +03:00
.RE
.PP
2006-04-06 12:57:09 +00:00
\fB 2\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 12:57:09 +00:00
Failed to save to the catalog, check file permissions
2011-10-19 22:08:03 +03:00
.RE
.PP
2006-04-06 12:57:09 +00:00
\fB 3\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-04-06 12:57:09 +00:00
Failed to add an entry to the catalog
2011-10-19 22:08:03 +03:00
.RE
.PP
2006-04-06 12:57:09 +00:00
\fB 4\fR
2011-10-19 22:08:03 +03:00
.RS 4
2006-08-21 08:34:11 +00:00
Failed to look up an entry in the catalog
2011-10-19 22:08:03 +03:00
.RE
2006-04-06 12:57:09 +00:00
.SH "SEE ALSO"
2006-04-06 08:22:51 +00:00
.PP
\fB libxml\fR (3)
2006-08-21 08:34:11 +00:00
.PP
More information can be found at
2011-10-19 22:08:03 +03:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2006-08-21 08:34:11 +00:00
\fB libxml\fR (3)
web page
2011-10-19 22:08:03 +03:00
\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2006-08-21 08:34:11 +00:00
\fB libxml\fR (3)
catalog support web page at
2011-10-19 22:08:03 +03:00
\m[blue]\fB\%http://www.xmlsoft.org/catalog.html\fR\m[]
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
James Clark\* (Aqs
2006-08-21 08:34:11 +00:00
SGML
catalog page
2011-10-19 22:08:03 +03:00
\m[blue]\fB\%http://www.jclark.com/sp/catalog.htm\fR\m[]
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
OASIS
XML
2006-08-21 08:34:11 +00:00
catalog specification
2011-10-19 22:08:03 +03:00
\m[blue]\fB\%http://www.oasis-open.org/committees/entity/spec.html\fR\m[]
.RE
.sp
2006-04-06 08:22:51 +00:00
.SH "AUTHOR"
2011-10-19 22:08:03 +03:00
.PP
\fB John Fleck\fR <\& jfleck@inkstain\& .net\& >
.RS 4
Author.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2001, 2004
.br