[gnome-doc-utils/mallard] Renaming the caption element to desc, which we already have as an info element
- From: Shaun McCance <shaunm src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-doc-utils/mallard] Renaming the caption element to desc, which we already have as an info element
- Date: Sun, 19 Apr 2009 12:56:26 -0400 (EDT)
commit 6ee9acd36f1cc056a82197638bfb7f265f05ec58
Author: Shaun McCance <shaunm gnome org>
Date: Sun Apr 19 11:55:58 2009 -0500
Renaming the caption element to desc, which we already have as an info element
---
doc/mallard/C/mal_block_caption.xml | 91 ----------------------------------
doc/mallard/C/mal_block_desc.xml | 82 ++++++++++++++++++++++++++++++
doc/mallard/C/mal_block_figure.xml | 4 +-
doc/mallard/C/mal_block_quote.xml | 4 +-
doc/mallard/C/mal_table.xml | 5 +-
xslt/mallard/html/mal2html-block.xsl | 12 ++--
6 files changed, 94 insertions(+), 104 deletions(-)
diff --git a/doc/mallard/C/mal_block_caption.xml b/doc/mallard/C/mal_block_caption.xml
deleted file mode 100644
index b1272c8..0000000
--- a/doc/mallard/C/mal_block_caption.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<page xmlns="http://www.gnome.org/~shaunm/mallard"
- type="topic"
- id="mal_block_caption">
-
-<info>
- <link type="guide" xref="mal_block#elements"/>
-
- <credit type="author">
- <name>Shaun McCance</name>
- <email>shaunm gnome org</email>
- </credit>
- <copyright>
- <year>2007</year>
- <name>Shaun McCance</name>
- </copyright>
-
- <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />
-
- <version number="0.1" date="2007-02-05" status="draft"/>
-</info>
-
-<title>Captions</title>
-
-<synopsis><code mime="application/relax-ng-compact-syntax">
-mal_block_caption = element caption {
- attribute style { xsd:NMTOKENS } ?,
- attribute * - (mal:* | local:*) { text } *,
-
- <link xref="mal_inline">mal_inline</link>
-}
-</code></synopsis>
-
-<p>The <code>caption</code> element marks a short text caption at the
-bottom of a <link xref="mal_block_figure">figure</link>. Captions provide
-a short textual description of the contents of the figure, often an
-image. Captions are simple block elements that can contain all
-general <link xref="mal_inline">inline content</link>.</p>
-
-<comment>
- <cite date="2007-02-02"><name>Shaun McCance</name></cite>
- <p>also appears in table</p>
-</comment>
-
-
-<!-- BEGIN examples -->
-<section id="examples">
- <title>Examples</title>
-
- <p>More exaples of figures can be found on the page <link xref="mal_figure"/>.</p>
-
- <code><![CDATA[
-<figure>
- <media type="image" mime="image/png" href="figures/mallard.png"/>
- <caption>Drake, the Mallard mascot</caption>
-</figure>
-]]></code>
- <figure>
- <media type="image" mime="image/png" href="figures/mallard.png"/>
- <caption>Drake, the Mallard mascot</caption>
- </figure>
-
- <comment>
- <cite date="2007-02-06"><name>Shaun McCance</name></cite>
- <p>Maybe add an example with a non-image figure? Should we even allow these?</p>
- </comment>
-</section>
-<!-- END examples -->
-
-
-<!-- BEGIN processing -->
-<section id="processing">
- <title>Processing Expectations</title>
-
- <p>The exact display of a caption will depend on how the enclosing figure is
- displayed. A caption is a block of text that should be displayed directly
- below the normal contents of the enclosing figure.</p>
-
- <p>Display tools should attempt to display the caption in a way that makes it
- clear that it belongs to the enclosing figure. For example, if a display tool
- draws a frame around the enclosing figure, it may choose to place the caption
- inside that frame. If the figure is indented from its enclosing block, the
- caption should also be at the same indentation level.</p>
-
- <p>Captions are typically displayed directly below the normal contents of the
- enclosing figure, with very little vertical space above them. If the enclosing
- figure contains content other than images, then display tools should be careful
- to ensure the caption is not confused with the normal figure content.</p>
-</section>
-<!-- END processing -->
-
-</page>
diff --git a/doc/mallard/C/mal_block_desc.xml b/doc/mallard/C/mal_block_desc.xml
new file mode 100644
index 0000000..0f9c1f1
--- /dev/null
+++ b/doc/mallard/C/mal_block_desc.xml
@@ -0,0 +1,82 @@
+<page xmlns="http://www.gnome.org/~shaunm/mallard"
+ type="topic"
+ id="mal_block_desc">
+
+<info>
+ <link type="guide" xref="mal_block#elements"/>
+
+ <version number="0.1" date="2009-04-19" status="incomplete"/>
+
+ <credit type="author">
+ <name>Shaun McCance</name>
+ <email>shaunm gnome org</email>
+ </credit>
+ <copyright>
+ <year>2007-2009</year>
+ <name>Shaun McCance</name>
+ </copyright>
+
+ <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />
+
+ <desc>FIXME</desc>
+</info>
+
+<title>Block Descriptions</title>
+
+<synopsis><code mime="application/relax-ng-compact-syntax">
+mal_block_desc = element desc {
+ attribute style { xsd:NMTOKENS } ?,
+ attribute * - (mal:* | local:*) { text } *,
+
+ <link xref="mal_inline">mal_inline</link>
+}
+</code></synopsis>
+
+<p>The <code>desc</code> element marks a short text description for
+formal block elements like <link xref="mal_block_figure">figure</link>.
+The description provided by <code>desc</code> is formatted as a caption
+for the formal element.</p>
+
+
+<!-- BEGIN examples -->
+<section id="examples">
+ <title>Examples</title>
+
+ <p>More exaples of figures can be found on the page <link xref="mal_figure"/>.</p>
+
+ <code><![CDATA[
+<figure>
+ <media type="image" mime="image/png" href="figures/mallard.png"/>
+ <desc>Drake, the Mallard mascot</desc>
+</figure>
+]]></code>
+ <figure>
+ <media type="image" mime="image/png" href="figures/mallard.png"/>
+ <desc>Drake, the Mallard mascot</desc>
+ </figure>
+
+ <comment>
+ <cite date="2007-02-06"><name>Shaun McCance</name></cite>
+ <p>Maybe add an example with a non-image figure? Should we even allow these?</p>
+ </comment>
+</section>
+<!-- END examples -->
+
+
+<!-- BEGIN processing -->
+<section id="processing">
+ <title>Processing Expectations</title>
+
+ <p>The exact display of a description will depend on how the enclosing formatl
+ element is displayed. A description is a block of text that should be displayed
+ directly above or below the normal contents of the enclosing element.</p>
+
+ <p>Display tools should attempt to display the description in a way that makes it
+ clear that it belongs to the enclosing formal element. For example, if a display
+ tool draws a frame around an enclosing figure, it may choose to place the description
+ inside that frame. If the formal element is indented from its enclosing block, the
+ description should also be at the same indentation level.</p>
+</section>
+<!-- END processing -->
+
+</page>
diff --git a/doc/mallard/C/mal_block_figure.xml b/doc/mallard/C/mal_block_figure.xml
index 57b2b2c..7478a62 100644
--- a/doc/mallard/C/mal_block_figure.xml
+++ b/doc/mallard/C/mal_block_figure.xml
@@ -15,8 +15,8 @@ mal_block_figure = element figure {
attribute * - (mal:* | local:*) { text } *,
<link xref="mal_title">mal_title</link> ?,
- <link xref="mal_block">mal_block</link> +,
- <link xref="mal_block_caption">mal_block_caption</link> ?
+ <link xref="mal_block_desc">mal_block_desc</link> ?,
+ <link xref="mal_block">mal_block</link> +
}
</code></synopsis>
diff --git a/doc/mallard/C/mal_block_quote.xml b/doc/mallard/C/mal_block_quote.xml
index c592acd..d3ddc2c 100644
--- a/doc/mallard/C/mal_block_quote.xml
+++ b/doc/mallard/C/mal_block_quote.xml
@@ -12,8 +12,8 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_block_quote = element quote {
<link xref="mal_title">mal_title</link> ?,
- <link xref="mal_block">mal_block</link> +,
- <link xref="mal_block_caption">mal_block_caption</link> ?
+ <link xref="mal_block_desc">mal_block_desc</link> ?,
+ <link xref="mal_block">mal_block</link> +
}
</code></synopsis>
diff --git a/doc/mallard/C/mal_table.xml b/doc/mallard/C/mal_table.xml
index d6e4920..0c106e5 100644
--- a/doc/mallard/C/mal_table.xml
+++ b/doc/mallard/C/mal_table.xml
@@ -26,6 +26,7 @@ mal_table = element table {
} ?,
<link xref="mal_title">mal_title</link> ?,
+ <link xref="mal_block_desc">mal_block_desc</link> ?,
( <link xref="mal_table_col">mal_table_col</link> + |
<link xref="mal_table_colgroup">mal_table_colgroup</link> +
@@ -36,9 +37,7 @@ mal_table = element table {
<link xref="mal_table_tbody">mal_table_tbody</link> +,
<link xref="mal_table_tfoot">mal_table_tfoot</link> ?
)
- ),
-
- <link xref="mal_block_caption">mal_block_caption</link> ?
+ )
}
mal_table_col = element col {}
mal_table_colgroup = element colgroup { mal_table_col * }
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index ee6ae91..8d1d205 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -105,7 +105,7 @@ div.figure-contents {
text-align: center;
}
div.figure div.title { margin: 0 0 4px 0; }
-div.figure div.caption { margin: 4px 0 0 0; }
+div.figure div.desc { margin: 4px 0 0 0; }
pre.screen {
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
@@ -181,9 +181,9 @@ FIXME
<!-- == Matched Templates == -->
-<!-- = caption = -->
-<xsl:template mode="mal2html.block.mode" match="mal:caption">
- <div class="caption">
+<!-- = desc = -->
+<xsl:template mode="mal2html.block.mode" match="mal:desc">
+ <div class="desc">
<xsl:apply-templates mode="mal2html.block.mode"/>
</div>
</xsl:template>
@@ -257,9 +257,9 @@ FIXME
<xsl:apply-templates mode="mal2html.block.mode" select="mal:title"/>
<div class="figure-contents">
<xsl:apply-templates mode="mal2html.block.mode"
- select="*[not(self::mal:title or self::mal:caption)]"/>
+ select="*[not(self::mal:title or self::mal:desc)]"/>
</div>
- <xsl:apply-templates mode="mal2html.block.mode" select="mal:caption"/>
+ <xsl:apply-templates mode="mal2html.block.mode" select="mal:desc"/>
</div>
</xsl:template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]