You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/07/15 16:26:34 UTC

DO NOT REPLY [Bug 2926] - constructor StreamSource(File f) sets incorrect system id for windows platform

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2926>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2926

constructor StreamSource(File f) sets incorrect system id for windows platform





------- Additional Comments From j_a_fernandez@yahoo.com  2002-07-15 14:26 -------
I am having problems on Linux related to this issue.

In the following code:
   File f = new File("/a/b/c.xsl");
   Source s = StreamSource(f);
   String id = s.getSystemId();

id == "file:////a/b/c.xsl" which is quite wrong. In particular because:
f.toURL().toExternaldForm() == "file:/a/b/c.xml"

Moreover, if I do:

  s.setSystemId(f.toURL().toExternalForm());

and build the Transformer with that, I can see in my URIResolver that:

  1) files included by the stylesheet are of the form "file:/a/b/d.xsl"
  2) files imported by the stylesheet are of the form "file:////a/b/d.xsl"

I need to do some analysis of the URLs in my URIResolver and this behaviour
is breaking the whole thing and the URIResolver cannot find anything.
In Windows at least the results seem to be consistent (as far as I can see).

Is there any workaround for this?