Adding or Editing a Document Type Association (Framework)

To add or edit a Document Type Association, open the Preferences dialog box (Options > Preferences) and go to Document Type Association. From this Document Type Association preferences page you can use the New, Edit, Duplicate, or Extend buttons to open a Document Type configuration dialog box that allows you to customize a new or existing document type (framework).

Figure: Document Type Configuration Dialog Box

You can specify the following properties for a document type:

  • Name - The name of the document type.
  • Priority - When multiple document types match the same document, the priority determines the order in which they are applied. It can be one of the following: Lowest, Low, Normal, High, Highest. The predefined document types that are already configured when the application is installed on the computer have the default Low priority.
    Note: Frameworks that have the same priority are sorted alphabetically.
  • Description - The document type description displayed as a tool tip in the Document Type Association preferences page.
  • Storage - The location where the document type is saved. If you select the External storage option, the document type is saved in the specified file with a mandatory framework extension, located in a subdirectory of the current frameworks directory. If you select the Internal storage option, the document type data is saved in the current .xpr Oxygen XML Editor project file (for Project-level Document Type Association options) or in the Oxygen XML Editor internal options (for Global-level Document Type Association Options). You can change the Document Type Association options level in the Document Type Association preferences page.
  • Initial edit mode - Allows you to select the initial editing mode for this document type: Editor specific, Text, Author, Grid and Design (available only for the W3C XML Schema editor). If the Editor specific option is selected, the initial editing mode is determined based upon the editor type. You can find the mapping between editors and edit modes in the Edit modes preferences page. You can impose an initial mode for opening files that match the association rules of the document type. For example, if the files are usually edited in the Author mode you can set it in the Initial edit mode combo box.
Note: You can also customize the initial mode for a document type in the Edit modes preferences page. Open the Preferences dialog box (Options > Preferences) and go to Editor > Edit modes.

You can specify the Association rules used for determining a document type for an opened XML document. A rule can define one or more conditions. All conditions need to be fulfilled for a specific rule to be chosen. Conditions can specify:

  • Namespace - The namespace of the document that matches the document type.
  • Root local name of document - The local name of the document that matches the document type.
  • File name - The file name (including the extension) of the document that matches the document type.
  • Public ID (for DTDs) - The PUBLIC identifier of the document that matches the document type.
  • Attribute - This field allows you to associate a document type depending on a certain value of the attribute in the root.
  • Java class - Name of the Java class that is called to determine if the document type should be used for an XML document. Java class must either implement the ro.sync.ecss.extensions.api.DocumentTypeCustomRuleMatcher interface or extend the ro.sync.ecss.extensions.api.DocumentTypeAdvancedCustomRuleMatcher abstract class from the Author API.

In the Schema tab, you can specify the type and URI of schema used for validation and content completion of all documents from the document type, when there is no schema detected in the document.

You can choose one of the following schema types:

  • DTD
  • Relax NG schema (XML syntax)
  • Relax NG schema (XML syntax) + Schematron
  • Relax NG schema (compact syntax)
  • XML Schema
  • XML Schema + Schematron rules
  • NVDL schema