Page 1 of 1

Framework configuration for doctype SYSTEM identifier

Posted: Fri Jul 29, 2022 12:09 am
by mboudreau
Hi,

I'm setting up a framework to view ONIX files, which one of our vendors requires with a doctype declaration that has a system ID instead of a public ID:

Code: Select all

<!DOCTYPE ONIXMessage SYSTEM "http://www.editeur.org/onix/2.1/reference/onix-international.dtd">
For all my previous frameworks, I've been able to create an association rule based on the DTD's public ID. In this case, I created an association rule like this:
  • Namespace: *
  • Root local name: ONIXMessage
  • File name: *
  • Public ID: *
  • Attribute:
    • Local name: *
    • Namespace: *
    • Value: *
  • Java class:
However, when I open a file that has a root element "ONIXMessage", I get the error "HttpExceptionWithDetails-404 Not Found for: https://www.editeur.org/onix/2.1/reference/onix-international.dtd".

Is there a way to tell Oxygen to ignore the doctype system ID for files with this root element? Or should I be trying something different?

Re: Framework configuration for doctype SYSTEM identifier

Posted: Fri Jul 29, 2022 8:09 am
by Radu
Hi,

If in the Oxygen Preferences->"Document type association" page you edit your framework configuration, it has an "XML catalogs" tab.
https://www.oxygenxml.com/doc/versions/ ... alogs.html
In your framework's folder you can create for example an XML catalog like this:

Code: Select all

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <system systemId="https://www.editeur.org/onix/2.1/reference/onix-international.dtd" uri="onix-international.dtd"/>
</catalog>
and place next to it the file "onix-international.dtd" containing a local copy of the DTD.
Then in the framework's XML catalogs tab refer to this framework specific XML catalog.
After this, Oxygen should pass the reference to the remote DTD through the XML catalog support, find the local DTD and use it for validation.

Regards,
Radu

Re: Framework configuration for doctype SYSTEM identifier

Posted: Fri Jul 29, 2022 5:24 pm
by mboudreau
Thanks, Radu! That worked.