Re: [xml] xmlcatalog: inconsistent behaviour between the --add and --del option?

On Sat, Nov 25, 2006 at 09:26:27PM +0100, Daniel Leidert wrote:

If I want to add an entry to the catalog, I have to specify the catalog

xmlcatalog --add 'TYPE' 'ORIG' 'REPLACE' $CATALOG

but removing an entry works without giving the catalog file

xmlcatalog --del 'VALUE'

Normally I would have expected, taht even the `--add' option does not
require a catalog file (Shouldn't it simply try to examine
XML_CATALOG_FILES)? Or is this behaviour dedicated to the fact, that
XML_CATALOG_FILES can be a list of catalogs (which isn't a problem, if
en entry shall be removed)? But in this case I would expect, that --del
accepts a catalog file too.

  Looking at xmlcatalog.c code and the 2 APIs used underneath
namely xmlCatalogAdd() and xmlCatalogRemove(), I don't see any difference
in code between both option w.r.t. what catalog are loaded and affected.
 If you don't specify a catalog the default one is used in both cases.
Sorry I don't really understand the problem. This should work the same 
in both cases, either with an explicit catalog or a default catalog. 
However in the add case, assuming the orig value was matched by an entry
in the system catalog, maybe you just can't change that system catalog,
but it's just suppositions.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]