1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="mal_block_list">
5
<revision version="0.1" date="2009-05-22" 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 basic bulleted or numbered list.</desc>
18
<title>Basic Lists</title>
20
<synopsis><code mime="application/relax-ng-compact-syntax">
21
mal_block_list = element list {
22
attribute type { xsd:NMTOKEN } ?,
23
attribute style { xsd:NMTOKENS } ?,
24
attribute * - (mal:* | local:*) { text } *,
26
<link xref="mal_block_title">mal_block_title</link> ?,
29
attribute style { xsd:NMTOKENS } ?,
30
attribute * - (mal:* | local:*) { text } *,
32
<link xref="mal_block">mal_block</link> +
37
<p>Use the <code>list</code> element to create a basic bulleted or numbered
38
list. By default, lists are unordered, and list items are marked with a
39
bullet or other glyph. You can select various numbering systems using the
40
<code>type</code> attribute. If you need a numbered list to enumerate steps
41
the reader should perform, use the <code xref="mal_block_steps">steps</code>
49
<item><p>The <code>list</code> element can contain an optional
50
<code xref="mal_block_title">title</code> element followed by one or more
51
<code>item</code> elements. Each child <code>item</code> element can
52
contain a mixture of text and any
53
<link xref="mal_inline">general inline elements</link>.</p></item>
55
<item><p>The <code>list</code> element can occur in any
56
general block context, including inside
57
<link xref="mal_page">pages</link>, <link xref="mal_section">sections</link>,
58
and certain <link xref="mal_block">block elements</link>.</p></item>
60
<item><p>The <code>type</code> attribute allows you to select the list type,
61
which affects the markers used for each list item. Allowed values are those
62
from the <link href="http://www.w3.org/TR/css3-lists/">CSS
63
<code>list-style-type</code> property</link>. Additionally, the value of
64
<code>"numbered"</code> can be used to select a numbered list type appropriate
65
for the page's language.</p></item>
67
<item><p>If no <code>type</code> attribute is present, it is assumed to be a
68
<link href="http://www.w3.org/TR/css3-lists/#glyphs">glyph type</link> such
69
as <code>"disc"</code> or <code>"circle"</code>. That is, lists default to
70
bulleted lists.</p></item>
72
<item><p>The <code>style</code> attribute takes a space-separated list of
73
style hints. Processing tools should adjust their behavior according to
74
those style hints they understand.</p></item>
76
<item><p>The <code>list</code> element can have attributes from external
77
namespaces. See <link xref="mal_external"/> for more information
78
on external-namespace attributes.</p></item>
84
<!-- BEGIN examples -->
85
<section id="examples">
86
<title>Ejemplos</title>
88
<p>Create a basic unordered list:</p>
93
<item><p><code>GTK_MESSAGE_INFO</code></p></item>
94
<item><p><code>GTK_MESSAGE_WARNING</code></p></item>
95
<item><p><code>GTK_MESSAGE_QUESTION</code></p></item>
96
<item><p><code>GTK_MESSAGE_ERROR</code></p></item>
97
<item><p><code>GTK_MESSAGE_OTHER</code></p></item>
101
<item><p><code>GTK_MESSAGE_INFO</code></p></item>
102
<item><p><code>GTK_MESSAGE_WARNING</code></p></item>
103
<item><p><code>GTK_MESSAGE_QUESTION</code></p></item>
104
<item><p><code>GTK_MESSAGE_ERROR</code></p></item>
105
<item><p><code>GTK_MESSAGE_OTHER</code></p></item>
109
<p>Create an unordered list with a title:</p>
114
<title>Message Types</title>
115
<item><p><code>GTK_MESSAGE_INFO</code></p></item>
116
<item><p><code>GTK_MESSAGE_WARNING</code></p></item>
117
<item><p><code>GTK_MESSAGE_QUESTION</code></p></item>
118
<item><p><code>GTK_MESSAGE_ERROR</code></p></item>
119
<item><p><code>GTK_MESSAGE_OTHER</code></p></item>
123
<title>Message Types</title>
124
<item><p><code>GTK_MESSAGE_INFO</code></p></item>
125
<item><p><code>GTK_MESSAGE_WARNING</code></p></item>
126
<item><p><code>GTK_MESSAGE_QUESTION</code></p></item>
127
<item><p><code>GTK_MESSAGE_ERROR</code></p></item>
128
<item><p><code>GTK_MESSAGE_OTHER</code></p></item>
132
<p>Create a simple numbered list:</p>
136
<list type="numbered">
137
<item><p>First</p></item>
138
<item><p>Second</p></item>
139
<item><p>Third</p></item>
142
<list type="numbered">
143
<item><p>Primero</p></item>
144
<item><p>Segundo</p></item>
145
<item><p>Third</p></item>
149
<p>Create a numbered list with Roman numerals:</p>
153
<list type="upper-roman">
154
<item><p>First</p></item>
155
<item><p>Second</p></item>
156
<item><p>Third</p></item>
159
<list type="upper-roman">
160
<item><p>Primero</p></item>
161
<item><p>Segundo</p></item>
162
<item><p>Third</p></item>
166
<!-- END examples -->
169
<!-- BEGIN processing -->
170
<section id="processing">
171
<title>Processing Expectations</title>
173
<p>Lists are displayed as block elements, with each child <code>item</code>
174
displayed as a list item. When present, the title should be displayed in a
175
way that makes it clear that it is the title of the list. List items are
176
interpreted in the same way as <code>li</code> elements in HTML, except that
177
the <code>item</code> element only allows block-level child content.</p>
179
<p>Item markers are taken from the <code>type</code> attribute, which is
180
either a valid value of the <link href="http://www.w3.org/TR/css3-lists/">CSS
181
<code>list-style-type</code> property</link>, or the special value
182
<code>"numbered"</code>. When the <code>"numbered"</code> type is used, a
183
numeric marker type is chosen that is appropriate for the language of the
184
page. The default numeric marker type per language may vary between
187
<!-- END processing -->
190
<!-- BEGIN comparison -->
191
<section id="comparison">
192
<title>Comparison to Other Formats</title>
194
<p>The <code>list</code> element combines the functionality of the
195
<code href="http://www.docbook.org/tdg/en/html/itemizedlist.html">itemizedlist</code>
196
and <code href="http://www.docbook.org/tdg/en/html/orderedlist.html">orderedlist</code>
197
elements in DocBook. DocBook allows leading block-level content in its list
198
elements. This is not allowed in Mallard, though an optional <code>title</code>
199
element is allowed. DocBook allows you to override the bullet or numbering
200
type on each list item. Mallard does not allow this.</p>
202
<!-- END comparison -->