diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2003-12-29 21:30:05 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2003-12-29 21:30:05 +0000 |
commit | 63d243eb6e7595575d4353c950d0b3a079680bb3 (patch) | |
tree | 2a4462ccd2f2f081bdb961f7f5e3b862da05fac3 | |
parent | 213a13e3eb8199ba6b1755952a3a407f041086c2 (diff) | |
download | yelp-63d243eb6e7595575d4353c950d0b3a079680bb3.tar.gz |
- Put classsynopsis in a gray box. - Monospace tt, since gtkhtml2 doesn't.
* stylesheets/db2html-html.xsl:
- Put classsynopsis in a gray box.
- Monospace tt, since gtkhtml2 doesn't.
* stylesheets/db2html-index.xsl:
- Remove indexterm, as it's already in -suppressed.xsl.
* stylesheets/db2html-synopsis.xsl:
- More work on classsynopsis and friends.
* stylesheets/db2html.xsl:
- Actually include -synopsis.xsl.
* test/testdoc1/testdoc1.xml:
- Put in a test for classsynopsis.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | stylesheets/ChangeLog | 15 | ||||
-rw-r--r-- | stylesheets/db2html-html.xsl | 3 | ||||
-rw-r--r-- | stylesheets/db2html-index.xsl | 4 | ||||
-rw-r--r-- | stylesheets/db2html-synopsis.xsl | 57 | ||||
-rw-r--r-- | stylesheets/db2html.xsl | 1 | ||||
-rw-r--r-- | test/testdoc1/testdoc1.xml | 76 |
7 files changed, 121 insertions, 40 deletions
@@ -1,3 +1,8 @@ +2003-12-29 Shaun McCance <shaunm@gnome.org> + + * test/testdoc1/testdoc1.xml: + - Put in a test for classsynopsis. + 2003-12-26 Shaun McCance <shaunm@gnome.org> * configure.in diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog index 8bf58730..2c211f7f 100644 --- a/stylesheets/ChangeLog +++ b/stylesheets/ChangeLog @@ -1,3 +1,18 @@ +2003-12-29 Shaun McCance <shaunm@gnome.org> + + * db2html-html.xsl: + - Put classsynopsis in a gray box. + - Monospace tt, since gtkhtml2 doesn't. + + * db2html-index.xsl: + - Remove indexterm, as it's already in -suppressed.xsl. + + * db2html-synopsis.xsl: + - More work on classsynopsis and friends. + + * db2html.xsl: + - Actually include -synopsis.xsl. + 2003-12-26 Shaun McCance <shaunm@gnome.org> * docbook/ diff --git a/stylesheets/db2html-html.xsl b/stylesheets/db2html-html.xsl index d5200385..69e5abe3 100644 --- a/stylesheets/db2html-html.xsl +++ b/stylesheets/db2html-html.xsl @@ -156,6 +156,7 @@ div[class="admonition"] { } div[class="admonition"] td[class="image"] { margin-right: 1.6em; } +div[class="classsynopsis"], div[class="programlisting"], div[class="screen"] { margin-top: 1.6em; @@ -169,6 +170,8 @@ div[class="screen"] { <xsl:value-of select="$color_gray_border"/><xsl:text>; } +tt { font-family: monospace; } + <!-- table { border: outset 1px; diff --git a/stylesheets/db2html-index.xsl b/stylesheets/db2html-index.xsl index f5d7c256..93e2bc09 100644 --- a/stylesheets/db2html-index.xsl +++ b/stylesheets/db2html-index.xsl @@ -11,10 +11,6 @@ <xsl:call-template name="FIXME"/> </xsl:template> -<xsl:template match="indexterm"> - <xsl:call-template name="FIXME"/> -</xsl:template> - <xsl:template match="primaryie"> <xsl:call-template name="FIXME"/> </xsl:template> diff --git a/stylesheets/db2html-synopsis.xsl b/stylesheets/db2html-synopsis.xsl index 620e021c..a1f030b8 100644 --- a/stylesheets/db2html-synopsis.xsl +++ b/stylesheets/db2html-synopsis.xsl @@ -102,7 +102,7 @@ <xsl:variable name="sepchar"> <xsl:choose> <xsl:when test="ancestor-or-self::*[@sepchar]"> - <xsl:value-of select="ancestor-or-self::[@sepchar][1]/@sepchar"/> + <xsl:value-of select="ancestor-or-self::*[@sepchar][1]/@sepchar"/> </xsl:when> <xsl:otherwise> <xsl:text> </xsl:text> @@ -393,47 +393,53 @@ <xsl:call-template name="FIXME"/> </xsl:when> <xsl:otherwise> - <xsl:apply-template mode="classsynopsis.java" select="ooclass[1]"/> + <xsl:for-each select="ooclass[1]/modifier"> + <xsl:apply-templates mode="classsynopsis.java" select="."/> + <xsl:text> </xsl:text> + </xsl:for-each> + <xsl:text>class </xsl:text> + <xsl:apply-templates mode="classsynopsis.java" select="ooclass[1]"/> <xsl:if test="ooclass[position() > 1]"> <xsl:text> extends</xsl:text> - <xsl:foreach match="ooclass[position() > 1]"> + <xsl:for-each select="ooclass[position() > 1]"> <xsl:text> </xsl:text> - <xsl:apply-template mode="classsynopis.java" select="."/> + <xsl:apply-templates mode="classsynopsis.java" select="."/> <xsl:if test="following-sibling::ooclass"> <xsl:text>,</xsl:text> </xsl:if> - </xsl:foreach> + </xsl:for-each> <xsl:if test="oointerface|ooexception"> <xsl:value-of select="concat($newline, $tab_java)"/> </xsl:if> </xsl:if> <xsl:if test="oointerface"> <xsl:text>implements</xsl:text> - <xsl:foreach match="oointerface"> + <xsl:for-each select="oointerface"> <xsl:text> </xsl:text> - <xsl:apply-template mode="classsynopis.java" select="."/> + <xsl:apply-templates mode="classsynopsis.java" select="."/> <xsl:if test="following-sibling::oointerface"> <xsl:text>,</xsl:text> </xsl:if> - </xsl:foreach> + </xsl:for-each> <xsl:if test="ooexception"> <xsl:value-of select="concat($newline, $tab_java)"/> </xsl:if> </xsl:if> - <xsl:if text="ooexception"> + <xsl:if test="ooexception"> <xsl:text>throws</xsl:text> - <xsl:foreach match="ooexception"> + <xsl:for-each select="ooexception"> <xsl:text> </xsl:text> - <xsl:apply-template mode="classsynopis.java" select="."/> + <xsl:apply-templates mode="classsynopsis.java" select="."/> <xsl:if test="following-sibling::ooexception"> <xsl:text>,</xsl:text> </xsl:if> - </xsl:foreach> + </xsl:for-each> </xsl:if> </xsl:otherwise> </xsl:choose> <xsl:value-of select="$newline"/> <xsl:text>{</xsl:text> + <xsl:value-of select="$newline"/> <xsl:apply-templates mode="classsynopsis.java" select=" constructorsynopsis | destructorsynopsis | fieldsynopsis | methodsynopsis | classsynopsis "/> @@ -442,7 +448,7 @@ </xsl:template> <xsl:template mode="classsynopsis.java" match="classsynopsisinfo"> - <xsl:apply-template mode="classsynopsis.java"/> + <xsl:apply-templates mode="classsynopsis.java"/> </xsl:template> <xsl:template mode="classsynopsis.java" match="constructorsynopsis"> @@ -453,10 +459,6 @@ <xsl:call-template name="FIXME"/> </xsl:template> -<xsl:template mode="classsynopsis.java" match="exceptionname"> - <xsl:call-template name="FIXME"/> -</xsl:template> - <xsl:template mode="classsynopsis.java" match="fieldsynopsis"> <xsl:call-template name="FIXME"/> </xsl:template> @@ -475,13 +477,30 @@ <xsl:template mode="classsynopsis.java" match=" classname | exceptionname | interfacename | methodname | - modifier | ooclass | ooexception | oointerface | - parameter | type | varname "> + modifier | parameter | type | varname "> <span class="{name(.)}"> <xsl:apply-templates mode="classsynopsis.java"/> </span> </xsl:template> +<xsl:template mode="classsynopsis.java" match="ooclass"> + <span class="{name(.)}"> + <xsl:apply-templates mode="classsynopsis.java" select="classname"/> + </span> +</xsl:template> + +<xsl:template mode="classsynopsis.java" match="oointerface"> + <span class="{name(.)}"> + <xsl:apply-templates mode="classsynopsis.java" select="interfacename"/> + </span> +</xsl:template> + +<xsl:template mode="classsynopsis.java" match="ooexception"> + <span class="{name(.)}"> + <xsl:apply-templates mode="classsynopsis.java" select="exceptionname"/> + </span> +</xsl:template> + <xsl:template mode="classsynopsis.java" match="void"> <span class="{name(.)}">void</span> </xsl:template> diff --git a/stylesheets/db2html.xsl b/stylesheets/db2html.xsl index d44ab9fb..6a5132cf 100644 --- a/stylesheets/db2html.xsl +++ b/stylesheets/db2html.xsl @@ -32,6 +32,7 @@ <xsl:include href="db2html-list.xsl"/> <xsl:include href="db2html-media.xsl"/> <xsl:include href="db2html-refentry.xsl"/> +<xsl:include href="db2html-synopsis.xsl"/> <xsl:include href="db2html-table.xsl"/> <xsl:include href="db2html-toc.xsl"/> <xsl:include href="db2html-xref.xsl"/> diff --git a/test/testdoc1/testdoc1.xml b/test/testdoc1/testdoc1.xml index 0034bf88..8d469556 100644 --- a/test/testdoc1/testdoc1.xml +++ b/test/testdoc1/testdoc1.xml @@ -80,7 +80,7 @@ </note> <para> - Next, we have a tip. + Next, we have a <sgmltag>tip</sgmltag>. </para> <tip> @@ -94,7 +94,7 @@ <para> And finally, we'll have a <sgmltag>warning</sgmltag>. Just to mix things - up a bit, we'll put this one <emph>inside</emph> the paragraph. + up a bit, we'll put this one <emphasis>inside</emphasis> the paragraph. <warning> <title>DocBook Is a Beast</title> @@ -110,31 +110,73 @@ </para> </sect1> +<sect1 id="td-classsynopsis"> + <title>Class Synopses</title> + <para> + This section tests the <sgmltag>classsynopsis</sgmltag> element. The + formatting of <sgmltag>classsynopis</sgmltag> is controlled entirely + by the <sgmltag class="attribute">language</sgmltag> attribute, which + specifies the programming language being presented. + </para> + + <para> + Here is a <sgmltag>classsynopsis</sgmltag> for Java. + </para> + + <classsynopsis language="java"> + <ooclass> + <modifier>public</modifier> + <classname>Foo</classname> + </ooclass> + <ooclass> + <classname>Bar</classname> + </ooclass> + <oointerface> + <interfacename>FooInterface</interfacename> + </oointerface> + <oointerface> + <interfacename>BarInterface</interfacename> + </oointerface> + + <constructorsynopsis> + <modifier>public</modifier> + <methodparam> + <type>String</type> + <parameter>fooStr</parameter> + </methodparam> + </constructorsynopsis> + <constructorsynopsis> + <modifier>public</modifier> + <void/> + </constructorsynopsis> + </classsynopsis> +</sect1> + <sect1 id="td-lists"> <title>Lists</title> <para> This sections tests the list elements in DocBook. </para> - <sect2 id="td-itemizedlist"> - <title>Itemized Lists</title> - </sect2> +<sect2 id="td-itemizedlist"> + <title>Itemized Lists</title> +</sect2> - <sect2 id="td-orderedlist"> - <title>Ordered Lists</title> - </sect2> +<sect2 id="td-orderedlist"> + <title>Ordered Lists</title> +</sect2> - <sect2 id="td-segmentedlist"> - <title>Segmented Lists</title> - </sect2> +<sect2 id="td-segmentedlist"> + <title>Segmented Lists</title> +</sect2> - <sect2 id="td-simplelist"> - <title>Simple Lists</title> - </sect2> +<sect2 id="td-simplelist"> + <title>Simple Lists</title> +</sect2> - <sect2 id="td-variablelist"> - <title>Variable Lists</title> - </sect2> +<sect2 id="td-variablelist"> + <title>Variable Lists</title> +</sect2> </sect1> </article> |