1XMLCATALOG(1) xmlcatalog Manual XMLCATALOG(1)
2
3
4
6 xmlcatalog - Command line tool to parse and manipulate XML or SGML
7 catalog files.
8
10 xmlcatalog [--sgml | --shell | --create | --del VALUE(S) |
11 [ --add TYPE ORIG REPLACE | --add FILENAME] | --noout |
12 --no-super-update | [-v | --verbose]] {CATALOGFILE}
13 {ENTITIES...}
14
16 xmlcatalog is a command line application allowing users to monitor and
17 manipulate XML and SGML catalogs. It is included in libxml(3).
18
19 Its functions can be invoked from a single command from the command
20 line, or it can perform multiple functions in interactive mode. It can
21 operate on both XML and SGML files.
22
24 xmlcatalog accepts the following options (in alphabetical order):
25
26 --add TYPE ORIG REPLACE
27 Add an entry to CATALOGFILE. TYPE indicates the type of entry.
28 Possible types are: public, system, uri, rewriteSystem, rewriteURI,
29 delegatePublic, delegateSystem, delegateURI, nextCatalog. ORIG is
30 the original reference to be replaced, and REPLACE is the URI of
31 the replacement entity to be used. The --add option will not
32 overwrite CATALOGFILE, outputting to stdout, unless --noout is
33 used. The --add will always take three parameters even if some of
34 the XML catalog constructs will have only a single argument.
35
36 --add FILENAME
37 If the --add option is used following the --sgml option, only a
38 single argument, a FILENAME, is used. This is used to add the name
39 of a catalog file to an SGML supercatalog, a file that contains
40 references to other included SGML catalog files.
41
42 --create
43 Create a new XML catalog. Outputs to stdout, ignoring filename
44 unless --noout is used, in which case it creates a new catalog file
45 filename.
46
47 --del VALUE(S)
48 Remove entries from CATALOGFILE matching VALUE(S). The --del option
49 will not overwrite CATALOGFILE, outputting to stdout, unless
50 --noout is used.
51
52 --noout
53 Save output to the named file rather than outputting to stdout.
54
55 --no-super-update
56 Do not update the SGML super catalog.
57
58 --shell
59 Run a shell allowing interactive queries on catalog file
60 CATALOGFILE. For the set of available commands see the section
61 called “SHELL COMMANDS”.
62
63 --sgml
64 Uses SGML super catalogs for --add and --del options.
65
66 -v, --verbose
67 Output debugging information.
68
69 Invoking xmlcatalog non-interactively without a designated action
70 (imposed with options like --add) will result in a lookup of the
71 catalog entry for ENTITIES in the catalog denoted with CATALOGFILE. The
72 corresponding entries will be output to the command line. This mode of
73 operation, together with --shell mode and non-modifying (i.e. without
74 --noout) direct actions, allows for a special shortcut of the void
75 CATALOGFILE specification (possibly expressed as "" in the shell
76 environment) appointing the default system catalog. That simplifies the
77 handling when its exact location is irrelevant but the respective
78 built-in still needs to be consulted.
79
81 Invoking xmlcatalog with the --shell CATALOGFILE option opens a command
82 line shell allowing interactive access to the catalog file identified
83 by CATALOGFILE. Invoking the shell provides a command line prompt after
84 which the following commands (described in alphabetical order) can be
85 entered.
86
87 add TYPE ORIG REPLACE
88 Add an entry to the catalog file. TYPE indicates the type of
89 entry. Possible types are: public, system, uri, rewriteSystem,
90 rewriteURI, delegatePublic, delegateSystem, delegateURI,
91 nextCatalog. ORIG is the original reference to be replaced, and
92 REPLACE is the URI of the replacement entity to be used. The --add
93 option will not overwrite CATALOGFILE, outputting to stdout, unless
94 --noout is used. The --add will always take three parameters even
95 if some of the XML catalog constructs will have only a single
96 argument.
97
98 debug
99 Print debugging statements showing the steps xmlcatalog is
100 executing.
101
102 del VALUE(S)
103 Remove the catalog entry corresponding to VALUE(S).
104
105 dump
106 Print the current catalog.
107
108 exit
109 Quit the shell.
110
111 public PUBLIC-ID
112 Execute a Formal Public Identifier lookup of the catalog entry for
113 PUBLIC-ID. The corresponding entry will be output to the command
114 line.
115
116 quiet
117 Stop printing debugging statements.
118
119 system SYSTEM-ID
120 Execute a Formal Public Identifier lookup of the catalog entry for
121 SYSTEM-ID. The corresponding entry will be output to the command
122 line.
123
125 XML_CATALOG_FILES
126 XML catalog behavior can be changed by redirecting queries to the
127 user's own set of catalogs. This can be done by setting the
128 XML_CATALOG_FILES environment variable to a space-separated list of
129 catalogs. Use percent-encoding to escape spaces or other
130 characters. An empty variable should deactivate loading the default
131 /etc/xml/catalog catalog.
132
134 xmlcatalog return codes provide information that can be used when
135 calling it from scripts.
136
137 0
138 No error
139
140 1
141 Failed to remove an entry from the catalog
142
143 2
144 Failed to save to the catalog, check file permissions
145
146 3
147 Failed to add an entry to the catalog
148
149 4
150 Failed to look up an entry in the catalog
151
153 libxml(3)
154
155 More information can be found at
156
157 • libxml(3) web page https://gitlab.gnome.org/GNOME/libxml2
158
159 • libxml(3) catalog support web page at
160 https://gitlab.gnome.org/GNOME/libxml2/-/wikis/Catalog-support
161
162 • James Clark's SGML catalog page
163 http://www.jclark.com/sp/catalog.htm
164
165 • OASIS XML catalog specification
166 http://www.oasis-open.org/committees/entity/spec.html
167
168
170 John Fleck <jfleck@inkstain.net>
171 Author.
172
174 Copyright © 2001, 2004
175
176
177
178libxml2 08/17/2022 XMLCATALOG(1)