-
Notifications
You must be signed in to change notification settings - Fork 39
/
lc_choicetable.dita
209 lines (209 loc) · 8.62 KB
/
lc_choicetable.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE learningContent PUBLIC "-//OASIS//DTD DITA Learning Content//EN" "learningContent.dtd">
<learningContent id="content_j2z_xnx_kt">
<title>A table of choices</title>
<prolog>
<author href="http://www.scriptorium.com" scope="external" format="html">Simon Bate,
Scriptorium</author>
<author href="http://www.scriptorium.com" scope="external" format="html">Gretyl Kinsey,
Scriptorium</author>
<critdates>
<created date="2015-09-21"/>
</critdates>
</prolog>
<learningContentbody>
<lcIntro>
<p>The choice table is a two-column table. In each row, the first column contains an
option (perhaps a keyword, a command line parameter, or an argument value). The
second column in the row contains a detailed description of the option. The detailed
description can include multiple paragraphs, lists, or even images. </p>
<p>The elements contained in the <choicetable> element include:</p>
<simpletable frame="all" relcolwidth="1.0* 1.0*" id="simpletable_rwy_l3n_2t">
<strow>
<stentry>
<p><chhead></p>
</stentry>
<stentry>
<p>The header row of a <choicetable> element. The <chhead> element
contains the <choptionhd> and <chdeschd> elements and is optional.
There can only be one <chhead> element in a <choicetable>
element.</p>
</stentry>
</strow>
<strow>
<stentry>
<p><choptionhd></p>
</stentry>
<stentry>
<p>Header text for the option column in a choice table. The text should be
wrapped in a <p> element according to best practice.</p>
</stentry>
</strow>
<strow>
<stentry>
<p><chdeschd></p>
</stentry>
<stentry>
<p>Header text for the description column in a choice table. The text
should be wrapped in a <p> element according to best practice.</p>
</stentry>
</strow>
<strow>
<stentry>
<p><chrow></p>
</stentry>
<stentry>
<p>A body row in a choice table. The <chrow> element contains the
<choption> and <chdesc> elements. There can be one or more
<chrow> elements in a <choicetable> element.</p>
</stentry>
</strow>
<strow>
<stentry>
<p><choption></p>
</stentry>
<stentry>
<p>Option text for a row in a choice table. The text should be wrapped in a
<p> element according to best practice.</p>
</stentry>
</strow>
<strow>
<stentry>
<p><chdesc></p>
</stentry>
<stentry>
<p>Description text for a row in a choice table. The text should be wrapped
in a <p> element according to best practice. There can be multiple
elements in the <chdesc> element.</p>
</stentry>
</strow>
</simpletable>
<p><xref href="https://youtu.be/nBua0_PDfFA" format="html" scope="external">Video:
Creating a choicetable in a DITA task</xref> shows how to use <xref
href="http://www.oxygenxml.com/" format="html" scope="external">oXygen XML
Editor</xref>'s choicetable wizard.</p>
</lcIntro>
</learningContentbody>
<task id="task_ers_h4x_kt">
<title/>
<taskbody>
<steps id="steps_etg_j4x_kt">
<step>
<cmd>Continue working in the file l_task_start.dita.</cmd>
</step>
<step>
<cmd>Following the <step> element containing the <choices> element, create
a new step with a <cmd> element and text as shown here:</cmd>
<stepxmp>
<pre><ph outputclass="newchanged"><step>
<cmd>Find some good optics</cmd>
</step>
</ph></pre>
</stepxmp>
<info/>
</step>
<step>
<cmd>After the <cmd> element, add a <choicetable> element and all its
child elements:</cmd>
<stepxmp>
<pre><step>
<cmd>Find some good optics</cmd>
<ph outputclass="newchanged"> <choicetable>
<chrow>
<choption></choption>
<chdesc></chdesc>
</chrow>
<chrow>
<choption></choption>
<chdesc></chdesc>
</chrow>
</choicetable></ph>
</step>
</pre>
</stepxmp>
<info>For each row in the <choicetable>, you need a <chrow> element. The
row contains two elements, which are both required: <choption> which
contains the option text and <chdesc> which contains the description
text. In standard usage, the <choption> contains just a few words
(usually one), while the description can contain multiple sentences, or even
paragraphs (<p> element). </info>
</step>
<stepsection>The <choicetable> has an optional head (<chhead>), which allows
you to label the two columns in the table.</stepsection>
<step>
<cmd>Before the first row of the choice table, add a <chhead> element and its
children, as shown here.</cmd>
<stepxmp>
<pre><step>
<cmd>Find some good optics</cmd>
<choicetable>
<ph outputclass="newchanged"> <chhead>
<choptionhd></choptionhd>
<chdeschd></chdeschd>
</chhead></ph>
<chrow>
<choption></choption>
<chdesc></chdesc>
</chrow>
...
</choicetable>
</step>
</pre>
</stepxmp>
<info>The <choptionhd> provides a heading for the option column; the
<chdeschd> provides a heading for the description column. </info>
</step>
<step>
<cmd>Add content to the <chhead> element and its child elements, as shown
here.</cmd>
<stepxmp>
<pre>...
<ph outputclass="newchanged"><chhead>
<choptionhd>
<p>Type</p>
</choptionhd>
<chdeschd>
<p>Advantages</p>
</chdeschd>
</chhead>
</ph>...</pre>
</stepxmp>
</step>
<step>
<cmd>Add content to the <chrow> element and its child elements, as shown
here.</cmd>
<stepxmp>
<pre>...
<ph outputclass="newchanged"><chrow>
<choption>
<p>Binoculars</p>
</choption>
<chdesc>
<p>Wide field of view, allows quick observations</p>
</chdesc>
</chrow>
</ph>...</pre>
</stepxmp>
</step>
<step>
<cmd>After the closing tag of the <chrow> element, add another <chrow>
element and add content to it as shown here.</cmd>
<stepxmp>
<pre><choicetable>
...
</chrow>
<ph outputclass="newchanged"><chrow>
<choption>
<p>Spotting scope</p>
</choption>
<chdesc>
<p>Higher magnification, better light-gathering</p>
</chdesc>
</chrow>
</ph></choicetable></pre>
</stepxmp>
</step>
</steps>
</taskbody>
</task>
</learningContent>