Re: [xslt] Win2K,xsltproc ignores catalog



On Mon, Feb 17, 2003 at 12:57:45PM +0100, Wim de Vries wrote:
> >You may never escape the number of issues around the error of using a
> >filename for URI until you understand how it's supposed to work !
> >   c:\xsherlock0.1\catalog.xml + ./art500/art500.dtd
> >      = art500/art500.dtd
> OK. please let me know when I am wrong...
> If I understand the RFC 2396 correctly then '/' is an abstract 
> (parent/child) separator. So,
> xxxx:///c:\dir1\dir2/dir3/source has 4 parts:
> xxxx: =scheme
> /// =authority is empty
> c:\dir1\dir2 =first part of  URI path (in URI terms no more meaning then a 
> string "c:\dir1\dir2")
> dir3 =second part of URI path;
> source =final resource.

   right final path more precisely.

> If xxxx is file then the URI should be resolve to a file-path. In Windows 
> it should be resolve to
> c:\dir1\dir2\dir3\source

   hum, no guarantee that your / \ mix and match will actually work in
the C libraries, it may also depends on the C library used !

> Back to my example:
> XML_CATOLOG_FILES = file:///C:\XSherLock0.1/catalog.xml
> So, 5.1.3 RFC ("Base URI from retrieval URI") applies, and the URI to 
> 'retrieve' catalog.xml is the one supplied by XML_CATOLOG_FILES 
> :  file:///C:\XSherLock0.1/
> In order to find the dtd at the Win-file-system 
> c:\xsherlock0.1\art500\art500.dtd
> catlog.xml contains <public publicId="bla-bla" uri="./art500/art500.dtd"/>
> Like you said, this should result in
> file:///C:\XSherLock0.1/art500/art500.dtd

  Right

> Still, xsltproc cannot find the dtd. And if catalog.xml contains the 
> absolute uri <public publicId="bla-bla" 
> uri="file:///C:/XSherLock0.1/art500/art500.dtd"/>,  it does work!

  so it seems the spurious \ simply confuses your library for file 
accesses.

> It seems like the uri of XML_CATALOG_FILES is interpreted differently than 
> the uri of a XML-catalog.

  No my conclusion is that your C library handles
     C:/XSherLock0.1/art500/art500.dtd
and  C:\XSherLock0.1/art500/art500.dtd
differently, which might be perfectly sensible.

   On any Unix that would be immediately checked with an strace xsltproc
test. No idea how you debug this on your OS. Sorry I cannot help for Windows
environments, check with whoever provides the support for those.

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]