Why am I seeing a "The entity 'deg' was referenced, but not declared" error when generating output or importing localized content?

You need to declare the entity in your DTDs.

Symptom

The code ° is used in some authoring topics to indicate temperature. When trying to import localized content, an error appears saying "Unable to process bep1509091030552.xml. Error occurred: The entity "deg" was referenced, but not declared".

Problem

The entity is missing from your topic DTDs.

Solution

  1. In your topic DTDs, above the TOPIC ENTITY DECLARATIONS section, add the following:
    <!-- ============================================================= -->
    <!--                    CUSTOM ENTITY DECLARATIONS                 -->
    <!-- ============================================================= -->
    
    <!ENTITY deg "&#176;">
  2. Declare the entity in the doctype of the topic that references the entity. For example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE concept PUBLIC "-//YOURCOMPANY//DTD DITA Composite//EN" "YourCompany.dtd" [<!ENTITY deg '&#176;'>]>
    
    Note: If this entity will be used frequently, declare it in the doctype within the topic template so that it will be there for any newly created topics.