Import error: Attribute must be declared for element type

This error occurs when one of the files has an attribute for an element that is not allowed in your configuration.

Description

You receive a message in the Import Errors dialog similar to this:

Unable to import dita file: Unable to import file in the generic type. [Attribute "attributeName" must be declared for element type "elementName".] file : .../.../filename.dita

Solution

There are two options to resolve the issue:

  • Edit the document type definition (DTD) for the document type so that the attribute "attributeName" is allowed for "elementName" elements. The DTD for the document type is in one of the folders in Repository/system/plugins.
  • Edit the file that you are trying to import so that it no longer has the attribute.