aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/02_data/articles.xsl2
-rw-r--r--source/03_meta/tags.xsl2
-rw-r--r--utility/datasource.xsl2
3 files changed, 4 insertions, 2 deletions
diff --git a/source/02_data/articles.xsl b/source/02_data/articles.xsl
index 7547cc7..bc41137 100644
--- a/source/02_data/articles.xsl
+++ b/source/02_data/articles.xsl
@@ -25,7 +25,7 @@
<xsl:template name="list_tags">
<xsl:param name="path"/>
- <xsl:for-each select="../../tags/*[./file/full = $path]">
+ <xsl:for-each select="$root/files/tags/*[./file/full = $path]">
<tag><xsl:value-of select="name()"/></tag>
</xsl:for-each>
</xsl:template>
diff --git a/source/03_meta/tags.xsl b/source/03_meta/tags.xsl
index 4bed65c..f51f91a 100644
--- a/source/03_meta/tags.xsl
+++ b/source/03_meta/tags.xsl
@@ -25,7 +25,7 @@
<xsl:template name="get_article_data">
<xsl:param name="handle"/>
- <xsl:copy-of select="ancestor::node()[4]/articles/entry[@handle = $handle]/*[self::title | self::date]"/>
+ <xsl:copy-of select="$root/articles/entry[@handle = $handle]/*[self::title | self::date]"/>
</xsl:template>
<xsl:template match="files/tags/*">
diff --git a/utility/datasource.xsl b/utility/datasource.xsl
index 8ce224c..5b0d4a5 100644
--- a/utility/datasource.xsl
+++ b/utility/datasource.xsl
@@ -14,6 +14,8 @@
indent="yes"
/>
+<xsl:variable name="root" select="/datasource"/>
+
<xsl:template match="/">
<datasource>
<xsl:apply-templates />