Subject: Re: [xsl] fn:document-uri in Saxon and XMLSpy From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 6 Jan 2006 16:43:59 GMT |
> 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 ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] fn:document-uri in Saxon , Michael Kay | Thread | Re: [xsl] fn:document-uri in Saxon , David Carlisle |
RE: [xsl] fn:document-uri in Saxon , Michael Kay | Date | Re: [xsl] fn:document-uri in Saxon , David Carlisle |
Month |