To add or edit a Document Type Association, open the
Preferences dialog box and go to . 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: The Document Type Configuration Dialog Box
You can specify the following properties for a document type:
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 in order 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