Page 1 of 1

framework catalog not found by all tolls

Posted: Thu Feb 11, 2016 10:39 pm
by steve.cuzner
I've got a catalog.xml file that I add to my framework in the Options->preferences, Document Type Association, edit framework, select catalog tab, add entry. The framework uses an rng for the schema. When I open my document in text view, there is no error indicator on my xinclude which has a href that the catalog resolves using rewriteURI. If I validate the xml file I get this error:

Code: Select all

W [ISO Schematron] Include operation failed, reverting to fallback. Resource error reading file as XML (href='http://mathworks.com/doc/product_names/tm_matlab'). Reason: 404 Not Found for: http://www.mathworks.com/doc/product_names/tm_matlab
If I do a well-formed validation, I get:

Code: Select all

W [Xerces] Include operation failed, reverting to fallback. Resource error reading file as XML (href='http://mathworks.com/doc/product_names/tm_matlab'). Reason: 404 Not Found for: http://www.mathworks.com/doc/product_names/tm_matlab
Note if I intentionally make my catalog resolve to a bad path, I get error indicators on my xinclude element and I get the additional error:

Code: Select all

W [Jing] Include operation failed, reverting to fallback. Resource error reading file as XML (href='http://mathworks.com/doc/product_names/tm_matlab'). Reason: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\prod_names\foo\tm_matlab (The system cannot find the file specified)
(where xxx is redacted information)

It appears that setting the catalog in the framework applies to the Jing rng validation, but other validation tools aren't reading the catalog. What can I do to make the catalog universally available to all validations engines and other systems (xspec, xslt scenarios, etc.)?

Steve

Re: framework catalog not found by all tolls

Posted: Fri Feb 12, 2016 9:24 am
by Radu
Hi Steve,

Besides the rewriteURI mappings, could you also try to add in your catalog add rewriteSystem mappings with the same values? The Xerces parser usually looks only at rewriteSystem mappings...
If this does not work, could you possibly create a small test project with a catalog, two XML files and attach that to an email?

Regards,
Radu

Re: framework catalog not found by all tolls

Posted: Fri Feb 12, 2016 4:45 pm
by steve.cuzner
Radu,

Thanks, that was most of the issue. I also had URIs without a protocol. When I changed them to start with http:/ they worked.