-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmal_inline_input.page
More file actions
144 lines (114 loc) · 4.85 KB
/
mal_inline_input.page
File metadata and controls
144 lines (114 loc) · 4.85 KB
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
<page xmlns="http://projectmallard.org/1.0/"
type="topic" style="spec"
id="mal_inline_input">
<info>
<link type="guide" xref="mal_inline#elements"/>
<link type="seealso" xref="mal_inline_output"/>
<revision docversion="1.0" date="2011-11-15" status="final"/>
<credit type="author copyright">
<name>Shaun McCance</name>
<email>shaunm@gnome.org</email>
<years>2008-2011</years>
</credit>
<include href="../cc-by-sa-3-0.xml" xmlns="http://www.w3.org/2001/XInclude" />
<desc>Mark up text the user should input into a computer program.</desc>
</info>
<title>User Input</title>
<p>Use the <code>input</code> element to mark up text that is input by
the user. This may be text entered into a command-line environment
or into a text field in a graphical application.</p>
<!-- BEGIN notes -->
<section id="notes">
<title>Notes</title>
<list>
<item><p>The <code>input</code> element can contain a mixture of text and
any <link xref="mal_inline">general inline elements</link>.</p></item>
<item><p>The <code>input</code> element can occur in any
general inline context, including inside most
<link xref="mal_inline">inline elements</link>, some
<link xref="mal_block#basic">basic block elements</link>, and certain
<link xref="mal_info">informational elements</link>.</p></item>
<item><p>The <code>input</code> element can link to other pages or documents.
See <link xref="mal_attr_link"/> for more information.</p></item>
<item><p>The <code>style</code> attribute takes a space-separated list of
style hints. Processing tools should adjust their behavior according to
those style hints they understand.</p></item>
<item><p>The <code>input</code> element can have attributes from external
namespaces. See <link xref="mal_external"/> for more information
on external-namespace attributes.</p></item>
<item><p>The <code>input</code> element, together with the
<code xref="mal_inline_output">output</code> element, may be used to mark up
the contents of a <code xref="mal_block_screen">screen</code> element,
allowing processing tools to treat them differently.</p></item>
</list>
</section>
<!-- END notes -->
<!-- BEGIN examples -->
<section id="examples">
<title>Examples</title>
<p>Use <code>input</code> to mark up a user response to a prompt:</p>
<example>
<code mime="application/xml"><![CDATA[Type <input>Y</input> at the prompt to proceed.]]></code>
<p>Type <input>Y</input> at the prompt to proceed.</p>
</example>
<p>Use <code>input</code> and <code xref="mal_inline_output">output</code>
inside a <code xref="mal_block_screen">screen</code> element:</p>
<example>
<code mime="application/xml"><![CDATA[
<screen>
<output style="prompt">$ </output><input>ls mal_inline_output.xml</input>
<output>mal_inline_output.xml</output>
</screen>
]]></code>
<screen>
<output style="prompt">$ </output><input>ls mal_inline_output.xml</input>
<output>mal_inline_output.xml</output>
</screen>
</example>
</section>
<!-- END examples -->
<!-- BEGIN processing -->
<section id="processing">
<title>Processing Expectations</title>
<p>User input is displayed in a fixed-width or wide font. Fixed-width
fonts tend to have more distinction between visually similar characters.
A border or background color may be used to make the beginning and end of
the input clear.</p>
</section>
<!-- END processing -->
<!-- BEGIN comparison -->
<section id="comparison">
<title>Comparison to Other Formats</title>
<p>The <code>input</code> element is similar to the
<code href="http://www.docbook.org/tdg51/en/html/userinput.html">userinput</code>
element in <link xref="docbook">DocBook</link>.</p>
<p>The <code>input</code> element is similar to the
<code href="http://docs.oasis-open.org/dita/v1.2/cd03/spec/langref/userinput.html">userinput</code>
element in <link xref="dita">DITA</link>.</p>
</section>
<!-- END comparison -->
<!-- BEGIN schema -->
<section id="schema">
<title>Schema</title>
<p>The formal definition of the Mallard language is maintained in
<link href="http://www.relaxng.org/">RELAX NG</link>
<link href="http://www.relaxng.org/compact-20021121.html">Compact Syntax</link>
in code blocks within this specification. This is the formal definition
for the <code>input</code> element. The namespace declarations for this
definition are on the page <link xref="mal_page"/>.</p>
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_inline_input = element input {
mal_inline_input_attr,
mal_inline_input_inline
}
mal_inline_input_attr = (
<link xref="mal_attr_link">mal_attr_link</link> *,
attribute style { xsd:NMTOKENS } ?,
<link xref="mal_inline">mal_inline_attr</link>,
<link xref="mal_external">mal_attr_external</link> *
)
mal_inline_input_inline = <link xref="mal_inline">mal_inline</link>
</code></synopsis>
</section>
<!-- END schema -->
</page>