Re: [xsl] SAXON url and relative URLs

Subject: Re: [xsl] SAXON url and relative URLs
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 4 Dec 2003 16:44:25 GMT
  shouldn't ss2.xsl have baseURL data2\ss2.xsl ? It behaves as it is data2/ss2.xsl,
  or as if relative urls are not computed by removing the last component. The output
  is below.

well it depends.

In the case of a server it's clearer: the base uri is the base uri of
whatever gets sent back (after any redirects) not the base uri of what
you asked for.
this is why you can omit the trailing / of a directory.

You go
the server redirects that typically to
then a relative link to omits the (empty) string after the last
and makes an absolute uri of
without that redirect you'd get ie one level higher)
(Note it's not automatic that it works that way, it's easy to configure
apache so it doesn't. If it serves the directory directly without
redirecting, then all relative links need to take account of that)

When you are getting stuff from the file system, the mapping between file
paths and uris is more of a black art that depends on the system and
isn't necessarily user visible.

If you tried your experiment with saxon7 you could use the xpath 2
functions to ask explictly what URI the variuos nodes have.



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

 XSL-List info and archive:

Current Thread