diff options
-rw-r--r-- | ChangeLog | 39 | ||||
-rw-r--r-- | data/icons/hicolor/48x48/admon-caution.png | bin | 2369 -> 2959 bytes | |||
-rw-r--r-- | data/icons/hicolor/48x48/admon-warning.png | bin | 3249 -> 2959 bytes | |||
-rw-r--r-- | data/icons/hicolor/scalable/Makefile.am | 4 | ||||
-rw-r--r-- | test/testbook/testbook.xml | 445 | ||||
-rw-r--r-- | xslt/docbook/common/db-common.xsl | 2 | ||||
-rw-r--r-- | xslt/docbook/common/db-title.xsl | 30 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-bibliography.xsl | 2 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-classsynopsis.xsl | 36 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-cmdsynopsis.xsl | 20 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-css.xsl | 79 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-division.xsl | 82 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-info.xsl | 19 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-inline.xsl | 705 | ||||
-rw-r--r-- | xslt/gettext/l10n.xml.in | 37 |
15 files changed, 1105 insertions, 395 deletions
@@ -1,3 +1,42 @@ +2007-05-21 Shaun McCance <shaunm@gnome.org> + + * test/testbook/testbook.xml: + - Added lots of inline tests + - Added the beginning of a glossary + + * xslt/docbook/common/db-title.xsl: + * xslt/docbook/html/db2html-division.xsl: + - Made the empty $info selectors node sets + - Fixed some automatic titles + + * xslt/docbook/html/db2html-info.xsl: + - Use the new dl-compact class in credits + + * xslt/docbook/html/db2html-cmdsynopsis.xsl: + - Made cmdsynopsis have a pre wrapped in a div for consistency + + * xslt/docbook/html/db2html-bibliography.xsl: + - Bibliographies have bibliographyinfo, not glossaryinfo + + * xslt/docbook/html/db2html-classsynopsis.xsl: + - Moved ooclass, ooexception, and oointerface to db2html-inline + + * xslt/docbook/html/db2html-css.xsl: + * xslt/docbook/html/db2html-inline.xsl: + - Revamped all inline elements + - Added db2html.inline.content.mode + + * xslt/docbook/common/db-common.xsl: + - Small db.personname modification + + * xslt/gettext/l10n.xml.in: + - Added localizable citation formatting + + * data/icons/hicolor/48x48/admon-caution.png: + * data/icons/hicolor/48x48/admon-warning.png: + * data/icons/hicolor/scalable/Makefile.am: + - More icons from cornelius[cz] + 2007-05-15 Shaun McCance <shaunm@gnome.org> * xslt/docbook/utils/graphics.xsl: diff --git a/data/icons/hicolor/48x48/admon-caution.png b/data/icons/hicolor/48x48/admon-caution.png Binary files differindex e3897db8..ecdc0f92 100644 --- a/data/icons/hicolor/48x48/admon-caution.png +++ b/data/icons/hicolor/48x48/admon-caution.png diff --git a/data/icons/hicolor/48x48/admon-warning.png b/data/icons/hicolor/48x48/admon-warning.png Binary files differindex 3c8a37df..ecdc0f92 100644 --- a/data/icons/hicolor/48x48/admon-warning.png +++ b/data/icons/hicolor/48x48/admon-warning.png diff --git a/data/icons/hicolor/scalable/Makefile.am b/data/icons/hicolor/scalable/Makefile.am index 0275bce4..fac94a54 100644 --- a/data/icons/hicolor/scalable/Makefile.am +++ b/data/icons/hicolor/scalable/Makefile.am @@ -1,8 +1,10 @@ icondir = $(datadir)/gnome-doc-utils/icons/hicolor/scalable icon_DATA = \ + admon-caution.svg \ admon-bug.svg \ admon-important.svg \ admon-note.svg \ - admon-tip.svg + admon-tip.svg \ + admon-warning.svg EXTRA_DIST = $(icon_DATA) diff --git a/test/testbook/testbook.xml b/test/testbook/testbook.xml index 2bba6e23..f991327f 100644 --- a/test/testbook/testbook.xml +++ b/test/testbook/testbook.xml @@ -48,6 +48,437 @@ </legalnotice> </bookinfo> +<chapter id="inline"> +<title>Inline Elements</title> +<variablelist> + <varlistentry> + <term><sgmltag>abbrev</sgmltag></term> + <listitem><para>The word <wordasword>concatenate</wordasword> is frequently abbreviated + as either <abbrev>concat</abbrev> or simply <abbrev>cat</abbrev>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>accel</sgmltag></term> + <listitem><para>To see the authors of an application, select + <guimenuitem><accel>A</accel>bout</guimenuitem> from the + <guimenuitem><accel>H</accel>elp</guimenuitem> menu.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>acronym</sgmltag></term> + <listitem><para><acronym>GNOME</acronym> stands for <acronym>GNU</acronym> + Network Object Model Environment.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>action</sgmltag></term> + <listitem><para>Logging out will cause the session manager to perform + <action>session saving</action>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>application</sgmltag></term> + <listitem><para><application>Yelp</application> is the default help + viewer in GNOME.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>citetitle</sgmltag></term> + <listitem><para>Please read <citetitle pubwork="article">A Pretty Good Article</citetitle> + and <citetitle pubwork="book">The Bestest Book Ever</citetitle>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>citation</sgmltag></term> + <listitem><para>Consult <citation>HolubSpencer</citation> for more information.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>classname</sgmltag></term> + <listitem><para>The <classname>YelpDocument</classname> class provides on-demand + page transformations in <application>Yelp</application>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>code</sgmltag></term> + <listitem><para>Call <code>frobnicate(file)</code> to frobnicate the file.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>command</sgmltag></term> + <listitem><para>To start <application>Yelp</application>, enter <command>yelp</command> + at the command line.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>computeroutput</sgmltag></term> + <listitem><para>Runnin <command>scrollkeeper-get-content-list C</command> should output + something like <computeroutput>/tmp/scrollkeeper-shaunm/contents.1</computeroutput>. + Sometimes it also prints errors like <computeroutput role="stderr">I/O warning : + failed to load external entity + "/var/lib/scrollkeeper/en_US.UTF-8/scrollkeeper_cl.xml"</computeroutput>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>constant</sgmltag></term> + <listitem><para>The maximum legal length for a path name is + <constant class='limit'>PATH_MAX</constant>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>corpauthor</sgmltag></term> + <term><sgmltag>corpcredit</sgmltag></term> + <listitem><para>Some of the GNOME Documentation was written by + <corpauthor>Sun Microsystems</corpauthor>. Some technical editing was also done + by <corpcredit>Sun Microsystems</corpcredit>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>database</sgmltag></term> + <listitem><para>The <database>Pulse</database> database tracks everything + you need to know about your project.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>email</sgmltag></term> + <listitem><para>To contact the GNOME Documentation Team, send an email to + <email>gnome-doc-list@gnome.org</email>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>emphasis</sgmltag></term> + <listitem><para>This is <emphasis>italic</emphasis>, and this is + <emphasis role="bold">bold</emphasis>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>envar</sgmltag></term> + <listitem><para>The <envar>YELP_DEBUG</envar> environment variable can be used to + control the debugging output in <application>Yelp</application>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>errorcode</sgmltag></term> + <term><sgmltag>errorname</sgmltag></term> + <term><sgmltag>errortext</sgmltag></term> + <term><sgmltag>errortype</sgmltag></term> + <listitem><para>On most DOS-derived systems, functions signal a + <errortext>File Not Found</errortext> error by returning <errorcode>2</errorcode> + (<errorname>ENOENT</errorname>). This is usually a <errortype>recoverable</errortype> + (non-fatal) error.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>exceptionname</sgmltag></term> + <listitem><para>If the world is ending, this function will throw the exception + <exceptionname>ArmageddonException</exceptionname>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>filename</sgmltag></term> + <listitem><para>This text was written in the file + <filename>testbook.xml</filename>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>firstterm</sgmltag></term> + <listitem><para>This document has example <firstterm>tables</firstterm>, and in + particular <firstterm linkend="cals-tables">CALS tables</firstterm>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>foreignphrase</sgmltag></term> + <listitem><para>Free software is sometimes called <foreignphrase>libre</foreignphrase> + software.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>function</sgmltag></term> + <listitem><para>The function <function>g_strdup</function> duplicates a string.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>glossterm</sgmltag></term> + <listitem><para>There's no glossary entry for <glossterm>frobnicate</glossterm>. This + links implicitly to the definition of <glossterm>button</glossterm>, but we have to use + an explicit link for <glossterm linkend="gloss-button">buttons</glossterm>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>guibutton</sgmltag></term> + <term><sgmltag>guiicon</sgmltag></term> + <term><sgmltag>guilabel</sgmltag></term> + <term><sgmltag>guimenu</sgmltag></term> + <term><sgmltag>guimenuitem</sgmltag></term> + <term><sgmltag>guisubmenu</sgmltag></term> + <listitem><para>You can select what fonts to use under the <guilabel>Fonts</guilabel> + heading in the dialog. To close the dialog, click the <guibutton>Close</guibutton> button. + To open a file, select <guimenuitem>Open</guimenuitem> from the <guimenu>File</guimenu> + menu or click the <guiicon><inlinegraphic + fileref="file:///usr/share/icons/gnome/22x22/status/stock_open.png"/></guiicon> icon + on the toolbar. To open a recent file, select a file from the <guisubmenu>Open Recent</guisubmenu> + submenu of the <guimenu>File</guimenu> menu.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>hardware</sgmltag></term> + <listitem><para>Unfortunately, your <hardware>hard drive</hardware> cannot be + fixed by simply blowing into it like an old game cartridge.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>inlineequation</sgmltag></term> + <term><sgmltag>mathphrase</sgmltag></term> + <listitem><para>Fermat's last theorem says that <inlineequation> + <alt>x^n + y^n ≠ z^n ∀ n > 2</alt> + <mathphrase>x<superscript>n</superscript> + y<superscript>n</superscript> ≠ z<superscript>n</superscript> ∀ n ≠ 2</mathphrase></inlineequation>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>interface</sgmltag></term> + <listitem><para>In old-school DocBook, we'd use the <sgmltag>interface</sgmltag> + tag for the <interface>Close</interface> button.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>interfacename</sgmltag></term> + <listitem><para>This class implements <interfacename>GtkCellLayout</interfacename>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>keycap</sgmltag></term> + <term><sgmltag>keycode</sgmltag></term> + <term><sgmltag>keysym</sgmltag></term> + <listitem><para>The <keycap>F1</keycap> key on an IBM PC keyboard generates the + scan code <keycode>0x3B</keycode> when pressed. This value is defined as + <keysym>KEY_F1</keysym>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>keycombo</sgmltag></term> + <listitem><para>To copy the selection to the clipboard, press + <keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>lineannotation</sgmltag></term> + <listitem><para>Do not run this command if you value your data:</para> + <screen>find . -type f -exec shred -fuz {} \; <lineannotation>shred all files at any depth</lineannotation></screen></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>literal</sgmltag></term> + <listitem><para>Set <envar>YELP_DEBUG</envar> to <literal>function-calls</literal> to + see all the major function calls inside <application>Yelp</application>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>markup</sgmltag></term> + <listitem><para>To italicize text on Wikipedia, type <markup>''text''</markup>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>medialabel</sgmltag></term> + <listitem><para>To being installing <application>Frobnicator</application>, insert + the disc labelled <medialabel>Frobnicator Install</medialabel>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>menuchoice</sgmltag></term> + <listitem><para>You can open a new window by selecting <menuchoice> + <shortcut><keycombo><keycap>Ctrl</keycap><keycap>N</keycap></keycombo></shortcut> + <guimenu>File</guimenu><guimenuitem>New Window</guimenuitem></menuchoice>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>methodname</sgmltag></term> + <listitem><para>The <methodname>set_label()</methodname> method sets the text of the + button to <parameter><replaceable>label</replaceable></parameter>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>mousebutton</sgmltag></term> + <listitem><para>Click with the <mousebutton>middle</mousebutton> mouse button to + paste the contents of the PRIMARY selection.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>option</sgmltag></term> + <listitem><para>The <option>-rf</option> option to the <command>ls</command> + command has been known to cause mental anguish.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>optional</sgmltag></term> + <listitem> + <synopsis><command>yelp <optional><option>-p</option></optional></command></synopsis> + </listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>ooclass</sgmltag></term> + <term><sgmltag>ooexception</sgmltag></term> + <term><sgmltag>oointerface</sgmltag></term> + <listitem><para>The <ooclass><classname>Mallard</classname></ooclass> class + implements the <oointerface><interfacename>Quacks</interfacename></oointerface> + interface. The <methodname>quack</methodname> method may throw the + <ooexception><exceptionname>Muted</exceptionname></ooexception> + exception.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>parameter</sgmltag></term> + <listitem><para>The <parameter>db2html.funcsynopsis.style</parameter> allows you + to set the style of function synopses to either <literal>'KR'</literal> or + <literal>'ANSI'</literal>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>personname</sgmltag></term> + <listitem><para>My name is + <personname><firstname>Shaun</firstname><surname>McCance</surname></personname>, + or <personname><firstname>Shaun</firstname><othername>William</othername> + <surname>McCance</surname></personname>. You may also call me <personname> + <honorific>Mr</honorific><surname>Mojo</surname></personname>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>productname</sgmltag></term> + <listitem><para><productname class="trade">Frobnicator</productname> is the + only solution for frobnicating your files.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>prompt</sgmltag></term> + <listitem><para>The prototypical prompt is <prompt>$</prompt>, but most people + use something like <prompt>[<replaceable>user</replaceable>@<replaceable>host</replaceable> <replaceable>dir</replaceable>]</prompt>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>property</sgmltag></term> + <listitem><para>The <property>font_name</property> property can be used to set + the font on a widget in your <filename>.gtrc-2.0</filename> file.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>quote</sgmltag></term> + <listitem><para>He said, <quote>The Mallard said <quote>Quack</quote>.</quote></para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>replaceable</sgmltag></term> + <listitem><para>To view a DocBook file, simply run + <command>yelp <replaceable>file</replaceable></command>, where + <parameter><replaceable>file</replaceable></parameter> + is the name of the file.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>returnvalue</sgmltag></term> + <listitem><para>The template <function>i18n.locale</function> returns + <returnvalue>C</returnvalue> if no language has been defined in the + document.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>sgmltag</sgmltag></term> + <listitem><itemizedlist> + <listitem><para><sgmltag class="attribute">attribute</sgmltag></para></listitem> + <listitem><para><sgmltag class="attvalue">attvalue</sgmltag></para></listitem> + <listitem><para><sgmltag class="element">element</sgmltag></para></listitem> + <listitem><para><sgmltag class="emptytag">emptytag</sgmltag></para></listitem> + <listitem><para><sgmltag class="endtag">endtag</sgmltag></para></listitem> + <listitem><para><sgmltag class="genentity">genentity</sgmltag></para></listitem> + <listitem><para><sgmltag class="localname">localname</sgmltag></para></listitem> + <listitem><para><sgmltag class="namespace">namespace</sgmltag></para></listitem> + <listitem><para><sgmltag class="numcharref">numcharref</sgmltag></para></listitem> + <listitem><para><sgmltag class="paramentity">paramentity</sgmltag></para></listitem> + <listitem><para><sgmltag class="pi">pi</sgmltag></para></listitem> + <listitem><para><sgmltag class="prefix">prefix</sgmltag></para></listitem> + <listitem><para><sgmltag class="sgmlcomment">sgmlcomment</sgmltag></para></listitem> + <listitem><para><sgmltag class="starttag">starttag</sgmltag></para></listitem> + <listitem><para><sgmltag class="xmlpi">xmlpi</sgmltag></para></listitem> + </itemizedlist></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>shortcut</sgmltag></term> + <listitem><para>You can open a new window by selecting <menuchoice> + <shortcut><keycombo><keycap>Ctrl</keycap><keycap>N</keycap></keycombo></shortcut> + <guimenu>File</guimenu><guimenuitem>New Window</guimenuitem></menuchoice>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>structfield</sgmltag></term> + <term><sgmltag>structname</sgmltag></term> + <listitem><para>The <structfield>reqs_pending</structfield> field is a list + of all the <structname>Request</structname> instances that are currently open + for this <structname>YelpDocument</structname>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>subscript</sgmltag></term> + <term><sgmltag>superscript</sgmltag></term> + <listitem><para>Here is a <sgmltag>subscript</sgmltag><subscript>sub<subscript>scr<subscript>ipt</subscript></subscript></subscript>. + Here is a <sgmltag>superscript</sgmltag><superscript>super<superscript>scr<superscript>ipt</superscript></superscript></superscript>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>symbol</sgmltag></term> + <listitem><para>No more than <symbol>MAX_DUCKS</symbol> ducks may exist + at any single time.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>systemitem</sgmltag></term> + <listitem><para>The GNOME web site is hosted on + <systemitem>window.gnome.org</systemitem>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>token</sgmltag></term> + <listitem><para>The character ∀ is parsed into <token>FORALL</token>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>trademark</sgmltag></term> + <listitem><para>Here are some trademarks: <trademark class="copyright">copyright</trademark> + <trademark class="registered">registered</trademark> + <trademark class="service">service</trademark> + <trademark class="trade">trade</trademark>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>type</sgmltag></term> + <listitem><para>Strings are stored as <type>gchar*</type> references.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>uri</sgmltag></term> + <listitem><para>Grab the latest Mallard stuff at + <uri>svn+ssh://svn.gnome.org/svn/gnome-doc-utils/trunk/sandbox/mallard/</uri>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>userinput</sgmltag></term> + <listitem><para>Type <userinput>foo</userinput> at the prompt.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>varname</sgmltag></term> + <listitem><para>In Perl, <varname>@ARGV</varname> contains the command line + parameters used when the script was run.</para></listitem> + </varlistentry> + + <varlistentry> + <term><sgmltag>wordasword</sgmltag></term> + <listitem><para>A <wordasword>term</wordasword> in Algebra has a very different + meaning than a <sgmltag>term</sgmltag> in DocBook.</para></listitem> + </varlistentry> + +</variablelist> +</chapter> <!-- inline --> + <chapter id="some-blocks"> <title>Some Block Elements</title> <titleabbrev>Some Blocks</titleabbrev> @@ -1276,4 +1707,18 @@ porttitor condimentum nulla.</para> </chapter> <!-- classsynopsis --> +<glossary id="glossary"> + <glossdiv id="glossary-desktop"> + <title>GNOME Desktop Terms</title> + <glossentry id="gloss-button"> + <glossterm>button</glossterm> + <glossdef><para>A user interface element that you use to start an action. + There are many types of button in the GNOME Desktop. Some buttons do not have + labels, so you do not have a convenient reference term. Although a button does + not have a name, there might be a tooltip for the button. If the text in the + tooltip is appropriate, use that text as the button name.</para></glossdef> + </glossentry> + </glossdiv> <!-- glossary-desktop --> +</glossary> + </book> diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl index f67d2b28..b52ff83e 100644 --- a/xslt/docbook/common/db-common.xsl +++ b/xslt/docbook/common/db-common.xsl @@ -159,12 +159,12 @@ assembled those into a string. --> <xsl:template name="db.personname"> <xsl:param name="node" select="."/> + <!-- FIXME: call i18n.locale --> <xsl:param name="lang" select="ancestor-or-self::*[@lang][1]/@lang"/> <!-- FIXME: Use xsl:choose for different language rules --> <xsl:if test="$node/honorific"> <xsl:apply-templates select="$node/honorific[1]"/> - <xsl:text>.</xsl:text> </xsl:if> <xsl:choose> <xsl:when test="$node/@role = 'family-given'"> diff --git a/xslt/docbook/common/db-title.xsl b/xslt/docbook/common/db-title.xsl index 7200e528..f087f6cd 100644 --- a/xslt/docbook/common/db-title.xsl +++ b/xslt/docbook/common/db-title.xsl @@ -160,6 +160,11 @@ REMARK: Describe this mode <xsl:when test="glossaryinfo/title"> <xsl:apply-templates select="glossaryinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Glossary'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> @@ -172,6 +177,11 @@ REMARK: Describe this mode <xsl:when test="indexinfo/title"> <xsl:apply-templates select="indexinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Index'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> @@ -385,6 +395,11 @@ REMARK: Describe this mode <xsl:when test="setindexinfo/title"> <xsl:apply-templates select="setindexinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Index'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> @@ -540,6 +555,11 @@ REMARK: Describe this mode <xsl:when test="glossaryinfo/title"> <xsl:apply-templates select="glossaryinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Glossary'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> @@ -558,6 +578,11 @@ REMARK: Describe this mode <xsl:when test="indexinfo/title"> <xsl:apply-templates select="indexinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Index'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> @@ -870,6 +895,11 @@ REMARK: Describe this mode <xsl:when test="setindexinfo/title"> <xsl:apply-templates select="setindexinfo/title/node()"/> </xsl:when> + <xsl:otherwise> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Index'"/> + </xsl:call-template> + </xsl:otherwise> </xsl:choose> </xsl:template> diff --git a/xslt/docbook/html/db2html-bibliography.xsl b/xslt/docbook/html/db2html-bibliography.xsl index c61ca29a..6ff02d43 100644 --- a/xslt/docbook/html/db2html-bibliography.xsl +++ b/xslt/docbook/html/db2html-bibliography.xsl @@ -60,7 +60,7 @@ Outputs CSS that controls the appearance of bibliograpies </xsl:call-template> </xsl:if> </xsl:with-param> - <xsl:with-param name="info" select="glossaryinfo"/> + <xsl:with-param name="info" select="bibliographyinfo"/> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> <xsl:with-param name="chunk_divisions" select="false()"/> diff --git a/xslt/docbook/html/db2html-classsynopsis.xsl b/xslt/docbook/html/db2html-classsynopsis.xsl index cd5d0c16..ee73973f 100644 --- a/xslt/docbook/html/db2html-classsynopsis.xsl +++ b/xslt/docbook/html/db2html-classsynopsis.xsl @@ -130,42 +130,6 @@ REMARK: Describe this param </xsl:call-template> </xsl:template> -<!-- = ooclass = --> -<xsl:template match="ooclass"> - <span class="ooclass" style="font-family: monospace;"> - <xsl:for-each select="modifier | classname"> - <xsl:if test="position() != 1"> - <xsl:text> </xsl:text> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - </span> -</xsl:template> - -<!-- = ooexception = --> -<xsl:template match="ooexception"> - <span class="ooexception" style="font-family: monospace;"> - <xsl:for-each select="modifier | exceptionname"> - <xsl:if test="position() != 1"> - <xsl:text> </xsl:text> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - </span> -</xsl:template> - -<!-- = oointerface = --> -<xsl:template match="oointerface"> - <span class="oointerface" style="font-family: monospace;"> - <xsl:for-each select="modifier | interfacename"> - <xsl:if test="position() != 1"> - <xsl:text> </xsl:text> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - </span> -</xsl:template> - <!--#* db2html.class.cpp.modifier --> <xsl:template name="db2html.class.cpp.modifier"> <!-- For C++, we expect the first modifier to be the visibility --> diff --git a/xslt/docbook/html/db2html-cmdsynopsis.xsl b/xslt/docbook/html/db2html-cmdsynopsis.xsl index 95e80250..e23ada16 100644 --- a/xslt/docbook/html/db2html-cmdsynopsis.xsl +++ b/xslt/docbook/html/db2html-cmdsynopsis.xsl @@ -166,17 +166,19 @@ div.cmdsynopsis { font-family: monospace; } </xsl:param> <div class="cmdsynopsis"> <xsl:call-template name="db2html.anchor"/> - <xsl:for-each select="command | arg | group | sbr"> - <xsl:if test="position() != 1"> - <xsl:value-of select="$sepchar"/> - </xsl:if> - <xsl:apply-templates select="."> + <pre> + <xsl:for-each select="command | arg | group | sbr"> + <xsl:if test="position() != 1"> + <xsl:value-of select="$sepchar"/> + </xsl:if> + <xsl:apply-templates select="."> + <xsl:with-param name="sepchar" select="$sepchar"/> + </xsl:apply-templates> + </xsl:for-each> + <xsl:apply-templates select="synopfragment"> <xsl:with-param name="sepchar" select="$sepchar"/> </xsl:apply-templates> - </xsl:for-each> - <xsl:apply-templates select="synopfragment"> - <xsl:with-param name="sepchar" select="$sepchar"/> - </xsl:apply-templates> + </pre> </div> </xsl:template> diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl index e792b0d4..c23799a9 100644 --- a/xslt/docbook/html/db2html-css.xsl +++ b/xslt/docbook/html/db2html-css.xsl @@ -92,6 +92,11 @@ body { direction: </xsl:text><xsl:call-template name="l10n.direction"/><xsl:text>; } div, p, pre, blockquote { margin: 0; padding: 0; } +p img { vertical-align: middle; } +sub { font-size: 0.83em; } +sub sub { font-size: 1em; } +sup { font-size: 0.83em; } +sup sup { font-size: 1em; } table { border-collapse: collapse; } td { vertical-align: top; } td { padding: 0.2em 0.83em 0.2em 0.83em; } @@ -138,6 +143,8 @@ h4.title, h5.title, h6.title, h7.title { font-size: 1em; } margin-right: 1em; } .block-indent .block-indent { margin-left: 0em; margin-right: 0em; } +td .block-indent { margin-left: 0em; margin-right: 0em; } +dd .block-indent { margin-left: 0em; margin-right: 0em; } .block-verbatim { white-space: pre; } div.title { margin-bottom: 0.2em; @@ -165,7 +172,10 @@ dt { margin: 0; } dd { <!-- FIXME: rtl --> margin-left: 1.72em; + margin-top: 0.2em; + margin-bottom: 1em; } +dl.dl-compact dd { margin-top: 0; margin-bottom: 0; } ul.linktrail { display: block; margin: 0.2em 0 0 0; @@ -294,7 +304,6 @@ div.caption { margin-top: 0.5em; } div.list div.title span.title { border-bottom: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>; } -div.list dd { margin-top: 0.2em; margin-bottom: 1em; } div.simplelist { <!-- FIXME: rtl --> margin-left: 1.72em; @@ -339,6 +348,10 @@ div.screen { div.screen .prompt { color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; } +div.screen .userinput { + font-weight: bold; + color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; +} pre.linenumbering { color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; margin: 0; @@ -386,8 +399,72 @@ div.warning { background-image: url("</xsl:text><xsl:value-of select="$theme.icon.admon.warning"/><xsl:text>"); } +span.accel { text-decoration: underline; } +span.acronym { font-family: sans-serif; } +span.application { font-style: italic; } +span.classname, span.exceptionname, span.interfacename { font-family: monospace; } +span.code { + font-family: monospace; + border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>; + <!-- FIXME: rtl --> + padding-left: 0.2em; + padding-right: 0.2em; +} +pre span.code { border: none; padding: 0; } +span.command { + font-family: monospace; + border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>; + <!-- FIXME: rtl --> + padding-left: 0.2em; + padding-right: 0.2em; +} +pre span.command { border: none; padding: 0; } +span.computeroutput { font-family: monospace; } +<!-- FIXME: stderr red text --> +span.constant { font-family: monospace; } +span.database { font-family: monospace; } +span.email { font-family: monospace; } +span.emphasis { font-style: italic; } +span.emphasis-bold { font-style: normal; font-weight: bold; } +span.envar { font-family: monospace; } +<!-- FIXME: error* red text --> +span.filename { font-family: monospace; } +span.firstterm { font-style: italic; } +span.foreignphrase { font-style: italic; } +span.function { font-family: monospace; } +span.glossterm { font-style: italic; } +dt.glossterm span.glossterm { font-style: normal; } +span.guibutton, span.guilabel, span.guimenu, span.guimenuitem, span.guisubmenu, span.interface { + font-weight: bold; + color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; +} +span.keycap { + font-weight: bold; + color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; +} +span.lineannotation { font-style: italic; } +span.literal { font-family: monospace; } +span.markup { font-family: monospace; } +span.medialabel { font-style: italic; } +span.methodname { font-family: monospace; } +span.ooclass, span.ooexception, span.oointerface { font-family: monospace; } +span.option { font-family: monospace; } span.parameter { font-family: monospace; } span.paramdef span.parameter { font-style: italic; } +span.prompt { font-family: monospace; } +span.property { font-family: monospace; } +span.replaceable { font-style: italic; } +span.returnvalue { font-family: monospace; } +span.sgmltag { font-family: monospace; } +span.structfield, span.structname { font-family: monospace; } +span.symbol { font-family: monospace; } +span.systemitem { font-family: monospace; } +span.token { font-family: monospace; } +span.type { font-family: monospace; } +span.uri { font-family: monospace; } +span.userinput { font-family: monospace; } +span.varname { font-family: monospace; } +span.wordasword { font-style: italic; } <!-- FIXME below --> </xsl:text> diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl index 381dc112..9fce02b4 100644 --- a/xslt/docbook/html/db2html-division.xsl +++ b/xslt/docbook/html/db2html-division.xsl @@ -84,7 +84,7 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called --> <xsl:template name="db2html.division.html"> <xsl:param name="node" select="."/> - <xsl:param name="info"/> + <xsl:param name="info" select="/false"/> <xsl:param name="template"/> <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"> @@ -265,7 +265,7 @@ REMARK: Talk about some of the parameters --> <xsl:template name="db2html.division.div"> <xsl:param name="node" select="."/> - <xsl:param name="info"/> + <xsl:param name="info" select="/false"/> <xsl:param name="title_node" select="($node/title | $info/title)[last()]"/> <xsl:param name="subtitle_node" @@ -665,7 +665,7 @@ REMARK: Describe this template --> <xsl:template name="db2html.division.top"> <xsl:param name="node"/> - <xsl:param name="info"/> + <xsl:param name="info" select="/false"/> <xsl:param name="template"/> <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"> @@ -728,7 +728,7 @@ REMARK: Describe this template --> <xsl:template name="db2html.division.sidebar"> <xsl:param name="node"/> - <xsl:param name="info"/> + <xsl:param name="info" select="/false"/> <xsl:param name="template"/> <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"> @@ -789,7 +789,7 @@ REMARK: Describe this template --> <xsl:template name="db2html.division.bottom"> <xsl:param name="node"/> - <xsl:param name="info"/> + <xsl:param name="info" select="/false"/> <xsl:param name="template"/> <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"> @@ -1088,17 +1088,25 @@ REMARK: Describe this template <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"/> </xsl:param> - <xsl:call-template name="db2html.division.div"> - <xsl:with-param name="title_content"> - <xsl:if test="not(title)"> - <xsl:call-template name="l10n.gettext"> - <xsl:with-param name="msgid" select="'Dedication'"/> - </xsl:call-template> - </xsl:if> - </xsl:with-param> - <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> - <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="not(title)"> + <xsl:call-template name="db2html.division.div"> + <xsl:with-param name="title_content"> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Dedication'"/> + </xsl:call-template> + </xsl:with-param> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="db2html.division.div"> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- = glossary = --> @@ -1109,21 +1117,33 @@ REMARK: Describe this template <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"/> </xsl:param> - <xsl:call-template name="db2html.division.div"> - <xsl:with-param name="entries" select="glossentry"/> - <xsl:with-param name="divisions" select="glossdiv | bibliography"/> - <xsl:with-param name="title_content"> - <xsl:if test="not(title) and not(glossaryinfo/title)"> - <xsl:call-template name="l10n.gettext"> - <xsl:with-param name="msgid" select="'Glossary'"/> - </xsl:call-template> - </xsl:if> - </xsl:with-param> - <xsl:with-param name="info" select="glossaryinfo"/> - <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> - <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> - <xsl:with-param name="chunk_divisions" select="false()"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="not(title) and not(glossaryinfo/title)"> + <xsl:call-template name="db2html.division.div"> + <xsl:with-param name="entries" select="glossentry"/> + <xsl:with-param name="divisions" select="glossdiv | bibliography"/> + <xsl:with-param name="title_content"> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'Glossary'"/> + </xsl:call-template> + </xsl:with-param> + <xsl:with-param name="info" select="glossaryinfo"/> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + <xsl:with-param name="chunk_divisions" select="false()"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="db2html.division.div"> + <xsl:with-param name="entries" select="glossentry"/> + <xsl:with-param name="divisions" select="glossdiv | bibliography"/> + <xsl:with-param name="info" select="glossaryinfo"/> + <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> + <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> + <xsl:with-param name="chunk_divisions" select="false()"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- = glossdiv = --> diff --git a/xslt/docbook/html/db2html-info.xsl b/xslt/docbook/html/db2html-info.xsl index 993854c2..d47417a5 100644 --- a/xslt/docbook/html/db2html-info.xsl +++ b/xslt/docbook/html/db2html-info.xsl @@ -172,7 +172,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$authors"/> </dl> </div> @@ -203,7 +203,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$editors"/> </dl> </div> @@ -234,7 +234,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$collabs"/> </dl> </div> @@ -254,6 +254,7 @@ REMARK: Describe this template <xsl:template name="db2html.info.translators"> <xsl:param name="node" select="."/> <xsl:param name="info" select="'FIXME'"/> + <!-- FIXME: new class attribute on credit --> <xsl:variable name="translators" select=" $info/corpcredit[@role = 'translator'] | $info/othercredit[@role = 'translator'] | @@ -268,7 +269,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$translators"/> </dl> </div> @@ -298,7 +299,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$publishers"/> </dl> </div> @@ -318,6 +319,7 @@ REMARK: Describe this template <xsl:template name="db2html.info.othercredits"> <xsl:param name="node" select="."/> <xsl:param name="info" select="'FIXME'"/> + <!-- FIXME: new class attribute on credit --> <xsl:variable name="othercredits" select=" $info/conbrib | $info/corpcredit[@role != 'translator'] | @@ -333,7 +335,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$othercredits"/> </dl> </div> @@ -363,7 +365,7 @@ REMARK: Describe this template </xsl:call-template> </h2> <div class="block block-first"> - <dl> + <dl class="dl-compact"> <xsl:apply-templates mode="db2html.info.mode" select="$copyrights"/> </dl> </div> @@ -390,6 +392,7 @@ REMARK: Describe this mode. <xsl:text>: </xsl:text> </i> <xsl:apply-templates mode="db2html.info.mode" select="orgname"/> + <!-- FIXME: orgdiv, jobtitle --> </dd> </xsl:template> @@ -450,6 +453,7 @@ REMARK: Describe this mode. <dt> <xsl:attribute name="class"> <xsl:choose> + <!-- FIXME: new class attribute on credit --> <xsl:when test="@role = 'translator'"> <xsl:text>translator</xsl:text> </xsl:when> @@ -555,6 +559,7 @@ REMARK: Describe this mode. <dt> <xsl:attribute name="class"> <xsl:choose> + <!-- FIXME: new class attribute on credit --> <xsl:when test="@role = 'translator'"> <xsl:text>translator</xsl:text> </xsl:when> diff --git a/xslt/docbook/html/db2html-inline.xsl b/xslt/docbook/html/db2html-inline.xsl index 94a5184d..57bd18cf 100644 --- a/xslt/docbook/html/db2html-inline.xsl +++ b/xslt/docbook/html/db2html-inline.xsl @@ -17,6 +17,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> @@ -30,9 +31,10 @@ REMARK: Describe this module <!--**========================================================================== db2html.inline -Renders an inline element +Renders an inline element as an HTML #{span} element $node: The element to render $children: The child elements to process +$class: The value of the #{class} attribute on the #{span} tag $bold: Whether to render the element in bold face $italic: Whether to render the element in italics $underline: Whether to underline the element @@ -43,7 +45,8 @@ REMARK: Document this template --> <xsl:template name="db2html.inline"> <xsl:param name="node" select="."/> - <xsl:param name="children" select="$node/node()"/> + <xsl:param name="children" select="false()"/> + <xsl:param name="class" select="local-name($node)"/> <xsl:param name="bold" select="false()"/> <xsl:param name="italic" select="false()"/> <xsl:param name="underline" select="false()"/> @@ -51,7 +54,7 @@ REMARK: Document this template <xsl:param name="sans" select="false()"/> <!-- FIXME: do CSS classes, rather than inline styles --> - <span class="{local-name($node)}"> + <span class="{$class}"> <xsl:if test="$bold or $italic or $mono or $underline or $sans"> <xsl:variable name="style"> <xsl:if test="$bold"> @@ -79,11 +82,29 @@ REMARK: Document this template <xsl:call-template name="db2html.anchor"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - <xsl:apply-templates select="$children"/> + <xsl:choose> + <xsl:when test="$children"> + <xsl:apply-templates select="$children"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="db2html.inline.content.mode" select="$node"/> + </xsl:otherwise> + </xsl:choose> </span> </xsl:template> +<!--%%=========================================================================== +db2html.inline.content.mode +FIXME + +FIXME +--> +<xsl:template mode="db2html.inline.content.mode" match="*"> + <xsl:apply-templates/> +</xsl:template> + + <!-- == Matched Templates == --> <!-- = abbrev = --> @@ -93,16 +114,12 @@ REMARK: Document this template <!-- = accel = --> <xsl:template match="accel"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="underline" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = acronym = --> <xsl:template match="acronym"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="sans" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = action = --> @@ -117,9 +134,7 @@ REMARK: Document this template <!-- = application = --> <xsl:template match="application"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = authorinitials = --> @@ -127,8 +142,34 @@ REMARK: Document this template <xsl:call-template name="db2html.inline"/> </xsl:template> +<!-- = citation = --> +<xsl:template match="citation"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = citation % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="citation"> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'citation.format'"/> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="format" select="true()"/> + </xsl:call-template> +</xsl:template> + +<!-- = citation % l10n.format.mode = --> +<xsl:template mode="l10n.format.mode" match="msg:citation"> + <xsl:param name="node"/> + <!-- FIXME: link to biblioentry/abbrev --> + <xsl:apply-templates select="$node/node()"/> +</xsl:template> + <!-- = citetitle = --> <xsl:template match="citetitle"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = citetitle % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="citetitle"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'citetitle.format'"/> <xsl:with-param name="role" select="@pubwork"/> @@ -142,49 +183,29 @@ REMARK: Document this template <xsl:call-template name="db2html.inline"/> </xsl:template> -<!-- = citation = --> -<xsl:template match="citation"> - <span class="citation"> - <xsl:call-template name="db2html.anchor"/> - <xsl:text>[</xsl:text> - <xsl:call-template name="db2html.inline"/> - <xsl:text>]</xsl:text> - </span> -</xsl:template> - <!-- = classname = --> <xsl:template match="classname"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = code = --> <xsl:template match="code"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = command = --> <xsl:template match="command"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = computeroutput = --> <xsl:template match="computeroutput"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = constant = --> <xsl:template match="constant"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = corpauthor = --> @@ -219,44 +240,46 @@ REMARK: Document this template <!-- = email = --> <xsl:template match="email"> - <span class="email"> - <xsl:call-template name="db2html.anchor"/> - <!-- FIXME: no style tags --> - <tt> - <xsl:text><</xsl:text> - <a> - <xsl:attribute name="href"> - <xsl:text>mailto:</xsl:text> - <xsl:value-of select="string(.)"/> - </xsl:attribute> - <xsl:attribute name="title"> - <xsl:call-template name="l10n.gettext"> - <xsl:with-param name="msgid" select="'email.tooltip'"/> - <xsl:with-param name="node" select="."/> - <xsl:with-param name="format" select="true()"/> - </xsl:call-template> - </xsl:attribute> - <xsl:call-template name="db2html.inline"/> - </a> - <xsl:text>></xsl:text> - </tt> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = email % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="email"> + <xsl:text><</xsl:text> + <a> + <xsl:attribute name="href"> + <xsl:text>mailto:</xsl:text> + <xsl:value-of select="string(.)"/> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'email.tooltip'"/> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="string" select="string(.)"/> + <xsl:with-param name="format" select="true()"/> + </xsl:call-template> + </xsl:attribute> + <xsl:apply-templates/> + </a> + <xsl:text>></xsl:text> </xsl:template> <!-- = emphasis = --> <xsl:template match="emphasis"> <xsl:variable name="bold" select="@role = 'bold' or @role = 'strong'"/> <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="$bold"/> - <xsl:with-param name="italic" select="not($bold)"/> + <xsl:with-param name="class"> + <xsl:text>emphasis</xsl:text> + <xsl:if test="$bold"> + <xsl:text> emphasis-bold</xsl:text> + </xsl:if> + </xsl:with-param> </xsl:call-template> </xsl:template> <!-- = envar = --> <xsl:template match="envar"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = errorcode = --> @@ -281,9 +304,7 @@ REMARK: Document this template <!-- = exceptionname = --> <xsl:template match="exceptionname"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="$true"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = fax = --> @@ -293,9 +314,7 @@ REMARK: Document this template <!-- = filename = --> <xsl:template match="filename"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = firstname = --> @@ -305,35 +324,81 @@ REMARK: Document this template <!-- = firstterm = --> <xsl:template match="firstterm"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = firstterm % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="firstterm"> + <xsl:choose> + <xsl:when test="@linkend"> + <xsl:call-template name="db2html.xref"> + <xsl:with-param name="linkend" select="@linkend"/> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- = foreignphrase = --> <xsl:template match="foreignphrase"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = function = --> <xsl:template match="function"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> +<!-- = glosskey = --> +<xsl:key name="glosskey" match="glossentry[@id]" use="string(glossterm)"/> + <!-- = glossterm = --> <xsl:template match="glossterm"> <xsl:call-template name="db2html.inline"/> </xsl:template> +<!-- = glossterm % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="glossterm"> + <xsl:choose> + <xsl:when test="@linkend"> + <xsl:call-template name="db2html.xref"> + <xsl:with-param name="linkend" select="@linkend"/> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="not(../self::glossentry)"> + <xsl:variable name="glossentry" select="key('glosskey', string(.))"/> + <xsl:choose> + <xsl:when test="$glossentry"> + <xsl:call-template name="db2html.xref"> + <xsl:with-param name="linkend" select="$glossentry/@id"/> + <xsl:with-param name="target" select="$glossentry"/> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <!-- = guibutton = --> <xsl:template match="guibutton"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = guiicon = --> @@ -343,30 +408,22 @@ REMARK: Document this template <!-- = guilabel = --> <xsl:template match="guilabel"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = guimenu = --> <xsl:template match="guimenu"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = guimenuitem = --> <xsl:template match="guimenuitem"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = guisubmenu = --> <xsl:template match="guisubmenu"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = hardware = --> @@ -386,16 +443,12 @@ REMARK: Document this template <!-- = interface = --> <xsl:template match="interface"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = interfacename = --> <xsl:template match="interfacename"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = isbn = --> @@ -410,9 +463,7 @@ REMARK: Document this template <!-- = keycap = --> <xsl:template match="keycap"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = keycode = --> @@ -422,6 +473,11 @@ REMARK: Document this template <!-- = keycombo = --> <xsl:template match="keycombo"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = keycombo % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="keycombo"> <xsl:variable name="joinchar"> <xsl:choose> <xsl:when test="@action = 'seq'"><xsl:text> </xsl:text></xsl:when> @@ -429,19 +485,16 @@ REMARK: Document this template <xsl:when test="@action = 'press'">-</xsl:when> <xsl:when test="@action = 'click'">-</xsl:when> <xsl:when test="@action = 'double-click'">-</xsl:when> - <xsl:when test="@action = 'other'"></xsl:when> + <xsl:when test="@action = 'other'">+</xsl:when> <xsl:otherwise>+</xsl:otherwise> </xsl:choose> </xsl:variable> - <span class="keycombo"> - <xsl:call-template name="db2html.anchor"/> - <xsl:for-each select="*"> - <xsl:if test="position() != 1"> - <xsl:value-of select="$joinchar"/> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - </span> + <xsl:for-each select="*"> + <xsl:if test="position() != 1"> + <xsl:value-of select="$joinchar"/> + </xsl:if> + <xsl:apply-templates select="."/> + </xsl:for-each> </xsl:template> <!-- = keysym = --> @@ -456,58 +509,51 @@ REMARK: Document this template <!-- = lineannotation = --> <xsl:template match="lineannotation"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = literal = --> <xsl:template match="literal"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = markup = --> <xsl:template match="markup"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = mathphrase = --> +<xsl:template match="mathphrase"> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = medialabel = --> <xsl:template match="medialabel"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = menuchoice = --> <xsl:template match="menuchoice"> - <span class="menuchoice"> - <xsl:call-template name="db2html.anchor"/> - <xsl:for-each select="*[local-name(.) != 'shortcut']"> - <xsl:if test="position() != 1"> - <xsl:text> → </xsl:text> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - <xsl:if test="shortcut"> - <span class="shortcut"> - <xsl:call-template name="db2html.anchor"/> - <xsl:text> (</xsl:text> - <xsl:apply-templates select="shortcut"/> - <xsl:text>)</xsl:text> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = menuchoice % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="menuchoice"> + <xsl:for-each select="*[not(self::shortcut)]"> + <xsl:if test="position() != 1"> + <xsl:text> ▸ </xsl:text> </xsl:if> - </span> + <xsl:apply-templates select="."/> + </xsl:for-each> + <xsl:if test="shortcut"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="shortcut"/> + </xsl:if> </xsl:template> <!-- = methodname = --> <xsl:template match="methodname"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = mousebutton = --> @@ -517,19 +563,19 @@ REMARK: Document this template <!-- = option = --> <xsl:template match="option"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = optional = --> <xsl:template match="optional"> - <span class="optional"> - <xsl:call-template name="db2html.anchor"/> - <xsl:text>[</xsl:text> - <xsl:call-template name="db2html.inline"/> - <xsl:text>]</xsl:text> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = optional % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="optional"> + <xsl:text>[</xsl:text> + <xsl:apply-templates/> + <xsl:text>]</xsl:text> </xsl:template> <!-- = orgdiv = --> @@ -549,16 +595,17 @@ REMARK: Document this template <!-- = parameter = --> <xsl:template match="parameter"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = personname = --> <xsl:template match="personname"> - <div class="personname"> - <xsl:call-template name="db.personname"/> - </div> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = personname % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="personname"> + <xsl:call-template name="db.personname"/> </xsl:template> <!-- = phone = --> @@ -583,15 +630,18 @@ REMARK: Document this template <!-- = productname = --> <xsl:template match="productname"> - <span class="productname"> - <xsl:call-template name="db2html.inline"/> - <xsl:choose> - <xsl:when test="@class = 'copyright'">©</xsl:when> - <xsl:when test="@class = 'registered'">®</xsl:when> - <xsl:when test="@class = 'trade'">™</xsl:when> - <xsl:when test="@class = 'service'">℠</xsl:when> - </xsl:choose> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = productname % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="productname"> + <xsl:apply-templates/> + <xsl:choose> + <xsl:when test="@class = 'copyright'">©</xsl:when> + <xsl:when test="@class = 'registered'">®</xsl:when> + <xsl:when test="@class = 'trade'">™</xsl:when> + <xsl:when test="@class = 'service'">℠</xsl:when> + </xsl:choose> </xsl:template> <!-- = productnumber = --> @@ -601,9 +651,7 @@ REMARK: Document this template <!-- = prompt = --> <xsl:template match="prompt"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = property = --> @@ -621,125 +669,180 @@ REMARK: Document this template <xsl:call-template name="db2html.inline"/> </xsl:template> +<!-- = ooclass = --> +<xsl:template match="ooclass"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = ooclass % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="ooclass"> + <xsl:for-each select="*"> + <xsl:if test="position() != 1"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates select="."/> + </xsl:for-each> +</xsl:template> + +<!-- = ooexception = --> +<xsl:template match="ooexception"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = ooexception % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="ooexception"> + <xsl:for-each select="*"> + <xsl:if test="position() != 1"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates select="."/> + </xsl:for-each> +</xsl:template> + +<!-- = oointerface = --> +<xsl:template match="oointerface"> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = oointerface % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="oointerface"> + <xsl:for-each select="*"> + <xsl:if test="position() != 1"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:apply-templates select="."/> + </xsl:for-each> +</xsl:template> + <!-- = quote = --> <xsl:template match="quote"> - <span class="quote"> - <xsl:call-template name="db2html.anchor"/> - <xsl:call-template name="l10n.gettext"> - <xsl:with-param name="msgid" select="'quote.format'"/> - <xsl:with-param name="role"> - <xsl:choose> - <xsl:when test="(count(ancestor::quote) mod 2) = 0"> - <xsl:text>outer</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>inner</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:with-param> - <xsl:with-param name="node" select="."/> - <xsl:with-param name="format" select="true()"/> - </xsl:call-template> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = quote % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="quote"> + <xsl:call-template name="l10n.gettext"> + <xsl:with-param name="msgid" select="'quote.format'"/> + <xsl:with-param name="role"> + <xsl:choose> + <xsl:when test="(count(ancestor::quote) mod 2) = 0"> + <xsl:text>outer</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>inner</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="format" select="true()"/> + </xsl:call-template> </xsl:template> <!-- = replaceable = --> <xsl:template match="replaceable"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = returnvalue = --> <xsl:template match="returnvalue"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = sgmltag = --> <xsl:template match="sgmltag"> - <xsl:variable name="class"> - <xsl:choose> - <xsl:when test="@class"> - <xsl:value-of select="@class"/> - </xsl:when> - <xsl:otherwise>element</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <!-- FIXME: no style tags --> - <tt class="sgmltag-{$class}"> - <xsl:call-template name="db2html.anchor"/> - <xsl:choose> - <xsl:when test="$class = 'attribute'"> - <xsl:apply-templates/> - </xsl:when> - <xsl:when test="$class = 'attvalue'"> - <xsl:apply-templates/> - </xsl:when> - <xsl:when test="$class = 'element'"> - <xsl:apply-templates/> - </xsl:when> - <xsl:when test="$class = 'emptytag'"> - <xsl:text><</xsl:text> - <xsl:apply-templates/> - <xsl:text>/></xsl:text> - </xsl:when> - <xsl:when test="$class = 'endtag'"> - <xsl:text></</xsl:text> - <xsl:apply-templates/> - <xsl:text>></xsl:text> - </xsl:when> - <xsl:when test="$class = 'genentity'"> - <xsl:text>&</xsl:text> - <xsl:apply-templates/> - <xsl:text>;</xsl:text> - </xsl:when> - <xsl:when test="$class = 'namespace'"> - <xsl:apply-templates/> - </xsl:when> - <xsl:when test="$class = 'numcharref'"> - <xsl:text>&#</xsl:text> - <xsl:apply-templates/> - <xsl:text>;</xsl:text> - </xsl:when> - <xsl:when test="$class = 'paramentity'"> - <xsl:text>%</xsl:text> - <xsl:apply-templates/> - <xsl:text>;</xsl:text> - </xsl:when> - <xsl:when test="$class = 'pi'"> - <xsl:text><?</xsl:text> - <xsl:apply-templates/> - <xsl:text>></xsl:text> - </xsl:when> - <xsl:when test="$class = 'sgmlcomment'"> - <xsl:text><!--</xsl:text> - <xsl:apply-templates/> - <xsl:text>--></xsl:text> - </xsl:when> - <xsl:when test="$class = 'starttag'"> - <xsl:text><</xsl:text> - <xsl:apply-templates/> - <xsl:text>></xsl:text> - </xsl:when> - <xsl:when test="$class = 'xmlpi'"> - <xsl:text><?</xsl:text> - <xsl:apply-templates/> - <xsl:text>?></xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </tt> + <xsl:call-template name="db2html.inline"> + <xsl:with-param name="class"> + <xsl:text>sgmltag</xsl:text> + <xsl:if test="@class"> + <xsl:value-of select="concat(' sgmltag-', @class)"/> + </xsl:if> + </xsl:with-param> + </xsl:call-template> +</xsl:template> + +<!-- = sgmltag % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="sgmltag"> + <xsl:choose> + <xsl:when test="@class = 'attribute'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@class = 'attvalue'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@class = 'element'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@class = 'emptytag'"> + <xsl:text><</xsl:text> + <xsl:apply-templates/> + <xsl:text>/></xsl:text> + </xsl:when> + <xsl:when test="@class = 'endtag'"> + <xsl:text></</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:when> + <xsl:when test="@class = 'genentity'"> + <xsl:text>&</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:when> + <xsl:when test="@class = 'localname'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@class = 'namespace'"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@class = 'numcharref'"> + <xsl:text>&#</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:when> + <xsl:when test="@class = 'paramentity'"> + <xsl:text>%</xsl:text> + <xsl:apply-templates/> + <xsl:text>;</xsl:text> + </xsl:when> + <xsl:when test="@class = 'pi'"> + <xsl:text><?</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:when> + <xsl:when test="@class = 'prefix'"> + <xsl:apply-templates/> + <xsl:text>:</xsl:text> + </xsl:when> + <xsl:when test="@class = 'sgmlcomment'"> + <xsl:text><!--</xsl:text> + <xsl:apply-templates/> + <xsl:text>--></xsl:text> + </xsl:when> + <xsl:when test="@class = 'starttag'"> + <xsl:text><</xsl:text> + <xsl:apply-templates/> + <xsl:text>></xsl:text> + </xsl:when> + <xsl:when test="@class = 'xmlpi'"> + <xsl:text><?</xsl:text> + <xsl:apply-templates/> + <xsl:text>?></xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- = shortcut = --> <xsl:template match="shortcut"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = shortcut % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="shortcut"> + <xsl:text>(</xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> </xsl:template> <!-- = state = --> @@ -754,22 +857,17 @@ REMARK: Document this template <!-- = structfield = --> <xsl:template match="structfield"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = structname = --> <xsl:template match="structname"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = subscript = --> <xsl:template match="subscript"> - <sub> + <sub class="subscript"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> </sub> @@ -777,7 +875,7 @@ REMARK: Document this template <!-- = superscript = --> <xsl:template match="superscript"> - <sup> + <sup class="superscript"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> </sup> @@ -795,9 +893,7 @@ REMARK: Document this template <!-- = systemitem = --> <xsl:template match="systemitem"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = token = --> @@ -807,16 +903,18 @@ REMARK: Document this template <!-- = trademark = --> <xsl:template match="trademark"> - <span class="trademark"> - <xsl:call-template name="db2html.anchor"/> - <xsl:apply-templates/> - <xsl:choose> - <xsl:when test="@class = 'copyright'">©</xsl:when> - <xsl:when test="@class = 'registered'">®</xsl:when> - <xsl:when test="@class = 'service'">℠</xsl:when> - <xsl:otherwise>™</xsl:otherwise> - </xsl:choose> - </span> + <xsl:call-template name="db2html.inline"/> +</xsl:template> + +<!-- = trademark % db2html.inline.content.mode = --> +<xsl:template mode="db2html.inline.content.mode" match="trademark"> + <xsl:apply-templates/> + <xsl:choose> + <xsl:when test="@class = 'copyright'">©</xsl:when> + <xsl:when test="@class = 'registered'">®</xsl:when> + <xsl:when test="@class = 'service'">℠</xsl:when> + <xsl:otherwise>™</xsl:otherwise> + </xsl:choose> </xsl:template> <!-- = type = --> @@ -826,31 +924,22 @@ REMARK: Document this template <!-- = uri = --> <xsl:template match="uri"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = userinput = --> <xsl:template match="userinput"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="true()"/> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = varname = --> <xsl:template match="varname"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="mono" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> <!-- = wordasword = --> <xsl:template match="wordasword"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="italic" select="true()"/> - </xsl:call-template> + <xsl:call-template name="db2html.inline"/> </xsl:template> </xsl:stylesheet> diff --git a/xslt/gettext/l10n.xml.in b/xslt/gettext/l10n.xml.in index 65141d0c..b98ec5f7 100644 --- a/xslt/gettext/l10n.xml.in +++ b/xslt/gettext/l10n.xml.in @@ -625,6 +625,43 @@ </_msg> </msgset> +<msgset> + <msgid>citation.format</msgid> + <!-- + This is a special format message. Please read the full translator + documentation before translating this message. The documentation + is maintained as part of the stylesheet documentation in DocBook. + For your convenience, it has also been converted to an HTML file + named STYLESHEETS.xml in the i18n directory. + + citetitle - An inline bibliographic reference to another published work + http://docbook.org/tdg/en/html/citation.html + + This is a format message used to format inline citations to other + published works. The content is typically an abbreviation of the + authors' last names. In English, this abbreviation is usually + written inside [square brackets]. + + Special elements in the message will be replaced with the + appropriate content, as follows: + + citation - The text content of the citation element, possibly + as a link to an entry in the bibliography + + These should be written as empty XML elements. Due to limitations + in intltool, I can't write XML content in translator comments. To + insert the citation, simply write left angle bracket, citation, + slash, right angle bracket. + + Additionally, format messages can use the i, b, and tt markup tags + to mark text as italic, bold, and monospace. + --> + <_msg> + <msgid>citation.format</msgid> + <msgstr>[<citation/>]</msgstr> + </_msg> +</msgset> + <!-- == chapter == --> <msgset> <msgid>chapter.digit</msgid> |