[xslt] Re: URIs and Their Hacks



On Tue, 18 Feb 2003, Igor Zlatkovic wrote:
> The new facility is called xmlURIFromPath and is implemented in uri.c.

Well, well, before I start getting flames... okay, I didn't terminate the
uri->path string with 0. Other than that, I observe the following on Linux:

  [astaroth:~/src/libxml]$ ll c:*
  -rw-r--r--    1 igor     users          33 Feb 17 22:06 c:\test.xml

  [astaroth:~/src/libxml]$ cat c:\\test.xml
  <?xml version="1.0"?><doc></doc>

  [astaroth:~/src/libxml]$ ./xmllint --debug c:\\test.xml
  DOCUMENT
  version=1.0
  URL=file:///c%3A/test.xml
  standalone=true
    ELEMENT doc

That URL might be acceptable on Windows, but I think it better to exclude
the slashificating code per #ifdef on Unix. With that done, I get this:

  [astaroth:~/src/libxml]$ ./xmllint --debug c:\\test.xml
  DOCUMENT
  version=1.0
  URL=c%3A%5Ctest.xml
  standalone=true
    ELEMENT doc

Better, isn't it? Okay, the URL is ugly, but so is the file name :-)

Ciao,
Igor



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