What is the topic structure in the architecture?
Forum topic: Submitted by carolgeyer on Mon, 2007-09-17 18:45.
The topic structure has the following major parts:
The DTD declaration for topic has the following structure:
<!ELEMENT topic (title, titlealts?, shortdesc?, prolog?, body,
related-links?, (%info-types;)*)>
which reads, "topic contains a required title, optional titlealts, optional shortdesc, optional prolog, required body, optional related-links, and any number of allowed child topics of various info-types."
A typical DITA topic utilizing all these elements may look like this: <topic id="example1">
<title>Example topic</title>
<titlealts>
<searchtitle>Typical example DITA topic</searchtitle>
</titlealts>
<shortdesc>A typical DITA topic can be augmented by optional elements.</shortdesc>
<prolog>
<author>John Doe</author>
</prolog>
<body>
<p>The topic element must contain a title and body.</p>
</body>
<related-links>
<link href="required-elements.xml" scope="local">
<linktext>Required elements</linktext>
</link>
<link href="optional-elements.xml" scope="local">
<linktext>Optional elements</linktext>
</link>
</related-links>
<topic id="nest1">
<title>A nested topic</title>
<body>
<p>This topic is a very simple nested topic.</p>
</body>
</topic>
</topic>
- <topic> is the container for a single unit of typed information. Tightly-related topics may be nested for reuse as a single construct.
- <title> provides self-description, consistent with guidelines for authoring.
- <titlealts> provides optional title content optimized for search or for navigation.
- <shortdesc> provides an abtract-level description of the content of the topic. Shortdesc is optional at the topic level for generality when specializing. For User Assistance, the best practice is to use shortdesc as if it were a required first or only paragraph.
- <prolog> contains optional metadata, or information about the document or its content.
- <body> is the container for paragraph-level content and any number of non-nesting sections.
- <related-links> is an optional container for in-topic link relations. Links can also be maintained separately from topics by using a DITA map to express the linking relationships between topics.
- optional nested information types that you can use to develop internal hierarchy when necessary.
The DTD declaration for topic has the following structure:
<!ELEMENT topic (title, titlealts?, shortdesc?, prolog?, body,
related-links?, (%info-types;)*)>
which reads, "topic contains a required title, optional titlealts, optional shortdesc, optional prolog, required body, optional related-links, and any number of allowed child topics of various info-types."
A typical DITA topic utilizing all these elements may look like this: <topic id="example1">
<title>Example topic</title>
<titlealts>
<searchtitle>Typical example DITA topic</searchtitle>
</titlealts>
<shortdesc>A typical DITA topic can be augmented by optional elements.</shortdesc>
<prolog>
<author>John Doe</author>
</prolog>
<body>
<p>The topic element must contain a title and body.</p>
</body>
<related-links>
<link href="required-elements.xml" scope="local">
<linktext>Required elements</linktext>
</link>
<link href="optional-elements.xml" scope="local">
<linktext>Optional elements</linktext>
</link>
</related-links>
<topic id="nest1">
<title>A nested topic</title>
<body>
<p>This topic is a very simple nested topic.</p>
</body>
</topic>
</topic>