Re: [xml] Lists in XML_CATALOG_FILES



<:~( Ruby has support for both windows and unix and what it's done is
define a constant called File::PATH_SEPARATOR which is used in
automatically constructing paths and lets ruby code be more
portable...

Eh? You mean a directory separator, like '/' on Unix, '\' on Windows?

Nope, that's File::SEPARATOR which handles the forward/backslash
funkiness for Windows/Unix.

I'd think there were other libraries out there that do the
same thing, eps since spaces in paths is very valid and used too
often.

Spaces are okay, I have tested this before I commited. You however must use
an URI notation if the path contains spaces. On Windows the following

  file:///c:/some%20directory/catalog

works. If the path does not contain spaces, then the native filesystem
notation works as well. The same goes for Unix.

Cool, did not know that.

Anyway, on unix it's a colon (:), and on windows it's #ifdef'ed to a
semi-colon (;).

You obviously don't mean a '/' or a '\'. Now I am puzzled about
where such thing can be used? Colon or semicolon cannot be used to
construct a path, but to construct a list of paths. Which part of
the OS has use for such lists? Which syscall understands it? The
PATH envvar is the only place I can think of.

PATH_SEPARATOR is used just like you would in a search path.

PATH="/usr/local/bin:/usr/bin:/bin"

Would there be any chance that libxml could follow the same
convention?  -sc

Colon cannot be used on any platform, because it is a valid
character in an URI notation. Breaking the support for the URI in
XML_CATALOG_FILES will bring other problems. URI support allows any
platform to specify the path, no matter how weird its native
filesystem notation might be.

This is true though.  Hrm...  how can you concatenate multiple URLs
into a list?  Maybe a space works well, but if you've just got a set
of paths like /usr/local/share/sgml/catalogs:/opt/corp/sgml/catalogs
and the Win32 equiv, are you going to require that everyone convert
file paths to URIs if they've got multiple catalog dirs?  .... OR, do
I just have a complete lack of understanding (also possible). -sc

-- 
Sean Chittenden



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