[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: meinproc/docbook can't handle paths with spaces ?
From: Ingo =?iso-8859-15?q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2007-12-18 21:01:20
Message-ID: 200712182201.20712 () erwin ! ingo-kloecker ! de
[Download RAW message or body]
On Tuesday 18 December 2007, Ingo Klöcker wrote:
> On Tuesday 18 December 2007, Oswald Buddenhagen wrote:
> > On Tue, Dec 18, 2007 at 05:54:58PM +0100, Alexander Neundorf wrote:
> > > On Tuesday 18 December 2007, Oswald Buddenhagen wrote:
> > > > have you tried url escaping? doesn't sound that unlikely, given
> > > > the context ...
> > >
> > > Good idea :-)
> > >
> > > This way ?
> > > ../../bin/meinproc4 --stylesheet
> > > /home/alex/src/kde4-svn/KDE%20dir/kdelibs/kdoctools/docbook/xsl/m
> > >an pages/docbook.xsl --check
> > > --srcdir=/home/alex/src/kde4-svn/KDE%20dir/kdelibs/kdoctools/
> > > /home/alex/src/kde4-svn/KDE\
> > > dir/kdelibs/doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook
> >
> > yes.
> >
> > > Doesn't work either :-(
> >
> > bleh. try a proper file:/// url. if that doesn't work, hunt down
> > the libxml authors and do something nasty with them. :)
>
> Doesn't work either because xmllint splits at colon and spaces, so
> that a file:///.... url is split into "file" and "///....". :-/
FWIW, below you'll find the function that parses the result of
getenv("SGML_CATALOG_FILES"). The code is pretty straightforward and
it's obvious that nobody thought about spaces in a catalog's path.
=====
void
xmlLoadCatalogs(const char *pathss) {
const char *cur;
const char *paths;
xmlChar *path;
#ifdef _WIN32
int i, iLen;
#endif
if (pathss == NULL)
return;
cur = pathss;
while (*cur != 0) {
while (xmlIsBlank_ch(*cur)) cur++;
if (*cur != 0) {
paths = cur;
while ((*cur != 0) && (*cur != PATH_SEAPARATOR) &&
(!xmlIsBlank_ch(*cur)))
cur++;
path = xmlStrndup((const xmlChar *)paths, cur - paths);
#ifdef _WIN32
iLen = strlen(path);
for(i = 0; i < iLen; i++) {
if(path[i] == '\\') {
path[i] = '/';
}
}
#endif
if (path != NULL) {
xmlLoadCatalog((const char *) path);
xmlFree(path);
}
}
while (*cur == PATH_SEAPARATOR)
cur++;
}
}
=====
Regards,
Ingo
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic