aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/03_meta/meta.xsl39
-rw-r--r--source/99_result/article/article.xsl3
-rw-r--r--source/99_result/tag/tag.xsl5
-rw-r--r--utility/master.xsl2
4 files changed, 43 insertions, 6 deletions
diff --git a/source/03_meta/meta.xsl b/source/03_meta/meta.xsl
new file mode 100644
index 0000000..75baa1d
--- /dev/null
+++ b/source/03_meta/meta.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:InputXSLT="function.inputxslt.application"
+ exclude-result-prefixes="xalan InputXSLT"
+>
+
+<xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="yes"
+/>
+
+<xsl:include href="[utility/datasource.xsl]"/>
+
+<xsl:variable name="meta">
+ <datasource type="main" mode="full" source="source/00_content/meta.xml" target="meta"/>
+ <datasource type="support" mode="full" source="target/02_data/tags.xml" target="tags"/>
+ <target mode="plain" value="meta.xml"/>
+</xsl:variable>
+
+<xsl:template match="meta">
+ <xsl:copy-of select="./*"/>
+</xsl:template>
+
+<xsl:template match="tags">
+ <tags>
+ <xsl:apply-templates />
+ </tags>
+</xsl:template>
+
+<xsl:template match="tags/entry">
+ <entry handle="{@handle}"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl
index 8801a60..9c5cd3e 100644
--- a/source/99_result/article/article.xsl
+++ b/source/99_result/article/article.xsl
@@ -19,8 +19,7 @@
<xsl:variable name="meta">
<datasource type="main" mode="iterate" source="target/02_data/articles.xml" target="article"/>
- <datasource type="support" mode="full" source="source/00_content/meta.xml" target="meta"/>
- <datasource type="support" mode="full" source="target/02_data/tags.xml" target="tags"/>
+ <datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
<target mode="xpath" value="xalan:nodeset($datasource)/datasource/article/entry/@handle"/>
</xsl:variable>
diff --git a/source/99_result/tag/tag.xsl b/source/99_result/tag/tag.xsl
index 6ab11bf..0ed3007 100644
--- a/source/99_result/tag/tag.xsl
+++ b/source/99_result/tag/tag.xsl
@@ -18,9 +18,8 @@
<xsl:include href="[utility/date-time.xsl]"/>
<xsl:variable name="meta">
- <datasource type="main" mode="iterate" source="target/03_meta/tags.xml" target="tag"/>
- <datasource type="support" mode="full" source="source/00_content/meta.xml" target="meta"/>
- <datasource type="support" mode="full" source="target/02_data/tags.xml" target="tags"/>
+ <datasource type="main" mode="iterate" source="target/03_meta/tags.xml" target="tag"/>
+ <datasource type="support" mode="full" source="target/03_meta/meta.xml" target="meta"/>
<target mode="xpath" value="xalan:nodeset($datasource)/datasource/tag/entry/@handle"/>
</xsl:variable>
diff --git a/utility/master.xsl b/utility/master.xsl
index da4343b..ec7366c 100644
--- a/utility/master.xsl
+++ b/utility/master.xsl
@@ -20,7 +20,7 @@
<xsl:template name="list_tags">
<ul>
- <xsl:for-each select="datasource/tags/entry">
+ <xsl:for-each select="datasource/meta/tags/entry">
<li>
<a href="{$url}/tag/{@handle}">
<xsl:value-of select="@handle"/>