diff options
author | Mikael Hallendal <micke@codefactory.se> | 2002-04-15 19:27:47 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2002-04-15 19:27:47 +0000 |
commit | 01f93cd1c6498b5e2580e42da92e0fee3ebaf4ed (patch) | |
tree | 3c40c34ce2e3af8f217a5b6573ebfa393103205a | |
parent | 98e468c943063e41ff3c4c76eb8c864b83284aa4 (diff) | |
download | yelp-01f93cd1c6498b5e2580e42da92e0fee3ebaf4ed.tar.gz |
- show error dialog if open fails.
2002-04-15 Mikael Hallendal <micke@codefactory.se>
* src/yelp-html.c (yelp_html_do_non_docbook):
- show error dialog if open fails.
* src/yelp-error.h (YELP_ERROR): added error for non-docbook
documents.
* src/yelp-db2html.c (yelp_db2html_convert): use stylesheet from
stylesheets/.
(yelp_db2html_convert): updated to reflect changes in the
stylesheet.
* stylesheets/*: Added, includs patch from sander to
gnome-doc-list.
* configure.in (AC_OUTPUT): added stylesheets/Makefile.
* Makefile.am (SUBDIRS): added stylesheets
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | src/yelp-db2html.c | 7 | ||||
-rw-r--r-- | src/yelp-error.h | 4 | ||||
-rw-r--r-- | src/yelp-html.c | 9 | ||||
-rw-r--r-- | src/yelp-view-content.c | 3 | ||||
-rw-r--r-- | stylesheets/Makefile.am | 9 | ||||
-rw-r--r-- | stylesheets/l10n.xml | 117 | ||||
-rw-r--r-- | stylesheets/yelp-custom.xsl | 1152 | ||||
-rw-r--r-- | stylesheets/yelp-customization.xsl | 304 |
11 files changed, 1618 insertions, 10 deletions
@@ -1,3 +1,23 @@ +2002-04-15 Mikael Hallendal <micke@codefactory.se> + + * src/yelp-html.c (yelp_html_do_non_docbook): + - show error dialog if open fails. + + * src/yelp-error.h (YELP_ERROR): added error for non-docbook + documents. + + * src/yelp-db2html.c (yelp_db2html_convert): use stylesheet from + stylesheets/. + (yelp_db2html_convert): updated to reflect changes in the + stylesheet. + + * stylesheets/*: Added, includs patch from sander to + gnome-doc-list. + + * configure.in (AC_OUTPUT): added stylesheets/Makefile. + + * Makefile.am (SUBDIRS): added stylesheets + 2002-04-14 Mikael Hallendal <micke@codefactory.se> * src/yelp-view-toc.c: pretty-fied the sub-pages too. diff --git a/Makefile.am b/Makefile.am index f6564f55..aaa9c73a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src po +SUBDIRS = src stylesheets po @INTLTOOL_DESKTOP_RULE@ diff --git a/configure.in b/configure.in index f9b1047e..75cf796c 100644 --- a/configure.in +++ b/configure.in @@ -65,5 +65,6 @@ dnl <= Check for bzip2 > 1.0.0 AC_OUTPUT([ Makefile src/Makefile +stylesheets/Makefile po/Makefile.in ]) diff --git a/src/yelp-db2html.c b/src/yelp-db2html.c index 36c2d9cf..08e6fb76 100644 --- a/src/yelp-db2html.c +++ b/src/yelp-db2html.c @@ -92,7 +92,7 @@ yelp_db2html_convert (const gchar *document, gchar *gdb_stylesheet; /* stylesheet location based on Linux Standard Base * * http://www.linuxbase.org/spec/gLSB/gLSB/sgmlr002.html */ - gdb_stylesheet = g_strconcat (PREFIX "/share/sgml/docbook/gnome-customization-0.1/gnome-customization.xsl", NULL); + gdb_stylesheet = g_strconcat (DATADIR "/sgml/docbook/yelp/yelp-customization.xsl", NULL); gdb_xslreturn = xsltParseStylesheetFile ((const xmlChar *) gdb_stylesheet); g_free (gdb_stylesheet); @@ -161,10 +161,7 @@ yelp_db2html_convert (const gchar *document, params[4] = NULL; if (has_rootid) { - /* FIXME: Change this when sander has the new - stylesheets ready */ - params[4] = "rootid"; -/* params[4] = "gdb_rootid"; */ + params[4] = "gdb_rootid"; params[5] = g_strconcat("\"", gdb_rootid + 1, "\"", NULL) ; params[6] = NULL; } diff --git a/src/yelp-error.h b/src/yelp-error.h index a6b57c1c..29c01578 100644 --- a/src/yelp-error.h +++ b/src/yelp-error.h @@ -26,7 +26,9 @@ #define YELP_ERROR yelp_error_quark () typedef enum { - YELP_ERROR_DOCBOOK_2_HTML + YELP_ERROR_DOCBOOK_2_HTML, + YELP_ERROR_FAILED_OPEN + } YelpError; GQuark yelp_error_quark (void) G_GNUC_CONST; diff --git a/src/yelp-html.c b/src/yelp-html.c index 751d7196..3484f6bc 100644 --- a/src/yelp-html.c +++ b/src/yelp-html.c @@ -35,6 +35,7 @@ #include "yelp-util.h" #include "yelp-marshal.h" #include "yelp-db2html.h" +#include "yelp-error.h" #include "yelp-html.h" #define d(x) @@ -205,6 +206,8 @@ yelp_html_do_close (void *context) gtk_adjustment_set_value (gtk_layout_get_vadjustment (GTK_LAYOUT (priv->view)), 0); + gdk_window_set_cursor (GTK_WIDGET (priv->view)->window, NULL); + return 0; } @@ -299,7 +302,11 @@ yelp_html_do_non_docbook (YelpHtml *html, HtmlStream *stream, d(g_print ("Opening took: %f\n", g_timer_elapsed (timer, 0))); if (result != GNOME_VFS_OK) { - g_warning ("Failed to open: %s", uri); + g_set_error (error, + YELP_ERROR, + YELP_ERROR_FAILED_OPEN, + _("Failed to open document '%s'"), + uri); return; } diff --git a/src/yelp-view-content.c b/src/yelp-view-content.c index a5623663..87971440 100644 --- a/src/yelp-view-content.c +++ b/src/yelp-view-content.c @@ -166,11 +166,10 @@ yvc_tree_selection_changed_cb (GtkTreeSelection *selection, if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->content_tree)); - gtk_tree_model_get (model, &iter, + gtk_tree_model_get (model, &iter, 1, §ion, -1); -/* yelp_html_open_section (YELP_HTML (priv->html_view), section); */ g_signal_emit (content, signals[URL_SELECTED], 0, section->reference, section->uri, FALSE); } diff --git a/stylesheets/Makefile.am b/stylesheets/Makefile.am new file mode 100644 index 00000000..14127b3a --- /dev/null +++ b/stylesheets/Makefile.am @@ -0,0 +1,9 @@ +yelpcustomizationdir=$(datadir)/sgml/docbook/yelp + +yelpcustomization_DATA = \ + yelp-customization.xsl \ + yelp-custom.xsl \ + l10n.xml + +EXTRA_DIST=$(yelpcustomization_DATA) + diff --git a/stylesheets/l10n.xml b/stylesheets/l10n.xml new file mode 100644 index 00000000..7cdba9fc --- /dev/null +++ b/stylesheets/l10n.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="US-ASCII"?> + +<!-- Localization of the text added by GNOME stylesheets. + Please note: all non-ascii symbols should be encoded using Unicode + character entities, see Russian localization for an example. To + convert the file from any normal encoding to this form, use GNU + recode: + recode -d input_encoding..h0 l10n.xml + Please do not convert the file to UTF8 or any other encoding + unless you really understand how i18n of Norman Walsh's modular + stylesheets works and are ready to rewrite the rest of it in + UTF8, too. + --> + +<i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0"> +<!-- ************ English ******************* --> +<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"> + <l:gentext key="Title" text="Title"/> + <l:gentext key="Author" text="Author"/> + <l:gentext key="Authors" text="Authors"/> + <l:gentext key="Affiliation" text="Affiliation"/> + <l:gentext key="History" text="History"/> + <l:gentext key="Email" text="Email"/> + <l:gentext key="Publisher" text="Publisher"/> + <l:gentext key="Date" text="Date"/> + + <l:context name="title"> + <l:template name="bookinfo" text="About This Document"/> + <l:template name="articleinfo" text="About This Document"/> + </l:context> + + <l:context name="section-xref"> + <l:template name="bridgehead" text="%t"/> + <l:template name="sect1" text="%t"/> + <l:template name="sect2" text="%t"/> + <l:template name="sect3" text="%t"/> + <l:template name="sect4" text="%t"/> + <l:template name="sect5" text="%t"/> + <l:template name="section" text="%t"/> + <l:template name="simplesect" text="%t"/> + </l:context> + + <l:context name="section-xref-numbered"> + <l:template name="bridgehead" text="%t"/> + <l:template name="sect1" text="%t"/> + <l:template name="sect2" text="%t"/> + <l:template name="sect3" text="%t"/> + <l:template name="sect4" text="%t"/> + <l:template name="sect5" text="%t"/> + <l:template name="section" text="%t"/> + <l:template name="simplesect" text="%t"/> + </l:context> + +</l:l10n> + +<!-- ************ Russian ******************* --> +<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="ru"> + <l:gentext key="Title" text="Заглавие"/> <!-- zaglavie --> + <l:gentext key="Author" text="Автор"/> <!-- avtor --> + <l:gentext key="Authors" text="Авторы"/> <!-- avtory --> + <l:gentext key="Affiliation" text="Организация"/> <!-- organizaciya --> + <l:gentext key="Email" text="Email"/> + <l:gentext key="Publisher" text="Издательство"/> <!-- izdatel'stvo --> + <l:gentext key="Date" text="Дата"/> <!-- data --> + <l:context name="title"> + <l:template name="bookinfo" text="Об этом документе"/> + <!-- Ob etom dokumente --> + <l:template name="articleinfo" text="Об этом документе"/> + </l:context> +</l:l10n> + +<!-- ************ Estonian ******************* --> +<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="et"> + <l:gentext key="Title" text="Pealkiri"/> + <l:gentext key="Author" text="Autor"/> + <l:gentext key="Authors" text="Autorid"/> + <l:gentext key="Affiliation" text="Organisatsioon"/> + <l:gentext key="Email" text="E-post"/> + <l:gentext key="Publisher" text="Kirjastaja"/> + <l:gentext key="Date" text="Kuupäev"/> + <l:context name="title"> + <l:template name="bookinfo" text="Sellest dokumendist"/> + <l:template name="articleinfo" text="Sellest dokumendist"/> + </l:context> +</l:l10n> + +<!-- *************** Italian ***************** --> +<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="it"> + <l:gentext key="Title" text="Titolo"/> + <l:gentext key="Author" text="Autore"/> + <l:gentext key="Authors" text="Autori"/> + <l:gentext key="Affiliation" text="Organizzazione"/> + <l:gentext key="Email" text="Email"/> + <l:gentext key="Publisher" text="Editore"/> + <l:gentext key="Date" text="Data"/> + <l:context name="title"> + <l:template name="bookinfo" text="Informazioni su questo documento"/> + <l:template name="articleinfo" text="Informazioni su questo documento"/> + </l:context> + </l:l10n> + +<!-- ************ Greek ******************* --> +<l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="el"> + <l:gentext key="Title" text="Τίτλος"/> + <l:gentext key="Author" text="Συγγραφέας"/> + <l:gentext key="Authors" text="Συγγραφείς"/> + <l:gentext key="Affiliation" text="Υπαγωγή"/> + <l:gentext key="Email" text="Ηλεκ. Διεύθ."/> + <l:gentext key="Publisher" text="Εκδότης"/> + <l:gentext key="Date" text="Ημερομηνία"/> + <l:context name="title"> + <l:template name="bookinfo" text="Περί αυτού του εγγράφου"/> + <l:template name="articleinfo" text="Περί αυτού του εγγράφου"/> + </l:context> +</l:l10n> + +</i18n> diff --git a/stylesheets/yelp-custom.xsl b/stylesheets/yelp-custom.xsl new file mode 100644 index 00000000..801df3fb --- /dev/null +++ b/stylesheets/yelp-custom.xsl @@ -0,0 +1,1152 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0' + xmlns="http://www.w3.org/TR/xhtml1/transitional" + exclude-result-prefixes="#default"> + +<!--******************************Admonitions*******************--> + +<!--********************************Variables*******************--> + +<!-- Localization --> +<xsl:param name="local.l10n.xml" select="document('l10n.xml')"/> + +<!-- Should graphics be included in admonitions? 0 or 1 --> +<xsl:param name="admon.graphics" select="1"/> + +<!-- Specifies the default path for admonition graphics --> +<xsl:param name="admon.graphics.path">./stylesheet/</xsl:param> + +<!-- Specifies the default graphic file if none is given. --> +<xsl:param name="graphic.default.extension" select="'png'" doc:type="string"/> + +<!--*******************************Templates********************--> + +<!-- Moves the title just to the right of the admonition graphic. --> +<xsl:template name="graphical.admonition"> + <div class="{name(.)}"> + <xsl:if test="$admon.style != ''"> + <xsl:attribute name="style"> + <xsl:value-of select="$admon.style"/> + </xsl:attribute> + </xsl:if> + <table border="0"> + <tr> + <td rowspan="2" align="center" valign="top"> + <xsl:attribute name="width"> + <xsl:call-template name="admon.graphic.width"/> + </xsl:attribute> + <img> + <xsl:attribute name="src"> + <xsl:call-template name="admon.graphic"/> + </xsl:attribute> + </img> + </td> + <th align="left" valign="top"> + <xsl:call-template name="anchor"/> + <xsl:apply-templates select="." mode="object.title.markup"/> + </th> + </tr> + <tr> + <td colspan="2" align="left" valign="top"> + <xsl:apply-templates/> + </td> + </tr> + </table> + </div> +</xsl:template> + +<!-- ****************************Emphasis************************--> + +<!-- Custom template to make the application tag bold fixed width --> +<xsl:template match="application"> + <xsl:call-template name="inline.boldmonoseq"/> +</xsl:template> + +<!-- ***************************Author**********************--> + +<!-- Adds the string "Author/Authors" to the author tag in the + title page. Also prints editors and othercredit --> + +<xsl:template match="artheader/author|articleinfo/author|bookinfo/author|authorgroup/author|editor" mode="titlepage.mode"> +<xsl:variable name="author.org" select=".//orgname"/> +<xsl:variable name="author.email" select=".//email"/> +<dl> + <dt><xsl:call-template name="person.name"/></dt> + <xsl:if test="$author.org"> + <dd><strong> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Affiliation'"/> + </xsl:call-template><xsl:text>: </xsl:text> + </strong> + <xsl:apply-templates select="$author.org"/></dd> + </xsl:if> + <xsl:if test="$author.email"> + <dd><strong> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Email'"/> + </xsl:call-template><xsl:text>: </xsl:text> + + </strong> + <xsl:apply-templates select="$author.email"/></dd> + </xsl:if> +</dl> +</xsl:template> + +<xsl:template match="authorgroup" mode="titlepage.mode"> + + <!-- count the number of authors --> + <xsl:variable name="numaut" select="count(author)"/> + <xsl:choose> + <xsl:when test="$numaut > 1"> + <h2> + <xsl:call-template name="gentext" mode="titlepage.mode"> + <xsl:with-param name="key" select="'Authors'"/> + </xsl:call-template> + </h2> + </xsl:when> + <xsl:when test="$numaut = 1"> + <h2> + <xsl:call-template name="gentext" mode="titlepage.mode"> + <xsl:with-param name="key" select="'Author'"/> + </xsl:call-template> + </h2> + </xsl:when> + <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="author" mode="titlepage.mode"/> + <!-- Now let us deal with editors --> + <xsl:variable name="editors" select="editor"/> + <xsl:if test="$editors"> + <h2> + <xsl:call-template name="gentext" mode="titlepage.mode"> + <xsl:with-param name="key" select="'Editedby'"/> + </xsl:call-template> + </h2> + <xsl:apply-templates select="editor" mode="titlepage.mode"/> + </xsl:if> + <!-- finally, everyone else --> + <xsl:apply-templates select="othercredit" mode="titlepage.mode"/> + </xsl:template> + +<!-- **************************Copyright*************************--> + +<!-- Makes the copyright years appear as a range. --> +<xsl:param name="make.year.ranges" select="1" doc:type="boolean"/> + +<xsl:template match="copyright[1]" mode="titlepage.mode"> + + <div class="{name(.)}"> + <h2> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Copyright'"/> + </xsl:call-template> + </h2> + + <p class="{name(.)}"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Copyright'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="dingbat"> + <xsl:with-param name="dingbat">copyright</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:call-template name="copyright.years"> + <xsl:with-param name="years" select="year"/> + <xsl:with-param name="print.ranges" select="$make.year.ranges"/> + <xsl:with-param name="single.year.ranges" + select="$make.single.year.ranges"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="holder" mode="titlepage.mode"/> + </p> + </div> + +</xsl:template> + +<!-- ****************************Emphasis************************--> + +<!-- Custom template to make the emphasis tag bold the text instead of + the text be italicized. --> +<xsl:template match="emphasis"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +<!-- ************************Glossary***************************--> + +<!-- Importing the Norman Walsh's stylesheet as the basis. --> +<!-- +<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh-1.45/html/chunk.xsl"/> +--> +<xsl:template match="glossentry/glossterm"> + <dt> + <b> + <xsl:apply-templates/> + </b> + </dt> +</xsl:template> + +<xsl:template match="glossentry/glossterm[1]" priority="2"> + <dt> + <b> + <xsl:call-template name="anchor"> + <xsl:with-param name="node" select=".."/> + </xsl:call-template> + <xsl:apply-templates/> + </b> + </dt> +</xsl:template> + +<xsl:template match="glossentry/glossdef[@subject]"> + + <xsl:if test="position()=2"> + <xsl:text disable-output-escaping="yes"><dd></xsl:text> + <xsl:text disable-output-escaping="yes"><div class="informaltable"></xsl:text> + <xsl:text disable-output-escaping="yes"><table border="0"></xsl:text> + <xsl:text disable-output-escaping="yes"><tbody></xsl:text> + </xsl:if> + + <tr> + <td valign="top"> + <p> + <xsl:value-of select="@subject"/> + </p> + </td> + <td> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + </td> + </tr> + + <xsl:if test="glossseealso"> + <p> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso'"/> + </xsl:call-template> + <xsl:apply-templates select="glossseealso"/> + </p> + </xsl:if> + + <xsl:if test="position()=last()"> + <xsl:text disable-output-escaping="yes"></tbody></xsl:text> + <xsl:text disable-output-escaping="yes"></table></xsl:text> + <xsl:text disable-output-escaping="yes"></div></xsl:text> + <xsl:text disable-output-escaping="yes"></dd></xsl:text> + </xsl:if> + +</xsl:template> + +<!-- ****************************Emphasis************************--> + +<!-- Custom template to make the guimenu, guisubmenu, guimenuitem and guilabel + tags bold the text. --> + + <xsl:template match="guimenu|guisubmenu|guimenuitem|guilabel"> + <xsl:call-template name="inline.boldseq"/> </xsl:template> + +<!-- *************************Keycombo***************************--> + +<xsl:template match="keycombo"> + <xsl:variable name="action" select="@action"/> + <xsl:variable name="joinchar"> + <xsl:choose> + <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when> + <xsl:when test="$action='simul'">+</xsl:when> + <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:otherwise>+</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:for-each select="./*"> + <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if> + <xsl:apply-templates/> + </xsl:for-each> +</xsl:template> + +<!-- *****************************Legalnotice*******************--> + +<!-- Puts a link on the title page to each legalnotice. --> +<xsl:param name="generate.legalnotice.link" select="0"/> + +<xsl:template match="legalnotice[1]" mode="titlepage.mode"> + <xsl:text>
</xsl:text> + <h2> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'legalnotice'"/> + </xsl:call-template> + </h2> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<!-- Makes the address inside the legalnotice inline instead of separated + from the body of the text.--> +<xsl:template match="legalnotice//address"> + <xsl:param name="suppress-numbers" select="'0'"/> + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + + <xsl:variable name="rtf"> + <xsl:apply-templates mode="inline-address"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$suppress-numbers = '0' + and @linenumbering = 'numbered' + and $use.extensions != '0' + and $linenumbering.extension != '0'"> + <xsl:call-template name="number.rtf.lines"> + <xsl:with-param name="rtf" select="$rtf"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates mode="inline-address"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Added a comma after the street, city and postal code. --> +<xsl:template match="street|city|postcode" mode="inline-address"> + <xsl:apply-templates mode="inline-address"/> + <xsl:text>, </xsl:text> +</xsl:template> + +<xsl:template match="state|country" mode="inline-address"> + <xsl:apply-templates mode="inline-address"/> +</xsl:template> + + +<xsl:template match="legalnotice/title" mode="titlepage.mode"> + <h2><xsl:apply-templates/></h2> +</xsl:template> + + + +<!-- *********************Navigation header/footer************************--> + +<!-- Custom template to add <<< and >>> to navigation header/footer --> + +<!-- ==================================================================== --> + +<xsl:template name="header.navigation"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <xsl:if test="$suppress.navigation = '0'"> + <div class="navheader"> + <table width="100%" summary="Navigation header"> + <tr> + <th colspan="3" align="center"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </th> + </tr> + <tr> + <td width="20%" align="left"> + <xsl:if test="count($prev)>0"> + <a accesskey="p"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text><<< </xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-prev</xsl:with-param> + </xsl:call-template> + </a> + </xsl:if> + <xsl:text> </xsl:text> + </td> + <th width="60%" align="center"> + <xsl:choose> + <xsl:when test="count($up) > 0 and $up != $home"> + <xsl:apply-templates select="$up" mode="object.title.markup"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </th> + <td width="20%" align="right"> + <xsl:text> </xsl:text> + <xsl:if test="count($next)>0"> + <a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-next</xsl:with-param> + </xsl:call-template> + <xsl:text> >>></xsl:text> + </a> + </xsl:if> + </td> + </tr> + </table> + <hr/> + </div> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="footer.navigation"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <xsl:if test="$suppress.navigation = '0'"> + <div class="navfooter"> + <hr/> + <table width="100%" summary="Navigation footer"> + <tr> + <td width="40%" align="left"> + <xsl:if test="count($prev)>0"> + <a accesskey="p"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text><<< </xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-prev</xsl:with-param> + </xsl:call-template> + </a> + </xsl:if> + <xsl:text> </xsl:text> + </td> + <td width="20%" align="center"> + <xsl:choose> + <xsl:when test="$home != ."> + <a accesskey="h"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$home"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-home</xsl:with-param> + </xsl:call-template> + </a> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </td> + <td width="40%" align="right"> + <xsl:text> </xsl:text> + <xsl:if test="count($next)>0"> + <a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-next</xsl:with-param> + </xsl:call-template> + <xsl:text> >>></xsl:text> + </a> + </xsl:if> + </td> + </tr> + + <tr> + <td width="40%" align="left"> + <xsl:apply-templates select="$prev" mode="object.title.markup"/> + <xsl:text> </xsl:text> + </td> + <td width="20%" align="center"> + <xsl:choose> + <xsl:when test="count($up)>0"> + <a accesskey="u"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">nav-up</xsl:with-param> + </xsl:call-template> + </a> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </td> + <td width="40%" align="right"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="$next" mode="object.title.markup"/> + </td> + </tr> + </table> + </div> + </xsl:if> +</xsl:template> + + +<!-- ***************************Othercredit**********************--> + +<!-- Puts Othercredit on title page. --> + +<xsl:template match="othercredit" mode="titlepage.mode"> +<xsl:variable name="contrib" select="string(contrib)"/> + +<!-- The following piece of code tries to find all <othercredit> witht +he same contrib field so that they can be listed under the same +heading. Borrowed from Walsh's modular stylesheets --> + + <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])"> + <xsl:if test="contrib"> + <h2><xsl:apply-templates mode="titlepage.mode" + select="contrib"/></h2> + </xsl:if> + <dl> + <xsl:apply-templates select= "." mode="titlepage.othercredits"/> + <xsl:apply-templates + select="following-sibling::othercredit[string(contrib)=$contrib]" + mode="titlepage.othercredits"/> + </dl> + </xsl:if> + + +</xsl:template> + +<xsl:template match="othercredit" mode="titlepage.othercredits"> +<xsl:variable name="author.org" select=".//orgname"/> +<xsl:variable name="author.email" select=".//email"/> + + <dt><xsl:call-template name="person.name"/></dt> + <xsl:if test="$author.org"> + <dd><strong> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Affiliation'"/> + </xsl:call-template><xsl:text>: </xsl:text> + </strong> + <xsl:apply-templates select="$author.org"/> + </dd> + </xsl:if> + <xsl:if test="$author.email"> + <dd><strong> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Email'"/> + </xsl:call-template><xsl:text>: </xsl:text> + </strong> + <xsl:apply-templates select="$author.email"/> + </dd> + </xsl:if> +</xsl:template> + +<!-- This makes part title to be shown as "Part I. Basics", rather + than "Basics" --> + + +<xsl:template match="part/title" mode="titlepage.mode" priority="2"> + <xsl:call-template name="component.title"> + <xsl:with-param name="node" select="ancestor::part[1]"/> + </xsl:call-template> +</xsl:template> + +<!-- *******************************Procedure*******************--> + +<xsl:param name="formal.procedures"> + <xsl:if test="procedure[@role='informal']"> + <xsl:text>0</xsl:text> + </xsl:if> +</xsl:param> + +<!-- ****************************Publisher********************--> + +<xsl:template match="publisher[1]" mode="titlepage.mode"> + + <div class="{name(.)}"> + <h2> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Publisher'"/> + </xsl:call-template> + </h2> + + <xsl:apply-templates mode="titlepage.mode"/> + </div> + +</xsl:template> + +<!-- ***************************Releaseinfo*********************--> + +<!-- Custom template to make the releaseinfo tag italicized. --> +<xsl:template match="releaseinfo" mode="titlepage.mode"> + <p class="{name(.)}"><i> + <xsl:apply-templates mode="titlepage.mode"/> + </i></p> +</xsl:template> + +<!-- ****************************Revhistory********************--> + +<xsl:template match="revhistory" mode="titlepage.mode"> + <xsl:variable name="numcols"> +<!-- + <xsl:choose> + <xsl:when test="//authorinitials">3</xsl:when> + <xsl:otherwise>2</xsl:otherwise> + </xsl:choose> +--> + 4 + </xsl:variable> + + <div class="{name(.)}"> + <h2><xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'History'"/> + </xsl:call-template> + </h2> + <table border="1" width="100%" summary="Revision history"> + <tr> + <th align="left" valign="top" colspan="1"> + <b> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Title'"/> + </xsl:call-template> + </b> + </th> + <th align="left" valign="top" colspan="1"> + <b> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Date'"/> + </xsl:call-template> + </b> + </th> + <th align="left" valign="top" colspan="1"> + <b> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Author'"/> + </xsl:call-template> + </b> + </th> + <th align="left" valign="top" colspan="1"> + <b> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Publisher'"/> + </xsl:call-template> + </b> + </th> + </tr> + <xsl:apply-templates mode="titlepage.mode"> + <xsl:with-param name="numcols" select="$numcols"/> + </xsl:apply-templates> + </table> + </div> +</xsl:template> + +<xsl:template match="revhistory/revision" mode="titlepage.mode"> + <xsl:param name="numcols" select="'4'"/> + <xsl:variable name="revnumber" select=".//revnumber"/> + <xsl:variable name="revdate" select=".//date"/> + <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> + + <xsl:variable name="revision.authors" + select="$revremark/para[@role='author']|.//authorinitials"/> + + + + <xsl:variable name="revision.publisher" select="$revremark/para[@role='publisher']"/> + + + <xsl:variable name="revision.other" select="$revremark/para[@role='']"/> + + + <tr> + <td align="left"> + <p> + <xsl:value-of select="$revnumber"/> + </p> + </td> + + <td align="left"> + <p> + <xsl:value-of select="$revdate"/> + </p> + </td> + + <td align="left"> + + <xsl:apply-templates + select="$revision.authors"/> + + </td> + + <td align="left"> + <xsl:apply-templates + select="$revision.publisher"/> + + </td> + </tr> + <xsl:if test="$revision.other"> + <tr> + <td align="left" colspan="4"> + <xsl:apply-templates select="$revision.other"/> + </td> + </tr> + </xsl:if> +</xsl:template> + +<xsl:template match="revision/revnumber" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/date" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/authorinitials" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revremark" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revdescription" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + + + +<!-- ==================================================================== --> + +<!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. --> + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.recto"> + + <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="bookinfo/title"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="title"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + + <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="bookinfo/subtitle"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="subtitle"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/publisher"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/> + +</xsl:template> + + + + + + + + + + + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.verso"> + +</xsl:template> + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.separator"> + +</xsl:template> + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.before.recto"> + +</xsl:template> + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.before.verso"> + <img align="left" src="stylesheet/gnome-logo-icon.png" alt="GNOME Logo"/> + +</xsl:template> + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage"> + <div class="titlepage"> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.before.recto"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.recto"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.before.verso"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.verso"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="book.titlepage.separator"/> + </div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="*" mode="book.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="*" mode="book.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="title" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="subtitle" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="authorgroup" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="author" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="publisher" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="copyright" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="legalnotice" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="revhistory" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="revision" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="releaseinfo" mode="book.titlepage.recto.auto.mode"> +<div use-attribute-sets="book.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="book.titlepage.recto.mode"/> +</div> +</xsl:template> + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.recto"> + + <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="articleinfo/title"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="artheader/title"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/title"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="title"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + + <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="articleinfo/subtitle"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="artheader/subtitle"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/> + </xsl:when> + <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="subtitle"> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/author"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/publisher"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/publisher"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/revision"/> + + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/> + +</xsl:template> + + + + + + + + + + + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.verso"> + +</xsl:template> + + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.separator"> + +</xsl:template> + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.before.recto"> + +</xsl:template> + + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.before.verso"> + <img align="left" src="stylesheet/gnome-logo-icon.png" alt="GNOME Logo"/> + +</xsl:template> + + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage"> + <div class="titlepage"> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.before.recto"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.recto"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.before.verso"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.verso"/> + <xsl:call-template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="article.titlepage.separator"/> + </div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="*" mode="article.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="*" mode="article.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="title" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="subtitle" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="authorgroup" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="author" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="publisher" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="copyright" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="legalnotice" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="revhistory" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="revision" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + +<xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="releaseinfo" mode="article.titlepage.recto.auto.mode"> +<div use-attribute-sets="article.titlepage.recto.style"> +<xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." mode="article.titlepage.recto.mode"/> +</div> +</xsl:template> + + +<!--**************************TOC*********************************--> + +<!-- Should books have a TOC? 0 or 1 --> +<xsl:param name="generate.book.toc" select="1" doc:type="boolean"/> + +<!-- Should articles have a TOC? 0 or 1 --> +<xsl:param name="generate.article.toc" select="1" doc:type="boolean"/> + +<!-- Should parts have a TOC? 0 or 1 --> +<xsl:param name="generate.part.toc" select="1" doc:type="boolean"/> + +<!-- Should chapters be labeled? 0 or 1 --> +<xsl:param name="chapter.autolabel" select="1" doc:type="boolean"/> + +<!-- Should sections be labeled? 0 or 1 --> +<xsl:param name="section.autolabel" select="1" doc:type ="boolean"/> + +<!-- Related to section labels, should those labels include the chapter + number in them (i.e., 1.1, 1.2, 1.3, 1.4 ) --> +<xsl:param name="section.label.includes.component.label" select="1" doc:type="boolean"/> + +<!-- Makes the id as the filename for each chunk. --> +<xsl:param name="use.id.as.filename" select="1" doc:type='boolean'/> + +<!-- Should the first section have its own chunk? 0 or 1 --> +<xsl:param name="chunk.first.sections" select ="1"/> + +<!-- This template is called from book/part toc. + We commented out "subtoc" stuff. As a result, book/part tocs only + contain chapters /appendices/prefaces, but not sect*. --> + +<xsl:template match="preface|chapter|appendix|article" mode="toc"> + +<!-- <xsl:variable name="subtoc"> + <xsl:element name="{$toc.list.type}"> + <xsl:apply-templates select="section|sect1|bridgehead" mode="toc"/> + </xsl:element> + </xsl:variable> + + <xsl:variable name="subtoc.list"> + <xsl:choose> + <xsl:when test="$toc.dd.type = ''"> + <xsl:copy-of select="$subtoc"/> + </xsl:when> + <xsl:otherwise> + <xsl:element name="{$toc.dd.type}"> + <xsl:copy-of select="$subtoc"/> + </xsl:element> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> --> + + <xsl:element name="{$toc.listitem.type}"> + <xsl:variable name="label"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:variable> + <xsl:copy-of select="$label"/> + <xsl:if test="$label != ''"> + <xsl:value-of select="$autotoc.label.separator"/> + </xsl:if> + <a> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"/> + </xsl:attribute> + <xsl:apply-templates select="." mode="title.markup"/> + </a> +<!-- <xsl:if test="$toc.listitem.type = 'li' + and $toc.section.depth>0 and section|sect1"> + <xsl:copy-of select="$subtoc.list"/> + </xsl:if> --> + </xsl:element> +<!-- <xsl:if test="$toc.listitem.type != 'li' + and $toc.section.depth>0 and section|sect1"> + <xsl:copy-of select="$subtoc.list"/> + </xsl:if> --> +</xsl:template> + + + + +<!-- **************************Top Level*************************--> + +<!-- ***************************Variablelist********************--> + +<!-- Custom template to make the term tag bold.--> +<xsl:template match="variablelist//term"> + <xsl:call-template name="inline.boldseq"/> +</xsl:template> + +</xsl:stylesheet> diff --git a/stylesheets/yelp-customization.xsl b/stylesheets/yelp-customization.xsl new file mode 100644 index 00000000..2130ca34 --- /dev/null +++ b/stylesheets/yelp-customization.xsl @@ -0,0 +1,304 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.48/html/docbook.xsl"/> +<xsl:include href="gnome-custom.xsl"/> + +<xsl:param name="gdb_docname" /> + +<xsl:param name="gdb_pathname" /> + +<xsl:param name="gdb_rootid" select="string()" /> + +<xsl:output encoding="ISO-8859-1" /> + +<!-- +<xsl:template match="graphic"> + <p> + <img> + <xsl:attribute name="src"> + <xsl:text>file://</xsl:text> + <xsl:value-of select="$gdb_pathname"/> + <xsl:text>/figures/example_panel.png</xsl:text> + </xsl:attribute> + </img> + </p> +</xsl:template> +--> + +<xsl:template name="process.image"> + <!-- When this template is called, the current node should be --> + <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> + <!-- those elements have the same set of attributes, so we can --> + <!-- handle them all in one place. --> + <xsl:param name="tag" select="'img'"/> + <xsl:param name="alt"/> + + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="local-name(.) = 'graphic' + or local-name(.) = 'inlinegraphic'"> + <xsl:choose> + <xsl:when test="@fileref"> + <xsl:value-of select="@fileref"/> + </xsl:when> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>A fileref or entityref is required on </xsl:text> + <xsl:value-of select="local-name(.)"/> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <!-- imagedata, videodata, audiodata --> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="@scale"><xsl:value-of select="@scale"/>%</xsl:when> + <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when> + <xsl:otherwise></xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="height"> + <xsl:choose> + <xsl:when test="@scale"></xsl:when> + <xsl:when test="@depth"><xsl:value-of select="@depth"/></xsl:when> + <xsl:otherwise></xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="align"> + <xsl:value-of select="@align"/> + </xsl:variable> + + <xsl:element name="{$tag}"> + <xsl:attribute name="src"> + + <xsl:text>file://</xsl:text> + <xsl:value-of select="$gdb_pathname"/> + <xsl:text>/</xsl:text> + <xsl:value-of select="$filename"/> + </xsl:attribute> + + <xsl:if test="$align != ''"> + <xsl:attribute name="align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$height != ''"> + <xsl:attribute name="height"> + <xsl:value-of select="$height"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$width"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$alt != ''"> + <xsl:attribute name="alt"> + <xsl:value-of select="$alt"/> + </xsl:attribute> + </xsl:if> + </xsl:element> +</xsl:template> +<!-- we are cheating here - but there isn't another way--> + +<xsl:template name="href.target"> +<xsl:param name="object" select="."/> + <xsl:text>ghelp:</xsl:text> + <xsl:value-of select="$gdb_docname"/> + <xsl:text>?</xsl:text> + <xsl:value-of select="$object/@id"/> +</xsl:template> + + +<!-- + article.chunk.prev and article.chunk.next need to be augumented + to take parents siblings children into account +--> + +<xsl:template name="article.chunk.prev"> +<xsl:param name="node" select="."/> + <td> + <xsl:choose> + <!-- trouble - we need to treat the first sect1 specially --> + <xsl:when test="$node=/article/sect1[1]"> + <td><a accesskey="p"> + <xsl:attribute name="href"> + <xsl:text>ghelp:</xsl:text> + <xsl:value-of select="$gdb_docname"/> + </xsl:attribute> + <xsl:text><<< Prev</xsl:text> + </a></td> + </xsl:when> + <xsl:when test="count($node/preceding-sibling::*) > 1"> + <td><a accesskey="p"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$node/preceding-sibling::*[1]"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text><<< Prev</xsl:text> + </a></td> + </xsl:when> + <xsl:otherwise> + <xsl:text><<< Prev</xsl:text> + </xsl:otherwise> + </xsl:choose> + </td> +</xsl:template> + +<xsl:template name="article.chunk.up"> +<xsl:param name="node" select="."/> + <td> + <xsl:choose> + <xsl:when test="local-name($node)='sect1' or local-name($node)='sect2'"> + <a accesskey="u"> + <xsl:attribute name="href"> + <xsl:text>ghelp:</xsl:text> + <xsl:value-of select="$gdb_docname"/> + </xsl:attribute> + <xsl:text>Up</xsl:text> + </a> + </xsl:when> + </xsl:choose> + </td> +</xsl:template> + +<xsl:template name="article.chunk.next"> +<xsl:param name="node" select="."/> + <td> + <xsl:choose> + <xsl:when test="count($node/following-sibling::*) > 0"> + <td><a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$node/following-sibling::*[1]"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text>Next >>></xsl:text> + </a></td> + </xsl:when> + <xsl:otherwise> + <xsl:text>Next >>></xsl:text> + </xsl:otherwise> + </xsl:choose> + </td> +</xsl:template> + +<xsl:template name="article.chunk.navigate"> +<xsl:param name="node" select="."/> + <tr> + <xsl:call-template name="article.chunk.prev"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:call-template name="article.chunk.up"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:call-template name="article.chunk.next"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </tr> +</xsl:template> + +<xsl:template name="article.render.chunk"> +<xsl:param name="node" select="."/> + <table width="100%"> + <xsl:call-template name="article.chunk.navigate"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </table> + <xsl:apply-templates select="$node"/> + <table width="100%"> + <xsl:call-template name="article.chunk.navigate"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </table> +</xsl:template> + +<xsl:template name="make.toc.navbar"> + <table width="100%"> + <tr> + <td><a accesskey="p"> + <xsl:attribute name="href"> + <xsl:text>ghelp:</xsl:text> + <xsl:value-of select="$gdb_docname"/> + <xsl:text>?title-page</xsl:text> + </xsl:attribute> + <xsl:text><<< Prev</xsl:text> + </a></td> + <td></td> + <td><a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="sect1[1]"/> + </xsl:call-template> + </xsl:attribute> + <xsl:text>Next >>></xsl:text> + </a></td> + </tr> + </table> +</xsl:template> + +<xsl:template name="make.titlep.navbar"> + <table width="100%"> + <tr> + <td> + <xsl:text><<< Prev</xsl:text> + </td> + <td><xsl:text>Up</xsl:text></td> + <td><a accesskey="n"> + <xsl:attribute name="href"> + <xsl:text>ghelp:</xsl:text> + <xsl:value-of select="$gdb_docname"/> + <xsl:text>?title-page</xsl:text> + </xsl:attribute> + <xsl:text>Next >>></xsl:text> + </a></td> + </tr> + </table> +</xsl:template> + + +<xsl:template name="article.render.titlepage"> + <xsl:call-template name="make.titlep.navbar"/> + <xsl:apply-templates select="/descendant::articleinfo/*" mode="titlepage.mode"/> + <xsl:call-template name="make.titlep.navbar"/> +</xsl:template> + +<xsl:template match="/article"> + <xsl:choose> + <xsl:when test="string-length($gdb_rootid) < 1"> + <xsl:call-template name="make.toc.navbar"/> + <xsl:call-template name="component.toc"/> + <xsl:call-template name="make.toc.navbar"/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$gdb_rootid='title-page'"> + <xsl:call-template name="article.render.titlepage"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="article.render.chunk"> + <xsl:with-param name="node" select="descendant::*[attribute::id=$gdb_rootid]" /> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +</xsl:stylesheet> |