Re: [xslt] Win2K,xsltproc ignores catalog



On Mon, Feb 17, 2003 at 07:14:46PM +0100, Igor Zlatkovic wrote:
> On Mon, 17 Feb 2003, Igor Zlatkovic wrote:
> > Time to consult the wisdom of the debugger :-)
> 
> Well, the debugger has spoken.
> 
> The backbone of the problem is a Windows path, of course.
> 
> In order for the myriad of possible processings to succeed, it is important
> that xmlDoc.URL always contains the path in the URI notation on Windows.
> The moment it contains the native filesystem notation, things like
> xmlBuildURI will fail at some point.
> 
> In order to ensure this, the function xmlNormalizeWindowsPath is called in
> xmlCreateFileParserCtxt, and that covers most cases.
> 
> The function xmlParseCatalogFile does the job differently. It creates the
> input buffer based on the file name. The function
> xmlCreateInputBufferFilename will normalise Windows path internally, but
> that helps not. xmlParseCatalogFile will create the new input stream based
> on the unnormalised file name and that unnormalised thing ends up in
> xmlDoc.URL at the end. If now the catalog referred to by xmlDoc.URL contains
> relative URIs, libxml will not find these resources.
> 
> I believe that this should be fixed, because xmlParseCatalogFile is a
> function which can very well be directly called by some command-line utility
> and have the native path passed on from the command-line.
> 
> The patch to catalog.c which fixes this is below. Any thoughts?

  You know libxml2 code, you have read the specs, you have Windows and
a debugger, you fix it :-)
As long as it doesn't break the Unix way, feel free to hack !
Could you also check this http://bugzilla.gnome.org/show_bug.cgi?id=105994 ?

  Thanks :-)

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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