Re: [xslt] Win2K,xsltproc ignores catalog



At Sunday 16/02/2003 16:36, you wrote:
>On Sat, Feb 15, 2003 at 11:26:27PM +0100, Wim de Vries wrote:
> > >   No, that actually mean to look for /art500.dtd on the .art500 host
> > >using the file protocol. The file scheme has no provision for relative
> > >paths. If you want to use a relative path then use "./art500/art500.dtd"
> > >but that path will be relative to the current base, i.e. the URL of
> > >the containing document or the xml:base if there is one in scope.
> > mmm...
> > catalog.xml (containing document) resides in c:\xsherlock0.1, but by using
> > uri="./art500/art500.dtd"
> > the art500.dtd is not found (c:/xsherlock0.1/art500/art500.dtd).
>
>   Normal, c:/xsherlock0.1/art500/art500.dtd  is a file name, good enough
>to read the content, but not good enough to build a full URL for relative
>path computations. Have you read RFC 2396 since I pointed you at it ?
>
>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.
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
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
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!
It seems like the uri of XML_CATALOG_FILES is interpreted differently than 
the uri of a XML-catalog.


>   file:///c:/xsherlock0.1/ctalog.xml + ./art500/art500.dtd
>      = file:///c:/xsherlock0.1/art500/art500.dtd
>
>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/
>_______________________________________________
>xslt mailing list, project page http://xmlsoft.org/XSLT/
>xslt@gnome.org
>http://mail.gnome.org/mailman/listinfo/xslt




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