aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
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>