aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-07-17 21:18:25 +0200
committerAdrian Kummerlaender2014-07-17 21:18:25 +0200
commite872033543129071469a0b100c0a36c18a6b519b (patch)
treee1124031a12423acfa9cb45dc7fef30c8dab4a3f /template
parent56e46331c3cb503baa2d3f8004dc0725baf51a0a (diff)
downloadblog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar.gz
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar.bz2
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar.lz
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar.xz
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.tar.zst
blog.kummerlaender.eu-e872033543129071469a0b100c0a36c18a6b519b.zip
Implemented basic page compilation facilities
* templates in 'template/compiler' are automatically generated ** required datasources are extracted and merged automatically ** 'pages.xsl' is currently a dummy compiler * moved context helper templates into context stylesheet * added compiler directory to meta DOM * modified generator and transformer helper templates to enable usage of DOM as input
Diffstat (limited to 'template')
-rw-r--r--template/compiler/pages.xsl25
-rw-r--r--template/datasource/pages.xsl8
2 files changed, 26 insertions, 7 deletions
diff --git a/template/compiler/pages.xsl b/template/compiler/pages.xsl
new file mode 100644
index 0000000..f4ada83
--- /dev/null
+++ b/template/compiler/pages.xsl
@@ -0,0 +1,25 @@
+<?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:variable name="datasources">
+ <file name="pages.xml"/>
+</xsl:variable>
+
+<xsl:template match="datasource[@name = 'pages.xml']/entry">
+ <compile>Compile page: <xsl:value-of select="@handle"/></compile>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/template/datasource/pages.xsl b/template/datasource/pages.xsl
index c77513a..5c036c9 100644
--- a/template/datasource/pages.xsl
+++ b/template/datasource/pages.xsl
@@ -10,13 +10,7 @@
<xsl:include href="[utility/datasource.xsl]"/>
<xsl:include href="[utility/formatter.xsl]"/>
-<xsl:template match="source/pages">
- <pages>
- <xsl:apply-templates select="./*"/>
- </pages>
-</xsl:template>
-
-<xsl:template match="file[./extension = '.md']">
+<xsl:template match="source/pages/file[./extension = '.md']">
<entry handle="{./name}">
<xsl:choose>
<xsl:when test="./extension = '.md'">