summaryrefslogtreecommitdiff
path: root/data/xslt/mal2html.xsl.in
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2011-05-18 16:06:08 -0400
committerShaun McCance <shaunm@gnome.org>2011-05-18 16:06:08 -0400
commit0637f921f36910d7688f73e14b2d2ec79ca90989 (patch)
tree90441f99ffbc4e2bcddd2d2826bf75f70040d594 /data/xslt/mal2html.xsl.in
parentee830ed9af0b7d911a25bf26d62f115f7c842c43 (diff)
downloadyelp-0637f921f36910d7688f73e14b2d2ec79ca90989.tar.gz
Massive cleanup of old files
Diffstat (limited to 'data/xslt/mal2html.xsl.in')
-rw-r--r--data/xslt/mal2html.xsl.in83
1 files changed, 83 insertions, 0 deletions
diff --git a/data/xslt/mal2html.xsl.in b/data/xslt/mal2html.xsl.in
new file mode 100644
index 00000000..0d45cba3
--- /dev/null
+++ b/data/xslt/mal2html.xsl.in
@@ -0,0 +1,83 @@
+<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:mal="http://www.gnome.org/~shaunm/mallard"
+ xmlns:yelp="http://www.gnome.org/yelp/ns"
+ xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="yelp"
+ version="1.0">
+
+<xsl:import href="@XSL_MAL2XHTML@"/>
+
+<xsl:import href="yelp-common.xsl"/>
+
+<xsl:param name="yelp.stub" select="false()"/>
+
+<xsl:param name="mal2html.editor_mode" select="$yelp.editor_mode"/>
+
+<xsl:param name="mal.cache" select="yelp:input()"/>
+<xsl:key name="mal.cache.key" match="mal:page | mal:section" use="@id"/>
+
+<!-- == mal.link.target == -->
+<xsl:template name="mal.link.target">
+ <xsl:param name="link" select="."/>
+ <xsl:param name="xref" select="$link/@xref"/>
+ <xsl:param name="href" select="$link/@href"/>
+ <xsl:choose>
+ <xsl:when test="string($xref) = ''">
+ <xsl:value-of select="$href"/>
+ </xsl:when>
+ <xsl:when test="contains($xref, '/')">
+ <xsl:value-of select="$href"/>
+ </xsl:when>
+ <xsl:when test="contains($xref, '#')">
+ <xsl:variable name="pageid" select="substring-before($xref, '#')"/>
+ <xsl:variable name="sectionid" select="substring-after($xref, '#')"/>
+ <xsl:value-of select="concat('xref:', $pageid, '#', $sectionid)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat('xref:', $xref)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="yelp.css.custom">
+<xsl:text>
+div.linkdiv { border: none; }
+div.linkdiv:hover {
+ border: none;
+ outline: solid 1px </xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>;
+ background: -webkit-gradient(linear, left top, left 80, from(</xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>), to(</xsl:text>
+ <xsl:value-of select="$color.background"/><xsl:text>));
+}
+</xsl:text>
+<xsl:if test="$yelp.editor_mode">
+<xsl:text>
+div.version {
+ margin: -1em -12px 1em -12px;
+ padding: 0.5em 12px 0.5em 12px;
+ position: relative;
+ left: auto; right: auto;
+ opacity: 1.0;
+ max-width: none;
+ border: none;
+ border-bottom: solid 1px </xsl:text>
+ <xsl:value-of select="$color.gray_border"/><xsl:text>;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.yellow_background"/><xsl:text>;
+}
+div.version:hover { opacity: 1.0; }
+</xsl:text>
+<xsl:if test="$yelp.stub">
+<xsl:text>
+body, div.body {
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.red_background"/><xsl:text>;
+}
+</xsl:text>
+</xsl:if>
+</xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>