RE: [xsl] Opening a document on a server

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

Hi, Mike (and other folks),


As usual, whipping up a test case showed the problem.

Given a file on a server, thus:


The following function call opens it:


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:


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