new URL(“file:” + catalogPath)
Appending text together seems to not be the best way to construct a URI.
On 3/13/16, 1:02 PM, "basex-talk-bounces@mailman.uni-konstanz.de on behalf of Kendall Shaw" <basex-talk-bounces@mailman.uni-konstanz.de on behalf of kendall.shaw@workday.com> wrote:
I remember trying to figure out if the catalog files are supposed to be URIs or file paths (in commons resolver), and I think it was Catalog.parseCatalogFile that had a problem. It tries essentially:
catalogPath = path.replace(‘\', ‘/‘)
new URL(baseURL, catalogPath)
and if that is a malformed URL, it tries:
new URL(“file:”, catalogPath)
So, with a canonical windows file path, the URL that it uses is:
file:c:/somewhere/some.file
And then later somewhere that URL is not resolved.
Kendall
On 3/13/16, 12:27 AM, "basex-talk-bounces@mailman.uni-konstanz.de on behalf of Eliot Kimber" <basex-talk-bounces@mailman.uni-konstanz.de on behalf of ekimber@contrext.com> wrote:
I was just trying that now (the trailing quote was my typo but was also a red herring).
Yes, the value must be a URL and I've verified that using file:/c:/... works.
I'm trying to put together a code patch that does this automatically when a normal filename is specified because this is pretty bad Simon Says behavior. It doesn't help that the Javadoc for the Apache CatalogManager isn't itself explicit that the catalog files property is in fact URLs, not OS-specific file paths.
Cheers,
E.
Eliot Kimber, Owner Contrext, LLC http://contrext.com
On 3/13/16, 5:19 PM, "Imsieke, Gerrit, le-tex" <basex-talk-bounces@mailman.uni-konstanz.de on behalf of gerrit.imsieke@le-tex.de> wrote:
Hi Eliot,
I didn¹t recently try it on Windows myself, but just two observations.
On 13.03.2016 01:13, Eliot Kimber wrote:
CATFILE = C:/workspace/DITA-OT2.x/catalog-dita.xml"
There is a trailing quote sign here, is this intentional? Don¹t know the effects of unbalanced quotes here.
In any case, it might be necessary to give the location as a file: URI, as in file:///C:/workspace/DITA-OT2.x/catalog-dita.xml Did you already try that?
Gerrit