summaryrefslogtreecommitdiff
path: root/xslt
diff options
context:
space:
mode:
authorShaun McCance <shaunm@redhat.com>2021-02-01 20:03:22 -0500
committerShaun McCance <shaunm@redhat.com>2021-02-01 20:03:22 -0500
commita97c9ed35baa68ddefa8034cf97e13718034a246 (patch)
treeee9743a39eae159318cbfdf72db1185b89814b0f /xslt
parentab19610426aeb43e000294e790ab3cd1eab9b146 (diff)
downloadyelp-tools-a97c9ed35baa68ddefa8034cf97e13718034a246.tar.gz
Switch to new python tools
Diffstat (limited to 'xslt')
-rw-r--r--xslt/comments.xsl122
-rw-r--r--xslt/mal-epub.xsl20
-rw-r--r--xslt/mal-files.xsl171
-rw-r--r--xslt/mal-license.xsl105
-rw-r--r--xslt/mal-status.xsl140
-rw-r--r--xslt/media.xsl39
-rw-r--r--xslt/meson.build20
7 files changed, 4 insertions, 613 deletions
diff --git a/xslt/comments.xsl b/xslt/comments.xsl
deleted file mode 100644
index 05f4878..0000000
--- a/xslt/comments.xsl
+++ /dev/null
@@ -1,122 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- xmlns:db="http://docbook.org/ns/docbook"
- exclude-result-prefixes="mal db"
- version="1.0">
-
-<xsl:output method="text"/>
-
-<xsl:param name="basename"/>
-<xsl:param name="site.dir"/>
-
-<xsl:template match="/*[namespace-uri(.) = ''] | /db:*">
- <xsl:for-each select="//remark | //db:remark">
- <xsl:text>Page: </xsl:text>
- <xsl:value-of select="$basename"/>
- <xsl:if test="ancestor::*/@id | ancestor::*/@xml:id">
- <xsl:text>#</xsl:text>
- <xsl:value-of select="(ancestor::*/@id | ancestor::*/@xml:id)[last()]"/>
- </xsl:if>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:if test="@revisionflag">
- <xsl:text>Flag: </xsl:text>
- <xsl:value-of select="@revisionflag"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:if>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:call-template name="fill">
- <xsl:with-param name="text" select="normalize-space(.)"/>
- <xsl:with-param name="pad" select="' '"/>
- </xsl:call-template>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="/mal:page">
- <xsl:for-each select="//mal:comment">
- <xsl:variable name="id">
- <xsl:value-of select="/mal:page/@id"/>
- <xsl:if test="ancestor::mal:section[1]/@id">
- <xsl:text>#</xsl:text>
- <xsl:value-of select="ancestor::mal:section[1]/@id"/>
- </xsl:if>
- </xsl:variable>
- <xsl:text>Page: </xsl:text>
- <xsl:value-of select="$site.dir"/>
- <xsl:value-of select="$id"/>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:if test="mal:cite">
- <xsl:text>From: </xsl:text>
- <xsl:value-of select="mal:cite[1]"/>
- <xsl:if test="starts-with(mal:cite[1]/@href, 'mailto:')">
- <xsl:text> &lt;</xsl:text>
- <xsl:value-of select="substring-after(mal:cite[1]/@href, 'mailto:')"/>
- <xsl:text>&gt;</xsl:text>
- </xsl:if>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:if test="mal:cite[1]/@date">
- <xsl:text>Date: </xsl:text>
- <xsl:value-of select="mal:cite[1]/@date"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:for-each select="*[not(self::mal:cite)]">
- <xsl:choose>
- <xsl:when test="self::mal:p">
- <xsl:call-template name="fill">
- <xsl:with-param name="text" select="normalize-space(.)"/>
- <xsl:with-param name="pad" select="' '"/>
- </xsl:call-template>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> FIXME: &lt;</xsl:text>
- <xsl:value-of select="local-name(.)"/>
- <xsl:text>&gt;...&lt;/</xsl:text>
- <xsl:value-of select="local-name(.)"/>
- <xsl:text>&gt;</xsl:text>
- <xsl:text>&#x000A;&#x000A;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:if test="not(*[not(self::mal:cite)])">
- <xsl:text>&#x000A;&#x000A;</xsl:text>
- </xsl:if>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template name="fill">
- <xsl:param name="text" select="''"/>
- <xsl:param name="pad" select="''"/>
- <xsl:param name="end" select="80 - string-length($pad)"/>
- <xsl:param name="col" select="$end"/>
- <xsl:choose>
- <xsl:when test="$col &gt; string-length($text)">
- <xsl:value-of select="$pad"/>
- <xsl:value-of select="$text"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:when>
- <xsl:when test="substring($text, $col, 1) = ' '">
- <xsl:value-of select="$pad"/>
- <xsl:value-of select="substring($text, 0, $col)"/>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:call-template name="fill">
- <xsl:with-param name="text" select="substring($text, $col + 1)"/>
- <xsl:with-param name="end" select="$end"/>
- <xsl:with-param name="pad" select="$pad"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="fill">
- <xsl:with-param name="text" select="$text"/>
- <xsl:with-param name="end" select="$end"/>
- <xsl:with-param name="pad" select="$pad"/>
- <xsl:with-param name="col" select="$col - 1"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/mal-epub.xsl b/xslt/mal-epub.xsl
deleted file mode 100644
index 265bcdd..0000000
--- a/xslt/mal-epub.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- exclude-result-prefixes="mal"
- version="1.0">
-
-<xsl:param name="mal.if.env" select="'epub html xhtml'"/>
-
-<xsl:template mode="html.header.mode" match="mal:page"/>
-<xsl:template mode="html.footer.mode" match="mal:page"/>
-
-<xsl:template mode="html.css.mode" match="mal:page">
-<xsl:text>
-body { background-color: </xsl:text><xsl:value-of select="$color.background"/><xsl:text>; }
-div.body { border: none; }
-</xsl:text>
-<xsl:apply-imports/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/mal-files.xsl b/xslt/mal-files.xsl
deleted file mode 100644
index c955a9e..0000000
--- a/xslt/mal-files.xsl
+++ /dev/null
@@ -1,171 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- xmlns:if="http://projectmallard.org/if/1.0/"
- xmlns:ui="http://projectmallard.org/ui/1.0/"
- xmlns:uix="http://projectmallard.org/experimental/ui/"
- xmlns:e="http://projectmallard.org/experimental/"
- xmlns:exsl="http://exslt.org/common"
- xmlns:html="http://www.w3.org/1999/xhtml"
- version="1.0">
-
-<xsl:template name="mal.files.copy">
- <xsl:param name="node" select="."/>
- <xsl:param name="href"/>
- <xsl:apply-templates mode="mal.files.copy.block.mode">
- <xsl:with-param name="dir">
- <xsl:call-template name="mal.files.copy.dirname">
- <xsl:with-param name="href" select="$href"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template name="mal.files.copy.dirname">
- <xsl:param name="href"/>
- <xsl:if test="contains($href, '/')">
- <xsl:value-of select="substring-before($href, '/')"/>
- <xsl:text>/</xsl:text>
- <xsl:call-template name="mal.files.copy.dirname">
- <xsl:with-param name="href" select="substring-after($href, '/')"/>
- </xsl:call-template>
- </xsl:if>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.media.mode" match="*"/>
-
-<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:if>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="text()"/>
-
-<xsl:template mode="mal.files.copy.block.mode" match="*">
- <xsl:param name="dir"/>
- <xsl:param name="restricted" select="false()"/>
- <xsl:if test="not($restricted)">
- <xsl:variable name="if">
- <xsl:call-template name="mal.if.test"/>
- </xsl:variable>
- <xsl:if test="$if != ''">
- <xsl:apply-templates mode="mal.files.copy.block.mode">
- <xsl:with-param name="dir" select="$dir"/>
- <xsl:with-param name="restricted" select="true()"/>
- </xsl:apply-templates>
- </xsl:if>
- </xsl:if>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="mal:info">
- <xsl:param name="dir"/>
- <xsl:apply-templates mode="mal.files.copy.block.mode"
- select="mal:title | mal:desc | mal:license/* | mal:link/*
- | mal:revision/* | mal:credit | ui:thumb | uix:thumb">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<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"/>
- </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>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="mal:title | mal:subtitle | mal:desc | mal:cite | mal:credit">
- <xsl:param name="dir"/>
- <xsl:apply-templates mode="mal.files.copy.media.mode" select=".//mal:media">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
-</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:note | mal:section | if:if">
- <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.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:media | e:mouseover | ui:thumb | uix:thumb">
- <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=".">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- </xsl:if>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="mal:comment">
- <xsl:param name="dir"/>
- <xsl:variable name="if">
- <xsl:call-template name="mal.if.test"/>
- </xsl:variable>
- <xsl:if test="$if != ''">
- <xsl:if test="$mal2html.editor_mode
- or processing-instruction('mal2html.show_comment')">
- <xsl:apply-templates mode="mal.files.copy.block.mode">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- </xsl:if>
- </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">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="if:choose">
- <xsl:param name="dir"/>
- <xsl:apply-templates mode="mal.files.copy.block.mode" select="if:when[1]">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="if:when">
- <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.block.mode">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- </xsl:if>
- <xsl:if test="$if != 'true'">
- <xsl:apply-templates mode="mal.files.copy.block.mode" select="following-sibling::*[1]">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
- </xsl:if>
-</xsl:template>
-
-<xsl:template mode="mal.files.copy.block.mode" match="if:else">
- <xsl:param name="dir"/>
- <xsl:apply-templates mode="mal.files.copy.block.mode">
- <xsl:with-param name="dir" select="$dir"/>
- </xsl:apply-templates>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/mal-license.xsl b/xslt/mal-license.xsl
deleted file mode 100644
index 74efdce..0000000
--- a/xslt/mal-license.xsl
+++ /dev/null
@@ -1,105 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- xmlns:str="http://exslt.org/strings"
- xmlns:exsl="http://exslt.org/common"
- version="1.0">
-
-<xsl:output method="text"/>
-
-<xsl:param name="only" select="''"/>
-<xsl:variable name="only_" select="concat(' ', translate($only, ',', ' '), ' ')"/>
-<xsl:param name="except" select="''"/>
-<xsl:variable name="except_" select="concat(' ', translate($except, ',', ' '), ' ')"/>
-<xsl:param name="totals" select="''"/>
-
-<xsl:param name="site.dir"/>
-
-<xsl:template match="/">
- <xsl:variable name="idents">
- <xsl:if test="not(/mal:page/mal:info/mal:license)">
- <ident>none</ident>
- </xsl:if>
- <xsl:for-each select="/mal:page/mal:info/mal:license">
- <ident>
- <xsl:call-template name="license.identifier"/>
- </ident>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="display">
- <xsl:for-each select="exsl:node-set($idents)/*">
- <xsl:choose>
- <xsl:when test="$only != ''">
- <xsl:if test="contains($only_, concat(' ', ., ' '))">
- <xsl:text>1</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:when test="$except != ''">
- <xsl:if test="not(contains($except_, concat(' ', ., ' ')))">
- <xsl:text>1</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>1</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$display != ''">
- <xsl:choose>
- <xsl:when test="$totals = ''">
- <xsl:value-of select="$site.dir"/>
- <xsl:value-of select="concat(/mal:page/@id, ': ')"/>
- <xsl:for-each select="exsl:node-set($idents)/*">
- <xsl:if test="position() != 1">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:value-of select="."/>
- </xsl:for-each>
- <xsl:text>&#x0A;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="exsl:node-set($idents)/*">
- <xsl:value-of select="."/>
- <xsl:text>&#x0A;</xsl:text>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
-</xsl:template>
-
-<xsl:template name="license.identifier">
- <xsl:param name="href" select="@href"/>
- <xsl:choose>
- <xsl:when test="$href = ''">
- <xsl:text>unknown</xsl:text>
- </xsl:when>
- <xsl:when test="starts-with($href, 'http://creativecommons.org/licenses/')">
- <xsl:text>cc-</xsl:text>
- <xsl:for-each select="str:split(substring-after($href, 'http://creativecommons.org/licenses/'), '/')">
- <xsl:if test="position() != 1">
- <xsl:text>-</xsl:text>
- </xsl:if>
- <xsl:value-of select="."/>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="starts-with($href, 'http://www.gnu.org/licenses/')">
- <xsl:variable name="basename">
- <xsl:value-of select="substring-after($href, 'http://www.gnu.org/licenses/')"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="substring($basename, string-length($basename) - 4) = '.html'">
- <xsl:value-of select="substring($basename, 1, string-length($basename) - 5)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$basename"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>unknown</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/mal-status.xsl b/xslt/mal-status.xsl
deleted file mode 100644
index 17ca7c7..0000000
--- a/xslt/mal-status.xsl
+++ /dev/null
@@ -1,140 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- xmlns:site="http://projectmallard.org/site/1.0/"
- xmlns:cache="http://projectmallard.org/cache/1.0/"
- xmlns:exsl="http://exslt.org/common"
- xmlns:str="http://exslt.org/strings"
- xmlns:dyn="http://exslt.org/dynamic"
- version="1.0">
-
-<xsl:output method="text"/>
-
-<xsl:param name="version" select="''"/>
-<xsl:param name="docversion" select="''"/>
-<xsl:param name="pkgversion" select="''"/>
-
-<xsl:param name="older" select="''"/>
-<xsl:param name="newer" select="''"/>
-
-<xsl:param name="only" select="''"/>
-<xsl:variable name="only_" select="concat(' ', translate($only, ',', ' '), ' ')"/>
-<xsl:param name="except" select="''"/>
-<xsl:variable name="except_" select="concat(' ', translate($except, ',', ' '), ' ')"/>
-
-<xsl:param name="totals" select="''"/>
-
-<xsl:template match="/">
- <xsl:choose>
- <xsl:when test="$totals = '1'">
- <xsl:variable name="statuses">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:variable name="stlist" select="str:split($statuses)"/>
- <xsl:for-each select="$stlist">
- <xsl:sort select="string(.)"/>
- <xsl:variable name="stval" select="string(.)"/>
- <xsl:if test="not(preceding-sibling::*[string(.) = $stval])">
- <xsl:value-of select="$stval"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="count($stlist[string(.) = $stval])"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="/cache:cache">
- <xsl:for-each select="mal:page">
- <xsl:sort select="@site:dir"/>
- <xsl:sort select="@id"/>
- <xsl:variable name="select">
- <xsl:text>mal:info/mal:revision</xsl:text>
- <xsl:if test="$version != ''">
- <xsl:text>[</xsl:text>
- <xsl:for-each select="str:tokenize($version, ', ')">
- <xsl:if test="position() != 1">
- <xsl:text> or </xsl:text>
- </xsl:if>
- <xsl:text>@version = '</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>'</xsl:text>
- </xsl:for-each>
- <xsl:text>]</xsl:text>
- </xsl:if>
- <xsl:if test="$docversion != ''">
- <xsl:text>[</xsl:text>
- <xsl:for-each select="str:tokenize($docversion, ', ')">
- <xsl:if test="position() != 1">
- <xsl:text> or </xsl:text>
- </xsl:if>
- <xsl:text>@docversion = '</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>'</xsl:text>
- </xsl:for-each>
- <xsl:text>]</xsl:text>
- </xsl:if>
- <xsl:if test="$pkgversion != ''">
- <xsl:text>[</xsl:text>
- <xsl:for-each select="str:tokenize($pkgversion, ', ')">
- <xsl:if test="position() != 1">
- <xsl:text> or </xsl:text>
- </xsl:if>
- <xsl:text>@pkgversion = '</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>'</xsl:text>
- </xsl:for-each>
- <xsl:text>]</xsl:text>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="revision_">
- <xsl:for-each select="dyn:evaluate($select)">
- <xsl:sort select="@date" order="descending"/>
- <xsl:if test="position() = 1">
- <xsl:copy-of select="."/>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="revision" select="exsl:node-set($revision_)/*"/>
- <xsl:variable name="status">
- <xsl:choose>
- <xsl:when test="$revision and $revision/@status">
- <xsl:value-of select="$revision/@status"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>none</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$only = '' or contains($only_, concat(' ', $status, ' '))">
- <xsl:if test="$except = '' or not(contains($except_, concat(' ', $status, ' ')))">
- <xsl:if test="$older = '' or ($revision/@date and
- (translate($revision/@date, '-', '') &lt; translate($older, '-', '')))">
- <xsl:if test="$newer = '' or ($revision/@date and
- (translate($revision/@date, '-', '') &gt; translate($newer, '-', '')))">
- <xsl:if test="$totals != '1'">
- <xsl:value-of select="@site:dir"/>
- <xsl:value-of select="@id"/>
- <xsl:text>: </xsl:text>
- </xsl:if>
- <xsl:value-of select="$status"/>
- <xsl:choose>
- <xsl:when test="$totals != '1'">
- <xsl:text>&#x000A;</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:if>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/media.xsl b/xslt/media.xsl
deleted file mode 100644
index c6b6845..0000000
--- a/xslt/media.xsl
+++ /dev/null
@@ -1,39 +0,0 @@
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:mal="http://projectmallard.org/1.0/"
- xmlns:ui="http://projectmallard.org/ui/1.0/"
- xmlns:uix="http://projectmallard.org/experimental/ui/"
- xmlns:e="http://projectmallard.org/experimental/"
- xmlns:db="http://docbook.org/ns/docbook"
- version="1.0">
-
-<xsl:output method="text"/>
-
-<xsl:template match="/*[namespace-uri(.) = ''] | /db:*">
- <xsl:for-each select="
- //audiodata | //imagedata | //videodata |
- //db:audiodata | //db:imagedata | //db:videodata">
- <xsl:variable name="src">
- <xsl:choose>
- <xsl:when test="@fileref">
- <xsl:value-of select="@fileref"/>
- </xsl:when>
- <xsl:when test="@entityref">
- <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$src"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="/mal:page">
- <xsl:variable name="id" select="@id"/>
- <xsl:for-each select="//mal:media[@src] | //uix:thumb | //ui:thumb | //e:mouseover">
- <xsl:value-of select="@src"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:for-each>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/meson.build b/xslt/meson.build
index 9615d42..259f6bf 100644
--- a/xslt/meson.build
+++ b/xslt/meson.build
@@ -1,12 +1,4 @@
-yelp_tools_xslt_data = [
- 'comments.xsl',
- 'mal-epub.xsl',
- 'mal-files.xsl',
- 'mal-license.xsl',
- 'mal-rng.xsl',
- 'mal-status.xsl',
- 'media.xsl',
-]
+yelp_tools_xslt_data = ['mal-rng.xsl']
install_data(
yelp_tools_xslt_data,
@@ -38,9 +30,7 @@ configure_file(
output: 'mal-ncx.xsl',
configuration: yelp_xslt_in,
install: true,
- install_dir: join_paths(
- pkgxsltdir,
- )
+ install_dir: pkgxsltdir
)
configure_file(
@@ -48,7 +38,5 @@ configure_file(
output: 'mal-opf.xsl',
configuration: yelp_xslt_in,
install: true,
- install_dir: join_paths(
- pkgxsltdir,
- )
-) \ No newline at end of file
+ install_dir: pkgxsltdir
+)