1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="mal_block_terms">
5
<revision version="0.1" date="2009-05-28" status="review"/>
8
<name>Shaun McCance</name>
9
<email>shaunm@gnome.org</email>
10
<years>2008-2009</years>
13
<include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>
15
<desc>Create a list of terms and associated descriptions.</desc>
18
<title>Definition Lists</title>
20
<synopsis><code mime="application/relax-ng-compact-syntax">
21
mal_block_terms = element terms {
22
attribute style { xsd:NMTOKENS } ?,
23
attribute * - (mal:* | local:*) { text } *,
25
<link xref="mal_block_title">mal_block_title</link> ?,
28
attribute style { xsd:NMTOKENS } ?,
29
attribute * - (mal:* | local:*) { text } *,
31
<link xref="mal_block_title">mal_block_title</link> +,
32
<link xref="mal_block">mal_block</link> +
37
<p>The <code>terms</code> element creates a list of terms and associated
38
definitions or descriptions. This type of list is often called a definition
39
list or a variable list.</p>
45
<item><p>The <code>terms</code> element can contain an optional
46
<code xref="mal_block_title">title</code> element followed by one or more
47
<code>item</code> elements. Each child <code>item</code> element can
48
contain one or more <code xref="mal_block_title">title</code> elements
49
followed by a mixture of text and any
50
<link xref="mal_inline">general inline elements</link>.</p></item>
52
<item><p>The <code>terms</code> element can occur in any
53
general block context, including inside
54
<link xref="mal_page">pages</link>, <link xref="mal_section">sections</link>,
55
and certain <link xref="mal_block">block elements</link>.</p></item>
57
<item><p>The <code>style</code> attribute takes a space-separated list of
58
style hints. Processing tools should adjust their behavior according to
59
those style hints they understand.</p></item>
61
<item><p>The <code>terms</code> element can have attributes from external
62
namespaces. See <link xref="mal_external"/> for more information
63
on external-namespace attributes.</p></item>
69
<!-- BEGIN examples -->
70
<section id="examples">
71
<title>Ejemplos</title>
73
<p>Create a simple definition list with a title:</p>
78
<title>Selected Basic Block Elements</title>
80
<title><code>code</code></title>
81
<p>Mark up a block of code or the contents of a file.</p>
84
<title><code>example</code></title>
85
<p>Mark up a group of block elements as being part of a single example.</p>
88
<title><code>screen</code></title>
89
<p>Mark up a textual user interface or an interactive shell session.</p>
93
<title>Selected Basic Block Elements</title>
95
<title><code>code</code></title>
96
<p>Mark up a block of code or the contents of a file.</p>
99
<title><code>ejemplo</code></title>
100
<p>Mark up a group of block elements as being part of a single example.</p>
103
<title><code>screen</code></title>
104
<p>Mark up a textual user interface or an interactive shell session.</p>
109
<p>Create a definition list with multiple terms per entry:</p>
115
<title><code>comment</code></title>
116
<title><code>quote</code></title>
117
<p>Formal elements which allow a <code>cite</code> element.</p>
120
<title><code>figure</code></title>
121
<title><code>listing</code></title>
122
<title><code>synopsis</code></title>
123
<p>Formal elements which allow a <code>desc</code> element.</p>
126
<title><code>note</code></title>
127
<p>Formal elements which only allow a <code>title</code> element.</p>
132
<title><code>comentario</code></title>
133
<title><code>comillas</code></title>
134
<p>Formal elements which allow a <code>cite</code> element.</p>
137
<title><code>figure</code></title>
138
<title><code>listing</code></title>
139
<title><code>synopsis</code></title>
140
<p>Formal elements which allow a <code>desc</code> element.</p>
143
<title><code>note</code></title>
144
<p>Formal elements which only allow a <code>title</code> element.</p>
149
<!-- END examples -->
152
<!-- BEGIN processing -->
153
<section id="processing">
154
<title>Processing Expectations</title>
156
<p>Definition lists are displayed as block elements, with each child
157
<code>item</code> displayed as some number of list items. When present, the
158
title should be displayed in a way that makes it clear that it is the title
159
of the list. Each <code>title</code> element of each list item is treated
160
as a term, and is displayed as a block element. The remaining block content
161
is then treated as the description and displayed as normal. The description
162
blocks should be indented from the terms.</p>
164
<!-- END processing -->
167
<!-- BEGIN comparison -->
168
<section id="comparison">
169
<title>Comparison to Other Formats</title>
171
<p>The <code>terms</code> element is similar to
172
<code href="http://www.docbook.org/tdg/en/html/variablelist.html">variablelist</code>
173
element in DocBook. Like DocBook (and unlike HTML), Mallard groups terms with their
174
corresponding entries. In DocBook, the entry must be wrapped with a
175
<code href="http://www.docbook.org/tdg/en/html/listitem.html">listitem</code>
177
<code href="http://www.docbook.org/tdg/en/html/varlistentry.html">varlistentry</code>
178
element. In Mallard, the entry is simply all of the block content except the
179
<code xref="mal_block_title">title</code> elements.</p>
181
<!-- END comparison -->