[gnome-doc-utils/mallard: 77/87] Adding content for output



commit 71d44d934a03ddcff9084e4a6f63557baf9c43b9
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Dec 15 19:09:56 2008 -0600

    Adding content for output
---
 doc/mallard/C/mal_inline_output.xml   |   69 ++++++++++++++++++++++++++++++++-
 xslt/mallard/html/mal2html-inline.xsl |    4 +-
 2 files changed, 69 insertions(+), 4 deletions(-)

diff --git a/doc/mallard/C/mal_inline_output.xml b/doc/mallard/C/mal_inline_output.xml
index 3b1374c..6c2e3d4 100644
--- a/doc/mallard/C/mal_inline_output.xml
+++ b/doc/mallard/C/mal_inline_output.xml
@@ -31,8 +31,17 @@ mal_inline_output = element output {
 }
 </code></synopsis>
 
-<comment><cite date="2008-12-12"><name>Shaun McCance</name></cite>
-<p>Add intro text</p></comment>
+<p>Use the <code>output</code> element to mark up text that is output
+by a computer program.  Typically, this is text output in a command-line
+environment, although you may use the <code>output</code> element for
+computer-generated text in a text box or similar control in a graphical
+application.  For messages and other labels in a graphical applicaiton,
+use the <code xref="mal_inline_gui">gui</code> element.</p>
+
+<p>You can use the <code>style</code> attribute to indicate what type of text
+is being marked up.  Inside a <code xref="mal_block_screen">screen</code>
+element, this may be used to format normal text, error text, and prompts
+differently.</p>
 
 
 <!-- BEGIN notes -->
@@ -73,6 +82,62 @@ mal_inline_output = element output {
 <!-- END notes -->
 
 
+<!-- BEGIN examples -->
+<section id="examples">
+  <title>Examples</title>
+
+  <p>Use <code>ouptut</code> to mark up text generated by a program:</p>
+
+  <example>
+    <code><![CDATA[
+The output of <cmd>echo $SHELL</cmd> is <output>/bin/bash</output>
+if you use the Bourne-again shell.
+]]></code>
+    <p>The output of <cmd>echo $SHELL</cmd> is <output>/bin/bash</output> if
+    you use the Bourne-again shell.</p>
+  </example>
+
+  <p>Use <code>output</code> and <code xref="mal_inline_input">input</code>
+  inside a <code xref="mal_block_screen">screen</code> element:</p>
+
+  <example>
+    <code><![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>
+
+  <p>Use <code>output</code> for error text:</p>
+
+  <example>
+    <code><![CDATA[
+<screen>
+<output style="prompt">$ </output><input>ls mal.xml</input>
+<output style="error">ls: mal.xml: No such file or directory</output>
+</screen>
+]]></code>
+<screen>
+<output style="prompt">$ </output><input>ls mal_inline_computeroutput.xml</input>
+<output style="error">ls: mal_inline_computerouput.xml: No such file or directory</output>
+</screen>
+  </example>
+</section>
+<!-- END examples -->
+
+
+<!-- BEGIN processing -->
+<section id="processing">
+  <title>Processing Expectations</title>
+  <comment><cite date="2008-12-15"><name>shaunm</name></cite><p>Add processing expectations</p></comment>
+</section>
+
+
 <!-- BEGIN docbook -->
 <section id="docbook">
   <title>Comparison to DocBook</title>
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index 4752aac..61beefc 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -107,9 +107,9 @@ span.em { font-style: italic; }
 span.email { color: red; }
 span.file { font-family: monospace; }
 span.gui { color: red; }
-span.input { color: red; }
+span.input { font-family: monospace; }
 span.key { /* FIXME */ }
-span.output { color: red; }
+span.output { font-family: monospace; }
 span.sys { font-family: monospace; }
 span.var { font-style: italic; }
 </xsl:text>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]