aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-12-09 19:03:28 +0100
committerAdrian Kummerlaender2014-12-09 19:03:28 +0100
commit299dbbb58f9b6c6c85563bba4d1e43ae514a7949 (patch)
tree30a77680fb5d015648c1be639312cfb8f2a9bcfe /utility
parent1b9a49bacf15c72c093b7e6de79b408c28e5b904 (diff)
downloadblog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar.gz
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar.bz2
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar.lz
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar.xz
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.tar.zst
blog.kummerlaender.eu-299dbbb58f9b6c6c85563bba4d1e43ae514a7949.zip
Replaced function-like data resolution with template applications
* e.g. article and tag support data is now fetched through direct _XPath_ template applications ** this required the introduction of a special `resolve` mode to prevent interaction between support and main content resolution ** in most cases arguments had to be wrapped inside helper constants to enable selection of e.g. article support data via the `@handle` attribute using the current elements `@handle` attribute * analogously to the recent changes in _StaticXSLT_ this commit aims to improve the XSLT code style used in generating this static website
Diffstat (limited to 'utility')
-rw-r--r--utility/master.xsl18
1 files changed, 10 insertions, 8 deletions
diff --git a/utility/master.xsl b/utility/master.xsl
index 84ecfe7..cb9e025 100644
--- a/utility/master.xsl
+++ b/utility/master.xsl
@@ -16,6 +16,14 @@
<xsl:variable name="root" select="datasource"/>
+<xsl:template match="meta/tags/entry" mode="master">
+ <li>
+ <a href="/tag/{@handle}">
+ <xsl:value-of select="@handle"/>
+ </a>
+ </li>
+</xsl:template>
+
<xsl:template match="/">
<html>
<head>
@@ -26,7 +34,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<link rel="stylesheet" type="text/css" href="/main.css" />
- <link rel="shortcut icon" type="image/x-icon" href="/media/favicon.ico" />
+ <link rel="shortcut icon" type="image/x-icon" href="/media/favicon.ico" />
<title>
<xsl:call-template name="title-text"/> @ <xsl:value-of select="$root/meta/title"/>
@@ -65,13 +73,7 @@
<div id="tags">
<ul>
- <xsl:for-each select="datasource/meta/tags/entry">
- <li>
- <a href="/tag/{@handle}">
- <xsl:value-of select="@handle"/>
- </a>
- </li>
- </xsl:for-each>
+ <xsl:apply-templates select="datasource/meta/tags/entry" mode="master"/>
</ul>
</div>