Blame doc/xmlcatalog.1

Packit 423ecb
'\" t
Packit 423ecb
.\"     Title: xmlcatalog
Packit 423ecb
.\"    Author: John Fleck <jfleck@inkstain.net>
Packit 423ecb
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
Packit 423ecb
.\"      Date: $Date$
Packit 423ecb
.\"    Manual: xmlcatalog Manual
Packit 423ecb
.\"    Source: libxml2
Packit 423ecb
.\"  Language: English
Packit 423ecb
.\"
Packit 423ecb
.TH "XMLCATALOG" "1" "$Date$" "libxml2" "xmlcatalog Manual"
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.\" * Define some portability stuff
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 423ecb
.\" http://bugs.debian.org/507673
Packit 423ecb
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
Packit 423ecb
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Packit 423ecb
.ie \n(.g .ds Aq \(aq
Packit 423ecb
.el       .ds Aq '
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.\" * set default formatting
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.\" disable hyphenation
Packit 423ecb
.nh
Packit 423ecb
.\" disable justification (adjust text to left margin only)
Packit 423ecb
.ad l
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.\" * MAIN CONTENT STARTS HERE *
Packit 423ecb
.\" -----------------------------------------------------------------
Packit 423ecb
.SH "NAME"
Packit 423ecb
xmlcatalog \- Command line tool to parse and manipulate XML or SGML catalog files\&.
Packit 423ecb
.SH "SYNOPSIS"
Packit 423ecb
.HP \w'\fBxmlcatalog\fR\ 'u
Packit 423ecb
\fBxmlcatalog\fR [\fB\-\-sgml\fR | \fB\-\-shell\fR | \fB\-\-create\fR | \fB\-\-del\ \fR\fB\fIVALUE(S)\fR\fR | [\ \fB\-\-add\ \fR\fB\fITYPE\fR\fR\fB\ \fR\fB\fIORIG\fR\fR\fB\ \fR\fB\fIREPLACE\fR\fR\fB\ \fR\ |\ \fB\-\-add\ \fR\fB\fIFILENAME\fR\fR] | \fB\-\-noout\fR | \fB\-\-no\-super\-update\fR | [\fB\-v\fR\ |\ \fB\-\-verbose\fR]] {\fICATALOGFILE\fR} {\fIENTITIES\fR...}
Packit 423ecb
.SH "DESCRIPTION"
Packit 423ecb
.PP
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
is a command line application allowing users to monitor and manipulate
Packit 423ecb
XML
Packit 423ecb
and
Packit 423ecb
SGML
Packit 423ecb
catalogs\&. It is included in
Packit 423ecb
\fBlibxml\fR(3)\&.
Packit 423ecb
.PP
Packit 423ecb
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
Packit 423ecb
XML
Packit 423ecb
and
Packit 423ecb
SGML
Packit 423ecb
files\&.
Packit 423ecb
.SH "OPTIONS"
Packit 423ecb
.PP
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
accepts the following options (in alphabetical order):
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-add \fR\fB\fITYPE\fR\fR\fB \fR\fB\fIORIG\fR\fR\fB \fR\fB\fIREPLACE\fR\fR\fB \fR
Packit 423ecb
.RS 4
Packit 423ecb
Add an entry to
Packit 423ecb
CATALOGFILE\&.
Packit 423ecb
\fITYPE\fR
Packit 423ecb
indicates the type of entry\&. Possible types are:
Packit 423ecb
\fIpublic\fR, \fIsystem\fR, \fIuri\fR, \fIrewriteSystem\fR, \fIrewriteURI\fR, \fIdelegatePublic\fR, \fIdelegateSystem\fR, \fIdelegateURI\fR, \fInextCatalog\fR\&.
Packit 423ecb
\fIORIG\fR
Packit 423ecb
is the original reference to be replaced, and
Packit 423ecb
\fIREPLACE\fR
Packit 423ecb
is the
Packit 423ecb
URI
Packit 423ecb
of the replacement entity to be used\&. The
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
option will not overwrite
Packit 423ecb
CATALOGFILE, outputting to
Packit 423ecb
stdout, unless
Packit 423ecb
\fB\-\-noout\fR
Packit 423ecb
is used\&. The
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
will always take three parameters even if some of the
Packit 423ecb
XML
Packit 423ecb
catalog constructs will have only a single argument\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-add \fR\fB\fIFILENAME\fR\fR
Packit 423ecb
.RS 4
Packit 423ecb
If the
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
option is used following the
Packit 423ecb
\fB\-\-sgml\fR
Packit 423ecb
option, only a single argument, a
Packit 423ecb
\fIFILENAME\fR, is used\&. This is used to add the name of a catalog file to an
Packit 423ecb
SGML
Packit 423ecb
supercatalog, a file that contains references to other included
Packit 423ecb
SGML
Packit 423ecb
catalog files\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-create\fR
Packit 423ecb
.RS 4
Packit 423ecb
Create a new
Packit 423ecb
XML
Packit 423ecb
catalog\&. Outputs to
Packit 423ecb
stdout, ignoring
Packit 423ecb
\fIfilename\fR
Packit 423ecb
unless
Packit 423ecb
\fB\-\-noout\fR
Packit 423ecb
is used, in which case it creates a new catalog file
Packit 423ecb
\fIfilename\fR\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-del \fR\fB\fIVALUE(S)\fR\fR
Packit 423ecb
.RS 4
Packit 423ecb
Remove entries from
Packit 423ecb
\fICATALOGFILE\fR
Packit 423ecb
matching
Packit 423ecb
\fIVALUE(S)\fR\&. The
Packit 423ecb
\fB\-\-del\fR
Packit 423ecb
option will not overwrite
Packit 423ecb
\fICATALOGFILE\fR, outputting to
Packit 423ecb
stdout, unless
Packit 423ecb
\fB\-\-noout\fR
Packit 423ecb
is used\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-noout\fR
Packit 423ecb
.RS 4
Packit 423ecb
Save output to the named file rather than outputting to
Packit 423ecb
stdout\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-no\-super\-update\fR
Packit 423ecb
.RS 4
Packit 423ecb
Do not update the
Packit 423ecb
SGML
Packit 423ecb
super catalog\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-shell\fR
Packit 423ecb
.RS 4
Packit 423ecb
Run a shell allowing interactive queries on catalog file
Packit 423ecb
\fICATALOGFILE\fR\&. For the set of available commands see
Packit 423ecb
the section called \(lqSHELL COMMANDS\(rq\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-\-sgml\fR
Packit 423ecb
.RS 4
Packit 423ecb
Uses
Packit 423ecb
SGML
Packit 423ecb
super catalogs for
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
and
Packit 423ecb
\fB\-\-del\fR
Packit 423ecb
options\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB\-v\fR, \fB\-\-verbose\fR
Packit 423ecb
.RS 4
Packit 423ecb
Output debugging information\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
Invoking
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
non\-interactively without a designated action (imposed with options like
Packit 423ecb
\fB\-\-add\fR) will result in a lookup of the catalog entry for
Packit 423ecb
\fIENTITIES\fR
Packit 423ecb
in the catalog denoted with
Packit 423ecb
\fICATALOGFILE\fR\&. The corresponding entries will be output to the command line\&. This mode of operation, together with
Packit 423ecb
\fB\-\-shell\fR
Packit 423ecb
mode and non\-modifying (i\&.e\&. without
Packit 423ecb
\fB\-\-noout\fR) direct actions, allows for a special shortcut of the void
Packit 423ecb
\fICATALOGFILE\fR
Packit 423ecb
specification (possibly expressed as "" in the shell environment) appointing the default system catalog\&. That simplifies the handling when its exact location is irrelevant but the respective built\-in still needs to be consulted\&.
Packit 423ecb
.SH "SHELL COMMANDS"
Packit 423ecb
.PP
Packit 423ecb
Invoking
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
with the
Packit 423ecb
\fB\-\-shell \fR\fB\fICATALOGFILE\fR\fR
Packit 423ecb
option opens a command line shell allowing interactive access to the catalog file identified by
Packit 423ecb
\fICATALOGFILE\fR\&. Invoking the shell provides a command line prompt after which the following commands (described in alphabetical order) can be entered\&.
Packit 423ecb
.PP
Packit 423ecb
\fBadd \fR\fB\fITYPE\fR\fR\fB \fR\fB\fIORIG\fR\fR\fB \fR\fB\fIREPLACE\fR\fR\fB \fR
Packit 423ecb
.RS 4
Packit 423ecb
Add an entry to the catalog file\&.
Packit 423ecb
\fITYPE\fR
Packit 423ecb
indicates the type of entry\&. Possible types are:
Packit 423ecb
\fIpublic\fR, \fIsystem\fR, \fIuri\fR, \fIrewriteSystem\fR, \fIrewriteURI\fR, \fIdelegatePublic\fR, \fIdelegateSystem\fR, \fIdelegateURI\fR, \fInextCatalog\fR\&.
Packit 423ecb
\fIORIG\fR
Packit 423ecb
is the original reference to be replaced, and
Packit 423ecb
\fIREPLACE\fR
Packit 423ecb
is the
Packit 423ecb
URI
Packit 423ecb
of the replacement entity to be used\&. The
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
option will not overwrite
Packit 423ecb
CATALOGFILE, outputting to
Packit 423ecb
stdout, unless
Packit 423ecb
\fB\-\-noout\fR
Packit 423ecb
is used\&. The
Packit 423ecb
\fB\-\-add\fR
Packit 423ecb
will always take three parameters even if some of the
Packit 423ecb
XML
Packit 423ecb
catalog constructs will have only a single argument\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBdebug\fR
Packit 423ecb
.RS 4
Packit 423ecb
Print debugging statements showing the steps
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
is executing\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBdel \fR\fB\fIVALUE(S)\fR\fR
Packit 423ecb
.RS 4
Packit 423ecb
Remove the catalog entry corresponding to
Packit 423ecb
\fIVALUE(S)\fR\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBdump\fR
Packit 423ecb
.RS 4
Packit 423ecb
Print the current catalog\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBexit\fR
Packit 423ecb
.RS 4
Packit 423ecb
Quit the shell\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBpublic \fR\fB\fIPUBLIC\-ID\fR\fR
Packit 423ecb
.RS 4
Packit 423ecb
Execute a Formal Public Identifier lookup of the catalog entry for
Packit 423ecb
\fIPUBLIC\-ID\fR\&. The corresponding entry will be output to the command line\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBquiet\fR
Packit 423ecb
.RS 4
Packit 423ecb
Stop printing debugging statements\&.
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fBsystem \fR\fB\fISYSTEM\-ID\fR\fR
Packit 423ecb
.RS 4
Packit 423ecb
Execute a Formal Public Identifier lookup of the catalog entry for
Packit 423ecb
\fISYSTEM\-ID\fR\&. The corresponding entry will be output to the command line\&.
Packit 423ecb
.RE
Packit 423ecb
.SH "ENVIRONMENT"
Packit 423ecb
.PP
Packit 423ecb
\fBXML_CATALOG_FILES\fR
Packit 423ecb
.RS 4
Packit 423ecb
XML
Packit 423ecb
catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
Packit 423ecb
\fBXML_CATALOG_FILES\fR
Packit 423ecb
environment variable to a list of catalogs\&. An empty one should deactivate loading the default
Packit 423ecb
/etc/xml/catalog
Packit 423ecb
catalog\&.
Packit 423ecb
.RE
Packit 423ecb
.SH "DIAGNOSTICS"
Packit 423ecb
.PP
Packit 423ecb
\fBxmlcatalog\fR
Packit 423ecb
return codes provide information that can be used when calling it from scripts\&.
Packit 423ecb
.PP
Packit 423ecb
\fB0\fR
Packit 423ecb
.RS 4
Packit 423ecb
No error
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB1\fR
Packit 423ecb
.RS 4
Packit 423ecb
Failed to remove an entry from the catalog
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB2\fR
Packit 423ecb
.RS 4
Packit 423ecb
Failed to save to the catalog, check file permissions
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB3\fR
Packit 423ecb
.RS 4
Packit 423ecb
Failed to add an entry to the catalog
Packit 423ecb
.RE
Packit 423ecb
.PP
Packit 423ecb
\fB4\fR
Packit 423ecb
.RS 4
Packit 423ecb
Failed to look up an entry in the catalog
Packit 423ecb
.RE
Packit 423ecb
.SH "SEE ALSO"
Packit 423ecb
.PP
Packit 423ecb
\fBlibxml\fR(3)
Packit 423ecb
.PP
Packit 423ecb
More information can be found at
Packit 423ecb
.sp
Packit 423ecb
.RS 4
Packit 423ecb
.ie n \{\
Packit 423ecb
\h'-04'\(bu\h'+03'\c
Packit 423ecb
.\}
Packit 423ecb
.el \{\
Packit 423ecb
.sp -1
Packit 423ecb
.IP \(bu 2.3
Packit 423ecb
.\}
Packit 423ecb
\fBlibxml\fR(3)
Packit 423ecb
web page
Packit 423ecb
\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
Packit 423ecb
.RE
Packit 423ecb
.sp
Packit 423ecb
.RS 4
Packit 423ecb
.ie n \{\
Packit 423ecb
\h'-04'\(bu\h'+03'\c
Packit 423ecb
.\}
Packit 423ecb
.el \{\
Packit 423ecb
.sp -1
Packit 423ecb
.IP \(bu 2.3
Packit 423ecb
.\}
Packit 423ecb
\fBlibxml\fR(3)
Packit 423ecb
catalog support web page at
Packit 423ecb
\m[blue]\fB\%http://www.xmlsoft.org/catalog.html\fR\m[]
Packit 423ecb
.RE
Packit 423ecb
.sp
Packit 423ecb
.RS 4
Packit 423ecb
.ie n \{\
Packit 423ecb
\h'-04'\(bu\h'+03'\c
Packit 423ecb
.\}
Packit 423ecb
.el \{\
Packit 423ecb
.sp -1
Packit 423ecb
.IP \(bu 2.3
Packit 423ecb
.\}
Packit 423ecb
James Clark\*(Aqs
Packit 423ecb
SGML
Packit 423ecb
catalog page
Packit 423ecb
\m[blue]\fB\%http://www.jclark.com/sp/catalog.htm\fR\m[]
Packit 423ecb
.RE
Packit 423ecb
.sp
Packit 423ecb
.RS 4
Packit 423ecb
.ie n \{\
Packit 423ecb
\h'-04'\(bu\h'+03'\c
Packit 423ecb
.\}
Packit 423ecb
.el \{\
Packit 423ecb
.sp -1
Packit 423ecb
.IP \(bu 2.3
Packit 423ecb
.\}
Packit 423ecb
OASIS
Packit 423ecb
XML
Packit 423ecb
catalog specification
Packit 423ecb
\m[blue]\fB\%http://www.oasis-open.org/committees/entity/spec.html\fR\m[]
Packit 423ecb
.RE
Packit 423ecb
.sp
Packit 423ecb
.SH "AUTHOR"
Packit 423ecb
.PP
Packit 423ecb
\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
Packit 423ecb
.RS 4
Packit 423ecb
Author.
Packit 423ecb
.RE
Packit 423ecb
.SH "COPYRIGHT"
Packit 423ecb
.br
Packit 423ecb
Copyright \(co 2001, 2004
Packit 423ecb
.br