/
lc_create_topic.dita
43 lines (43 loc) · 1.87 KB
/
lc_create_topic.dita
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is part of the DITA Training project hosted on
github.com. See the accompanying LICENSE file for
applicable licenses.-->
<!DOCTYPE learningContent PUBLIC "-//OASIS//DTD DITA Learning Content//EN" "learningContent.dtd">
<learningContent id="content_psc_gxq_bs">
<title>Creating a topic in a text editor</title>
<prolog>
<author href="http://www.scriptorium.com" scope="external" format="html">Sarah O’Keefe, Scriptorium</author>
<critdates>
<created date="2015-05-18"/>
</critdates>
</prolog>
<learningContentbody>
<lcInstruction>
<p>DITA files are XML, and XML is plain text. Therefore, you can create an XML file in
any text editor.</p>
<p>A basic DITA topic needs an XML declaration, a DOCTYPE declaration, a topic, an id attribute on the topic, and a title. That’s it.</p>
<p>Here is a minimal valid topic:</p>
<pre><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="myfirsttopic">
<title>Hello world</title>
</topic>
</pre>
<p>This topic is valid, but it is not particularly useful because it doesn’t have any
body content. To make a topic useful, you need something more like this:</p>
<pre><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="myfirsttopic">
<title>Hello world</title>
<body>
<p>Here is a paragraph</p>
<ul>
<li>bulleted lists are nice</li>
<li>especially if you have at least two items</li>
</ul>
<note>And don't forget the notes.</note>
</body>
</topic></pre>
</lcInstruction>
</learningContentbody>
</learningContent>