xsl-list
[Top] [All Lists]

Re: SAXON url and relative URLs

2003-12-04 09:44:25

  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
http://www.example.com/a/b
the server redirects that typically to
http://www.example.com/a/b/
then a relative link to foo.bar omits the (empty) string after the last
/
and makes an absolute uri of
http://www.example.com/a/b/foo.bar
without that redirect you'd get
http://www.example.com/a/foo.bar 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.

David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>