From 299dbbb58f9b6c6c85563bba4d1e43ae514a7949 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 9 Dec 2014 19:03:28 +0100 Subject: 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 --- source/01_data/articles.xsl | 20 ++++++++------------ source/02_meta/articles.xsl | 34 +++++++++++++++------------------- source/02_meta/categories.xsl | 20 ++++++++------------ source/02_meta/tags.xsl | 28 ++++++++++++---------------- source/99_result/archive.xsl | 2 +- source/99_result/article/article.xsl | 2 +- source/99_result/atom.xsl | 2 +- source/99_result/stream.xsl | 28 +++++++++++----------------- utility/master.xsl | 18 ++++++++++-------- 9 files changed, 67 insertions(+), 87 deletions(-) diff --git a/source/01_data/articles.xsl b/source/01_data/articles.xsl index e207117..c25fe2a 100644 --- a/source/01_data/articles.xsl +++ b/source/01_data/articles.xsl @@ -12,17 +12,13 @@ - + - - - - - - - - + + + + @@ -51,9 +47,9 @@ - - - + + + diff --git a/source/02_meta/articles.xsl b/source/02_meta/articles.xsl index 1a8b8fa..f91ff1e 100644 --- a/source/02_meta/articles.xsl +++ b/source/02_meta/articles.xsl @@ -11,31 +11,27 @@ - + + + +
+ + <xsl:value-of select="title"/> + + + + +
+
+ + - - - + - - - - -
- - <xsl:value-of select="title"/> - - - - -
-
-
- diff --git a/source/02_meta/categories.xsl b/source/02_meta/categories.xsl index 1a06aa1..ea8593b 100644 --- a/source/02_meta/categories.xsl +++ b/source/02_meta/categories.xsl @@ -15,17 +15,13 @@ - - - - - - + + - <xsl:value-of select="$page/title"/> + <xsl:value-of select="title"/> - - + + @@ -37,9 +33,9 @@ - - - + + + diff --git a/source/02_meta/tags.xsl b/source/02_meta/tags.xsl index 20b1f10..3c95932 100644 --- a/source/02_meta/tags.xsl +++ b/source/02_meta/tags.xsl @@ -12,17 +12,15 @@ - - - - - - - <xsl:value-of select="$article/self::title"/> - - - - + +
+ + <xsl:value-of select="title"/> + + + + +
@@ -32,11 +30,9 @@ -
- - - -
+ + +
diff --git a/source/99_result/archive.xsl b/source/99_result/archive.xsl index 31d8354..8ef7d9a 100644 --- a/source/99_result/archive.xsl +++ b/source/99_result/archive.xsl @@ -11,7 +11,7 @@ - +
Archive diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl index 37e2fda..d34df77 100644 --- a/source/99_result/article/article.xsl +++ b/source/99_result/article/article.xsl @@ -31,7 +31,7 @@ - + | diff --git a/source/99_result/atom.xsl b/source/99_result/atom.xsl index b5fffdd..4972bb8 100644 --- a/source/99_result/atom.xsl +++ b/source/99_result/atom.xsl @@ -17,7 +17,7 @@ - + diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl index 5d2218c..d71b094 100644 --- a/source/99_result/stream.xsl +++ b/source/99_result/stream.xsl @@ -28,24 +28,20 @@
- - - - - +

ยป - - + +

- + - + | - + @@ -55,7 +51,7 @@

- +
@@ -80,19 +76,17 @@ + +
- - - +
- - - +
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 @@ + +
  • + + + +
  • +
    + @@ -26,7 +34,7 @@ - + <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> -- cgit v1.2.3