[xml] URI build



Hello,

I use libxml2 2.9.4 on Windows 10, compiled with VC2013.
I have the following call stack here.

xmlSaveUri(_xmlURI * uri)
xmlCanonicPath(const unsigned char * path)
xmlNewInputFromFile(_xmlParserCtxt * ctxt, const char * filename)
xmlDefaultExternalEntityLoader(const char * URL, const char * ID, _xmlParserCtxt * ctxt)
xmlLoadExternalEntity(const char * URL, const char * ID, _xmlParserCtxt * ctxt)
xmlCreateURLParserCtxt(const char * filename, int options)
xmlReadFile(const char * filename, const char * encoding, int options)

Suppose SaveUri() is called with uri->path "/c:/dir1/dir2/file.xml" and uri->scheme file.
In version 2.9.0 the URI was build as "file:///c:/dir1/dir2/file.xml". Now I use version 2.9.4 an URI is build as"file:/c:/dir1/dir2/file.xml".
In xmlIO.c however, many functions only test on file:///. For this reason, the file is not saved when I call xmlSaveFormatFileEnc() and set xmlDoc URL as the filename parameter.
If the URI incorrectly formed in xmlSaveURI()? Or must test all functions in xmlIO for file:/ ?
 
Regards,
 
Kai


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