aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-09-02 22:54:07 +0200
committerAdrian Kummerlaender2014-09-02 22:54:07 +0200
commit62d309c963eb31cfdce22a867c004072c8f9aaa1 (patch)
tree601eb56fe92b516807bf8ce96c73c94f27710688
parent70200abbdb88f5e06c4980524e9031b8b2516262 (diff)
downloadblog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar.gz
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar.bz2
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar.lz
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar.xz
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.tar.zst
blog.kummerlaender.eu-62d309c963eb31cfdce22a867c004072c8f9aaa1.zip
Moved author name into the meta tree
* modified all transformations requiring the author name accordingly
-rw-r--r--source/00_content/meta.xml1
-rw-r--r--source/99_result/article/article.xsl5
-rw-r--r--source/99_result/atom.xsl7
-rw-r--r--source/99_result/stream.xsl3
4 files changed, 11 insertions, 5 deletions
diff --git a/source/00_content/meta.xml b/source/00_content/meta.xml
index ac81b8d..8741edc 100644
--- a/source/00_content/meta.xml
+++ b/source/00_content/meta.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta>
<title>/home/adrian</title>
+ <author>Adrian Kummerländer</author>
<url>http://localhost:8000</url>
</meta>
diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl
index 1a6d2eb..0dadf76 100644
--- a/source/99_result/article/article.xsl
+++ b/source/99_result/article/article.xsl
@@ -9,7 +9,7 @@
<xsl:variable name="meta">
<datasource type="main" mode="iterate" source="02_data/articles.xml" target="article"/>
- <datasource type="support" mode="full" source="03_meta/meta.xml" target="meta"/>
+ <datasource type="support" mode="full" source="03_meta/meta.xml" target="meta"/>
<target mode="xpath" value="concat(xalan:nodeset($datasource)/datasource/article/entry/@handle, '/index.html')"/>
</xsl:variable>
@@ -36,7 +36,8 @@
<xsl:value-of select="."/>
</a>
</xsl:for-each>
- <xsl:text> | Adrian Kummerländer</xsl:text>
+ <xsl:text> | </xsl:text>
+ <xsl:value-of select="$root/meta/author"/>
</p>
<xsl:copy-of select="content/node()"/>
</div>
diff --git a/source/99_result/atom.xsl b/source/99_result/atom.xsl
index bfd038b..c2cced8 100644
--- a/source/99_result/atom.xsl
+++ b/source/99_result/atom.xsl
@@ -17,7 +17,8 @@
<target mode="plain" value="atom.xml"/>
</xsl:variable>
-<xsl:variable name="url" select="datasource/meta/url"/>
+<xsl:variable name="url" select="datasource/meta/url"/>
+<xsl:variable name="author" select="datasource/meta/author"/>
<xsl:template match="*" mode="xhtml_copy">
<xsl:element name="{name()}" namespace="http://www.w3.org/1999/xhtml">
@@ -34,7 +35,9 @@
<id><xsl:value-of select="$url"/></id>
<title><xsl:value-of select="datasource/meta/title"/></title>
<author>
- <name>Adrian Kummerländer</name>
+ <name>
+ <xsl:value-of select="$author"/>
+ </name>
</author>
<xsl:apply-templates select="datasource/articles/entry[position() &lt;= 5]"/>
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl
index 4d93a2c..7db2410 100644
--- a/source/99_result/stream.xsl
+++ b/source/99_result/stream.xsl
@@ -48,7 +48,8 @@
<xsl:value-of select="."/>
</a>
</xsl:for-each>
- <xsl:text> | Adrian Kummerländer</xsl:text>
+ <xsl:text> | </xsl:text>
+ <xsl:value-of select="$root/meta/author"/>
</p>
<xsl:copy-of select="$article/content/*"/>
</xsl:template>