aboutsummaryrefslogtreecommitdiff
path: root/make.xsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-08-23 12:58:32 +0200
committerAdrian Kummerlaender2014-08-23 12:58:32 +0200
commitb942f8ed534e789495b74cc87fd155b0bd2dab0b (patch)
tree29e1cf7ebb10acb7c6708b926c811e06962d05a1 /make.xsl
parent99b8d15f33ac71fe85bb2fa7001d080931bba7ba (diff)
downloadblog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar.gz
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar.bz2
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar.lz
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar.xz
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.tar.zst
blog.kummerlaender.eu-b942f8ed534e789495b74cc87fd155b0bd2dab0b.zip
Revamped source tree traversion
* this was done to be able to implement directory symlinking * the generation process is now split into three transformations ** the actual work is performed by "list.xsl" and "traverse.xsl" respecitively ** "make.xsl" wraps these two transformations *** i.e. generation is now launched by executing "ixslt --transformation make.xsl" * checked background images into VCS
Diffstat (limited to 'make.xsl')
-rw-r--r--make.xsl58
1 files changed, 58 insertions, 0 deletions
diff --git a/make.xsl b/make.xsl
new file mode 100644
index 0000000..a62a017
--- /dev/null
+++ b/make.xsl
@@ -0,0 +1,58 @@
+<?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="yes"
+ encoding="UTF-8"
+ indent="yes"
+/>
+
+<xsl:include href="utility/helper.xsl"/>
+
+<xsl:template name="generate">
+ <xsl:param name="input"/>
+ <xsl:param name="transformation"/>
+
+ <xsl:copy-of select="InputXSLT:generate(
+ $input,
+ string($transformation)
+ )/self::generation/node()"/>
+</xsl:template>
+
+<xsl:template match="/">
+ <xsl:variable name="source">source</xsl:variable>
+ <xsl:variable name="target">target</xsl:variable>
+
+ <xsl:call-template name="generate">
+ <xsl:with-param name="input">
+ <xsl:call-template name="merge_datasource">
+ <xsl:with-param name="main">
+ <xsl:call-template name="generate">
+ <xsl:with-param name="input">
+ <datasource>
+ <xsl:value-of select="$source"/>
+ </datasource>
+ </xsl:with-param>
+ <xsl:with-param name="transformation">list.xsl</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="support">
+ <meta>
+ <source><xsl:value-of select="$source"/></source>
+ <target><xsl:value-of select="$target"/></target>
+ </meta>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="transformation">traverse.xsl</xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>