doc type association for root tag

Having trouble installing Oxygen? Got a bug to report? Post it all here.
4everJang
Posts: 22
Joined: Mon Oct 14, 2013 2:12 pm

doc type association for root tag

Post by 4everJang »

I know it should be possible to have <oXygen/> look at the root tag of an XML document to determine which DTD to use for validation but it does not work (yet). Is there a detailed description of what to include and what to remove from the association rules to make this work?

I am developing an app in eXist-db, which strips all doctype declarations from the XML, so whenever I open a DITA file, I have to add the doctype declaration to make the validation work. The root element is always <dita> as that is the only type of file I am storing in eXist-db.
mihaela
Posts: 489
Joined: Wed May 20, 2009 2:40 pm

Re: doc type association for root tag

Post by mihaela »

Hi,

Here are some steps to follow if you want to to add a default schema validation for your DITA documents with "dita" root element name and no schema declared in the document:
  • Create an extension from the DITA default document type - open the Preferences dialog box (Options > Preferences) and go to Document Type Association. Select "DITA" document type and press "Extend". A "Document Type" dialog will open, allowing you to edit your extension framework.
  • In the "Association Rules" tab from the "Document Type" dialog remove all the rules exept the one that specifies "dita" as root element name.
  • Remove the default validation scenario from the "Validation" tab .
  • In the Schema tab, you can specify a schema that Oxygen XML Editor uses if an XML document does not contain a schema declaration and no default validation scenario is associated with it. So, go to "Schema" tab and specify the DTD to be associated with your documents.
Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
4everJang
Posts: 22
Joined: Mon Oct 14, 2013 2:12 pm

Re: doc type association for root tag

Post by 4everJang »

Hello Mihaela,

I got swamped in other work, so I did not check back on the forum until now. I foillowed the steps you provided and this solved my issue.

Thanks.

4everJang
Post Reply