Re: [xml] Lists in XML_CATALOG_FILES

On Thu, Oct 03, 2002 at 06:18:40PM +0200, Igor Zlatkovic wrote:
Hi everyone,

The environment variable XML_CATALOG_FILES can be used to redirect the
catalog lookup to the user's own set of catalogs. The variable can contain a
list of catalog files. So far, so good.

Now, the function xmlLoadCatalogs says that the files in the list can be
separated with either a ':' or a space. What about the following


How does the software know which colon is separating the two paths? The
space would work good as a separator, but the colon...?

 yep, I expect filenames there, not URIs

Nevertheless, the libxml catalog initialisation code (function
xmlInitializeCatalog) plugs the content of XML_CATALOG_FILES directly into
the catalog entry. If XML_CATALOG_FILES is set to a list of catalogs, no
catalog is loaded. If XML_CATALOG_FILES points to a single file, everything
works as expected.
It seems to me that xmlInitializeCatalog function needs some additional
code. It should expand XML_CATALOG_FILES and produce a list of xmlCatalog
objects, as necessary. By the same token, a colon should not be alowed as a
separator. Space is good, perhaps a semicolon would be good as well?

Am I right here, or am I overlooking something? If I am right, I would fix
the code.

  You're right feel free to fix the code and comment. Note that having 
http based catalogs is not supported right now and I doubt it should really
be, be aware of that. Basically you make all processing dependant on a remote
resource, that's bad.


Daniel Veillard      | Red Hat Network
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]