diff options
-rw-r--r-- | source/02_data/articles.xsl | 7 | ||||
-rw-r--r-- | source/03_meta/tags.xsl | 9 | ||||
-rw-r--r-- | source/99_result/article/article.xsl | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/source/02_data/articles.xsl b/source/02_data/articles.xsl index 8900085..6f79675 100644 --- a/source/02_data/articles.xsl +++ b/source/02_data/articles.xsl @@ -49,7 +49,12 @@ <xsl:value-of select="xalan:nodeset($content)/h1"/> </title> <date> - <xsl:value-of select="substring(./name, 0, 11)"/> + <full> + <xsl:value-of select="substring(./name, 0, 11)"/> + </full> + <year> + <xsl:value-of select="substring(./name, 0, 5)"/> + </year> </date> <tags> <xsl:call-template name="list_tags"> diff --git a/source/03_meta/tags.xsl b/source/03_meta/tags.xsl index 84114e8..ac77335 100644 --- a/source/03_meta/tags.xsl +++ b/source/03_meta/tags.xsl @@ -22,7 +22,14 @@ <xsl:template name="get_article_data"> <xsl:param name="handle"/> - <xsl:copy-of select="$root/articles/entry[@handle = $handle]/*[self::title | self::date]"/> + <xsl:variable name="article" select="$root/articles/entry[@handle = $handle]/*[self::title | self::date]"/> + + <title> + <xsl:value-of select="$article/self::title"/> + </title> + <date> + <xsl:value-of select="$article/self::date/full"/> + </date> </xsl:template> <xsl:template match="tags/entry"> diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl index af8702b..11fd2b5 100644 --- a/source/99_result/article/article.xsl +++ b/source/99_result/article/article.xsl @@ -31,7 +31,7 @@ </h2> <p class="info"> <xsl:call-template name="format-date"> - <xsl:with-param name="date" select="./date"/> + <xsl:with-param name="date" select="./date/full"/> <xsl:with-param name="format" select="'M x, Y'"/> </xsl:call-template> | <xsl:for-each select="tags/tag"> |