Page 1 of 1

Malformed URL for master catalog

Posted: Mon Dec 12, 2016 5:02 pm
by charlesh
Hi,

I'm using oXygen 17.1 for Eclipse, in Windows.

My root catalog has the following contents:

Code: Select all


<?xml version="1.0" ?> 

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">

<!-- DITA CMS 4.x Master catalog -->
<nextCatalog catalog="synch.dir/system/catalogs/master-catalog.xml"/>

</catalog>
I can see from the Console view that once the root catalog is loaded and parsed, the synch.dir value is transformed correctly, but something is not to it's liking as it reports malformed URL. Immediately afterwards though, it reports that the very same catalog has been loaded.

Malformed URL on system identifier: C:/Users/myusername/ditacms_workspace/REPOSITORY/myusername/dita-qa.acme.com/dita/system/catalogs/master-catalog.xml
Loading catalog: C:/Users/myusername/ditacms_workspace/REPOSITORY/myusername/dita-qa.acme.com/dita/system/catalogs/master-catalog.xml

The end result may not be a problem as such, but can you advise how, if possible, I can avoid the malformed URL message? Some other users in my organisation do use Macs by the way (in case your solution proposes a change to the path).

Thanks,

Charles

Re: Malformed URL for master catalog

Posted: Mon Dec 12, 2016 5:31 pm
by adrian
Hi,

synch.dir is expanded to "C:/Users/myusername/ditacms_workspace/REPOSITORY/myusername/dita-qa.acme.com/dita", which is an absolute file path.
However, you need to provide there (value of @catalog) either an absolute URL (file:/C:/Users/...), or a relative URL, not a file path.
A quick and dirty fix is to add the "file:/" prefix, but this may not always work, because the URL needs some characters to be escaped (e.g. space):

Code: Select all

   <nextCatalog catalog="file:/synch.dir/system/catalogs/master-catalog.xml"/>
The best solution would be to use a proper URL, but not sure where you could get a "synch.url".

Regards,
Adrian

Re: Malformed URL for master catalog

Posted: Wed Dec 14, 2016 11:56 am
by charlesh
Thanks Adrian. Your advice has helped avoid the malformed URL message.