aboutsummaryrefslogtreecommitdiff
path: root/source/99_result
diff options
context:
space:
mode:
Diffstat (limited to 'source/99_result')
-rw-r--r--source/99_result/archive.xsl2
-rw-r--r--source/99_result/article/article.xsl2
-rw-r--r--source/99_result/atom.xsl2
-rw-r--r--source/99_result/stream.xsl28
4 files changed, 14 insertions, 20 deletions
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 @@
<datasource type="main" mode="full" source="02_meta/articles.xml" target="articles"/>
<datasource type="support" mode="full" source="02_meta/meta.xml" target="meta"/>
<datasource type="support" mode="full" source="00_content/microblog.xml" target="microblog"/>
- <target mode="plain" value="archive/index.html"/>
+ <target mode="plain" value="archive/index.html"/>
</xsl:variable>
<xsl:template name="title-text">Archive</xsl:template>
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 @@
<xsl:call-template name="format-date">
<xsl:with-param name="date" select="date/full"/>
<xsl:with-param name="format" select="'M x, Y'"/>
- </xsl:call-template>
+ </xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:for-each select="tags/tag">
<a href="/tag/{.}">
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 @@
<xsl:variable name="meta">
<datasource type="main" mode="full" source="01_data/articles.xml" target="articles"/>
<datasource type="support" mode="full" source="02_meta/meta.xml" target="meta"/>
- <target mode="plain" value="atom.xml"/>
+ <target mode="plain" value="atom.xml"/>
</xsl:variable>
<xsl:variable name="url" select="datasource/meta/url"/>
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 @@
</xsl:choose>
</xsl:template>
-<xsl:template name="get_article">
- <xsl:param name="handle"/>
-
- <xsl:variable name="article" select="$root/articles/entry[@handle = $handle]"/>
-
+<xsl:template match="articles/entry" mode="resolve">
<h2>
<xsl:text>ยป </xsl:text>
- <a href="/article/{$handle}">
- <xsl:value-of select="$article/title"/>
+ <a href="/article/{@handle}">
+ <xsl:value-of select="title"/>
</a>
</h2>
<p class="info">
<xsl:call-template name="format-date">
- <xsl:with-param name="date" select="$article/date/full"/>
+ <xsl:with-param name="date" select="date/full"/>
<xsl:with-param name="format" select="'M x, Y'"/>
- </xsl:call-template>
+ </xsl:call-template>
<xsl:text> | </xsl:text>
- <xsl:for-each select="$article/tags/tag">
+ <xsl:for-each select="tags/tag">
<a href="/tag/{.}">
<xsl:value-of select="."/>
</a>
@@ -55,7 +51,7 @@
<xsl:value-of select="$root/meta/author"/>
</p>
- <xsl:apply-templates select="$article/content/node()" mode="xhtml"/>
+ <xsl:apply-templates select="content/node()" mode="xhtml"/>
</xsl:template>
<xsl:template match="page/entry">
@@ -80,19 +76,17 @@
</xsl:template>
<xsl:template match="page/entry/article">
+ <xsl:variable name="handle" select="@handle"/>
+
<xsl:choose>
<xsl:when test="position() = last()">
<div class="last article">
- <xsl:call-template name="get_article">
- <xsl:with-param name="handle" select="@handle"/>
- </xsl:call-template>
+ <xsl:apply-templates select="$root/articles/entry[@handle = $handle]" mode="resolve"/>
</div>
</xsl:when>
<xsl:otherwise>
<div class="article">
- <xsl:call-template name="get_article">
- <xsl:with-param name="handle" select="@handle"/>
- </xsl:call-template>
+ <xsl:apply-templates select="$root/articles/entry[@handle = $handle]" mode="resolve"/>
</div>
</xsl:otherwise>
</xsl:choose>