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

RE: Opening a document on a server

Subject: RE: Opening a document on a server
From: JBryant@xxxxxxxxx
Date: Wed, 15 Jun 2005 17:03:56 -0500
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)

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.