aboutsummaryrefslogtreecommitdiff
path: root/detail/plan.xsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-10-12 12:57:01 +0200
committerAdrian Kummerlaender2014-10-12 12:57:01 +0200
commit22ed1ee6e63a496f1e56d8bd905542035d88ca2b (patch)
tree64f8eed3d7a80d9a69eacd08a7f9c9821d411934 /detail/plan.xsl
parentd9784669ec613d42d453c907921a9983a36518fb (diff)
downloadblog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar.gz
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar.bz2
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar.lz
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar.xz
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.tar.zst
blog.kummerlaender.eu-22ed1ee6e63a496f1e56d8bd905542035d88ca2b.zip
Extracted generation framework into StaticXSLT module
* i.e. the `detail` transformations were moved into a BuildXSLT module * modified XML Makefile accordingly * removed framework documentation from `README.md` and added usage documentation * this was done to make it easier to use the basic static site generation framework in other projects ** the detail transformations were developed to enable the implementation of this blog but are generic enough to be used in other contexts
Diffstat (limited to 'detail/plan.xsl')
-rw-r--r--detail/plan.xsl99
1 files changed, 0 insertions, 99 deletions
diff --git a/detail/plan.xsl b/detail/plan.xsl
deleted file mode 100644
index 653a9ca..0000000
--- a/detail/plan.xsl
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dyn="http://exslt.org/dynamic"
- xmlns:xalan="http://xml.apache.org/xalan"
- xmlns:InputXSLT="function.inputxslt.application"
- exclude-result-prefixes="dyn xalan InputXSLT"
->
-
-<xsl:output
- method="xml"
- omit-xml-declaration="yes"
- encoding="UTF-8"
- indent="no"
-/>
-
-<xsl:include href="../utility/datasource.xsl"/>
-
-<xsl:template name="traverse">
- <xsl:param name="source"/>
- <xsl:param name="target"/>
- <xsl:param name="path"/>
- <xsl:param name="node"/>
-
- <xsl:for-each select="$node/directory">
- <xsl:choose>
- <xsl:when test=".//file/@extension = '.xsl'">
- <xsl:call-template name="traverse">
- <xsl:with-param name="source" select="$source"/>
- <xsl:with-param name="target" select="$target"/>
- <xsl:with-param name="path" select="concat($path, '/', @name)"/>
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <task type="link">
- <from>
- <xsl:value-of select="concat($target, '/', $path, '/', @name)"/>
- </from>
- <to>
- <xsl:value-of select="concat($source, '/', $path, '/', @name)"/>
- </to>
- </task>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:for-each select="$node/file">
- <xsl:choose>
- <xsl:when test="@extension = '.xsl'">
- <task type="generate">
- <meta>
- <datasource_prefix>
- <xsl:value-of select="$target"/>
- </datasource_prefix>
- </meta>
- <source>
- <xsl:value-of select="concat($source, '/', $path, '/', @name, @extension)"/>
- </source>
- <target>
- <xsl:value-of select="concat($target, '/', $path)"/>
- </target>
- </task>
- </xsl:when>
- <xsl:when test="@extension = '.css'">
- <task type="link">
- <from>
- <xsl:value-of select="concat($target, '/', $path, '/', @name, @extension)"/>
- </from>
- <to>
- <xsl:value-of select="concat($source, '/', $path, '/', @name, @extension)"/>
- </to>
- </task>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:template match="datasource">
- <xsl:copy-of select="source"/>
- <xsl:copy-of select="meta"/>
-
- <tasks>
- <task type="clean">
- <path>
- <xsl:value-of select="meta/target"/>
- </path>
- </task>
-
- <xsl:call-template name="traverse">
- <xsl:with-param name="source" select="$root/meta/source"/>
- <xsl:with-param name="target" select="$root/meta/target"/>
- <xsl:with-param name="node" select="source"/>
- </xsl:call-template>
- </tasks>
-</xsl:template>
-
-</xsl:stylesheet>