diff options
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.xsl | 18 |
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> |