Framework configuration for doctype SYSTEM identifier

Post here questions and problems related to oXygen frameworks/document types.
mboudreau
Posts: 68
Joined: Sat Jan 07, 2017 1:23 am

Framework configuration for doctype SYSTEM identifier

Post 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?
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Framework configuration for doctype SYSTEM identifier

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mboudreau
Posts: 68
Joined: Sat Jan 07, 2017 1:23 am

Re: Framework configuration for doctype SYSTEM identifier

Post by mboudreau »

Thanks, Radu! That worked.
Post Reply