aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-08-18 20:44:05 +0200
committerAdrian Kummerlaender2014-08-18 20:44:05 +0200
commit99b8d15f33ac71fe85bb2fa7001d080931bba7ba (patch)
tree5111ce422e7046d223b7e14100de93f92b9c5e25 /utility
parent354edf1af29c72e4c82b904f7d219d557a0b75ec (diff)
downloadblog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar.gz
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar.bz2
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar.lz
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar.xz
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.tar.zst
blog.kummerlaender.eu-99b8d15f33ac71fe85bb2fa7001d080931bba7ba.zip
Implemented basic cleaning and linking facilities
* e.g. removing the target directory before each regeneration and symlinking CSS files ** this will be extended to include ressource directories and so on * renamed "formatter.xsl" stylesheet to "helper.xsl" as it now includes various helper templates * finally checked the main CSS into the VCS
Diffstat (limited to 'utility')
-rw-r--r--utility/formatter.xsl20
-rw-r--r--utility/helper.xsl36
2 files changed, 36 insertions, 20 deletions
diff --git a/utility/formatter.xsl b/utility/formatter.xsl
deleted file mode 100644
index 1c2ff3f..0000000
--- a/utility/formatter.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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:template name="formatter">
- <xsl:param name="format"/>
- <xsl:param name="source"/>
-
- <xsl:copy-of select="InputXSLT:external-command(
- $format,
- $source
- )/self::output/node()"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/utility/helper.xsl b/utility/helper.xsl
new file mode 100644
index 0000000..cf3d7ba
--- /dev/null
+++ b/utility/helper.xsl
@@ -0,0 +1,36 @@
+<?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:template name="formatter">
+ <xsl:param name="format"/>
+ <xsl:param name="source"/>
+
+ <xsl:copy-of select="InputXSLT:external-command(
+ $format,
+ $source
+ )/self::command/node()"/>
+</xsl:template>
+
+<xsl:template name="cleaner">
+ <xsl:param name="path"/>
+
+ <cleaning path="./{$path}" result="{InputXSLT:external-command(
+ concat('rm -r ./', $path, '/*')
+ )/self::command/@result}"/>
+</xsl:template>
+
+<xsl:template name="linker">
+ <xsl:param name="from"/>
+ <xsl:param name="to"/>
+
+ <linkage from="{$from}" to="{$to}" result="{InputXSLT:external-command(
+ concat('ln -s ', $from, ' ./', $to)
+ )/self::command/@result}"/>
+</xsl:template>
+</xsl:stylesheet>