[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Opening a document on a server
> Could you share how you solved it, because last time I tried I couldn't > get the Java URL mechanism to connect to a remote file by means of a > UNC filename, and the question does come up quite often. > > Michael Kay > http://www.saxonica.com/ Hi, Mike (and other folks), Sure. As usual, whipping up a test case showed the problem. Given a file on a server, thus: //someServer/someDirectory/someFile.xml The following function call opens it: document('file:////someServer/someDirectory/someFile.xml') My problem arose because my path had spaces in it (which I didn't realize right off because I was being passed the server and first directory in a long path as a parameter), thus: //someServer/some Directory With Spaces/someFile.xml and I got it open thus: document('//someServer/some%20Directory%20With%20Spaces/someFile.xml') So now I need to use analyze-string to replace each space in that path with %20. I'm not sure to what extent the file qualifies as "remote". I was getting a file off a server on the local network, rather than reaching for a file from a web or FTP server or something similar. Those problems might not be amenable to the same simple solution. Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|