[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: fn:document-uri in Saxon and XMLSpy

Subject: Re: fn:document-uri in Saxon and XMLSpy
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 6 Jan 2006 16:43:59 GMT
saxon in xml spy
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.