diff options
author | Shaun McCance <shaunm@gnome.org> | 2009-05-11 12:54:25 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-05-11 12:54:25 -0500 |
commit | fc0cdea95ef540bccce4135eca88129f2b0c3938 (patch) | |
tree | a01cfccae369e9f905a9af10a83f6c1c5d2fb58f /xslt | |
parent | b41f0f89066d822c6af3fe3fc6e8856e7c43a3ec (diff) | |
download | gnome-doc-utils-fc0cdea95ef540bccce4135eca88129f2b0c3938.tar.gz |
[mal2html] Using the dual-(x)html output method from db2html
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/mallard/html/mal2html-page.xsl | 4 | ||||
-rw-r--r-- | xslt/mallard/html/mal2html.xsl | 16 | ||||
-rw-r--r-- | xslt/mallard/html/mal2xhtml.xsl | 67 |
3 files changed, 82 insertions, 5 deletions
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl index 81c6430..e4e84bd 100644 --- a/xslt/mallard/html/mal2html-page.xsl +++ b/xslt/mallard/html/mal2html-page.xsl @@ -268,7 +268,7 @@ REMARK: Describe this template <xsl:if test="$inlinks or $outlinks or $pagelinks or $guidelinks"> <div class="section autolinkssection"> <div class="header"> - <xsl:element name="{concat('h', $depth)}"> + <xsl:element name="{concat('h', $depth)}" namespace="{$mal2html.namespace}"> <xsl:attribute name="class"> <xsl:text>title</xsl:text> </xsl:attribute> @@ -484,7 +484,7 @@ REMARK: Describe this template <xsl:template mode="mal2html.title.mode" match="mal:title"> <xsl:variable name="depth" select="count(ancestor::mal:section) + 1"/> - <xsl:element name="{concat('h', $depth)}"> + <xsl:element name="{concat('h', $depth)}" namespace="{$mal2html.namespace}"> <xsl:attribute name="class"> <xsl:text>title</xsl:text> </xsl:attribute> diff --git a/xslt/mallard/html/mal2html.xsl b/xslt/mallard/html/mal2html.xsl index 9b62be9..21e46d0 100644 --- a/xslt/mallard/html/mal2html.xsl +++ b/xslt/mallard/html/mal2html.xsl @@ -18,9 +18,21 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mal="http://www.gnome.org/~shaunm/mallard" - xmlns="http://www.w3.org/1999/xhtml" + xmlns:html="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="mal" version="1.0"> +<xsl:output method="html" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" + doctype-system="http://www.w3.org/TR/html4/loose.dtd"/> +<xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default"/> + +<!--#@ mal2html.namespace --> +<xsl:param name="mal2html.namespace" select="''"/> + +<xsl:param name="mal.extension" select="'.html'"/> + + <!--!!========================================================================== Mallard to HTML @@ -40,8 +52,6 @@ REMARK: Describe this module <xsl:include href="theme.xsl"/> <xsl:include href="util.xsl"/> -<xsl:param name="mal.extension" select="'.xhtml'"/> - <!-- FIXME --> <xsl:template match="*"> <xsl:message> diff --git a/xslt/mallard/html/mal2xhtml.xsl b/xslt/mallard/html/mal2xhtml.xsl new file mode 100644 index 0000000..5a94063 --- /dev/null +++ b/xslt/mallard/html/mal2xhtml.xsl @@ -0,0 +1,67 @@ +<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- --> +<!-- +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License +along with this program; see the file COPYING.LGPL. If not, write to the +Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +--> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:mal="http://www.gnome.org/~shaunm/mallard" + xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="mal" + version="1.0"> + +<!--#@ mal2html.namespace --> +<xsl:param name="mal2html.namespace" select="'http://www.w3.org/1999/xhtml'"/> + +<xsl:param name="mal.extension" select="'.xhtml'"/> + +<!--!!========================================================================== +Mallard to HTML + +REMARK: Describe this module +--> + +<xsl:include href="../common/mal-link.xsl"/> + +<xsl:include href="mal2html-block.xsl"/> +<xsl:include href="mal2html-css.xsl"/> +<xsl:include href="mal2html-inline.xsl"/> +<xsl:include href="mal2html-list.xsl"/> +<xsl:include href="mal2html-media.xsl"/> +<xsl:include href="mal2html-page.xsl"/> +<xsl:include href="mal2html-table.xsl"/> + +<xsl:include href="theme.xsl"/> +<xsl:include href="util.xsl"/> + +<!-- FIXME --> +<xsl:template match="*"> + <xsl:message> + <xsl:text>Unmatched element: </xsl:text> + <xsl:value-of select="local-name(.)"/> + </xsl:message> + <xsl:apply-templates/> +</xsl:template> + +<!-- FIXME --> +<xsl:template name="l10n.gettext"> + <xsl:param name="msgid" select="'email.tooltip'"/> + <xsl:value-of select="$msgid"/> +</xsl:template> +<xsl:template name="l10n.direction"> + <xsl:text>ltr</xsl:text> +</xsl:template> + +</xsl:stylesheet> |