Malformed URL for master catalog

Questions about XML that are not covered by the other forums should go here.
charlesh
Posts: 7

Malformed URL for master catalog

Mon Dec 12, 2016 5:02 pm

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
adrian
Posts: 2391

Re: Malformed URL for master catalog

Mon Dec 12, 2016 5:31 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
charlesh
Posts: 7

Re: Malformed URL for master catalog

Wed Dec 14, 2016 11:56 am

Thanks Adrian. Your advice has helped avoid the malformed URL message.

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests