XMLCATALOG(1) xmlcatalog Manual XMLCATALOG(1) NNAAMMEE xmlcatalog - Command line tool to parse and manipulate XML or SGML catalog files. SSYYNNOOPPSSIISS xxmmllccaattaalloogg [----ssggmmll | ----sshheellll | ----ccrreeaattee | ----ddeell _V_A_L_U_E_(_S_) | [ ----aadddd _T_Y_P_E _O_R_I_G _R_E_P_L_A_C_E | ----aadddd _F_I_L_E_N_A_M_E] | ----nnoooouutt | ----nnoo--ssuuppeerr--uuppddaattee | [--vv | ----vveerrbboossee]] {_C_A_T_A_L_O_G_F_I_L_E} {_E_N_T_I_T_I_E_S...} DDEESSCCRRIIPPTTIIOONN xxmmllccaattaalloogg is a command line application allowing users to monitor and manipulate XML and SGML catalogs. It is included in lliibbxxmmll(3). 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. OOPPTTIIOONNSS xxmmllccaattaalloogg accepts the following options (in alphabetical order): ----aadddd _T_Y_P_E _O_R_I_G _R_E_P_L_A_C_E Add an entry to CATALOGFILE. _T_Y_P_E indicates the type of entry. Possible types are: _p_u_b_l_i_c, _s_y_s_t_e_m, _u_r_i, _r_e_w_r_i_t_e_S_y_s_t_e_m, _r_e_w_r_i_t_e_U_R_I, _d_e_l_e_g_a_t_e_P_u_b_l_i_c, _d_e_l_e_g_a_t_e_S_y_s_t_e_m, _d_e_l_e_g_a_t_e_U_R_I, _n_e_x_t_C_a_t_a_l_o_g. _O_R_I_G is the original reference to be replaced, and _R_E_P_L_A_C_E is the URI of the replacement entity to be used. The ----aadddd option will not overwrite CATALOGFILE, outputting to stdout, 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. ----aadddd _F_I_L_E_N_A_M_E If the ----aadddd option is used following the ----ssggmmll option, only a single argument, a _F_I_L_E_N_A_M_E, is used. This is used to add the name of a catalog file to an SGML supercatalog, a file that contains references to other included SGML catalog files. ----ccrreeaattee Create a new XML catalog. Outputs to stdout, ignoring _f_i_l_e_n_a_m_e unless ----nnoooouutt is used, in which case it creates a new catalog file _f_i_l_e_n_a_m_e. ----ddeell _V_A_L_U_E_(_S_) Remove entries from _C_A_T_A_L_O_G_F_I_L_E matching _V_A_L_U_E_(_S_). The ----ddeell option will not overwrite _C_A_T_A_L_O_G_F_I_L_E, outputting to stdout, unless ----nnoooouutt is used. ----nnoooouutt Save output to the named file rather than outputting to stdout. ----nnoo--ssuuppeerr--uuppddaattee Do not update the SGML super catalog. ----sshheellll Run a shell allowing interactive queries on catalog file _C_A_T_A_L_O_G_F_I_L_E. For the set of available commands see the section called "SHELL COMMANDS". ----ssggmmll Uses SGML super catalogs for ----aadddd and ----ddeell options. --vv, ----vveerrbboossee Output debugging information. Invoking xxmmllccaattaalloogg non-interactively without a designated action (imposed with options like ----aadddd) will result in a lookup of the catalog entry for _E_N_T_I_T_I_E_S in the catalog denoted with _C_A_T_A_L_O_G_F_I_L_E. The corresponding entries will be output to the command line. This mode of operation, together with ----sshheellll mode and non-modifying (i.e. without ----nnoooouutt) direct actions, allows for a special shortcut of the void _C_A_T_A_L_O_G_F_I_L_E 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. SSHHEELLLL CCOOMMMMAANNDDSS Invoking xxmmllccaattaalloogg with the ----sshheellll _C_A_T_A_L_O_G_F_I_L_E option opens a command line shell allowing interactive access to the catalog file identified by _C_A_T_A_L_O_G_F_I_L_E. Invoking the shell provides a command line prompt after which the following commands (described in alphabetical order) can be entered. aadddd _T_Y_P_E _O_R_I_G _R_E_P_L_A_C_E Add an entry to the catalog file. _T_Y_P_E indicates the type of entry. Possible types are: _p_u_b_l_i_c, _s_y_s_t_e_m, _u_r_i, _r_e_w_r_i_t_e_S_y_s_t_e_m, _r_e_w_r_i_t_e_U_R_I, _d_e_l_e_g_a_t_e_P_u_b_l_i_c, _d_e_l_e_g_a_t_e_S_y_s_t_e_m, _d_e_l_e_g_a_t_e_U_R_I, _n_e_x_t_C_a_t_a_l_o_g. _O_R_I_G is the original reference to be replaced, and _R_E_P_L_A_C_E is the URI of the replacement entity to be used. The ----aadddd option will not overwrite CATALOGFILE, outputting to stdout, 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. ddeebbuugg Print debugging statements showing the steps xxmmllccaattaalloogg is executing. ddeell _V_A_L_U_E_(_S_) Remove the catalog entry corresponding to _V_A_L_U_E_(_S_). dduummpp Print the current catalog. eexxiitt Quit the shell. ppuubblliicc _P_U_B_L_I_C_-_I_D Execute a Formal Public Identifier lookup of the catalog entry for _P_U_B_L_I_C_-_I_D. The corresponding entry will be output to the command line. qquuiieett Stop printing debugging statements. ssyysstteemm _S_Y_S_T_E_M_-_I_D Execute a Formal Public Identifier lookup of the catalog entry for _S_Y_S_T_E_M_-_I_D. The corresponding entry will be output to the command line. EENNVVIIRROONNMMEENNTT XXMMLL__CCAATTAALLOOGG__FFIILLEESS XML catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the XXMMLL__CCAATTAALLOOGG__FFIILLEESS environment variable to a list of catalogs. An empty one should deactivate loading the default /etc/xml/catalog catalog. DDIIAAGGNNOOSSTTIICCSS xxmmllccaattaalloogg return codes provide information that can be used when calling it from scripts. 00 No error 11 Failed to remove an entry from the catalog 22 Failed to save to the catalog, check file permissions 33 Failed to add an entry to the catalog 44 Failed to look up an entry in the catalog SSEEEE AALLSSOO lliibbxxmmll(3) More information can be found at +o lliibbxxmmll(3) web page hhttttpp::////wwwwww..xxmmllssoofftt..oorrgg// +o lliibbxxmmll(3) catalog support web page at hhttttpp::////wwwwww..xxmmllssoofftt..oorrgg//ccaattaalloogg..hhttmmll +o James Clark's SGML catalog page hhttttpp::////wwwwww..jjccllaarrkk..ccoomm//sspp//ccaattaalloogg..hhttmm +o OASIS XML catalog specification hhttttpp::////wwwwww..ooaassiiss--ooppeenn..oorrgg//ccoommmmiitttteeeess//eennttiittyy//ssppeecc..hhttmmll AAUUTTHHOORR JJoohhnn FFlleecckk Author. CCOOPPYYRRIIGGHHTT Copyright (C) 2001, 2004 libxml2 $Date$ XMLCATALOG(1)