diff options
25 files changed, 1585 insertions, 930 deletions
@@ -1,3 +1,37 @@ +2007-05-04 Shaun McCance <shaunm@gnome.org> + + * test/testbook/testbook.xml: + - More table tests + + * xslt/docbook/html/db2html-table.xsl: + - Massively improved (and somewhat more documented) CALS tables + + * xslt/docbook/html/db2html-autotoc.xsl: + * xslt/docbook/html/db2html-bibliography.xsl: + * xslt/docbook/html/db2html-block.xsl: + * xslt/docbook/html/db2html-callout.xsl: + * xslt/docbook/html/db2html-classsynopsis.xsl: + * xslt/docbook/html/db2html-cmdsynopsis.xsl: + * xslt/docbook/html/db2html-css.xsl: + * xslt/docbook/html/db2html-division.xsl: + * xslt/docbook/html/db2html-ebnf.xsl: + * xslt/docbook/html/db2html-footnote.xsl: + * xslt/docbook/html/db2html-funcsynopsis.xsl: + * xslt/docbook/html/db2html-info.xsl: + * xslt/docbook/html/db2html-inline.xsl: + * xslt/docbook/html/db2html-l10n.xsl: + * xslt/docbook/html/db2html-list.xsl: + * xslt/docbook/html/db2html-media.xsl: + * xslt/docbook/html/db2html-qanda.xsl: + * xslt/docbook/html/db2html-refentry.xsl: + * xslt/docbook/html/db2html-title.xsl: + * xslt/docbook/html/db2html-xref.xsl: + - We don't need the html: prefix to do the namespace alias + + * doc/xslt/Makefile.am: + * doc/xslt/C/gnome-doc-xslt.xml: + - Keep xsldoc.awk output around, can do checks later + 2007-04-25 Shaun McCance <shaunm@gnome.org> * xslt/docbook/html/db2html-autotoc.xsl: diff --git a/doc/xslt/C/gnome-doc-xslt.xml b/doc/xslt/C/gnome-doc-xslt.xml index 37519255..e2c7e1cb 100644 --- a/doc/xslt/C/gnome-doc-xslt.xml +++ b/doc/xslt/C/gnome-doc-xslt.xml @@ -231,6 +231,7 @@ <include href="db2omf.xml" xmlns="http://www.w3.org/2001/XInclude"/> + <include href="theme.xml" xmlns="http://www.w3.org/2001/XInclude"/> <include href="gettext.xml" xmlns="http://www.w3.org/2001/XInclude"/> <include href="l10n-numbers.xml" xmlns="http://www.w3.org/2001/XInclude"/> <!--END--> diff --git a/doc/xslt/Makefile.am b/doc/xslt/Makefile.am index 75237094..a1e54f55 100644 --- a/doc/xslt/Makefile.am +++ b/doc/xslt/Makefile.am @@ -3,6 +3,7 @@ include $(top_srcdir)/bootstrap.make dist-hook: doc-dist-hook xsldoc_dirs = \ + $(top_srcdir)/xslt/common \ $(top_srcdir)/xslt/gettext \ $(top_srcdir)/xslt/docbook/common \ $(top_srcdir)/xslt/docbook/html \ @@ -11,11 +12,19 @@ xsldoc_xsls = $(filter-out %db2html-suppressed.xsl, \ $(sort $(patsubst ./%, %, $(foreach dir,$(xsldoc_dirs), \ $(wildcard $(dir)/*.xsl) $(wildcard $(srcdir)/$(dir)/*.xsl) ))) ) xsldoc_base = $(sort $(foreach xsl,$(xsldoc_xsls), $(basename $(notdir $(xsl))))) -xsldoc_docs = $(patsubst %, C/%.xml, $(xsldoc_base)) +xsldoc_docs = $(patsubst %, C/%.xsldoc, $(xsldoc_base)) +xsldoc_xmls = $(patsubst %, C/%.xml, $(xsldoc_base)) all: $(xsldoc_docs) -$(xsldoc_docs): $(xsldoc_xsls) xsldoc.awk xsldoc.xsl - $(GDU_AWK) -f "$(srcdir)/xsldoc.awk" "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" | xsltproc -o "$@" --stringparam basename "$(basename $(notdir $@))" --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" "$(srcdir)/xsldoc.xsl" - +$(xsldoc_docs): $(xsldoc_xsls) xsldoc.awk + $(GDU_AWK) -f "$(srcdir)/xsldoc.awk" "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" | xmllint --c14n - > "$@" + +$(xsldoc_xmls): xsldoc.xsl +$(xsldoc_xmls): C/%.xml : C/%.xsldoc + xsltproc -o "$@" \ + --stringparam basename "$(basename $(notdir $@))" \ + --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" \ + "$(srcdir)/xsldoc.xsl" "$<" gnome_doc_xslt_awk='\ /<\!--BEGIN-->/ { inc=1; }\ @@ -33,14 +42,19 @@ inc {\ all: gnome-doc-xslt-check gnome-doc-xslt-check: @incs=`$(GDU_AWK) $(gnome_doc_xslt_awk) "$(srcdir)/C/gnome-doc-xslt.xml" | sort`; \ - xmls=`echo $(xsldoc_base) | tr '\ ' '\n' | sort`; \ - if [ "$$incs" != "$$xmls" ]; then \ - echo "gnome-doc-xslt.xml does not include all reference pages" 1>&2; \ + xmls=`echo $(xsldoc_base) | sort`; \ + exs=""; \ + for xml in $$xmls; do \ + if echo "$$incs" | tr '\n' '\ ' | grep -v "\<$$xml\>" 1>/dev/null; then \ + exs="$$exs$$xml "; \ + fi; done; \ + if [ "x$$exs" != "x" ]; then \ + echo "gnome-doc-xslt.xml does not include the following reference pages: $$exs" 1>&2; \ exit 1; \ fi clean-local: - rm -f $(xsldoc_docs) + rm -f $(xsldoc_docs) $(xsldoc_xmls) EXTRA_DIST = xsldoc.awk xsldoc.xsl diff --git a/test/testbook/testbook.xml b/test/testbook/testbook.xml index c30cf0fc..ea093c9b 100644 --- a/test/testbook/testbook.xml +++ b/test/testbook/testbook.xml @@ -596,12 +596,263 @@ procedure </chapter> <!-- lists --> -<chapter id="tables"> -<title>Table Elements</title> +<chapter id="cals-tables"> +<title>CALS Tables</title> -<table> -<title>A Table</title> -<tgroup> +<informaltable> +<tgroup cols="2"> + <tbody> + <row><entry>fe</entry><entry>fi</entry></row> + <row><entry>fo</entry><entry>fum</entry></row> + </tbody> +</tgroup> +</informaltable> + +<para>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed risus dui, +faucibus at, blandit eu, congue in, sem. Suspendisse nec mi. Sed vel augue. +Cras egestas. Vivamus nisi. Fusce neque. Aenean posuere, orci non lacinia +consectetuer, neque libero semper metus, ut ullamcorper eros lorem at tellus. +Ut ante tellus, iaculis at, tincidunt quis, ultrices at, ligula. Pellentesque +porttitor condimentum nulla.</para> + +<section id="cals-tables-span"> +<title>Spanning</title> + +<para>Here's some column spanning:</para> +<informaltable frame="none"> +<tgroup cols="4" rowsep="1" colsep="1"> + <colspec colname="one"/> + <colspec colname="two"/> + <colspec colname="three"/> + <colspec colname="four"/> + <spanspec spanname="two-four" namest="two" nameend="four"/> + <tbody> + <row> + <entry>one</entry> + <entry>two</entry> + <entry>three</entry> + <entry>four</entry> + </row> + <row> + <entry namest="one" nameend="two">one-two</entry> + <entry>three</entry> + <entry>four</entry> + </row> + <row> + <entry namest="two" nameend="three">two-three</entry> + <entry>four</entry> + </row> + <row> + <entry>one</entry> + <entry spanname="two-four">two-four</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>Here's some row spanning:</para> +<informaltable frame="none"> +<tgroup cols="4" rowsep="1" colsep="1"> + <tbody> + <row> + <entry morerows="1">one</entry> + <entry morerows="2">two</entry> + <entry>three</entry> + <entry>four</entry> + </row> + <row> + <entry>three</entry> + <entry morerows="1">four</entry> + </row> + <row> + <entry>one</entry> + <entry morerows="1">three</entry> + </row> + <row> + <entry>one</entry> + <entry>two</entry> + <entry>four</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>Here we test implicit entries:</para> +<informaltable frame="none"> +<tgroup cols="4" rowsep="1" colsep="1"> + <colspec colname="one"/> + <colspec colname="two"/> + <colspec colname="three"/> + <colspec colname="four"/> + <tbody> + <row> + <entry>one</entry> + <entry>two</entry> + <entry morerows="2">three</entry> + <entry>four</entry> + </row> + <row> + <entry colname="two">two</entry> + <entry>four</entry> + </row> + <row> + <entry colname="four">four</entry> + </row> + <row> + <entry colname="three">three</entry> + <entry>four</entry> + </row> + <row> + <entry colname="four">four</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>And here's some craziness to mix it all together:</para> +<informaltable frame="none"> +<tgroup cols="5" rowsep="1" colsep="1"> + <colspec colname="one"/> + <colspec colname="two"/> + <colspec colname="three"/> + <colspec colname="four"/> + <colspec colname="five"/> + <tbody> + <row> + <entry morerows="1">one</entry> + <entry>two</entry> + <entry>three</entry> + <entry morerows="3">four</entry> + <entry>five</entry> + </row> + <row> + <entry colname="three">three</entry> + <entry morerows="1">five</entry> + </row> + <row> + <entry>one</entry> + <entry namest="two" nameend="three">two-three</entry> + </row> + <row> + <entry>one</entry> + <entry namest="two" nameend="three" morerows="1">two-three</entry> + <entry>five</entry> + </row> + <row> + <entry>one</entry> + <entry>four</entry> + <entry>five</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +</section> <!-- cals-tables-span --> + +<section id="cals-tables-sep"> +<title>Separators</title> + +<!-- FIXME: more --> +<para>Here we just set <sgmltag>colsep</sgmltag> on some +<sgmltag>entry</sgmltag> elements:</para> +<informaltable frame="none"> +<tgroup cols="3"> + <tbody> + <row> + <entry colsep="1">SEP</entry> + <entry>no</entry> + <entry>no</entry> + </row> + <row> + <entry>no</entry> + <entry colsep="1">SEP</entry> + <entry>no</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>Here we turn column separators on and off with +<sgmltag>colspec</sgmltag> elements:</para> +<informaltable frame="none"> +<tgroup cols="3" colsep="1"> + <colspec colname="one" colsep="0"/> + <colspec colname="two" colsep="1"/> + <colspec colname="three" colsep="0"/> + <colspec/> + <tbody> + <row> + <entry>no</entry> + <entry colname="two">SEP</entry> + <entry>no</entry> + </row> + <row> + <entry namest="one" nameend="two">SEP</entry> + <entry>no</entry> + </row> + <row> + <entry namest="two" nameend="three">no</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +</section> <!-- cals-tables-sep --> + +<section id="cals-tables-frames"> +<title>Frames</title> + +<para>This table has a top frame:</para> +<informaltable frame="top"> +<tgroup cols="2"> + <tbody> + <row> + <entry>fe</entry> + <entry>fi</entry> + </row> + <row> + <entry>fo</entry> + <entry>fum</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>This table has a bottom frame:</para> +<informaltable frame="bottom"> +<tgroup cols="2"> + <tbody> + <row> + <entry>fe</entry> + <entry>fi</entry> + </row> + <row> + <entry>fo</entry> + <entry>fum</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>This table has top and bottom frames:</para> +<informaltable frame="topbot"> +<tgroup cols="2"> + <tbody> + <row> + <entry>fe</entry> + <entry>fi</entry> + </row> + <row> + <entry>fo</entry> + <entry>fum</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>This table has side frames:</para> +<informaltable frame="sides"> +<tgroup cols="2"> <tbody> <row> <entry>fe</entry> @@ -613,8 +864,59 @@ procedure </row> </tbody> </tgroup> +</informaltable> + +<para>This table has no frames:</para> +<informaltable frame="none"> +<tgroup cols="2"> + <tbody> + <row> + <entry>fe</entry> + <entry>fi</entry> + </row> + <row> + <entry>fo</entry> + <entry>fum</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +<para>We default to framing all sides when not specified:</para> +<informaltable> +<tgroup cols="2"> + <tbody> + <row> + <entry>fe</entry> + <entry>fi</entry> + </row> + <row> + <entry>fo</entry> + <entry>fum</entry> + </row> + </tbody> +</tgroup> +</informaltable> + +</section> <!-- cals-tables-frames --> + +<section id="cals-tables-misc"> +<title>Miscellaneous</title> + +<table pgwide="1"> +<title>Using <sgmltag>pgwide</sgmltag></title> +<tgroup cols="3"> + <tbody> + <row><entry>fe</entry><entry>fi</entry><entry>fo</entry></row> + <row><entry>fum</entry><entry>fe</entry><entry>fi</entry></row> + <row><entry>fo</entry><entry>fum</entry><entry>fe</entry></row> + <row><entry>fi</entry><entry>fo</entry><entry>fum</entry></row> + </tbody> +</tgroup> </table> -</chapter> <!-- tables --> +</section> <!-- cals-tables-misc --> + +</chapter> <!-- cals-tables --> </book> diff --git a/xslt/docbook/html/db2html-autotoc.xsl b/xslt/docbook/html/db2html-autotoc.xsl index 3292a1b9..1a851c9f 100644 --- a/xslt/docbook/html/db2html-autotoc.xsl +++ b/xslt/docbook/html/db2html-autotoc.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -54,17 +53,17 @@ REMARK: Extra explanation of the parameters would be good <xsl:param name="labels" select="true()"/> <xsl:param name="titleabbrev" select="false()"/> <xsl:if test="($selected = false()) or ($node = $selected/ancestor-or-self::*)"> - <html:div class="autotoc"> + <div class="autotoc"> <xsl:if test="$show_title"> - <html:div class="title autotoc-title"> + <div class="title autotoc-title"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Contents'"/> </xsl:call-template> - </html:div> + </div> </xsl:if> - <html:ul> + <ul> <xsl:if test="$show_info"> - <html:li> + <li> <xsl:choose> <xsl:when test="$is_info"> <xsl:call-template name="l10n.gettext"> @@ -72,7 +71,7 @@ REMARK: Extra explanation of the parameters would be good </xsl:call-template> </xsl:when> <xsl:otherwise> - <html:a> + <a> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$db.chunk.info_basename"/> @@ -88,10 +87,10 @@ REMARK: Extra explanation of the parameters would be good <xsl:value-of select="$text"/> </xsl:attribute> <xsl:value-of select="$text"/> - </html:a> + </a> </xsl:otherwise> </xsl:choose> - </html:li> + </li> </xsl:if> <xsl:for-each select="$divisions"> <xsl:apply-templates mode="db2html.autotoc.mode" select="."> @@ -102,8 +101,8 @@ REMARK: Extra explanation of the parameters would be good <xsl:with-param name="titleabbrev" select="$titleabbrev"/> </xsl:apply-templates> </xsl:for-each> - </html:ul> - </html:div> + </ul> + </div> </xsl:if> </xsl:template> @@ -131,14 +130,14 @@ REMARK: Describe this mode <xsl:text>abbrev</xsl:text> </xsl:if> </xsl:variable> - <html:li> + <li> <xsl:if test="$labels"> - <html:span class="label"> + <span class="label"> <xsl:call-template name="db.label"> <xsl:with-param name="node" select="."/> <xsl:with-param name="role" select="'li'"/> </xsl:call-template> - </html:span> + </span> </xsl:if> <xsl:choose> <xsl:when test=". = $selected and not($is_info)"> @@ -167,7 +166,7 @@ REMARK: Describe this mode <xsl:with-param name="titleabbrev" select="$titleabbrev"/> </xsl:call-template> </xsl:if> - </html:li> + </li> </xsl:template> <!-- = refentry % db2html.autotoc.mode = --> @@ -183,7 +182,7 @@ REMARK: Describe this mode <xsl:text>abbrev</xsl:text> </xsl:if> </xsl:variable> - <html:li> + <li> <xsl:call-template name="db2html.xref"> <xsl:with-param name="linkend" select="@id"/> <xsl:with-param name="target" select="."/> @@ -194,7 +193,7 @@ REMARK: Describe this mode <xsl:text> — </xsl:text> <xsl:apply-templates select="refnamediv/refpurpose[1]"/> </xsl:if> - </html:li> + </li> </xsl:template> </xsl:stylesheet> diff --git a/xslt/docbook/html/db2html-bibliography.xsl b/xslt/docbook/html/db2html-bibliography.xsl index e0fab7f6..305e11e0 100644 --- a/xslt/docbook/html/db2html-bibliography.xsl +++ b/xslt/docbook/html/db2html-bibliography.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -83,7 +82,7 @@ Outputs CSS that controls the appearance of bibliograpies <!-- = bibliomixed = --> <xsl:template match="bibliomixed"> - <html:div class="bibliomixed block-indent"> + <div class="bibliomixed block-indent"> <xsl:call-template name="db2html.anchor"/> <xsl:choose> <xsl:when test="*[1]/self::abbrev"> @@ -103,7 +102,7 @@ Outputs CSS that controls the appearance of bibliograpies <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> - </html:div> + </div> </xsl:template> <!-- = bibliomset = --> diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl index 394a70d0..77daa0bd 100644 --- a/xslt/docbook/html/db2html-block.xsl +++ b/xslt/docbook/html/db2html-block.xsl @@ -18,8 +18,8 @@ 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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="msg html" + xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="msg" version="1.0"> <!--!!========================================================================== @@ -60,7 +60,7 @@ is then used by the CSS for styling. <xsl:param name="formal" select="false()"/> <xsl:param name="title" select="$node/title"/> <xsl:param name="caption" select="$node/caption"/> - <html:div> + <div> <xsl:attribute name="class"> <xsl:value-of select="concat($class, ' block ', local-name($node))"/> <xsl:if test="$first"> @@ -79,38 +79,55 @@ is then used by the CSS for styling. <xsl:choose> <xsl:when test="$formal"> <xsl:if test="$title"> - <html:div class="block block-first title title-formal"> - <xsl:call-template name="db2html.anchor"> - <xsl:with-param name="node" select="$title"/> - </xsl:call-template> - <html:span class="label"> - <xsl:call-template name="db.label"> - <xsl:with-param name="node" select="$node"/> - <xsl:with-param name="role" select="'header'"/> - </xsl:call-template> - </html:span> - <xsl:apply-templates select="$title/node()"/> - </html:div> + <xsl:call-template name="db2html.block.title"> + <xsl:with-param name="node" select="$node"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> </xsl:if> - <html:div class="{local-name($node)}-inner"> + <div class="{local-name($node)}-inner"> <xsl:apply-templates select="$node/node()[not(. = $title) and not(. = $caption)]"/> - </html:div> + </div> <xsl:apply-templates select="$caption"/> </xsl:when> <xsl:when test="$node/self::title"> - <html:span class="title"> + <span class="title"> <xsl:apply-templates select="$node/node()"/> - </html:span> + </span> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="$node/node()"/> </xsl:otherwise> </xsl:choose> - </html:div> + </div> </xsl:template> <!--**========================================================================== +db2html.block.title +Renders a formal title for a block-level element +$node: The block-level element being processed +$title: The element containing the title + +FIXME +--> +<xsl:template name="db2html.block.title"> + <xsl:param name="node" select="."/> + <xsl:param name="title" select="$node/title"/> + <div class="block block-first title title-formal"> + <xsl:call-template name="db2html.anchor"> + <xsl:with-param name="node" select="$title"/> + </xsl:call-template> + <span class="label"> + <xsl:call-template name="db.label"> + <xsl:with-param name="node" select="$node"/> + <xsl:with-param name="role" select="'header'"/> + </xsl:call-template> + </span> + <xsl:apply-templates select="$title/node()"/> + </div> +</xsl:template> + +<!--**========================================================================== db2html.blockquote Renders a #{blockquote} element to HTML $node: The #{blockquote} element to render @@ -125,7 +142,7 @@ element. select="not($node/preceding-sibling::* [not(self::blockinfo) and not(self::title) and not(self::titleabbrev) and not(self::attribution) ])"/> - <html:div> + <div> <xsl:attribute name="class"> <xsl:value-of select="local-name($node)"/> <xsl:text> block block-indent</xsl:text> @@ -137,12 +154,12 @@ element. <xsl:with-param name="node" select="$node"/> </xsl:call-template> <xsl:apply-templates select="$node/title"/> - <html:blockquote class="{local-name($node)}"> + <blockquote class="{local-name($node)}"> <xsl:apply-templates select="$node/node()[name(.) != 'title' and name(.) != 'attribution']"/> - </html:blockquote> + </blockquote> <xsl:apply-templates select="$node/attribution"/> - </html:div> + </div> </xsl:template> @@ -160,7 +177,7 @@ This template creates an HTML #{p} element for the given DocBook element. select="not($node/preceding-sibling::* [not(self::blockinfo) and not(self::title) and not(self::titleabbrev) and not(self::attribution) ])"/> - <html:p> + <p> <xsl:attribute name="class"> <xsl:value-of select="local-name($node)"/> <xsl:text> block</xsl:text> @@ -172,7 +189,7 @@ This template creates an HTML #{p} element for the given DocBook element. <xsl:with-param name="node" select="$node"/> </xsl:call-template> <xsl:apply-templates select="$node/node()"/> - </html:p> + </p> </xsl:template> @@ -201,7 +218,7 @@ is then used by the CSS for styling. @format @startinglinenumber --> - <html:div> + <div> <xsl:attribute name="class"> <xsl:value-of select="local-name($node)"/> <xsl:text> block</xsl:text> @@ -216,11 +233,11 @@ is then used by the CSS for styling. <xsl:with-param name="node" select="$node"/> </xsl:call-template> <xsl:if test="$node/@linenumbering = 'numbered'"> - <html:pre class="linenumbering"><xsl:call-template name="db.linenumbering"> + <pre class="linenumbering"><xsl:call-template name="db.linenumbering"> <xsl:with-param name="node" select="$node"/> - </xsl:call-template></html:pre> + </xsl:call-template></pre> </xsl:if> - <html:pre class="{local-name($node)}"> + <pre class="{local-name($node)}"> <!-- Strip off a leading newline --> <xsl:if test="$node/node()[1]/self::text()"> <xsl:choose> @@ -246,8 +263,8 @@ is then used by the CSS for styling. </xsl:choose> </xsl:if> <xsl:apply-templates select="$node/node()[not(position() = 1 and self::text())]"/> - </html:pre> - </html:div> + </pre> + </div> </xsl:template> @@ -348,31 +365,31 @@ dd.glossdef, dd.glosssee, dd.glossseealso <!-- = glossdef = --> <xsl:template match="glossdef"> - <html:dd class="glossdef"> + <dd class="glossdef"> <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> - </html:dd> + </dd> <xsl:apply-templates select="glossseealso[1]"/> </xsl:template> <!-- = glossentry = --> <xsl:template match="glossentry"> - <html:dt class="glossterm"> + <dt class="glossterm"> <xsl:apply-templates select="glossterm"/> - </html:dt> + </dt> <xsl:apply-templates select="glossdef | glosssee[1]"/> </xsl:template> <!-- = glosssee = --> <xsl:template match="glosssee | glossseealso"> - <html:dd class="{local-name(.)}"> - <html:p> + <dd class="{local-name(.)}"> + <p> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="concat(local-name(.), '.format')"/> <xsl:with-param name="node" select="."/> <xsl:with-param name="format" select="true()"/> </xsl:call-template> - </html:p> - </html:dd> + </p> + </dd> </xsl:template> <!--#% l10n.format.mode --> @@ -387,7 +404,7 @@ dd.glossdef, dd.glosssee, dd.glossseealso </xsl:if> <xsl:choose> <xsl:when test="@otherterm"> - <html:a> + <a> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="@otherterm"/> @@ -398,7 +415,7 @@ dd.glossdef, dd.glosssee, dd.glossseealso <xsl:with-param name="linkend" select="@otherterm"/> </xsl:call-template> </xsl:attribute> - </html:a> + </a> <xsl:choose> <xsl:when test="normalize-space(.) != ''"> <xsl:apply-templates/> diff --git a/xslt/docbook/html/db2html-callout.xsl b/xslt/docbook/html/db2html-callout.xsl index 67378c70..bba60069 100644 --- a/xslt/docbook/html/db2html-callout.xsl +++ b/xslt/docbook/html/db2html-callout.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -85,9 +84,9 @@ REMARK: Describe this template --> <xsl:template name="db2html.co.dingbat"> <xsl:param name="co" select="."/> - <html:span class="co"> + <span class="co"> <xsl:value-of select="count(preceding::co) + 1"/> - </html:span> + </span> </xsl:template> diff --git a/xslt/docbook/html/db2html-classsynopsis.xsl b/xslt/docbook/html/db2html-classsynopsis.xsl index 35bd034d..f1e6e2c3 100644 --- a/xslt/docbook/html/db2html-classsynopsis.xsl +++ b/xslt/docbook/html/db2html-classsynopsis.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -69,9 +68,9 @@ REMARK: Describe this param </xsl:choose> </xsl:variable> - <html:div class="{local-name(.)}"> + <div class="{local-name(.)}"> <xsl:call-template name="db2html.anchor"/> - <html:pre class="$language"> + <pre class="$language"> <xsl:choose> <xsl:when test="$language = 'cpp'"> <xsl:apply-templates mode="db2html.class.cpp.mode" select="."/> @@ -89,8 +88,8 @@ REMARK: Describe this param </xsl:message> </xsl:otherwise> </xsl:choose> - </html:pre> - </html:div> + </pre> + </div> </xsl:template> <!-- = classsynopsisinfo = --> @@ -100,14 +99,14 @@ REMARK: Describe this param <!-- = methodparam = --> <xsl:template match="methodparam"> - <html:span class="methodparam"> + <span class="methodparam"> <xsl:for-each select="*"> <xsl:if test="position() != 1"> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates select="."/> </xsl:for-each> - </html:span> + </span> </xsl:template> <!-- = methodparam/parameter = --> @@ -120,38 +119,38 @@ REMARK: Describe this param <!-- = ooclass = --> <xsl:template match="ooclass"> - <html:span class="ooclass" style="font-family: monospace;"> + <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> - </html:span> + </span> </xsl:template> <!-- = ooexception = --> <xsl:template match="ooexception"> - <html:span class="ooexception" style="font-family: monospace;"> + <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> - </html:span> + </span> </xsl:template> <!-- = oointerface = --> <xsl:template match="oointerface"> - <html:span class="oointerface" style="font-family: monospace;"> + <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> - </html:span> + </span> </xsl:template> <!--#* class.cpp.modifier --> @@ -197,7 +196,7 @@ REMARK: Describe this mode } --> <xsl:if test="@class = 'class' or not(@class)"> - <html:span class="ooclass"> + <span class="ooclass"> <xsl:for-each select="ooclass[1]/modifier"> <xsl:if test="position() != 1"> <xsl:text> </xsl:text> @@ -207,7 +206,7 @@ REMARK: Describe this mode <xsl:text> class </xsl:text> <xsl:apply-templates mode="db2html.class.cpp.mode" select="ooclass[1]/classname"/> - </html:span> + </span> <xsl:if test="ooclass[2]"> <xsl:text> : </xsl:text> <xsl:for-each select="ooclass[position() != 1]"> @@ -253,9 +252,9 @@ REMARK: Describe this mode <xsl:apply-templates mode="db2html.class.cpp.mode" select="methodname"/> </xsl:when> <xsl:when test="../self::classsynopsis[ooclass]"> - <html:span class="methodname"> + <span class="methodname"> <xsl:value-of select="../ooclass/classname"/> - </html:span> + </span> </xsl:when> </xsl:choose> <xsl:text>(</xsl:text> @@ -294,10 +293,10 @@ REMARK: Describe this mode <xsl:apply-templates mode="db2html.class.cpp.mode" select="methodname"/> </xsl:when> <xsl:when test="../self::classsynopsis[ooclass]"> - <html:span class="methodname"> + <span class="methodname"> <xsl:text>~</xsl:text> <xsl:value-of select="../ooclass/classname"/> - </html:span> + </span> </xsl:when> </xsl:choose> <xsl:text>(</xsl:text> @@ -349,14 +348,14 @@ REMARK: Describe this mode <!-- = methodparam % db2html.class.cpp.mode = --> <xsl:template mode="db2html.class.cpp.mode" match="methodparam"> - <html:span class="methodparam"> + <span class="methodparam"> <xsl:for-each select="*"> <xsl:if test="position() != 1"> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates mode="db2html.class.cpp.mode" select="."/> </xsl:for-each> - </html:span> + </span> </xsl:template> <!-- = methodsynopsis % db2html.class.cpp.mode = --> @@ -410,7 +409,7 @@ REMARK: Describe this mode <!-- <xsl:template mode="db2html.class.python.mode" match="classsynopsis"> <xsl:if test="@class = 'class' or not(@class)"> - <html:span class="ooclass"> + <span class="ooclass"> <xsl:for-each select="ooclass[1]/modifier"> <xsl:if test="position() != 1"> <xsl:text> </xsl:text> @@ -420,7 +419,7 @@ REMARK: Describe this mode <xsl:text> class </xsl:text> <xsl:apply-templates mode="db2html.class.python.mode" select="ooclass[1]/classname"/> - </html:span> + </span> <xsl:if test="ooclass[2]"> <xsl:text> : </xsl:text> <xsl:for-each select="ooclass[position() != 1]"> @@ -460,9 +459,9 @@ REMARK: Describe this mode <xsl:apply-templates mode="db2html.class.python.mode" select="methodname"/> </xsl:when> <xsl:when test="../self::classsynopsis[ooclass]"> - <html:span class="methodname"> + <span class="methodname"> <xsl:value-of select="../ooclass/classname"/> - </html:span> + </span> </xsl:when> </xsl:choose> <xsl:text>(</xsl:text> @@ -495,10 +494,10 @@ REMARK: Describe this mode <xsl:apply-templates mode="db2html.class.python.mode" select="methodname"/> </xsl:when> <xsl:when test="../self::classsynopsis[ooclass]"> - <html:span class="methodname"> + <span class="methodname"> <xsl:text>~</xsl:text> <xsl:value-of select="../ooclass/classname"/> - </html:span> + </span> </xsl:when> </xsl:choose> <xsl:text>(</xsl:text> @@ -544,14 +543,14 @@ REMARK: Describe this mode <!-- = methodparam % db2html.class.python.mode = --> <!-- <xsl:template mode="db2html.class.python.mode" match="methodparam"> - <html:span class="methodparam"> + <span class="methodparam"> <xsl:for-each select="*"> <xsl:if test="position() != 1"> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates mode="db2html.class.python.mode" select="."/> </xsl:for-each> - </html:span> + </span> </xsl:template> --> diff --git a/xslt/docbook/html/db2html-cmdsynopsis.xsl b/xslt/docbook/html/db2html-cmdsynopsis.xsl index 4e9565a0..5f6d9215 100644 --- a/xslt/docbook/html/db2html-cmdsynopsis.xsl +++ b/xslt/docbook/html/db2html-cmdsynopsis.xsl @@ -18,8 +18,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -122,7 +121,7 @@ div.cmdsynopsis { font-family: monospace; } </xsl:choose> </xsl:param> - <html:span class="arg-punc"> + <span class="arg-punc"> <xsl:choose> <xsl:when test="$choice = 'plain'"/> <xsl:when test="$choice = 'req'"> @@ -132,11 +131,11 @@ div.cmdsynopsis { font-family: monospace; } <xsl:text>[</xsl:text> </xsl:otherwise> </xsl:choose> - <html:span class="arg"> + <span class="arg"> <xsl:apply-templates> <xsl:with-param name="sepchar" select="$sepchar"/> </xsl:apply-templates> - </html:span> + </span> <xsl:if test="$rep = 'repeat'"> <xsl:text>...</xsl:text> </xsl:if> @@ -149,7 +148,7 @@ div.cmdsynopsis { font-family: monospace; } <xsl:text>]</xsl:text> </xsl:otherwise> </xsl:choose> - </html:span> + </span> </xsl:template> <!-- = cmdsynopsis = --> @@ -164,7 +163,7 @@ div.cmdsynopsis { font-family: monospace; } </xsl:otherwise> </xsl:choose> </xsl:param> - <html:div class="cmdsynopsis"> + <div class="cmdsynopsis"> <xsl:call-template name="db2html.anchor"/> <xsl:for-each select="command | arg | group | sbr"> <xsl:if test="position() != 1"> @@ -177,7 +176,7 @@ div.cmdsynopsis { font-family: monospace; } <xsl:apply-templates select="synopfragment"> <xsl:with-param name="sepchar" select="$sepchar"/> </xsl:apply-templates> - </html:div> + </div> </xsl:template> <!-- = group = --> @@ -213,7 +212,7 @@ div.cmdsynopsis { font-family: monospace; } </xsl:choose> </xsl:param> - <html:span class="group-punc"> + <span class="group-punc"> <xsl:choose> <xsl:when test="$choice = 'plain'"> <xsl:text>(</xsl:text> @@ -225,7 +224,7 @@ div.cmdsynopsis { font-family: monospace; } <xsl:text>[</xsl:text> </xsl:otherwise> </xsl:choose> - <html:span class="group"> + <span class="group"> <xsl:for-each select="*"> <xsl:if test="local-name(.) = 'arg' and position() != 1"> <xsl:value-of select="concat($sepchar, '|', $sepchar)"/> @@ -234,7 +233,7 @@ div.cmdsynopsis { font-family: monospace; } <xsl:with-param name="sepchar" select="$sepchar"/> </xsl:apply-templates> </xsl:for-each> - </html:span> + </span> <xsl:choose> <xsl:when test="$choice = 'plain'"> <xsl:text>)</xsl:text> @@ -249,12 +248,12 @@ div.cmdsynopsis { font-family: monospace; } <xsl:if test="$rep = 'repeat'"> <xsl:text>...</xsl:text> </xsl:if> - </html:span> + </span> </xsl:template> <!-- = sbr = --> <xsl:template match="sbr"> - <html:br class="sbr"/> + <br class="sbr"/> </xsl:template> <!-- = synopfragment = --> @@ -269,13 +268,13 @@ div.cmdsynopsis { font-family: monospace; } </xsl:otherwise> </xsl:choose> </xsl:param> - <html:div class="synopfragment"> + <div class="synopfragment"> <xsl:call-template name="db2html.anchor"/> - <html:i><xsl:call-template name="db.label"/></html:i> + <i><xsl:call-template name="db.label"/></i> <xsl:apply-templates> <xsl:with-param name="sepchar" select="$sepchar"/> </xsl:apply-templates> - </html:div> + </div> </xsl:template> <!-- = synopfragmentref = --> diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl index fdcbe5c1..499b4c15 100644 --- a/xslt/docbook/html/db2html-css.xsl +++ b/xslt/docbook/html/db2html-css.xsl @@ -18,9 +18,8 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" - xmlns:html="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/1999/xhtml" extension-element-prefixes="exsl" - exclude-result-prefixes="html" version="1.0"> <!--!!========================================================================== @@ -61,12 +60,12 @@ avoid creating the same file multiple times. <xsl:call-template name="db2html.css.content"/> </exsl:document> </xsl:if> - <html:link rel="stylesheet" type="text/css" href="{$db2html.css.file}"/> + <link rel="stylesheet" type="text/css" href="{$db2html.css.file}"/> </xsl:when> <xsl:otherwise> - <html:style type="text/css"> + <style type="text/css"> <xsl:call-template name="db2html.css.content"/> - </html:style> + </style> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -268,10 +267,6 @@ 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; } -dt.term { - font-weight: bold; - color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; -} div.simplelist { <!-- FIXME: rtl --> margin-left: 1.72em; diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl index d62d72fa..f680fa75 100644 --- a/xslt/docbook/html/db2html-division.xsl +++ b/xslt/docbook/html/db2html-division.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -120,18 +119,18 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called <xsl:variable name="prev_node" select="key('idkey', $prev_id)"/> <xsl:variable name="next_node" select="key('idkey', $next_id)"/> <!-- FIXME --> - <html:html> - <html:head> - <html:title> + <html> + <head> + <title> <xsl:variable name="title"> <xsl:call-template name="db.title"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="normalize-space($title)"/> - </html:title> + </title> <xsl:if test="string($prev_id) != ''"> - <html:link rel="previous"> + <link rel="previous"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$prev_id"/> @@ -144,10 +143,10 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called <xsl:with-param name="node" select="$prev_node"/> </xsl:call-template> </xsl:attribute> - </html:link> + </link> </xsl:if> <xsl:if test="string($next_id) != ''"> - <html:link rel="next"> + <link rel="next"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$next_id"/> @@ -160,10 +159,10 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called <xsl:with-param name="node" select="$next_node"/> </xsl:call-template> </xsl:attribute> - </html:link> + </link> </xsl:if> <xsl:if test="/*[1] != $node"> - <html:link rel="top"> + <link rel="top"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="/*[1]/@id"/> @@ -176,14 +175,14 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called <xsl:with-param name="node" select="/*[1]"/> </xsl:call-template> </xsl:attribute> - </html:link> + </link> </xsl:if> <xsl:call-template name="db2html.css"> <xsl:with-param name="css_file" select="$depth_of_chunk = 0"/> </xsl:call-template> <xsl:call-template name="db2html.division.head.extra"/> - </html:head> - <html:body> + </head> + <body> <xsl:call-template name="db2html.division.top"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="info" select="$info"/> @@ -207,7 +206,7 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called </xsl:call-template> </xsl:variable> <xsl:copy-of select="$sidebar"/> - <html:div> + <div> <xsl:attribute name="class"> <xsl:text>body</xsl:text> <xsl:if test="$sidebar != ''"> @@ -229,7 +228,7 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called </xsl:apply-templates> </xsl:otherwise> </xsl:choose> - </html:div> + </div> <xsl:call-template name="db2html.division.bottom"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="info" select="$info"/> @@ -240,8 +239,8 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called <xsl:with-param name="prev_node" select="$prev_node"/> <xsl:with-param name="next_node" select="$next_node"/> </xsl:call-template> - </html:body> - </html:html> + </body> + </html> </xsl:template> @@ -294,7 +293,7 @@ REMARK: Talk about some of the parameters ($depth_in_chunk = 0 and $info)"/> <xsl:param name="autotoc_depth" select="number(boolean($divisions))"/> - <html:div class="division {local-name($node)}"> + <div class="division {local-name($node)}"> <xsl:call-template name="db2html.anchor"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> @@ -319,12 +318,12 @@ REMARK: Talk about some of the parameters <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> </xsl:apply-templates> <xsl:if test="$entries"> - <html:dl class="{local-name($node)}"> + <dl class="{local-name($node)}"> <xsl:apply-templates select="$entries"> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> </xsl:apply-templates> - </html:dl> + </dl> </xsl:if> <xsl:if test="$autotoc_depth != 0"> <xsl:call-template name="db2html.autotoc"> @@ -347,7 +346,7 @@ REMARK: Talk about some of the parameters <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> </xsl:call-template> </xsl:if> - </html:div> + </div> </xsl:template> @@ -404,25 +403,25 @@ REMARK: Talk about the different kinds of title blocks </xsl:choose> </xsl:variable> - <html:div class="header"> + <div class="header"> <xsl:element name="{$title_h}" namespace="{$db2html.namespace}"> <xsl:attribute name="class"> <xsl:value-of select="concat(local-name($node), ' ', local-name($title_node))"/> </xsl:attribute> - <html:span class="title"> + <span class="title"> <xsl:if test="$title_node"> <xsl:call-template name="db2html.anchor"> <xsl:with-param name="node" select="$title_node"/> </xsl:call-template> </xsl:if> <xsl:if test="$generate_label"> - <html:span class="label"> + <span class="label"> <xsl:call-template name="db.label"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="role" select="'header'"/> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> </xsl:call-template> - </html:span> + </span> </xsl:if> <xsl:choose> <xsl:when test="$title_content"> @@ -432,7 +431,7 @@ REMARK: Talk about the different kinds of title blocks <xsl:apply-templates select="$title_node/node()"/> </xsl:otherwise> </xsl:choose> - </html:span> + </span> </xsl:element> <xsl:if test="$subtitle_node or $subtitle_content"> <xsl:element name="{$subtitle_h}" namespace="{$db2html.namespace}"> @@ -449,7 +448,7 @@ REMARK: Talk about the different kinds of title blocks </xsl:choose> </xsl:element> </xsl:if> - </html:div> + </div> </xsl:template> @@ -463,10 +462,10 @@ REMARK: Describe this <xsl:template name="db2html.linktrail"> <xsl:param name="node"/> <xsl:if test="$node/ancestor::*"> - <html:ul class="linktrail"> + <ul class="linktrail"> <!-- The parens put the nodes back in document order --> <xsl:for-each select="($node/ancestor::*)"> - <html:li> + <li> <xsl:attribute name="class"> <xsl:text>linktrail</xsl:text> <xsl:choose> @@ -481,7 +480,7 @@ REMARK: Describe this </xsl:when> </xsl:choose> </xsl:attribute> - <html:a class="linktrail"> + <a class="linktrail"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="@id"/> @@ -498,10 +497,10 @@ REMARK: Describe this <xsl:call-template name="db.titleabbrev"> <xsl:with-param name="node" select="."/> </xsl:call-template> - </html:a> - </html:li> + </a> + </li> </xsl:for-each> - </html:ul> + </ul> </xsl:if> </xsl:template> @@ -548,12 +547,12 @@ REMARK: Document this template <xsl:param name="prev_node" select="key('idkey', $prev_id)"/> <xsl:param name="next_node" select="key('idkey', $next_id)"/> <xsl:param name="position" select="'top'"/> - <html:div class="navbar navbar-{$position}"> + <div class="navbar navbar-{$position}"> <!-- FIXME: rtl --> - <html:table class="navbar"><html:tr> - <html:td class="navbar-prev"> + <table class="navbar"><tr> + <td class="navbar-prev"> <xsl:if test="$prev_id != ''"> - <html:a class="navbar-prev"> + <a class="navbar-prev"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$prev_id"/> @@ -589,12 +588,12 @@ REMARK: Document this template </xsl:call-template> </xsl:otherwise> </xsl:choose> - </html:a> + </a> </xsl:if> - </html:td> - <html:td class="navbar-next"> + </td> + <td class="navbar-next"> <xsl:if test="$next_id != ''"> - <html:a class="navbar-next"> + <a class="navbar-next"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$next_id"/> @@ -612,14 +611,14 @@ REMARK: Document this template </xsl:call-template> <xsl:text>  </xsl:text> <xsl:copy-of select="$navbar.icon.next"/> - </html:a> + </a> </xsl:if> - </html:td> - </html:tr></html:table> - </html:div> + </td> + </tr></table> + </div> </xsl:template> <xsl:variable name="navbar.icon.previous"> - <html:img> + <img> <xsl:attribute name="src"> <xsl:value-of select="$theme.icon.nav.previous"/> </xsl:attribute> @@ -629,10 +628,10 @@ REMARK: Document this template <xsl:attribute name="width"> <xsl:value-of select="$theme.icon.nav.size"/> </xsl:attribute> - </html:img> + </img> </xsl:variable> <xsl:variable name="navbar.icon.next"> - <html:img> + <img> <xsl:attribute name="src"> <xsl:value-of select="$theme.icon.nav.next"/> </xsl:attribute> @@ -642,7 +641,7 @@ REMARK: Document this template <xsl:attribute name="width"> <xsl:value-of select="$theme.icon.nav.size"/> </xsl:attribute> - </html:img> + </img> </xsl:variable> @@ -657,7 +656,7 @@ REMARK: Document this template <xsl:template name="db2html.sidenav"> <xsl:param name="node" select="."/> <xsl:param name="template"/> - <html:div class="sidenav"> + <div class="sidenav"> <xsl:call-template name="db2html.autotoc"> <xsl:with-param name="node" select="/"/> <xsl:with-param name="show_info" select="$db.chunk.info_chunk"/> @@ -668,7 +667,7 @@ REMARK: Document this template <xsl:with-param name="labels" select="false()"/> <xsl:with-param name="titleabbrev" select="true()"/> </xsl:call-template> - </html:div> + </div> </xsl:template> @@ -796,12 +795,12 @@ REMARK: Describe this template <xsl:param name="prev_node" select="key('idkey', $prev_id)"/> <xsl:param name="next_node" select="key('idkey', $next_id)"/> <xsl:if test="$db2html.sidenav"> - <html:div class="sidebar"> + <div class="sidebar"> <xsl:call-template name="db2html.sidenav"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="template" select="$template"/> </xsl:call-template> - </html:div> + </div> </xsl:if> </xsl:template> diff --git a/xslt/docbook/html/db2html-ebnf.xsl b/xslt/docbook/html/db2html-ebnf.xsl index 339bd67a..35121684 100644 --- a/xslt/docbook/html/db2html-ebnf.xsl +++ b/xslt/docbook/html/db2html-ebnf.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -44,13 +43,13 @@ REMARK: Describe this module <!-- = productionset = --> <xsl:template match="productionset"> - <html:div class="productionset"> + <div class="productionset"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="title"/> - <html:table class="productionset"> + <table class="productionset"> <xsl:apply-templates select="production | productionrecap"/> - </html:table> - </html:div> + </table> + </div> </xsl:template> <!-- = productionset/title = --> diff --git a/xslt/docbook/html/db2html-footnote.xsl b/xslt/docbook/html/db2html-footnote.xsl index 7ff86c72..d36c40ce 100644 --- a/xslt/docbook/html/db2html-footnote.xsl +++ b/xslt/docbook/html/db2html-footnote.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -60,14 +59,14 @@ REMARK: Describe this template </xsl:otherwise> </xsl:choose> </xsl:variable> - <html:a name="{$anchor}"/> - <html:sup> - <html:a class="footnote" href="{$href}"> + <a name="{$anchor}"/> + <sup> + <a class="footnote" href="{$href}"> <xsl:call-template name="db.number"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - </html:a> - </html:sup> + </a> + </sup> </xsl:template> @@ -103,17 +102,17 @@ REMARK: Describe this template </xsl:otherwise> </xsl:choose> </xsl:variable> - <html:div class="footnote"> - <html:a name="{$anchor}"/> - <html:span class="footnote-number"> - <html:a class="footnote-ref" href="{$href}"> + <div class="footnote"> + <a name="{$anchor}"/> + <span class="footnote-number"> + <a class="footnote-ref" href="{$href}"> <xsl:call-template name="db.number"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - </html:a> - </html:span> + </a> + </span> <xsl:apply-templates select="$node/node()"/> - </html:div> + </div> </xsl:template> @@ -157,7 +156,7 @@ REMARK: Describe this template </xsl:variable> <xsl:choose> <xsl:when test="($depth = $depth_of_chunk) and not($div)"> - <html:div class="footnotes"> + <div class="footnotes"> <xsl:call-template name="db2html.footnote.note"> <xsl:with-param name="node" select="$this"/> </xsl:call-template> @@ -170,7 +169,7 @@ REMARK: Describe this template <xsl:with-param name="div" select="true()"/> </xsl:call-template> </xsl:if> - </html:div> + </div> </xsl:when> <xsl:otherwise> <xsl:if test="$depth = $depth_of_chunk"> diff --git a/xslt/docbook/html/db2html-funcsynopsis.xsl b/xslt/docbook/html/db2html-funcsynopsis.xsl index cf17959b..83eae94b 100644 --- a/xslt/docbook/html/db2html-funcsynopsis.xsl +++ b/xslt/docbook/html/db2html-funcsynopsis.xsl @@ -18,9 +18,8 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" - xmlns:html="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/1999/xhtml" extension-element-prefixes="str" - exclude-result-prefixes="html" version="1.0"> <!--!!========================================================================== @@ -119,13 +118,13 @@ elements. Supported values are #{'KR'} and #{'ANSI'}. </xsl:otherwise> </xsl:choose> </xsl:param> - <html:pre class="funcsynopsis"> + <pre class="funcsynopsis"> <xsl:call-template name="db2html.anchor"/> <!-- The select is needed to avoid extra whitespace --> <xsl:apply-templates select="*"> <xsl:with-param name="style" select="$style"/> </xsl:apply-templates> - </html:pre> + </pre> </xsl:template> <!-- = funcsynopsisinfo = --> diff --git a/xslt/docbook/html/db2html-info.xsl b/xslt/docbook/html/db2html-info.xsl index 05b540f1..e9c326e3 100644 --- a/xslt/docbook/html/db2html-info.xsl +++ b/xslt/docbook/html/db2html-info.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -45,11 +44,11 @@ REMARK: Describe this template <xsl:with-param name="node" select="$node"/> </xsl:call-template> </xsl:param> - <html:div class="division {local-name($info)}"> + <div class="division {local-name($info)}"> <xsl:call-template name="db2html.anchor"> <xsl:with-param name="name" select="local-name($info)"/> </xsl:call-template> - <html:div class="header"> + <div class="header"> <xsl:call-template name="db2html.info.title"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="info" select="$info"/> @@ -58,7 +57,7 @@ REMARK: Describe this template <xsl:with-param name="node" select="$node"/> <xsl:with-param name="info" select="$info"/> </xsl:call-template> - </html:div> + </div> <xsl:call-template name="db2html.info.authors"> <xsl:with-param name="node" select="$node"/> <xsl:with-param name="info" select="$info"/> @@ -89,7 +88,7 @@ REMARK: Describe this template </xsl:call-template> <xsl:apply-templates mode="db2html.info.mode" select="$info/legalnotice"/> <xsl:apply-templates mode="db2html.info.mode" select="$info/revhistory"/> - </html:div> + </div> </xsl:template> @@ -106,16 +105,16 @@ REMARK: Describe this template <xsl:param name="info" select="'FIXME'"/> <xsl:choose> <xsl:when test="$info/title"> - <html:h1 class="title"> + <h1 class="title"> <xsl:apply-templates mode="db2html.info.mode" select="$info/title/node()"/> - </html:h1> + </h1> </xsl:when> <xsl:when test="$node/title"> - <html:h1 class="title"> + <h1 class="title"> <xsl:apply-templates mode="db2html.info.mode" select="$node/title/node()"/> - </html:h1> + </h1> </xsl:when> </xsl:choose> </xsl:template> @@ -134,16 +133,16 @@ REMARK: Describe this template <xsl:param name="info" select="'FIXME'"/> <xsl:choose> <xsl:when test="$info/subtitle"> - <html:h2 class="subtitle"> + <h2 class="subtitle"> <xsl:apply-templates mode="db2html.info.mode" select="$info/subtitle/node()"/> - </html:h2> + </h2> </xsl:when> <xsl:when test="$node/subtitle"> - <html:h2 class="subtitle"> + <h2 class="subtitle"> <xsl:apply-templates mode="db2html.info.mode" select="$node/subtitle/node()"/> - </html:h2> + </h2> </xsl:when> </xsl:choose> </xsl:template> @@ -164,19 +163,19 @@ REMARK: Describe this template $info/author | $info/authorgroup/author | $info/corpauthor | $info/authorgroup/corpauthor "/> <xsl:if test="$authors"> - <html:div class="division"> - <html:h2 class="title author"> + <div class="division"> + <h2 class="title author"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Author'"/> <xsl:with-param name="number" select="count($authors)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$authors"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -195,19 +194,19 @@ REMARK: Describe this template <xsl:variable name="editors" select=" $info/editor | $info/authorgroup/editor"/> <xsl:if test="$editors"> - <html:div class="division"> - <html:h2 class="title editor"> + <div class="division"> + <h2 class="title editor"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Editor'"/> <xsl:with-param name="number" select="count($editors)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$editors"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -226,19 +225,19 @@ REMARK: Describe this template <xsl:variable name="collabs" select=" $info/collab | $info/authorgroup/collab"/> <xsl:if test="$collabs"> - <html:div class="division"> - <html:h2 class="title collab"> + <div class="division"> + <h2 class="title collab"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Collaborator'"/> <xsl:with-param name="number" select="count($collabs)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$collabs"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -260,19 +259,19 @@ REMARK: Describe this template $info/authorgroup/corpcredit[@role = 'translator'] | $info/authorgroup/othercredit[@role = 'translator'] "/> <xsl:if test="$translators"> - <html:div class="division"> - <html:h2 class="title translator"> + <div class="division"> + <h2 class="title translator"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Translator'"/> <xsl:with-param name="number" select="count($translators)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$translators"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -290,19 +289,19 @@ REMARK: Describe this template <xsl:param name="info" select="'FIXME'"/> <xsl:variable name="publishers" select="$info/publisher"/> <xsl:if test="$publishers"> - <html:div class="division"> - <html:h2 class="title publisher"> + <div class="division"> + <h2 class="title publisher"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Publisher'"/> <xsl:with-param name="number" select="count($publishers)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$publishers"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -325,19 +324,19 @@ REMARK: Describe this template $info/authorgroup/corpcredit[@role != 'translator'] | $info/authorgroup/othercredit[@role != 'translator'] "/> <xsl:if test="$othercredits"> - <html:div class="division"> - <html:h2 class="title othercredit"> + <div class="division"> + <h2 class="title othercredit"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Other Contributor'"/> <xsl:with-param name="number" select="count($othercredits)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$othercredits"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -355,19 +354,19 @@ REMARK: Describe this template <xsl:param name="info" select="'FIXME'"/> <xsl:variable name="copyrights" select="$info/copyright"/> <xsl:if test="$copyrights"> - <html:div class="division"> - <html:h2 class="title copyright"> + <div class="division"> + <h2 class="title copyright"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Copyright'"/> <xsl:with-param name="number" select="count($copyrights)"/> </xsl:call-template> - </html:h2> - <html:div class="block block-first"> - <html:dl> + </h2> + <div class="block block-first"> + <dl> <xsl:apply-templates mode="db2html.info.mode" select="$copyrights"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:if> </xsl:template> @@ -381,26 +380,26 @@ REMARK: Describe this mode. <!-- = affiliation % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="affiliation"> - <html:dd class="affiliation"> + <dd class="affiliation"> <!-- FIXME: no style tags --> - <html:i> + <i> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Affiliation'"/> </xsl:call-template> <xsl:text>: </xsl:text> - </html:i> + </i> <xsl:apply-templates mode="db2html.info.mode" select="orgname"/> - </html:dd> + </dd> </xsl:template> <!-- = author % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="author"> - <html:dt class="author"> + <dt class="author"> <xsl:variable name="node" select="(. | personname)[last()]"/> <xsl:call-template name="db.personname"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - </html:dt> + </dt> <xsl:apply-templates mode="db2html.info.mode" select="affiliation[orgname]"/> <xsl:apply-templates mode="db2html.info.mode" @@ -416,38 +415,38 @@ REMARK: Describe this mode. <!-- = authorblurb % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="authorblurb"> - <html:dd class="authorblurb"> + <dd class="authorblurb"> <xsl:apply-templates/> - </html:dd> + </dd> </xsl:template> <!-- = collab % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="collab"> - <html:dt class="collab"> + <dt class="collab"> <xsl:apply-templates mode="db2html.info.mode" select="collabname"/> - </html:dt> + </dt> <xsl:apply-templates mode="db2html.info.mode" select="affiliation[orgname]"/> </xsl:template> <!-- = collabname % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="collabname"> - <html:span class="collabname"> + <span class="collabname"> <xsl:apply-templates/> - </html:span> + </span> </xsl:template> <!-- = corpauthor % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="corpauthor"> - <html:dt class="corpauthor"> + <dt class="corpauthor"> <!-- Can occur outside db2html.info.mode, so apply those templates --> <xsl:apply-templates select="."/> - </html:dt> + </dt> </xsl:template> <!-- = corpcredit % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="corpname"> - <html:dt> + <dt> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@role = 'translator'"> @@ -460,12 +459,12 @@ REMARK: Describe this mode. </xsl:attribute> <!-- Can occur outside db2html.info.mode, so apply those templates --> <xsl:apply-templates select="."/> - </html:dt> + </dt> </xsl:template> <!-- = copyright % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="copyright"> - <html:dt class="copyright"> + <dt class="copyright"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Copyright'"/> </xsl:call-template> @@ -483,7 +482,7 @@ REMARK: Describe this mode. </xsl:if> <xsl:apply-templates mode="db2html.info.mode" select="."/> </xsl:for-each> - </html:dt> + </dt> </xsl:template> <!-- = editor % db2html.info.mode = --> @@ -493,12 +492,12 @@ REMARK: Describe this mode. <!-- = editor % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="editor"> - <html:dt class="editor"> + <dt class="editor"> <xsl:variable name="node" select="(. | personname)[last()]"/> <xsl:call-template name="db.personname"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - </html:dt> + </dt> <xsl:apply-templates mode="db2html.info.mode" select="affiliation[orgname]"/> <xsl:apply-templates mode="db2html.info.mode" @@ -509,39 +508,39 @@ REMARK: Describe this mode. <!-- = email % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="email"> - <html:dd class="affiliation"> + <dd class="affiliation"> <!-- FIXME: no style tags --> - <html:i> + <i> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Email'"/> </xsl:call-template> <xsl:text>: </xsl:text> - </html:i> + </i> <!-- Can occur outside db2html.info.mode, so apply those templates --> <xsl:apply-templates select="."/> - </html:dd> + </dd> </xsl:template> <!-- = holder % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="holder"> - <html:span class="holder"> + <span class="holder"> <xsl:apply-templates/> - </html:span> + </span> </xsl:template> <!-- = legalnotice % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="legalnotice"> - <html:div class="division legalnotice"> + <div class="division legalnotice"> <xsl:call-template name="db2html.anchor"/> <xsl:if test="not(title)"> - <html:h2 class="title legalnotice"> + <h2 class="title legalnotice"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Legal Notice'"/> </xsl:call-template> - </html:h2> + </h2> </xsl:if> <xsl:apply-templates/> - </html:div> + </div> </xsl:template> <!-- = orgname % db2html.info.mode = --> @@ -552,7 +551,7 @@ REMARK: Describe this mode. <!-- = othercredit % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="othercredit"> - <html:dt> + <dt> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="@role = 'translator'"> @@ -567,7 +566,7 @@ REMARK: Describe this mode. <xsl:call-template name="db.personname"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - </html:dt> + </dt> <xsl:apply-templates mode="db2html.info.mode" select="affiliation[orgname]"/> <xsl:apply-templates mode="db2html.info.mode" @@ -578,23 +577,23 @@ REMARK: Describe this mode. <!-- = personblurb % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="personblurb"> - <html:dd class="personblurb"> + <dd class="personblurb"> <xsl:apply-templates/> - </html:dd> + </dd> </xsl:template> <!-- = publisher % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="publisher"> - <html:dt class="publisher"> + <dt class="publisher"> <xsl:apply-templates mode="db2html.info.mode"/> - </html:dt> + </dt> </xsl:template> <!-- = publishername % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="publishername"> - <html:span class="publishername"> + <span class="publishername"> <xsl:apply-templates/> - </html:span> + </span> </xsl:template> <!-- = revdescription % db2html.info.mode = --> @@ -604,20 +603,20 @@ REMARK: Describe this mode. <!-- = revhistory % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="revhistory"> - <html:div class="division revhistory"> + <div class="division revhistory"> <xsl:call-template name="db2html.anchor"/> - <html:h2 class="title revhistory"> + <h2 class="title revhistory"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'Revision History'"/> </xsl:call-template> - </html:h2> + </h2> <xsl:apply-templates mode="db2html.info.mode"/> - </html:div> + </div> </xsl:template> <!-- = revision % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="revision"> - <html:div class="block revision"> + <div class="block revision"> <xsl:apply-templates mode="db2html.info.mode" select="date"/> <xsl:text>: </xsl:text> <xsl:apply-templates mode="db2html.info.mode" select="revnumber"/> @@ -656,7 +655,7 @@ REMARK: Describe this mode. </xsl:for-each> <xsl:text>)</xsl:text> </xsl:if> - </html:div> + </div> </xsl:template> <!-- = revnumber % db2html.info.mode = --> @@ -671,9 +670,9 @@ REMARK: Describe this mode. <!-- = year % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="year"> - <html:span class="year"> + <span class="year"> <xsl:apply-templates/> - </html:span> + </span> </xsl:template> @@ -805,7 +804,7 @@ REMARK: Describe this mode. <!-- = legalnotice/title = --> <xsl:template match="legalnotice/title"> - <html:h2 class="title legalnotice"><xsl:apply-templates/></html:h2> + <h2 class="title legalnotice"><xsl:apply-templates/></h2> </xsl:template> </xsl:stylesheet> diff --git a/xslt/docbook/html/db2html-inline.xsl b/xslt/docbook/html/db2html-inline.xsl index 651ef4ad..f7debc19 100644 --- a/xslt/docbook/html/db2html-inline.xsl +++ b/xslt/docbook/html/db2html-inline.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -49,7 +48,7 @@ REMARK: Document this template <xsl:param name="sans" select="false()"/> <!-- FIXME: do CSS classes, rather than inline styles --> - <html:span class="{local-name($node)}"> + <span class="{local-name($node)}"> <xsl:if test="$bold or $italic or $mono or $underline or $sans"> <xsl:variable name="style"> <xsl:if test="$bold"> @@ -78,7 +77,7 @@ REMARK: Document this template <xsl:with-param name="node" select="$node"/> </xsl:call-template> <xsl:apply-templates select="$node/node()"/> - </html:span> + </span> </xsl:template> @@ -142,11 +141,11 @@ REMARK: Document this template <!-- = citation = --> <xsl:template match="citation"> - <html:span class="citation-punc"> + <span class="citation-punc"> <xsl:text>[</xsl:text> <xsl:call-template name="db2html.inline"/> <xsl:text>]</xsl:text> - </html:span> + </span> </xsl:template> <!-- = classname = --> @@ -216,11 +215,11 @@ REMARK: Document this template <!-- = email = --> <xsl:template match="email"> - <html:span class="email-punc"> + <span class="email-punc"> <!-- FIXME: no style tags --> - <html:tt> + <tt> <xsl:text><</xsl:text> - <html:a> + <a> <xsl:attribute name="href"> <xsl:text>mailto:</xsl:text> <xsl:value-of select="string(.)"/> @@ -233,10 +232,10 @@ REMARK: Document this template </xsl:call-template> </xsl:attribute> <xsl:call-template name="db2html.inline"/> - </html:a> + </a> <xsl:text>></xsl:text> - </html:tt> - </html:span> + </tt> + </span> </xsl:template> <!-- = emphasis = --> @@ -429,14 +428,14 @@ REMARK: Document this template <xsl:otherwise>+</xsl:otherwise> </xsl:choose> </xsl:variable> - <html:span class="keycombo"> + <span class="keycombo"> <xsl:for-each select="*"> <xsl:if test="position() != 1"> <xsl:value-of select="$joinchar"/> </xsl:if> <xsl:apply-templates select="."/> </xsl:for-each> - </html:span> + </span> </xsl:template> <!-- = keysym = --> @@ -479,7 +478,7 @@ REMARK: Document this template <!-- = menuchoice = --> <xsl:template match="menuchoice"> - <html:span class="menuchoice"> + <span class="menuchoice"> <xsl:for-each select="*[local-name(.) != 'shortcut']"> <xsl:if test="position() != 1"> <xsl:text> → </xsl:text> @@ -487,13 +486,13 @@ REMARK: Document this template <xsl:apply-templates select="."/> </xsl:for-each> <xsl:if test="shortcut"> - <html:span class="shortcut-punc"> + <span class="shortcut-punc"> <xsl:text> (</xsl:text> <xsl:apply-templates select="shortcut"/> <xsl:text>)</xsl:text> - </html:span> + </span> </xsl:if> - </html:span> + </span> </xsl:template> <!-- = methodname = --> @@ -517,11 +516,11 @@ REMARK: Document this template <!-- = optional = --> <xsl:template match="optional"> - <html:span class="optional-punc"> + <span class="optional-punc"> <xsl:text>[</xsl:text> <xsl:call-template name="db2html.inline"/> <xsl:text>]</xsl:text> - </html:span> + </span> </xsl:template> <!-- = orgdiv = --> @@ -548,9 +547,9 @@ REMARK: Document this template <!-- = personname = --> <xsl:template match="personname"> - <html:div class="personname"> + <div class="personname"> <xsl:call-template name="db.personname"/> - </html:div> + </div> </xsl:template> <!-- = phone = --> @@ -575,14 +574,14 @@ REMARK: Document this template <!-- = productname = --> <xsl:template match="productname"> - <html:span class="productname-punc"> + <span class="productname-punc"> <xsl:call-template name="db2html.inline"/> <xsl:if test="@class"> <xsl:call-template name="db.dingbat"> <xsl:with-param name="dingbat" select="@class"/> </xsl:call-template> </xsl:if> - </html:span> + </span> </xsl:template> <!-- = productnumber = --> @@ -614,7 +613,7 @@ REMARK: Document this template <!-- = quote = --> <xsl:template match="quote"> - <html:span class="quote"> + <span class="quote"> <xsl:call-template name="l10n.gettext"> <xsl:with-param name="msgid" select="'quote.format'"/> <xsl:with-param name="role"> @@ -630,7 +629,7 @@ REMARK: Document this template <xsl:with-param name="node" select="."/> <xsl:with-param name="format" select="true()"/> </xsl:call-template> - </html:span> + </span> </xsl:template> <!-- = replaceable = --> @@ -658,7 +657,7 @@ REMARK: Document this template </xsl:choose> </xsl:variable> <!-- FIXME: no style tags --> - <html:tt class="sgmltag-{$class}"> + <tt class="sgmltag-{$class}"> <xsl:call-template name="db2html.anchor"/> <xsl:choose> <xsl:when test="$class = 'attribute'"> @@ -722,7 +721,7 @@ REMARK: Document this template <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> - </html:tt> + </tt> </xsl:template> <!-- = shortcut = --> @@ -759,18 +758,18 @@ REMARK: Document this template <!-- = subscript = --> <xsl:template match="subscript"> - <html:sub> + <sub> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> - </html:sub> + </sub> </xsl:template> <!-- = superscript = --> <xsl:template match="superscript"> - <html:sup> + <sup> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> - </html:sup> + </sup> </xsl:template> <!-- = surname = --> @@ -807,12 +806,12 @@ REMARK: Document this template </xsl:otherwise> </xsl:choose> </xsl:variable> - <html:span class="trademark"> + <span class="trademark"> <xsl:apply-templates/> <xsl:call-template name="db.dingbat"> <xsl:with-param name="dingbat" select="$class"/> </xsl:call-template> - </html:span> + </span> </xsl:template> <!-- = type = --> diff --git a/xslt/docbook/html/db2html-l10n.xsl b/xslt/docbook/html/db2html-l10n.xsl index 88c75a97..f203505f 100644 --- a/xslt/docbook/html/db2html-l10n.xsl +++ b/xslt/docbook/html/db2html-l10n.xsl @@ -18,8 +18,8 @@ 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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="msg html" + xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="msg" version="1.0"> <!--!!========================================================================== @@ -53,7 +53,7 @@ the parameters can do. <xsl:param name="font_stretch" select="string($span/@font-stretch)"/> <xsl:param name="font_size" select="string($span/@font-size)"/> <xsl:param name="text_decoration" select="string($span/@text-decoration)"/> - <html:span> + <span> <xsl:attribute name="style"> <xsl:if test="$font_family != ''"> <xsl:value-of select="concat('font-family: ', $font_family, '; ')"/> @@ -81,7 +81,7 @@ the parameters can do. <xsl:apply-templates mode="l10n.format.mode"> <xsl:with-param name="node" select="$node"/> </xsl:apply-templates> - </html:span> + </span> </xsl:template> <!--#% l10n.format.mode ==================================================== --> @@ -120,20 +120,20 @@ the parameters can do. <xsl:template mode="l10n.format.mode" match="msg:sub"> <xsl:param name="node"/> - <html:sub> + <sub> <xsl:apply-templates mode="l10n.format.mode"> <xsl:with-param name="node" select="$node"/> </xsl:apply-templates> - </html:sub> + </sub> </xsl:template> <xsl:template mode="l10n.format.mode" match="msg:sup"> <xsl:param name="node"/> - <html:sup> + <sup> <xsl:apply-templates mode="l10n.format.mode"> <xsl:with-param name="node" select="$node"/> </xsl:apply-templates> - </html:sup> + </sup> </xsl:template> <xsl:template mode="l10n.format.mode" match="msg:small"> diff --git a/xslt/docbook/html/db2html-list.xsl b/xslt/docbook/html/db2html-list.xsl index e0099bc5..4127b90d 100644 --- a/xslt/docbook/html/db2html-list.xsl +++ b/xslt/docbook/html/db2html-list.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -64,11 +63,11 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. <!-- = itemizedlist = --> <xsl:template match="itemizedlist"> - <html:div class="block list"> - <html:div class="itemizedlist"> + <div class="block list"> + <div class="itemizedlist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'listitem']"/> - <html:ul> + <ul> <xsl:if test="@mark"> <xsl:attribute name="style"> <xsl:text>list-style-type: </xsl:text> @@ -85,9 +84,9 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:attribute> </xsl:if> <xsl:apply-templates select="listitem"/> - </html:ul> - </html:div> - </html:div> + </ul> + </div> + </div> </xsl:template> <!-- = itemizedlist/listitem = --> @@ -95,7 +94,7 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. <xsl:variable name="first" select="not(preceding-sibling::* [not(self::blockinfo) and not(self::title) and not(self::titleabbrev)])"/> - <html:li> + <li> <xsl:if test="$first"> <xsl:attribute name="class"> <xsl:text>li-first</xsl:text> @@ -113,7 +112,7 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:if> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> - </html:li> + </li> </xsl:template> <!-- = member = --> @@ -133,11 +132,11 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:choose> </xsl:variable> <!-- FIXME: auto-numeration for nested lists --> - <html:div class="block list"> - <html:div class="orderedlist"> + <div class="block list"> + <div class="orderedlist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'listitem']"/> - <html:ol> + <ol> <xsl:if test="@numeration"> <xsl:attribute name="type"> <xsl:choose> @@ -162,9 +161,9 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:if> <!-- FIXME: @inheritnum --> <xsl:apply-templates select="listitem"/> - </html:ol> - </html:div> - </html:div> + </ol> + </div> + </div> </xsl:template> <!-- = orderedlist/listitem = --> @@ -172,7 +171,7 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. <xsl:variable name="first" select="not(preceding-sibling::* [not(self::blockinfo) and not(self::title) and not(self::titleabbrev)])"/> - <html:li> + <li> <xsl:if test="$first"> <xsl:attribute name="class"> <xsl:text>li-first</xsl:text> @@ -185,35 +184,35 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:if> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> - </html:li> + </li> </xsl:template> <!-- = procedure = --> <xsl:template match="procedure"> - <html:div class="block list"> - <html:div class="procedure"> + <div class="block list"> + <div class="procedure"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'step']"/> <xsl:choose> <xsl:when test="count(step) = 1"> - <html:ul> + <ul> <xsl:apply-templates select="step"/> - </html:ul> + </ul> </xsl:when> <xsl:otherwise> - <html:ol> + <ol> <xsl:apply-templates select="step"/> - </html:ol> + </ol> </xsl:otherwise> </xsl:choose> - </html:div> - </html:div> + </div> + </div> </xsl:template> <!-- = seg = --> <xsl:template match="seg"> <xsl:variable name="position" select="count(preceding-sibling::seg) + 1"/> - <html:p> + <p> <xsl:if test="$position = 1"> <xsl:attribute name="class"> <xsl:text>segfirst</xsl:text> @@ -221,14 +220,14 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:if> <xsl:apply-templates select="../../segtitle[position() = $position]"/> <xsl:apply-templates/> - </html:p> + </p> </xsl:template> <!-- = seglistitem = --> <xsl:template match="seglistitem"> <xsl:param name="position" select="count(preceding-sibling::seglistitem) + 1"/> - <html:div class="seglistitem"> - <html:div> + <div class="seglistitem"> + <div> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="($position mod 2) = 1"> @@ -240,28 +239,28 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:choose> </xsl:attribute> <xsl:apply-templates/> - </html:div> - </html:div> + </div> + </div> </xsl:template> <!-- FIXME: Implement tabular segmentedlists --> <!-- = segmentedlist = --> <xsl:template match="segmentedlist"> - <html:div class="segmentedlist"> + <div class="segmentedlist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="title"/> <xsl:apply-templates select="seglistitem"/> - </html:div> + </div> </xsl:template> <!-- = segtitle = --> <xsl:template match="segtitle"> <!-- FIXME: no style tags --> - <html:b> + <b> <xsl:apply-templates/> <!-- FIXME: i18n --> <xsl:text>: </xsl:text> - </html:b> + </b> </xsl:template> <!-- = simplelist = --> @@ -278,7 +277,7 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:variable> <xsl:choose> <xsl:when test="@type = 'inline'"> - <html:span class="simplelist"> + <span class="simplelist"> <xsl:call-template name="db2html.anchor"/> <xsl:for-each select="member"> <xsl:if test="position() != 1"> @@ -288,63 +287,63 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:if> <xsl:apply-templates select="."/> </xsl:for-each> - </html:span> + </span> </xsl:when> <xsl:when test="@type = 'horiz'"> - <html:div class="block list"> - <html:div class="simplelist"> + <div class="block list"> + <div class="simplelist"> <xsl:call-template name="db2html.anchor"/> - <html:table> + <table> <xsl:for-each select="member[$columns = 1 or position() mod $columns = 1]"> - <html:tr> - <html:td class="td-first"> + <tr> + <td class="td-first"> <xsl:apply-templates select="."/> - </html:td> + </td> <xsl:for-each select="following-sibling::member[ position() < $columns]"> - <html:td> + <td> <xsl:apply-templates select="."/> - </html:td> + </td> </xsl:for-each> <xsl:variable name="fcount" select="count(following-sibling::member)"/> <xsl:if test="$fcount < ($columns - 1)"> - <html:td colspan="{$columns - $fcount - 1}"/> + <td colspan="{$columns - $fcount - 1}"/> </xsl:if> - </html:tr> + </tr> </xsl:for-each> - </html:table> - </html:div> - </html:div> + </table> + </div> + </div> </xsl:when> <xsl:otherwise> - <html:div class="block list"> - <html:div class="simplelist"> + <div class="block list"> + <div class="simplelist"> <xsl:call-template name="db2html.anchor"/> <xsl:variable name="rows" select="ceiling(count(member) div $columns)"/> - <html:table> + <table> <xsl:for-each select="member[position() <= $rows]"> - <html:tr> - <html:td class="td-first"> + <tr> + <td class="td-first"> <xsl:apply-templates select="."/> - </html:td> + </td> <xsl:for-each select="following-sibling::member[ position() mod $rows = 0]"> - <html:td> + <td> <xsl:apply-templates select="."/> - </html:td> + </td> </xsl:for-each> <xsl:if test="position() = $rows"> <xsl:variable name="fcount" select="count(following-sibling::member[position() mod $rows = 0])"/> <xsl:if test="$fcount < ($columns - 1)"> - <html:td colspan="{$columns - $fcount - 1}"/> + <td colspan="{$columns - $fcount - 1}"/> </xsl:if> </xsl:if> - </html:tr> + </tr> </xsl:for-each> - </html:table> - </html:div> - </html:div> + </table> + </div> + </div> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -355,23 +354,23 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. <xsl:variable name="first" select="not(preceding-sibling::* [not(self::blockinfo) and not(self::title) and not(self::titleabbrev)])"/> - <html:li> + <li> <xsl:if test="$first"> <xsl:attribute name="class"> <xsl:text>li-first</xsl:text> </xsl:attribute> </xsl:if> <xsl:apply-templates/> - </html:li> + </li> </xsl:template> <!-- FIXME: Do something with @performance --> <!-- = substeps = --> <xsl:template match="substeps"> <xsl:variable name="depth" select="count(ancestor::substeps)"/> - <html:div class="substeps"> + <div class="substeps"> <xsl:call-template name="db2html.anchor"/> - <html:ol> + <ol> <xsl:attribute name="type"> <xsl:choose> <xsl:when test="$depth mod 3 = 0">a</xsl:when> @@ -380,33 +379,33 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. </xsl:choose> </xsl:attribute> <xsl:apply-templates/> - </html:ol> - </html:div> + </ol> + </div> </xsl:template> <!-- = term = --> <xsl:template match="term"> - <html:dt class="term"> + <dt class="term"> <xsl:if test="../varlistentry/@id and not(preceding-sibling::term)"> <xsl:call-template name="db2html.anchor"> <xsl:with-param name="node" select=".."/> </xsl:call-template> </xsl:if> <xsl:apply-templates/> - </html:dt> + </dt> </xsl:template> <!-- = variablelist = --> <xsl:template match="variablelist"> - <html:div class="block list"> - <html:div class="variablelist"> + <div class="block list"> + <div class="variablelist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'varlistentry']"/> - <html:dl> + <dl> <xsl:apply-templates select="varlistentry"/> - </html:dl> - </html:div> - </html:div> + </dl> + </div> + </div> </xsl:template> <!-- = varlistentry = --> @@ -417,10 +416,10 @@ determines the number to use for the first #{listitem} in an #{orderedlist}. <!-- = varlistentry/listitem = --> <xsl:template match="varlistentry/listitem"> - <html:dd> + <dd> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates/> - </html:dd> + </dd> </xsl:template> diff --git a/xslt/docbook/html/db2html-media.xsl b/xslt/docbook/html/db2html-media.xsl index 4e725587..56577f73 100644 --- a/xslt/docbook/html/db2html-media.xsl +++ b/xslt/docbook/html/db2html-media.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -43,7 +42,7 @@ REMARK: calls db2html.imagedata.src, how other attrs are gotten --> <xsl:template name="db2html.imagedata"> <xsl:param name="node" select="."/> - <html:img> + <img> <xsl:attribute name="src"> <xsl:call-template name="db2html.imagedata.src"> <xsl:with-param name="node" select="$node"/> @@ -79,7 +78,7 @@ REMARK: calls db2html.imagedata.src, how other attrs are gotten </xsl:if> --> <!-- FIXME: longdesc --> - </html:img> + </img> </xsl:template> @@ -159,10 +158,10 @@ as a text-only mode. <!-- = graphic = --> <xsl:template match="graphic"> - <html:div class="graphic"> + <div class="graphic"> <xsl:call-template name="db2html.anchor"/> <xsl:call-template name="db2html.imagedata"/> - </html:div> + </div> </xsl:template> <!-- = imagedata = --> @@ -177,23 +176,23 @@ as a text-only mode. <!-- = inlinegraphic = --> <xsl:template match="inlinegraphic"> - <html:span class="inlinegraphic"> + <span class="inlinegraphic"> <xsl:call-template name="db2html.anchor"/> <xsl:call-template name="db2html.imagedata"/> - </html:span> + </span> </xsl:template> <!-- = inlinemediaobject = --> <xsl:template match="inlinemediaobject"> - <html:span class="inlinemediaobject"> + <span class="inlinemediaobject"> <xsl:call-template name="db2html.anchor"/> <xsl:call-template name="db2html.mediaobject"/> - </html:span> + </span> </xsl:template> <!-- = mediaojbect = --> <xsl:template match="mediaobject"> - <html:div class="mediaobject"> + <div class="mediaobject"> <xsl:call-template name="db2html.anchor"/> <xsl:call-template name="db2html.mediaobject"/> <!-- When a figure contains only a single mediaobject, it eats the caption --> @@ -202,7 +201,7 @@ as a text-only mode. not(self::titleabbrev) and not(. = current()) ]"> <xsl:apply-templates select="caption"/> </xsl:if> - </html:div> + </div> </xsl:template> <!-- = screenshot = --> diff --git a/xslt/docbook/html/db2html-qanda.xsl b/xslt/docbook/html/db2html-qanda.xsl index 6af80d6f..922b7a03 100644 --- a/xslt/docbook/html/db2html-qanda.xsl +++ b/xslt/docbook/html/db2html-qanda.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -53,14 +52,14 @@ dd.answer div.label { float: left; } <!-- = answer = --> <xsl:template match="answer"> - <html:dd class="answer"> - <html:div class="label"> + <dd class="answer"> + <div class="label"> <xsl:call-template name="db.label"> <xsl:with-param name="role" select="'header'"/> </xsl:call-template> - </html:div> + </div> <xsl:apply-templates/> - </html:dd> + </dd> </xsl:template> <!-- = qandadiv = --> @@ -110,14 +109,14 @@ dd.answer div.label { float: left; } <!-- = question = --> <xsl:template match="question"> - <html:dt class="question"> - <html:div class="label"> + <dt class="question"> + <div class="label"> <xsl:call-template name="db.label"> <xsl:with-param name="role" select="'header'"/> </xsl:call-template> - </html:div> + </div> <xsl:apply-templates/> - </html:dt> + </dt> </xsl:template> </xsl:stylesheet> diff --git a/xslt/docbook/html/db2html-refentry.xsl b/xslt/docbook/html/db2html-refentry.xsl index 4d1b99bf..dab6a7ca 100644 --- a/xslt/docbook/html/db2html-refentry.xsl +++ b/xslt/docbook/html/db2html-refentry.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -68,7 +67,7 @@ div.refentry + div.refentry { <xsl:call-template name="db.chunk.depth-of-chunk"/> </xsl:param> - <html:div class="refentry"> + <div class="refentry"> <xsl:choose> <xsl:when test="refmeta/refentrytitle"> <xsl:call-template name="db2html.title.header"> @@ -101,7 +100,7 @@ div.refentry + div.refentry { </xsl:otherwise> </xsl:choose> - <html:div class="refnamedivs"> + <div class="refnamedivs"> <xsl:call-template name="db2html.title.header"> <xsl:with-param name="node" select="refnamediv"/> <xsl:with-param name="referent" select="refnamediv"/> @@ -115,12 +114,12 @@ div.refentry + div.refentry { </xsl:with-param> </xsl:call-template> <xsl:apply-templates select="refnamediv"/> - </html:div> + </div> <xsl:apply-templates select="refsynopsisdiv | refsect1 | refsection"> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/> </xsl:apply-templates> - </html:div> + </div> </xsl:template> <!-- = refname = --> @@ -130,7 +129,7 @@ div.refentry + div.refentry { <!-- = refnamediv = --> <xsl:template match="refnamediv"> - <html:div class="refnamediv"> + <div class="refnamediv"> <xsl:call-template name="db2html.anchor"/> <xsl:for-each select="refname"> <xsl:if test="position() != 1"> @@ -140,7 +139,7 @@ div.refentry + div.refentry { </xsl:for-each> <xsl:text> — </xsl:text> <xsl:apply-templates select="refpurpose"/> - </html:div> + </div> </xsl:template> <!-- = refpurpose = --> @@ -224,7 +223,7 @@ div.refentry + div.refentry { <xsl:param name="depth_of_chunk"> <xsl:call-template name="db.chunk.depth-of-chunk"/> </xsl:param> - <html:div class="refsynopsisdiv"> + <div class="refsynopsisdiv"> <xsl:call-template name="db2html.anchor"/> <xsl:if test="not(title)"> <xsl:call-template name="db2html.title.header"> @@ -243,7 +242,7 @@ div.refentry + div.refentry { <xsl:apply-templates> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/> </xsl:apply-templates> - </html:div> + </div> </xsl:template> <!-- = refsect*/title = --> diff --git a/xslt/docbook/html/db2html-table.xsl b/xslt/docbook/html/db2html-table.xsl index 1bc9bf17..88b1dc6d 100644 --- a/xslt/docbook/html/db2html-table.xsl +++ b/xslt/docbook/html/db2html-table.xsl @@ -17,12 +17,12 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== DocBook to HTML - Tables +:Requires: db2html-block REMARK: This needs lots of talk about CALS --> @@ -34,7 +34,7 @@ The color used for alternating-color rules on table rows REMARK: Describe this param --> -<xsl:param name="db2html.table.rule_color" select="'#F0F0F0'"/> +<xsl:param name="db2html.table.rule_color" select="'#f6f6f6'"/> <!--**========================================================================== @@ -45,21 +45,10 @@ REMARK: Describe this template --> <xsl:template name="db2html.table.css"> <xsl:text> -table { - border-collapse: collapse; -} -table.table { - border: solid 1px; - -moz-border-radius: 5px; -} -</xsl:text> -<xsl:if test="$db2html.table.rule_color"> - <xsl:text>tr.odd { background-color: </xsl:text> - <xsl:value-of select="$db2html.table.rule_color"/> - <xsl:text> }</xsl:text> -</xsl:if><xsl:text> -td { padding: 4px 0.83em 4px 0.83em; } -th { padding-left: 0.8em; padding-right: 0.83em; } +table { border-collapse: collapse; } +td { vertical-align: top; } +td { padding: 0.2em 0.83em 0.2em 0.83em; } +th { padding: 0 0.83em 0 0.83em; } thead { border-top: solid 2px; border-bottom: solid 2px; @@ -68,32 +57,598 @@ tfoot { border-top: solid 2px; border-bottom: solid 2px; } -td + td { - border-left: solid 1px; -} -tbody { - border: solid 1px; - -moz-border-radius: 5px; -} + +table.table-pgwide { width: 100%; } +tr.tr-shade { background-color: </xsl:text><xsl:value-of select="$theme.color.gray_background"/><xsl:text>; } +td.td-colsep { border-right: solid 1px; } +td.td-rowsep { border-bottom: solid 1px; } </xsl:text> </xsl:template> <!--**========================================================================== -db2html.entry.colnum -Calculates the column number for an #{entry} element +db2html.row +Creates a #{tr} element for a #{row} element +$row: The #{row} element to process $colspecs: The #{colspec} elements currently in scope $spanspecs: The #{spanspec} elements currently in scope +$colsep: Whether column separators are currently enabled +$rowsep: Whether column separators are currently enabled +$spanstr: The string representation of the row spans + +FIXME +--> +<xsl:template name="db2html.row"> + <xsl:param name="row" select="."/> + <xsl:param name="colspecs"/> + <xsl:param name="spanspecs"/> + <xsl:param name="colsep" select="''"/> + <xsl:param name="rowsep" select="''"/> + <xsl:param name="spanstr"/> + <tr> + <xsl:if test="$row/../self::tbody and (count($row/preceding-sibling::row) mod 2 = 1)"> + <xsl:attribute name="class"> + <xsl:text>tr-shade</xsl:text> + </xsl:attribute> + </xsl:if> + <xsl:if test="$row/*[1]"> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$row/*[1]"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep"> + <xsl:choose> + <xsl:when test="$row/@rowsep"> + <xsl:value-of select="$row/@rowsep"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$rowsep"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="spanstr" select="$spanstr"/> + </xsl:call-template> + </xsl:if> + </tr> + <xsl:variable name="following" select="$row/following-sibling::row[1]"/> + <xsl:if test="$following"> + <xsl:call-template name="db2html.row"> + <xsl:with-param name="row" select="$following"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="spanstr"> + <xsl:call-template name="db2html.spanstr"> + <xsl:with-param name="row" select="$row"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="spanstr" select="$spanstr"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> +</xsl:template> + + +<!--**========================================================================== +db2html.entry +Creates a #{td} element for an #{entry} element $entry: The #{entry} element to process -$colnum: The default column number, as passed by the preceding sibling +$colspecs: The #{colspec} elements currently in scope +$spanspecs: The #{spanspec} elements currently in scope +$colsep: Whether column separators are currently enabled +$rowsep: Whether column separators are currently enabled +$colpos: The output column position currently being considered +$colnum: The actual column number of ${entry} +$spanstr: The string representation of the row spans -REMARK: This template needs to be explained in detail, but I forgot how it works. +This template processes a single #{entry} element and generates #{td} elements +as needed. It then calls itself on the following #{entry} element, adjusting +parameters as necessary. Under certain conditions, this template may not be +able to output a #{td} element immediately. In these cases, it makes whatever +adjustments are needed and calls itself or *{db2html.entry.implicit} (which, +in turn, calls this template again when it's finished). + +Three parameters are used to determine whether a #{td} element can be output. +The ${spanstr} parameter provides infomation about row spans in effect from +entries in previous rows; the ${colpos} parameter specifies which column we +would output to if we created a #{td}; and the ${colnum} parameter specifies +which column this #{entry} should be in, according to any relevant #{colspec} +or #{spanspec} elemets. + +There are two conditions that cause this template not to output a #{td} element +immediately: if the ${spanstr} parameter does not start with #{0:}, and if the +${colpos} parameter is less than the ${colnum} parameter. + +The ${spanstr} parameter specifies the row spans in effect from entries in +previous rows. As this template iterates over the #{entry} elements, it strips +off parts of ${spanstr} so that only the parts relevant to the #{entry} are +present. If ${spanstr} does not start with #{0:}, then an entry in a previous +row occupies this column position. In this case, that value is removed from +${spanstr}, the ${colpos} parameter is incremented, and *{db2html.entry} is +called again. Additionally, since *{db2html.entry.colnum} doesn't consider +row spans, the ${colnum} parameter may be incremented as well. + +If the ${colpos} parameter is less than the ${colnum} parameter, then the +document has skipped entries by explicitly referencing a column. This is +allowed in CALS tables, but not in HTML. To fill the blank spaces, we call +*{db2html.entry.implicit}, which outputs an empty #{td} element spanning as +many columns as necessary to fill in the blanks. The *{db2html.entry.implicit} +template then calls this template again with appropriate parameter values. + +When this template is finally able to output a #{td} element, it calculates +appropriate values for the #{style} and #{class} attribute based on DocBook +attributes on the #{entry}, the relevant #{colspec} or #{spanspec}, and any +relevant ancestor elements. It then calls itself on the following #{entry} +element to output the next #{td}. --> -<xsl:template name="db2html.entry.colnum"> +<xsl:template name="db2html.entry"> + <xsl:param name="entry" select="."/> <xsl:param name="colspecs"/> <xsl:param name="spanspecs"/> + <xsl:param name="colsep" select="''"/> + <xsl:param name="rowsep" select="''"/> + <xsl:param name="colpos" select="1"/> + <xsl:param name="colnum"> + <xsl:call-template name="db2html.entry.colnum"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colpos" select="$colpos"/> + </xsl:call-template> + </xsl:param> + <xsl:param name="spanstr"/> + <xsl:variable name="colspan"> + <xsl:choose> + <xsl:when test="$entry/@spanname or $entry/@namest"> + <xsl:call-template name="db2html.entry.colspan"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:choose> + <!-- Another entry has a rowspan that covers this column position --> + <xsl:when test="$spanstr != '' and not(starts-with($spanstr, '0:'))"> + <xsl:choose> + <xsl:when test="$colnum = $colpos"> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos + 1"/> + <xsl:with-param name="colnum" select="$colnum + 1"/> + <xsl:with-param name="colspan" select="$colspan"/> + <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos + 1"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="$colspan"/> + <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <!-- We need to insert implicit td elements to cover blank space --> + <xsl:when test="$colnum > $colpos"> + <xsl:call-template name="db2html.entry.implicit"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="1"/> + <xsl:with-param name="spanstr" select="$spanstr"/> + </xsl:call-template> + </xsl:when> + <!-- We can output the td for this entry --> + <xsl:otherwise> + <xsl:if test="$colnum < $colpos"> + <xsl:message>Column positions are not aligned.</xsl:message> + </xsl:if> + <xsl:variable name="element"> + <xsl:choose> + <xsl:when test="$entry/../../self::thead or $entry/../../self::tfoot">th</xsl:when> + <xsl:otherwise>td</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="rowspan"> + <xsl:choose> + <xsl:when test="$entry/@morerows"> + <xsl:value-of select="$entry/@morerows + 1"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="1"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="align"> + <xsl:choose> + <xsl:when test="$entry/@align"> + <xsl:value-of select="$entry/@align"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@colname]/@align"> + <xsl:value-of select="$colspecs[@colname = $entry/@colname]/@align"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@namest]/@align"> + <xsl:value-of select="$colspecs[@colname = $entry/@namest]/@align"/> + </xsl:when> + <xsl:when test="$spanspecs[@spanname = $entry/@spanname]/@align"> + <xsl:value-of select="$spanspecs[@spanname = $entry/@spanname]/@align"/> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@align"> + <xsl:value-of select="$colspecs[position() = $colnum]/@align"/> + </xsl:when> + <xsl:when test="$entry/../../../@align"> + <xsl:value-of select="$entry/../../../@align"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + <xsl:variable name="valign"> + <xsl:choose> + <xsl:when test="$entry/@valign"> + <xsl:value-of select="$entry/@valign"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@colname]/@valign"> + <xsl:value-of + select="$colspecs[@colname = $entry/@colname]/@valign"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@namest]/@valign"> + <xsl:value-of select="$colspecs[@colname = $entry/@namest]/@valign"/> + </xsl:when> + <xsl:when test="$spanspecs[@spanname = $entry/@spanname]/@valign"> + <xsl:value-of select="$spanspecs[@spanname = $entry/@spanname]/@valign"/> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@valign"> + <xsl:value-of select="$colspecs[position() = $colnum]/@valign"/> + </xsl:when> + <xsl:when test="$entry/../@valign"> + <xsl:value-of select="$entry/../@valign"/> + </xsl:when> + <xsl:when test="$entry/../../@valign"> + <xsl:value-of select="$entry/../../@valign"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + <xsl:variable name="char"> + <xsl:choose> + <xsl:when test="$align != 'char'"/> + <xsl:when test="$entry/@char"> + <xsl:value-of select="$entry/@char"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@colname]/@char"> + <xsl:value-of select="$colspecs[@colname = $entry/@colname]/@char"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@namest]/@char"> + <xsl:value-of select="$colspecs[@colname = $entry/@namest]/@char"/> + </xsl:when> + <xsl:when test="$spanspecs[@spanname = $entry/@spanname]/@char"> + <xsl:value-of select="$spanspecs[@spanname = $entry/@spanname]/@char"/> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@char"> + <xsl:value-of select="$colspecs[position() = $colnum]/@char"/> + </xsl:when> + <xsl:when test="$entry/../../../@char"> + <xsl:value-of select="$entry/../../@char"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + <xsl:variable name="charoff"> + <xsl:choose> + <xsl:when test="$align != 'char'"/> + <xsl:when test="$entry/@charoff"> + <xsl:value-of select="$entry/@charoff"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@colname]/@charoff"> + <xsl:value-of select="$colspecs[@colname = $entry/@colname]/@charoff"/> + </xsl:when> + <xsl:when test="$colspecs[@colname = $entry/@namest]/@charoff"> + <xsl:value-of select="$colspecs[@colname = $entry/@namest]/@charoff"/> + </xsl:when> + <xsl:when test="$spanspecs[@spanname = $entry/@spanname]/@charoff"> + <xsl:value-of select="$spanspecs[@spanname = $entry/@spanname]/@charoff"/> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@charoff"> + <xsl:value-of select="$colspecs[position() = $colnum]/@charoff"/> + </xsl:when> + <xsl:when test="$entry/../../../@charoff"> + <xsl:value-of select="$entry/../../@charoff"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + <xsl:variable name="style"> + <xsl:if test="$align != ''"> + <xsl:value-of select="concat('text-align: ', $align, ';')"/> + </xsl:if> + <xsl:if test="$valign != ''"> + <xsl:value-of select="concat('vertical-align: ', $valign, ';')"/> + </xsl:if> + </xsl:variable> + <xsl:variable name="class"> + <!-- td-colsep: whether to show a column separator --> + <xsl:choose> + <!-- FIXME: we need to handle @cols better --> + <xsl:when test="number($colpos) + number($colspan) > number($entry/ancestor::tgroup[1]/@cols)"/> + <xsl:when test="$entry/@colsep"> + <xsl:if test="$entry/@colsep = '1'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@spanname and $spanspecs[@spanname = $entry/@spanname]/@colsep"> + <xsl:if test="$spanspecs[@spanname = $entry/@spanname]/@colsep = '1'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@colname and $colspecs[@colname = $entry/@colname]/@colsep"> + <xsl:if test="$colspecs[@colname = $entry/@colname]/@colsep = '1'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@nameend and $colspecs[@colname = $entry/@nameend]/@colsep"> + <xsl:if test="$colspecs[@colname = $entry/@nameend]/@colsep = '1'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@colsep"> + <xsl:if test="$colspecs[position() = $colnum]/@colsep = '1'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$colsep = '0'"/> + <xsl:otherwise> + <xsl:text> td-colsep</xsl:text> + </xsl:otherwise> + </xsl:choose> + <!-- td-rowsep: whether to show a row separator --> + <xsl:choose> + <xsl:when test="count($entry/../following-sibling::row) < number($rowspan)"/> + <xsl:when test="$entry/@rowsep"> + <xsl:if test="$entry/@rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@spanname and $spanspecs[@spanname = $entry/@spanname]/@rowsep"> + <xsl:if test="$spanspecs[@spanname = $entry/@spanname]/@rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@colname and $colspecs[@colname = $entry/@colname]/@rowsep"> + <xsl:if test="$colspecs[@colname = $entry/@colname]/@rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$entry/@nameend and $colspecs[@colname = $entry/@nameend]/@rowsep"> + <xsl:if test="$colspecs[@colname = $entry/@nameend]/@rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$colspecs[position() = $colnum]/@rowsep"> + <xsl:if test="$colspecs[position() = $colnum]/@rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:when> + <xsl:when test="$rowsep = '1'"> + <xsl:text> td-rowsep</xsl:text> + </xsl:when> + </xsl:choose> + </xsl:variable> + <!-- Finally, output the td or th element --> + <xsl:element name="{$element}" namespace="{$db2html.namespace}"> + <xsl:if test="$style != ''"> + <xsl:attribute name="style"> + <xsl:value-of select="normalize-space($style)"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$class != ''"> + <xsl:attribute name="class"> + <xsl:value-of select="normalize-space($class)"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="number($rowspan) > 1"> + <xsl:attribute name="rowspan"> + <xsl:value-of select="$rowspan"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$colspan > 1"> + <xsl:attribute name="colspan"> + <xsl:value-of select="$colspan"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$char != ''"> + <xsl:attribute name="char"> + <xsl:value-of select="$char"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$charoff != ''"> + <xsl:attribute name="charoff"> + <xsl:value-of select="$charoff"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates select="$entry/node()"/> + </xsl:element> + <!-- And process the next entry --> + <xsl:variable name="following" select="$entry/following-sibling::*[1]"/> + <xsl:if test="$following"> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$following"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos + $colspan"/> + <xsl:with-param name="spanstr"> + <xsl:call-template name="db2html.spanstr.pop"> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colspan" select="$colspan"/> + <xsl:with-param name="spanstr" select="$spanstr"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<!--**========================================================================== +db2html.entry.implicit +Creates an implicit #{td} element to fill up unoccupied columns +$entry: The #{entry} element currently being processed +$colspecs: The #{colspec} elements currently in scope +$spanspecs: The #{spanspec} elements currently in scope +$colsep: Whether column separators are currently enabled +$rowsep: Whether column separators are currently enabled +$colpos: The output column position currently being considered +$colnum: The actual column number of ${entry} +$colspan: How many columns the implicit #{td} currently spans +$spanstr: The string representation of the row spans + +CALS tables in DocBook don't need to have #{entry} elements for each column +in each row, even when the column is not covered by a row-spanning entry from +a previous row. An #{entry} can explicitly specify which column it's in, and +any previous unfilled columns are considered blank. Since HTML tables don't +have this mechanism, we have to insert blank #{td} elements to fill the gaps. + +When *{db2html.entry} detects a blank entry, it will call this template with +the approprite parameters. This template then calls itself recursively, each +time adjusting the ${colpos}, ${colspan}, and ${spanstr} parameters, until it +comes across the last column that needs to be filled. It then outputs a #{td} +element with an appropriate #{colspan} attribute. + +Finally, this template calls *{db2html.entry} again on ${entry}. With the +values of ${colpos} and ${spanstr} suitably adjusted, that template is then +able to output the #{td} for the #{entry} element. +--> +<xsl:template name="db2html.entry.implicit"> + <xsl:param name="entry"/> + <xsl:param name="colspecs"/> + <xsl:param name="spanspecs"/> + <xsl:param name="colsep" select="''"/> + <xsl:param name="rowsep" select="''"/> + <xsl:param name="colpos" select="1"/> + <xsl:param name="colnum"> + <xsl:call-template name="db2html.entry.colnum"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colpos" select="$colpos"/> + </xsl:call-template> + </xsl:param> + <xsl:param name="colspan"/> + <xsl:param name="spanstr"/> + + <xsl:variable name="element"> + <xsl:choose> + <xsl:when test="$entry/../../self::thead or $entry/../../self::tfoot">th</xsl:when> + <xsl:otherwise>td</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="class"> + <xsl:if test="$colsep != '0'"> + <xsl:text> td-colsep</xsl:text> + </xsl:if> + <xsl:if test="$rowsep = '1' and $entry/../following-sibling::row"> + <xsl:text> td-rowsep</xsl:text> + </xsl:if> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$spanstr != '' and not(starts-with($spanstr, '0:'))"> + <xsl:element name="{$element}" namespace="{$db2html.namespace}"> + <xsl:if test="$class != ''"> + <xsl:attribute name="class"> + <xsl:value-of select="normalize-space($class)"/> + </xsl:attribute> + </xsl:if> + <xsl:attribute name="colspan"> + <xsl:value-of select="$colspan - 1"/> + </xsl:attribute> + <xsl:text> </xsl:text> + </xsl:element> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="spanstr" select="$spanstr"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$colnum - $colpos = 1"> + <xsl:element name="{$element}" namespace="{$db2html.namespace}"> + <xsl:if test="$class != ''"> + <xsl:attribute name="class"> + <xsl:value-of select="normalize-space($class)"/> + </xsl:attribute> + </xsl:if> + <xsl:attribute name="colspan"> + <xsl:value-of select="$colspan"/> + </xsl:attribute> + <xsl:text> </xsl:text> + </xsl:element> + <xsl:call-template name="db2html.entry"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos + 1"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="db2html.entry.implicit"> + <xsl:with-param name="entry" select="$entry"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + <xsl:with-param name="colpos" select="$colpos + 1"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="$colspan + 1"/> + <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<!--**========================================================================== +db2html.entry.colnum +Calculates the actual column number for an #{entry} element +$entry: The #{entry} element to process +$colspecs: The #{colspec} elements currently in scope +$spanspecs: The #{spanspec} elements currently in scope +$colpos: The column position, as passed by the preceding #{entry} + +FIXME +--> +<xsl:template name="db2html.entry.colnum"> <xsl:param name="entry" select="."/> - <xsl:param name="colnum" select="0"/> + <xsl:param name="colspecs"/> + <xsl:param name="spanspecs"/> + <xsl:param name="colpos" select="0"/> <xsl:choose> <xsl:when test="$entry/@spanname"> <xsl:variable name="spanspec" @@ -101,31 +656,31 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:variable name="colspec" select="$colspecs[@colname = $spanspec/@namest]"/> <xsl:call-template name="db2html.colspec.colnum"> + <xsl:with-param name="colspec" select="$colspec"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspec" select="$colspec"/> </xsl:call-template> </xsl:when> <xsl:when test="$entry/@colname"> <xsl:variable name="colspec" select="$colspecs[@colname = $entry/@colname]"/> <xsl:call-template name="db2html.colspec.colnum"> + <xsl:with-param name="colspec" select="$colspec"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspec" select="$colspec"/> </xsl:call-template> </xsl:when> <xsl:when test="$entry/@namest"> <xsl:variable name="colspec" select="$colspecs[@colname = $entry/@namest]"/> <xsl:call-template name="db2html.colspec.colnum"> + <xsl:with-param name="colspec" select="$colspec"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspec" select="$colspec"/> </xsl:call-template> </xsl:when> <xsl:otherwise> - <xsl:value-of select="$colnum"/> + <xsl:value-of select="$colpos"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -134,16 +689,16 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <!--**========================================================================== db2html.colspec.colnum Calculates the column number for a #{colspec} element +$colspec: The #{colspec} element to process $colspecs: The #{colspec} elements currently in scope $spanspecs: The #{spanspec} elements currently in scope -$colspec: The #{colspec} element to process -REMARK: This template needs to be explained in detail, but I forgot how it works. +FIXME --> <xsl:template name="db2html.colspec.colnum"> + <xsl:param name="colspec" select="."/> <xsl:param name="colspecs"/> <xsl:param name="spanspecs"/> - <xsl:param name="colspec" select="."/> <xsl:choose> <xsl:when test="$colspec/@colnum"> <xsl:value-of select="$colspec/@colnum"/> @@ -151,10 +706,10 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:when test="$colspec/preceding-sibling::colspec"> <xsl:variable name="prec.colspec.colnum"> <xsl:call-template name="db2html.colspec.colnum"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> <xsl:with-param name="colspec" select="$colspec/preceding-sibling::colspec[1]"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$prec.colspec.colnum + 1"/> @@ -167,16 +722,19 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <!--**========================================================================== db2html.entry.colspan Calculates the #{colspan} for an #{entry} element +$entry: The #{entry} element to process $colspecs: The #{colspec} elements currently in scope $spanspecs: The #{spanspec} elements currently in scope -$entry: The #{entry} element to process -REMARK: This template needs to be explained in detail, but I forgot how it works. +This template calculates how many columns an #{entry} element should span. +In CALS tables, column spanning is done by specifying starting and ending +#{colspec} elements, or by specifying a #{spanspec} element which specifies +starting and ending #{colspec} elements. --> <xsl:template name="db2html.entry.colspan"> + <xsl:param name="entry" select="."/> <xsl:param name="colspecs"/> <xsl:param name="spanspecs"/> - <xsl:param name="entry" select="."/> <xsl:variable name="namest"> <xsl:choose> <xsl:when test="$entry/@spanname"> @@ -201,16 +759,16 @@ REMARK: This template needs to be explained in detail, but I forgot how it works </xsl:variable> <xsl:variable name="colnumst"> <xsl:call-template name="db2html.colspec.colnum"> + <xsl:with-param name="colspec" select="$colspecs[@colname = $namest]"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspec" select="$colspecs[@colname = $namest]"/> </xsl:call-template> </xsl:variable> <xsl:variable name="colnumend"> <xsl:call-template name="db2html.colspec.colnum"> + <xsl:with-param name="colspec" select="$colspecs[@colname = $nameend]"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspec" select="$colspecs[@colname = $nameend]"/> </xsl:call-template> </xsl:variable> <xsl:choose> @@ -225,138 +783,35 @@ REMARK: This template needs to be explained in detail, but I forgot how it works </xsl:template> -<!--**========================================================================== -db2html.entry.style -Generates the #{style} attribute for an #{entry} element -$colspecs: The #{colspec} elements currently in scope -$spanspecs: The #{spanspec} elements currently in scope -REMARK: This template needs to be explained in detail, but I forgot how it works. ---> -<xsl:template name="db2html.entry.style"> - <!-- FIXME: we should pass in the entry node --> - <xsl:param name="colspecs"/> - <xsl:param name="spanspecs"/> - <xsl:param name="colsep" select="false()"/> - <xsl:param name="rowsep" select="false()"/> - <xsl:if test="(following-sibling::*) and ( - (@colsep = '1') or - ($colspecs[@colname = current()/@colname]/@colsep = '1') or - ($colspecs[@colname = current()/@nameend]/@colsep = '1') or - ($spanspecs[@spanname = current()/@spanname]/@colsep = '1') or - ($colsep = '1' and ( - (@colsep != '0') or - ($colspecs[@colname = current()/@colname]/@colsep != '0') or - ($colspecs[@colname = current()/@nameend]/@colsep != '0') or - ($spanspecs[@spanname = current()/@spanname]/@colsep != '0') - )) )"> - <xsl:text>border-right: outset 1px; </xsl:text> - </xsl:if> - <xsl:if test="(../following-sibling::*) and ( - (@rowsep = '1') or - ($colspecs[@colname = current()/@colname]/@rowsep = '1') or - ($colspecs[@colname = current()/@namest]/@rowsep = '1') or - ($spanspecs[@spanname = current()/@spanname]/@rowsep = '1') or - ($rowsep = '1' and ( - (@rowsep != '0') or - ($colspecs[@colname = current()/@colname]/@rowsep != '0') or - ($colspecs[@colname = current()/@namest]/@rowsep != '0') or - ($spanspecs[@spanname = current()/@spanname]/@rowsep != '0') - )) )"> - <xsl:text>border-bottom: outset 1px; </xsl:text> - </xsl:if> - <xsl:choose> - <xsl:when test="@align"> - <xsl:text>text-align: </xsl:text> - <xsl:value-of select="@align"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@colname]/@align"> - <xsl:text>text-align: </xsl:text> - <xsl:value-of - select="$colspecs[@colname = current()/@colname]/@align"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@namest]/@align"> - <xsl:text>text-align: </xsl:text> - <xsl:value-of - select="$colspecs[@colname = current()/@namest]/@align"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$spanspecs[@spanname = current()/@spanname]/@align"> - <xsl:text>text-align: </xsl:text> - <xsl:value-of - select="$spanspecs[@spanname = current()/@spanname]/@align"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="../../../@align"> - <xsl:text>text-align: </xsl:text> - <xsl:value-of select="../../../@align"/> - <xsl:text>; </xsl:text> - </xsl:when> - </xsl:choose> - <xsl:choose> - <xsl:when test="@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of select="@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@colname]/@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of - select="$colspecs[@colname = current()/@colname]/@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@namest]/@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of - select="$colspecs[@colname = current()/@namest]/@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="$spanspecs[@spanname = current()/@spanname]/@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of - select="$spanspecs[@spanname = current()/@spanname]/@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="../@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of select="../@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:when test="../../@valign"> - <xsl:text>vertical-align: </xsl:text> - <xsl:value-of select="../../@valign"/> - <xsl:text>; </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>vertical-align: top; </xsl:text> - </xsl:otherwise> - </xsl:choose> -</xsl:template> + +<!-- FIXME below --> <!--**========================================================================== db2html.spanstr -FIXME +Generates a string specifying the row spans in effect +$colspecs: The #{colspec} elements currently in scope +$spanspecs: The #{spanspec} elements currently in scope +$spanstr: The ${spanstr} parameter used by the previous row REMARK: This template needs to be explained in detail, but I forgot how it works. --> <xsl:template name="db2html.spanstr"> + <xsl:param name="row" select="."/> + <xsl:param name="entry" select="$row/*[1]"/> <xsl:param name="colspecs"/> <xsl:param name="spanspecs"/> <xsl:param name="spanstr"/> - <xsl:param name="row" select="."/> - <xsl:param name="entry" select="$row/*[1]"/> - <xsl:param name="colnum" select="1"/> - <xsl:param name="entry.colnum"> + <xsl:param name="colpos" select="1"/> + <xsl:param name="colnum"> <xsl:call-template name="db2html.entry.colnum"> + <xsl:with-param name="entry" select="$entry"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="entry" select="$entry"/> </xsl:call-template> </xsl:param> - <xsl:param name="entry.colspan"> + <xsl:param name="colspan"> <xsl:choose> <xsl:when test="$entry/@spanname or $entry/@namest"> <xsl:call-template name="db2html.entry.colspan"> @@ -372,7 +827,8 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:call-template name="db2html.spanstr.pop"> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspan" select="$entry.colspan"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="$colspan"/> <xsl:with-param name="spanstr" select="$spanstr"/> </xsl:call-template> </xsl:variable> @@ -381,32 +837,32 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:value-of select="substring-before($spanstr, ':') - 1"/> <xsl:text>:</xsl:text> <xsl:call-template name="db2html.spanstr"> + <xsl:with-param name="row" select="$row"/> + <xsl:with-param name="entry" select="$entry"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> - <xsl:with-param name="row" select="$row"/> - <xsl:with-param name="entry" select="$entry"/> - <xsl:with-param name="colnum" select="$colnum + 1"/> - <xsl:with-param name="entry.colnum" select="$entry.colnum"/> - <xsl:with-param name="entry.colspan" select="$entry.colspan"/> + <xsl:with-param name="colpos" select="$colpos + 1"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="$colspan"/> </xsl:call-template> </xsl:when> - <xsl:when test="$entry.colnum > $colnum"> + <xsl:when test="$colnum > $colpos"> <xsl:text>0:</xsl:text> <xsl:call-template name="db2html.spanstr"> + <xsl:with-param name="row" select="$row"/> + <xsl:with-param name="entry" select="$entry"/> <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> <xsl:with-param name="spanstr" select="$following.spanstr"/> - <xsl:with-param name="row" select="$row"/> - <xsl:with-param name="entry" select="$entry"/> - <xsl:with-param name="colnum" select="$colnum + $entry.colspan"/> - <xsl:with-param name="entry.colnum" select="$entry.colnum"/> - <xsl:with-param name="entry.colspan" select="$entry.colspan"/> + <xsl:with-param name="colpos" select="$colpos + $colspan"/> + <xsl:with-param name="colnum" select="$colnum"/> + <xsl:with-param name="colspan" select="$colspan"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="copy-string"> - <xsl:with-param name="count" select="$entry.colspan"/> + <xsl:with-param name="count" select="$colspan"/> <xsl:with-param name="string"> <xsl:choose> <xsl:when test="$entry/@morerows"> @@ -417,16 +873,23 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:text>:</xsl:text> </xsl:with-param> </xsl:call-template> - <xsl:if test="$entry/following-sibling::*"> - <xsl:call-template name="db2html.spanstr"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="spanstr" select="$following.spanstr"/> - <xsl:with-param name="row" select="$row"/> - <xsl:with-param name="entry" select="$entry/following-sibling::*[1]"/> - <xsl:with-param name="colnum" select="$colnum + $entry.colspan"/> - </xsl:call-template> - </xsl:if> + <xsl:choose> + <xsl:when test="$entry/following-sibling::*[1]"> + <xsl:call-template name="db2html.spanstr"> + <xsl:with-param name="row" select="$row"/> + <xsl:with-param name="entry" select="$entry/following-sibling::*[1]"/> + <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:with-param name="spanspecs" select="$spanspecs"/> + <xsl:with-param name="spanstr" select="$following.spanstr"/> + <xsl:with-param name="colpos" select="$colpos + $colspan"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$following.spanstr != ''"> + <xsl:call-template name="db2html.spanstr.decrement"> + <xsl:with-param name="spanstr" select="$following.spanstr"/> + </xsl:call-template> + </xsl:when> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -462,6 +925,25 @@ REMARK: This template needs to be explained in detail, but I forgot how it works </xsl:choose> </xsl:template> +<!--#* db2html.spanstr.decrement --> +<xsl:template name="db2html.spanstr.decrement"> + <xsl:param name="spanstr"/> + <xsl:if test="$spanstr != ''"> + <xsl:choose> + <xsl:when test="starts-with($spanstr, '0:')"> + <xsl:text>0:</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="span" select="substring-before($spanstr, ':')"/> + <xsl:value-of select="$span - 1"/> + <xsl:text>:</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:call-template name="db2html.spanstr.decrement"> + <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> + </xsl:call-template> + </xsl:if> +</xsl:template> <!--#* copy-string --> <xsl:template name="copy-string"> @@ -477,219 +959,13 @@ REMARK: This template needs to be explained in detail, but I forgot how it works </xsl:template> -<!-- == Matched Templates == --> -<!-- = entry | entrytbl = --> -<xsl:template match="entry | entrytbl"> - <xsl:param name="colspecs"/> - <xsl:param name="spanspecs"/> - <xsl:param name="colsep" select="false()"/> - <xsl:param name="rowsep" select="false()"/> - <xsl:param name="colnum" select="1"/> - <xsl:param name="spanstr"/> - <xsl:param name="entry.colnum"> - <xsl:call-template name="db2html.entry.colnum"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="entry" select="."/> - <xsl:with-param name="colnum" select="$colnum"/> - </xsl:call-template> - </xsl:param> - <xsl:param name="entry.colspan"> - <xsl:choose> - <xsl:when test="@spanname or @namest"> - <xsl:call-template name="db2html.entry.colspan"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="entry" select="."/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise>1</xsl:otherwise> - </xsl:choose> - </xsl:param> - <xsl:variable name="following.spanstr"> - <xsl:call-template name="db2html.spanstr.pop"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colspan" select="$entry.colspan"/> - <xsl:with-param name="spanstr" select="$spanstr"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="element"> - <xsl:choose> - <xsl:when test=" - local-name(../..) = 'thead' or - local-name(../..) = 'tfoot' ">th</xsl:when> - <xsl:otherwise>td</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:variable name="style"> - <xsl:call-template name="db2html.entry.style"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select="$rowsep"/> - </xsl:call-template> - </xsl:variable> - <xsl:choose> - <xsl:when test="$spanstr != '' and not(starts-with($spanstr, '0:'))"> - <xsl:apply-templates select="."> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colnum" select="$colnum + 1"/> - <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> - <xsl:with-param name="entry.colnum" select="$entry.colnum"/> - <xsl:with-param name="entry.colspan" select="$entry.colspan"/> - </xsl:apply-templates> - </xsl:when> - <xsl:when test="$entry.colnum > $colnum"> - <html:td> - <xsl:if test="$style"> - <xsl:attribute name="style"> - <xsl:value-of select="$style"/> - </xsl:attribute> - </xsl:if> - <xsl:text> </xsl:text> - </html:td> - <xsl:apply-templates select="."> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colnum" select="$colnum + 1"/> - <xsl:with-param name="spanstr" select="substring-after($spanstr, ':')"/> - <xsl:with-param name="entry.colnum" select="$entry.colnum"/> - <xsl:with-param name="entry.colspan" select="$entry.colspan"/> - </xsl:apply-templates> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="char"> - <xsl:choose> - <xsl:when test="@char"> - <xsl:value-of select="@char"/> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@colname]/@char"> - <xsl:value-of - select="$colspecs[@colname = current()/@colname]/@char"/> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@namest]/@char"> - <xsl:value-of - select="$colspecs[@colname = current()/@namest]/@char"/> - </xsl:when> - <xsl:when test="$spanspecs[@spanname = current()/@spanname]/@char"> - <xsl:value-of - select="$spanspecs[@spanname = current()/@spanname]/@char"/> - </xsl:when> - <xsl:when test="../../../@char"> - <xsl:value-of select="../../@char"/> - </xsl:when> - </xsl:choose> - </xsl:variable> - <xsl:variable name="charoff"> - <xsl:choose> - <xsl:when test="@charoff"> - <xsl:value-of select="@charoff"/> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@colname]/@charoff"> - <xsl:value-of - select="$colspecs[@colname = current()/@colname]/@charoff"/> - </xsl:when> - <xsl:when test="$colspecs[@colname = current()/@namest]/@charoff"> - <xsl:value-of - select="$colspecs[@colname = current()/@namest]/@charoff"/> - </xsl:when> - <xsl:when test="$spanspecs[@spanname = current()/@spanname]/@charoff"> - <xsl:value-of - select="$spanspecs[@spanname = current()/@spanname]/@charoff"/> - </xsl:when> - <xsl:when test="../../../@charoff"> - <xsl:value-of select="../../@charoff"/> - </xsl:when> - </xsl:choose> - </xsl:variable> - <xsl:element name="{$element}" namespace="{$db2html.namespace}"> - <xsl:if test="$style != ''"> - <xsl:attribute name="style"> - <xsl:value-of select="$style"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="@morerows > 0"> - <xsl:attribute name="rowspan"> - <xsl:value-of select="@morerows + 1"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="$entry.colspan > 1"> - <xsl:attribute name="colspan"> - <xsl:value-of select="$entry.colspan"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="$char != ''"> - <xsl:attribute name="char"> - <xsl:value-of select="$char"/> - </xsl:attribute> - </xsl:if> - <xsl:if test="$charoff != ''"> - <xsl:attribute name="charoff"> - <xsl:value-of select="$charoff"/> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </xsl:element> - <xsl:apply-templates select="following-sibling::*[1]"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select="$rowsep"/> - <xsl:with-param name="colnum" select="$colnum + $entry.colspan"/> - <xsl:with-param name="spanstr" select="$following.spanstr"/> - </xsl:apply-templates> - </xsl:otherwise> - </xsl:choose> -</xsl:template> -<!-- = row = --> -<xsl:template match="row"> - <xsl:param name="colspecs"/> - <xsl:param name="spanspecs"/> - <xsl:param name="colsep" select="false()"/> - <xsl:param name="rowsep" select="false()"/> - <xsl:param name="spanstr"/> - <html:tr> - <xsl:if test="name(..) = 'tbody'"> - <xsl:attribute name="class"> - <xsl:choose> - <xsl:when test="count(preceding-sibling::row) mod 2">odd</xsl:when> - <xsl:otherwise>even</xsl:otherwise> - </xsl:choose> - </xsl:attribute> - </xsl:if> - <xsl:apply-templates select="*[1]"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select=" - (@rowsep = '1') or ((@rowsep != '0') and $rowsep)"/> - <xsl:with-param name="spanstr" select="$spanstr"/> - </xsl:apply-templates> - </html:tr> - <xsl:if test="following-sibling::row"> - <xsl:apply-templates select="following-sibling::row[1]"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select="$rowsep"/> - <xsl:with-param name="spanstr"> - <xsl:call-template name="db2html.spanstr"> - <xsl:with-param name="colspecs" select="$colspecs"/> - <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="spanstr" select="$spanstr"/> - </xsl:call-template> - </xsl:with-param> - </xsl:apply-templates> - </xsl:if> -</xsl:template> + <!-- = table = --> <xsl:template match="table | informaltable"> - <html:div class="table block-indent"> + <div class="table block block-indent"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="title"/> <!-- FIXME: I have no idea what I'm supposed to do with textobject --> @@ -700,8 +976,6 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:when test="tgroup"> <xsl:apply-templates select="tgroup"/> </xsl:when> - <!-- I am not going to allow the neurotic mixing of HTML and CALS - that the DTD does. --> <xsl:when test="tr"> <xsl:apply-templates select="col | colgroup | tr"/> <xsl:apply-templates select="caption"/> @@ -713,13 +987,35 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:apply-templates select="caption"/> </xsl:otherwise> </xsl:choose> - </html:div> + </div> </xsl:template> <!-- = tgroup = --> <xsl:template match="tgroup"> + <xsl:variable name="colsep"> + <xsl:choose> + <xsl:when test="@colsep"> + <xsl:value-of select="string(@colsep)"/> + </xsl:when> + <xsl:when test="not(.//*[@colsep][1])"/> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="rowsep"> + <xsl:choose> + <xsl:when test="@rowsep"> + <xsl:value-of select="string(@rowsep)"/> + </xsl:when> + <xsl:when test="not(//*[@rowsep][1])"/> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="style"> - <xsl:if test="../@frame = 'all'"> + <xsl:if test="../@frame = 'all' or not(../@frame)"> <xsl:text>border: solid 1px; </xsl:text> </xsl:if> <xsl:if test="../@frame = 'none'"> @@ -732,50 +1028,57 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:text>border-top: solid 1px; </xsl:text> </xsl:if> <xsl:if test="../@frame = 'sides'"> - <xsl:text>border-left: solid 1px; border-right: outset 1px; </xsl:text> + <xsl:text>border-left: solid 1px; border-right: solid 1px; </xsl:text> </xsl:if> </xsl:variable> - <html:table> + <xsl:variable name="class"> + <xsl:if test="../@pgwide = '1'"> + <xsl:text>table-pgwide</xsl:text> + </xsl:if> + </xsl:variable> + <table> <xsl:if test="../title"> <xsl:attribute name="summary"> <xsl:value-of select="../title"/> </xsl:attribute> </xsl:if> - <xsl:if test="../@pgwide = '1'"> - <xsl:attribute name="width">100%</xsl:attribute> - </xsl:if> - <xsl:if test="string($style) != ''"> + <xsl:if test="$style != ''"> <xsl:attribute name="style"> - <xsl:value-of select="$style"/> + <xsl:value-of select="normalize-space($style)"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="$class != ''"> + <xsl:attribute name="class"> + <xsl:value-of select="normalize-space($class)"/> </xsl:attribute> </xsl:if> <xsl:apply-templates select="thead"> <xsl:with-param name="colspecs" select="colspec"/> <xsl:with-param name="spanspecs" select="spanspec"/> - <xsl:with-param name="colsep" select="@colsep = '1'"/> - <xsl:with-param name="rowsep" select="@rowsep = '1'"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> </xsl:apply-templates> <xsl:apply-templates select="tbody"> <xsl:with-param name="colspecs" select="colspec"/> <xsl:with-param name="spanspecs" select="spanspec"/> - <xsl:with-param name="colsep" select="@colsep = '1'"/> - <xsl:with-param name="rowsep" select="@rowsep = '1'"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> </xsl:apply-templates> <xsl:apply-templates select="tfoot"> <xsl:with-param name="colspecs" select="colspec"/> <xsl:with-param name="spanspecs" select="spanspec"/> - <xsl:with-param name="colsep" select="@colsep = '1'"/> - <xsl:with-param name="rowsep" select="@rowsep = '1'"/> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> </xsl:apply-templates> - </html:table> + </table> </xsl:template> <!-- = tbody | tfoot | thead = --> <xsl:template match="tbody | tfoot | thead"> <xsl:param name="colspecs"/> <xsl:param name="spanspecs"/> - <xsl:param name="colsep" select="false()"/> - <xsl:param name="rowsep" select="false()"/> + <xsl:param name="colsep" select="''"/> + <xsl:param name="rowsep" select="''"/> <xsl:element name="{local-name(.)}" namespace="{$db2html.namespace}"> <xsl:if test="@valign"> <xsl:attribute name="valign"> @@ -787,27 +1090,37 @@ REMARK: This template needs to be explained in detail, but I forgot how it works <xsl:apply-templates select="tr"/> </xsl:when> <xsl:when test="colspec"> - <xsl:apply-templates select="row[1]"> - <xsl:with-param name="colspecs" select="colspec"/> + <xsl:call-template name="db2html.row"> + <xsl:with-param name="row" select="row[1]"/> + <xsl:with-param name="colspecs" select="colspec"/> <xsl:with-param name="spanspecs" select="spanspec"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select="$rowsep"/> - </xsl:apply-templates> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + </xsl:call-template> </xsl:when> <xsl:otherwise> - <xsl:apply-templates select="row[1]"> - <xsl:with-param name="colspecs" select="$colspecs"/> + <xsl:call-template name="db2html.row"> + <xsl:with-param name="row" select="row[1]"/> + <xsl:with-param name="colspecs" select="$colspecs"/> <xsl:with-param name="spanspecs" select="$spanspecs"/> - <xsl:with-param name="colsep" select="$colsep"/> - <xsl:with-param name="rowsep" select="$rowsep"/> - </xsl:apply-templates> + <xsl:with-param name="colsep" select="$colsep"/> + <xsl:with-param name="rowsep" select="$rowsep"/> + </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> +<!-- = table/title = --> +<xsl:template match="table/title"> + <xsl:call-template name="db2html.block.title"> + <xsl:with-param name="node" select=".."/> + <xsl:with-param name="title" select="."/> + </xsl:call-template> +</xsl:template> + <!-- -This template strips the p tag around single-paragraph table cells to avoid +This template strips the p tag around single-paragraph table entries to avoid introducing extra spacing. --> <xsl:template match="entry/para[ diff --git a/xslt/docbook/html/db2html-title.xsl b/xslt/docbook/html/db2html-title.xsl index 17263f2d..685616d7 100644 --- a/xslt/docbook/html/db2html-title.xsl +++ b/xslt/docbook/html/db2html-title.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -44,21 +43,21 @@ REMARK: Talk about the different kinds of title blocks <xsl:with-param name="node" select="$referent"/> </xsl:call-template> </xsl:variable> - <html:div class="block block-first {local-name($node)}"> - <html:span class="{local-name($node)}"> + <div class="block block-first {local-name($node)}"> + <span class="{local-name($node)}"> <xsl:call-template name="db2html.anchor"> <xsl:with-param name="node" select="$node"/> </xsl:call-template> - <html:span class="label"> + <span class="label"> <xsl:call-template name="db.label"> <xsl:with-param name="node" select="$referent"/> <xsl:with-param name="role" select="'header'"/> <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/> </xsl:call-template> - </html:span> + </span> <xsl:apply-templates select="$node/node()"/> - </html:span> - </html:div> + </span> + </div> </xsl:template> @@ -96,9 +95,5 @@ REMARK: Talk about the different kinds of title blocks <xsl:call-template name="db2html.title.block"/> </xsl:template> -<!-- = table/title = --> -<xsl:template match="table/title"> - <xsl:call-template name="db2html.title.block"/> -</xsl:template> </xsl:stylesheet> diff --git a/xslt/docbook/html/db2html-xref.xsl b/xslt/docbook/html/db2html-xref.xsl index ee771a26..67897af9 100644 --- a/xslt/docbook/html/db2html-xref.xsl +++ b/xslt/docbook/html/db2html-xref.xsl @@ -17,8 +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:html="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="html" + xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <!--!!========================================================================== @@ -39,7 +38,7 @@ REMARK: Describe this template <xsl:template name="db2html.anchor" match="anchor"> <xsl:param name="node" select="."/> <xsl:param name="name" select="$node/@id"/> - <xsl:if test="$name"><html:a name="{$name}"/></xsl:if> + <xsl:if test="$name"><a name="{$name}"/></xsl:if> </xsl:template> @@ -54,7 +53,7 @@ REMARK: Describe this template <xsl:template name="db2html.link" match="link"> <xsl:param name="linkend" select="@linkend"/> <xsl:param name="target" select="key('idkey', $linkend)"/> - <html:a class="link"> + <a class="link"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$linkend"/> @@ -74,7 +73,7 @@ REMARK: Describe this template <xsl:apply-templates select="key('idkey', @endterm)/node()"/> </xsl:when> </xsl:choose> - </html:a> + </a> </xsl:template> @@ -89,7 +88,7 @@ REMARK: Describe this template <xsl:template name="db2html.ulink" match="ulink"> <xsl:param name="url" select="@url"/> <xsl:param name="content" select="false()"/> - <html:a class="ulink" href="{$url}"> + <a class="ulink" href="{$url}"> <xsl:attribute name="title"> <xsl:call-template name="db.ulink.tooltip"/> </xsl:attribute> @@ -104,7 +103,7 @@ REMARK: Describe this template <xsl:value-of select="$url"/> </xsl:otherwise> </xsl:choose> - </html:a> + </a> </xsl:template> @@ -125,7 +124,7 @@ REMARK: Describe this template <xsl:param name="endterm" select="@endterm"/> <xsl:param name="xrefstyle" select="@xrefstyle"/> <xsl:param name="content" select="false()"/> - <html:a class="xref"> + <a class="xref"> <xsl:attribute name="href"> <xsl:call-template name="db.xref.target"> <xsl:with-param name="linkend" select="$linkend"/> @@ -153,7 +152,7 @@ REMARK: Describe this template </xsl:call-template> </xsl:otherwise> </xsl:choose> - </html:a> + </a> </xsl:template> </xsl:stylesheet> |