summaryrefslogtreecommitdiff
path: root/xslt/mal-files.xsl
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2017-07-07 12:04:19 -0400
committerShaun McCance <shaunm@gnome.org>2017-07-07 12:04:19 -0400
commit4daf828149ec8e027ae57d1940d4fd4666cca3f6 (patch)
treeb132b58525b3f0c45b43eafa682553e7e5e78fa2 /xslt/mal-files.xsl
parentdecc5890e1e38122f5ed94440d9744ffdc7e375b (diff)
downloadyelp-tools-4daf828149ec8e027ae57d1940d4fd4666cca3f6.tar.gz
Adapt to recent major changes in yelp-xsl
Diffstat (limited to 'xslt/mal-files.xsl')
-rw-r--r--xslt/mal-files.xsl70
1 files changed, 3 insertions, 67 deletions
diff --git a/xslt/mal-files.xsl b/xslt/mal-files.xsl
index cea85fd..c955a9e 100644
--- a/xslt/mal-files.xsl
+++ b/xslt/mal-files.xsl
@@ -9,16 +9,9 @@
xmlns:html="http://www.w3.org/1999/xhtml"
version="1.0">
-<xsl:param name="mal.files.copy.icon.dir"/>
-<xsl:param name="mal.files.copy.js.dir"/>
-
<xsl:template name="mal.files.copy">
<xsl:param name="node" select="."/>
<xsl:param name="href"/>
- <xsl:value-of select="concat('+', $mal.files.copy.js.dir, '/jquery.js ./&#x000A;')"/>
- <xsl:value-of select="concat('+', $mal.files.copy.js.dir, '/jquery.syntax.js ./&#x000A;')"/>
- <xsl:value-of select="concat('+', $mal.files.copy.js.dir, '/jquery.syntax.core.js ./&#x000A;')"/>
- <xsl:value-of select="concat('+', $mal.files.copy.js.dir, '/jquery.syntax.layout.yelp.js ./&#x000A;')"/>
<xsl:apply-templates mode="mal.files.copy.block.mode">
<xsl:with-param name="dir">
<xsl:call-template name="mal.files.copy.dirname">
@@ -44,7 +37,7 @@
<xsl:template mode="mal.files.copy.media.mode" match="mal:media | e:mouseover | ui:thumb | uix:thumb">
<xsl:param name="dir"/>
<xsl:if test="not(contains(@src, ':') or substring(@src, 1, 1) = '/')">
- <xsl:value-of select="concat('-', $dir, @src, ' ', @src, '&#x000A;')"/>
+ <xsl:value-of select="concat($dir, @src, ' ', @src, '&#x000A;')"/>
</xsl:if>
</xsl:template>
@@ -75,7 +68,7 @@
</xsl:apply-templates>
</xsl:template>
-<xsl:template mode="mal.files.copy.block.mode" match="mal:p | mal:screen">
+<xsl:template mode="mal.files.copy.block.mode" match="mal:p | mal:screen | mal:code">
<xsl:param name="dir"/>
<xsl:variable name="if">
<xsl:call-template name="mal.if.test"/>
@@ -94,32 +87,11 @@
</xsl:apply-templates>
</xsl:template>
-<xsl:template mode="mal.files.copy.block.mode" match="mal:code">
- <xsl:param name="dir"/>
- <xsl:variable name="if">
- <xsl:call-template name="mal.if.test"/>
- </xsl:variable>
- <xsl:if test="$if != ''">
- <xsl:apply-templates mode="mal.files.copy.media.mode" select=".//mal:media">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- <xsl:if test="$html.syntax.highlight and @mime">
- <xsl:variable name="brush">
- <xsl:call-template name="html.syntax.class"/>
- </xsl:variable>
- <xsl:if test="starts-with($brush, 'syntax brush-')">
- <xsl:value-of select="concat('+', $mal.files.copy.js.dir, '/jquery.syntax.brush.',
- substring-after($brush, 'syntax brush-'), '.js ./&#x000A;')"/>
- </xsl:if>
- </xsl:if>
- </xsl:if>
-</xsl:template>
-
<xsl:template mode="mal.files.copy.block.mode"
match="mal:example | mal:quote | mal:listing | mal:figure |
mal:synopsis | mal:links | mal:list | mal:steps |
mal:terms | mal:tree | mal:item | mal:table |
- mal:section | if:if">
+ mal:note | mal:section | if:if">
<xsl:param name="dir"/>
<xsl:variable name="if">
<xsl:call-template name="mal.if.test"/>
@@ -158,42 +130,6 @@
</xsl:if>
</xsl:template>
-<xsl:template mode="mal.files.copy.block.mode" match="mal:note">
- <xsl:param name="dir"/>
- <xsl:variable name="if">
- <xsl:call-template name="mal.if.test"/>
- </xsl:variable>
- <xsl:if test="$if != ''">
- <xsl:variable name="style" select="concat(' ', @style, ' ')"/>
- <xsl:choose>
- <!--
- <xsl:when test="contains($style, ' advanced ')">
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note-advanced.png ./&#x000A;')"/>
- </xsl:when>
- -->
- <xsl:when test="contains($style, ' bug ')">
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note-bug.png ./&#x000A;')"/>
- </xsl:when>
- <xsl:when test="contains($style, ' important ')">
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note-important.png ./&#x000A;')"/>
- </xsl:when>
- <xsl:when test="contains($style, ' sidebar ')"/>
- <xsl:when test="contains($style, ' tip ')">
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note-tip.png ./&#x000A;')"/>
- </xsl:when>
- <xsl:when test="contains($style, ' warning ')">
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note-warning.png ./&#x000A;')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('+', $mal.files.copy.icon.dir, '/yelp-note.png ./&#x000A;')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates mode="mal.files.copy.block.mode">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- </xsl:if>
-</xsl:template>
-
<xsl:template mode="mal.files.copy.block.mode" match="mal:tr | mal:td">
<xsl:param name="dir"/>
<xsl:apply-templates mode="mal.files.copy.block.mode">