While using the resolver, I came across this following observation
which I wanted to clarify with you.
For the following Catalog file (public_cat.xml)
resolver resolves uri "http://www.example.relative.com/existing/namespace"
to "<URI to absolute parent dir of
public_cat.xml>/xsdcollection/existingxsd.xsd" which is as
expected. So, the result on Unix is "file:/home/gb133050/temp/xsdcollection/existingxsd.xsd"
where public_cat.xml exists @ "file:/home/gb133050/temp/public_cat.xml".
Note the hierarchical path to "existingxsd.xsd" in the result.
Issue arises when I run the same thing on Windows platform. The result
on windows is "file:D:/workdloads/xsdcollection/existingxsd.xsd"
where public_cat.xml exists @ "file:D:/workdloads/public_cat.xml".
Note the missing "/" @ the starting of the result string
Though for human eyes this is very much valid, JAVA treats this path as
relative path (an opaque URI). So, if I construct a new File object (File
= new File(new URI(result));) I will get the following
Exception in thread "main"
java.lang.IllegalArgumentException: URI is not hierarchical
This exception occurs because of the missing "/" @ the
So, I observe a difference in behavior between Windows and Unix. Is
this observation intended behavior or is it a bug?
Any light on this would be really helpful.
Please reply to me directly.