Adding an RNG domain

Posts: 14
Joined: Mon Oct 14, 2013 2:12 pm

Adding an RNG domain

Post by 4everJang » Wed May 16, 2018 1:53 am

I have created a new domain as RNG file and included it in my concept.rng shell, but I cannot seem to make oXygen use the RNG file for validation and element selection. I cannot use the new elements in a newly created concept. Do I have to convert the RNG to DTD before I can start using the new domain? And if that is the case, how do I convert the RNG shell? I tried using the conversion tool but that runs into a bunch of problems.

Quick pointers are appreciated. I am giving a workshop today on how to constrain and specialise DITA and showing the final result in a real topic would be nice. Not absolutely necessary but nice.

Posts: 7094
Joined: Fri Jul 09, 2004 5:18 pm

Re: Adding an RNG domain

Post by Radu » Wed May 16, 2018 7:35 am

Hi Jang,

If you use Oxygen's main menu "File->New" wizard, you can search in the new wizard dialog for "topic rng" and create a new DITA topic based on Relax NG. If you open the topic in the Text editing mode it uses before the root element an xml-model processing instructions to refer to the RNG schema:

Code: Select all

<?xml-model href="urn:oasis:names:tc:dita:rng:topic.rng" schematypens=""?>
so you can do something similar to have a custom XML document refer to your RNG schema. Oxygen will start using it for validation, content completion and everything else.
Or you can create a new XML document and use the "Associate Schema" toolbar button to associate a RNG schema to it. It adds the same xml-model PI.

Radu Coravu
<oXygen/> XML Editor

Post Reply