aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/read_directory/reference.xml1
-rw-r--r--test/transform/reference.xml35
-rw-r--r--test/transform/test.xsl24
-rw-r--r--test/transform/transformation.xsl31
4 files changed, 91 insertions, 0 deletions
diff --git a/test/read_directory/reference.xml b/test/read_directory/reference.xml
index 76fb84f..fedd903 100644
--- a/test/read_directory/reference.xml
+++ b/test/read_directory/reference.xml
@@ -5,6 +5,7 @@
<item>read_xml_file</item>
<item>common</item>
<item>read_file</item>
+<item>transform</item>
<item>default_params</item>
</function_read_directory>
</test_case>
diff --git a/test/transform/reference.xml b/test/transform/reference.xml
new file mode 100644
index 0000000..37c060e
--- /dev/null
+++ b/test/transform/reference.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test_case>
+<transform>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:InputXSLT="function.inputxslt.application"
+ exclude-result-prefixes="InputXSLT"
+&gt;
+
+&lt;xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="yes"
+/&gt;
+
+&lt;xsl:template match="/"&gt;
+&lt;test_case&gt;
+ &lt;transform&gt;
+ &lt;xsl:variable
+ name = "result"
+ select = "InputXSLT:transform('test.xsl', 'test_actual.xml')"
+ /&gt;
+
+ &lt;xsl:value-of select="
+ InputXSLT:read-xml-file('test_actual.xml')/test_case/transform_test
+ "/&gt;
+ &lt;/transform&gt;
+&lt;/test_case&gt;
+&lt;/xsl:template&gt;
+
+&lt;/xsl:stylesheet&gt;
+</transform>
+</test_case>
diff --git a/test/transform/test.xsl b/test/transform/test.xsl
new file mode 100644
index 0000000..40134c4
--- /dev/null
+++ b/test/transform/test.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:InputXSLT="function.inputxslt.application"
+ exclude-result-prefixes="InputXSLT"
+>
+
+<xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="yes"
+/>
+
+<xsl:template match="/">
+<test_case>
+ <transform_test>
+ <xsl:value-of select="InputXSLT:read-file('transformation.xsl')"/>
+ </transform_test>
+</test_case>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/test/transform/transformation.xsl b/test/transform/transformation.xsl
new file mode 100644
index 0000000..9039642
--- /dev/null
+++ b/test/transform/transformation.xsl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:InputXSLT="function.inputxslt.application"
+ exclude-result-prefixes="InputXSLT"
+>
+
+<xsl:output
+ method="xml"
+ omit-xml-declaration="no"
+ encoding="UTF-8"
+ indent="yes"
+/>
+
+<xsl:template match="/">
+<test_case>
+ <transform>
+ <xsl:variable
+ name = "result"
+ select = "InputXSLT:transform('test.xsl', 'test_actual.xml')"
+ />
+
+ <xsl:value-of select="
+ InputXSLT:read-xml-file('test_actual.xml')/test_case/transform_test
+ "/>
+ </transform>
+</test_case>
+</xsl:template>
+
+</xsl:stylesheet>