Basic topic components
The generic topic structure is used for untyped topics.
Body
The body contains the main content of a topic.
Syntax
The syntax for representing this component varies depending on the authoring format:
Authoring format | Syntax and example |
---|---|
XDITA |
|
HDITA |
|
MDITA |
There is no specific support in the MDITA core profile. If needed, use an HDITA snippet. |
Attributes
The available attributes vary based on the authoring format:
- XDITA and HDITA
- The following attributes are available on this element: localization attributes and universal attributes.
- MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
Examples
This section is non-normative.
The following example demonstrates the use of body in an XDITA topic.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="franchise-intro">
<title>An innovative, attractive, and out of the ordinary concept</title>
<body>
<p>Are you interested in investing with us? Welcome to our franchise information package.</p>
</body>
</topic>
The following example demonstrates the use of body in an HDITA topic.
<!DOCTYPE html>
<title>An innovative, attractive, and out of the ordinary concept</title>
<body>
<article id="franchise-intro">
<h1>An innovative, attractive, and out of the ordinary concept</h1>
<p>Are you interested in investing with us? Welcome to our franchise information package.</p>
</article>
</body>
The following example demonstrates the equivalent of the body component in an MDITA topic.
# An innovative, attractive, and out of the ordinary concept
Are you interested in investing with us? Welcome to our franchise information package.
Short description
A short description is a sentence or group of sentences that describes the purpose or main point of the topic.
Syntax
- XDITA
<shortdesc>
- HDITA
- First element in article, if it is a paragraph, after title
- MDITA (core and extended profiles)
- First block, if it is a paragraph, after title
Usage information
When present in topics, the short description is the first paragraph of the topic. It can also be used for hover text, link previews, search results, and more.
Rendering expectations
Processors SHOULD render the content of the
<shortdesc>
element as the initial
paragraph of the topic.
Attributes
The available attributes vary based on the authoring format:
- XDITA and HDITA
- The following attributes are available on this element: ID
attributes, localization attributes, universal
attributes, and
@props
. - MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
Examples
This section is non-normative.
The following example demonstrates the use of a short description in an XDITA topic.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="install-and-setup">
<title>Installing and Setting up Remote Lighting</title>
<shortdesc>Installation of your lighting kit includes installing the light bulbs into
light fixtures, preparing the remote control, and programming lighting groups.
</shortdesc>
</topic>
The following example demonstrates the use of a short description in an HDITA topic.
<!DOCTYPE html>
<html>
<head>
<title>Installing and Setting up Remote Lighting</title>
</head>
<body>
<article id="install-and-setup">
<h1>Installing and Setting up Remote Lighting</h1>
<p>Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.</p>
</article>
</body>
</html>
The following example demonstrates the use of a short description in an MDITA topic.
# Installing and Setting up Remote Lighting
Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.
Title
A title is a heading or label for an object. Titles can be associated with topics, maps, sections, examples, figures, tables, and other structures.
Syntax
- XDITA
<title>
in<topic>
,<section>
,<example>
,<fig>
, and<simpletable>
.- HDITA
-
<h1>
and<title>
for topic (The content for Title in an HDITA topic MUST map to both<title>
and<h1>
).<h2>
for section and example.<figcaption>
in<figure>
.<caption>
for table. Title also applied to audio and video in HDITA as attribute??? - MDITA (core and extended profiles)
#
or===
underline for topic;##
or-----
underline for section
Attributes
The available attributes vary based on the authoring format:
- XDITA and HDITA
- The following attributes are available on this element: localization attributes and universal attributes.
- MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
Examples
This section is non-normative.
The following example demonstrates the use of a title in an XDITA topic.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="install-and-setup">
<title>Installing and Setting up Remote Lighting</title>
<shortdesc>Installation of your lighting kit includes installing the light bulbs into
light fixtures, preparing the remote control, and programming lighting groups.
</shortdesc>
</topic>
The following example demonstrates the use of a title in an HDITA topic.
<!DOCTYPE html>
<html>
<head>
<title>Installing and Setting up Remote Lighting</title>
</head>
<body>
<article id="install-and-setup">
<h1>Installing and Setting up Remote Lighting</h1>
<p>Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.</p>
</article>
</body>
</html>
The following example demonstrates the use of a title in an MDITA topic using ATX headings.
# Installing and Setting up Remote Lighting
Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.
The following example demonstrates the use of a title in an MDITA topic using Setext headings.
Installing and Setting up Remote Lighting
=========================================
Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.
Topic
A topic is a standalone unit of information.
Syntax
- XDITA
<topic>
- HDITA
<article>
- MDITA (core and extended profiles)
There is no specific syntax for topic in MDITA
Attributes
The available attributes vary based on the authoring format:
- XDITA
- The following attributes are available on this element: architectural attributes, localization attributes, universal
attributes, and
@id
.For this element, the
@id
attribute is required. - HDITA
- The following attributes are available on this element: localization attributes, universal
attributes, and
@id
. - MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
Examples
This section is non-normative.
The following example demonstrates the use of a topic in XDITA.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="install-and-setup">
<title>Installing and Setting up Remote Lighting</title>
<shortdesc>Installation of your lighting kit includes installing the light bulbs into
light fixtures, preparing the remote control, and programming lighting groups.
</shortdesc>
</topic>
The following example demonstrates the use of a topic in HDITA.
<!DOCTYPE html>
<html>
<head>
<title>Installing and Setting up Remote Lighting</title>
</head>
<body>
<article id="install-and-setup">
<h1>Installing and Setting up Remote Lighting</h1>
<p>Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.</p>
</article>
</body>
</html>
The following example demonstrates the use of a topic in MDITA.
# Installing and Setting up Remote Lighting
Installation of your lighting kit includes installing the light bulbs into light fixtures, preparing the remote control, and programming lighting groups.