aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/formatter.xsl20
-rw-r--r--utility/generator.xsl22
-rw-r--r--utility/reader.xsl16
-rw-r--r--utility/transformer.xsl20
-rw-r--r--utility/writer.xsl20
5 files changed, 98 insertions, 0 deletions
diff --git a/utility/formatter.xsl b/utility/formatter.xsl
new file mode 100644
index 0000000..49d8630
--- /dev/null
+++ b/utility/formatter.xsl
@@ -0,0 +1,20 @@
+<?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-text-formatter(
+ $format,
+ $source
+ )/self::output/*"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/utility/generator.xsl b/utility/generator.xsl
new file mode 100644
index 0000000..ca6f0c3
--- /dev/null
+++ b/utility/generator.xsl
@@ -0,0 +1,22 @@
+<?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="generator">
+ <xsl:param name="input"/>
+ <xsl:param name="transformation"/>
+ <xsl:param name="target"/>
+
+ <xsl:copy-of select="InputXSLT:generate(
+ $input,
+ string($transformation),
+ string($target)
+ )/self::generation"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/utility/reader.xsl b/utility/reader.xsl
new file mode 100644
index 0000000..31d6fcc
--- /dev/null
+++ b/utility/reader.xsl
@@ -0,0 +1,16 @@
+<?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="reader">
+ <xsl:param name="path"/>
+
+ <xsl:copy-of select="InputXSLT:read-file($path)/self::file/*"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/utility/transformer.xsl b/utility/transformer.xsl
new file mode 100644
index 0000000..6c85a4e
--- /dev/null
+++ b/utility/transformer.xsl
@@ -0,0 +1,20 @@
+<?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="transformer">
+ <xsl:param name="input"/>
+ <xsl:param name="transformation"/>
+
+ <xsl:copy-of select="InputXSLT:transform(
+ $input,
+ string($transformation)
+ )/self::transformation/*"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/utility/writer.xsl b/utility/writer.xsl
new file mode 100644
index 0000000..42e9502
--- /dev/null
+++ b/utility/writer.xsl
@@ -0,0 +1,20 @@
+<?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="writer">
+ <xsl:param name="source"/>
+ <xsl:param name="target"/>
+
+ <xsl:copy-of select="InputXSLT:write-file(
+ $target,
+ $source
+ )"/>
+</xsl:template>
+
+</xsl:stylesheet>