topic

The <topic> element is the top-level DITA element for a single-subject topic or article. Other top-level DITA elements that are more content-specific are <concept>, <task>, and <reference>.

To support applications that are namespace-aware, DITA DTDs and Schemas provide the following fixed namespaced declarations for topic, and for topic-level elements derived from topic:
ditaarch:DITAArchVersion="1.0" 
xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" 
In DTDs, the "ditaarch" prefix is parameterized to enable future specialization.

All DITA elements take the xmlns="" fixed attribute, which puts them into the null namespace by default. This attribute is applied via the %global-atts; group.

Contains

(title then (titlealts) (optional) then (shortdesc) (optional) then (prolog) (optional) then (body) (optional) then (related-links) (optional) then (topic or concept or task or reference) (any number) )

Contained by

dita, topic, concept, task, reference

Inheritance

topic/topic

Attributes

Name Description Data Type Default Value Required?
id An anchor point. This ID is the target for references by href and conref attributes, and for external applications that refer to DITA content. ID #IMPLIED No
conref This attribute is used to reference an ID on a topic that can be reused. For example, you could create a series of topics in a compound (dita) or nested context for authoring convenience and then reference each topic individually into a new target location. During output processing, a lookup process will pull the contents of the first topic into the calling topic markup that has the conref attribute.

The conref value follows the same conventions as HTML for normal file links. To refer to target content in a different file, put the full URL of that topic before the # character.

Target elsewhere in the same file: 
  conref="#topicid"
First topic in different file: 
  conref="filename.xml"
Specific topic in different file: 
  conref="filename.xml#topicid"
CDATA #IMPLIED No
%select-atts; (platform, product, audience, otherprops, importance, rev, status) A set of related attributes, described at %select-atts; parameter entity PE not applicable Not applicable
xml:lang Specifies the language of the element content. When no xml:lang value is supplied, the default value of English is assumed. For example, if there is a note element with the attribute xml:lang set to the value "es-es," then the label on the note, which is normally output as "Note" is now output in Spanish as "Nota." The allowed xml:lang values are based on ISO-3166 Country Codes and RFC 3066 Language Codes (see W3C: Language tagging in HTML and XML). NMTOKEN #IMPLIED No
DITAArchVersion Designates the version of the architecture that is in use. CDATA "1.0" (version dependent; will increase) Yes
domains Indicates the specialized domains that are included in the DTD. CDATA ui-d hi-d pr-d sw-d No
%global-atts; (xtrf, xtrc) A set of related attributes, described at %global-atts; parameter entity PE not applicable Not applicable
class, outputclass Common attributes described in Other common DITA attributes

Example

<topic id="topic">
 <title>Some little topic</title>
 <body>
  <p>Here's a <b><i>cute</i></b>,
  <b>little</b> topic.</p>
  <ul>
   <li>Some item</li>
   <li>Another item</li>
  </ul>
 </body>
</topic>

OASIS DITA Language Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.