DITA Proposed Feature #12018

Create elements for text attributes with translatable text.

Longer description

The problem: There are several attributes in DITA that are meant to hold free text. There is no way to reuse the values inside these attributes, or to make use of common text inside the attributes. For example, the navtitle attribute on topicrefs often contains reusable text such as product names, but this common text must be entered in every attribute.

In addition, translation vendors have expressed reservations about including translatable text in attributes. Tools have to be programmed to recognize these attributes, and traditional values such as xml:lang and the translate attribute do not combine easily with attributes on the same element.

The solution: Add elements for each of the text attributes, and deprecate the use of the attributes.

Discussion:
Note: This requirement was partially completed in DITA 1.1, which included the <title> element in maps while deprecating the title attribute on <map>.

Statement of Requirement

Translatable content that appears in attributes should be expressible as element content, for the following reasons:
  • Ease of use for authoring - in many XML editors it is more difficult or time consuming to edit attributes than to insert content in an element.
  • Reuse of content - these attributes may contain reusable phrases, but it is not possible to use conref inside an attribute.
  • Difficulty of providing language or translation information - with an element, it becomes possible to specify xml:lang, as well as the dir and translate attributes, for the content.
  • Easier adoption by translation tools - tools will not need to be specially programed to recognize translatable attributes.

Use Cases

  1. An author creates a topichead element in the map. The topichead includes a phrase that is reused elsewhere with conref (such as a product name). If this phrase is in the navtitle attribute, the author must make a copy of the phrase in this location. With the navigation title in an element, any portion of the title may be reused.
  2. A translation tool wishes to support DITA. Default settings in many translation tools assume that attributes do not contain real content and should not be translated. If these translatable attributes are replaced with elements, the tools will be able to support DITA more easily.
  3. The title of a topichead element should not be translated. If the title can be specified in an element, the translate attribute can be used on that element without setting an undesired value for children of the topichead.

Scope

Medium. Design is relatively simple. Tools must be updated to be aware of the new elements. Tools may wish to warn users about deprecated attributes.

Technical Requirements

There will be changes to the DTDs, Schemas, and to processing. Changes to the DTD and Schemas will be relatively minor. Changes to processing will be more complicated.

The following attributes are candidates to be updated:

Previous versions of this proposal also suggested new version, release, and modification elements within <vrm> to replace the equivalent attribute values. However, the specification indicates that these attributes expect to take simple numbers (such as 3) rather than translatable text (such as Version 3). So, I have left that out of this proposal.

New or Changed Specification Language

Update the language specification to add the new elements and contexts.

Update the language specification to deprecate the old attributes.

Update the architectural specification page that lists translatable elements and attributes.

Costs

Small amount of time to update the DTDs, Schemas, and specifications.

Tools must be updated to recognize and work with the new elements.

Benefits