Who is doing it right and why?
saxon.
Wouldn't it be better for both processors to make both "/" and "\\" work?
document-uri() is defined to return a URI and the URI corresponding to a
windows file path like
c:\a\b\c.txt
is
file:///c:/a/b/c.txt
URI relative references and things like .. going up a level are _only_
defined for / separated URIs.
If a system treats
c:\a\b\c.txt
That as a URI then that is legal (athough it is using an unregisted URI
scheme of c: but if that is your base a relative URI of d.txt would
not reference
c:\a\b\d.txt
as URI relative references are defined in terms of stripping back to the
last / character and there are no / characters here.
Some browsers in the top level user-input box accept windows paths and
change them internally to URI but no programming APi should do that
automatically.
So xml spy is buggy in returning a "uri" using \ characters, but you
could work around teh bug by using
tokenize(document-uri(.), "[\\/]")
which will split on both \ or / but you should report the bug to xml
spy's maintainers.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--