diff options
Diffstat (limited to 'test/read_directory')
-rw-r--r-- | test/read_directory/reference.xml | 9 | ||||
-rw-r--r-- | test/read_directory/transformation.xsl | 26 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/read_directory/reference.xml b/test/read_directory/reference.xml new file mode 100644 index 0000000..7e83460 --- /dev/null +++ b/test/read_directory/reference.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<test_case> +<function_read_directory> +<item>read_directory</item> +<item>read_xml_file</item> +<item>common</item> +<item>read_file</item> +</function_read_directory> +</test_case> diff --git a/test/read_directory/transformation.xsl b/test/read_directory/transformation.xsl new file mode 100644 index 0000000..d3c21f1 --- /dev/null +++ b/test/read_directory/transformation.xsl @@ -0,0 +1,26 @@ +<?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> + <function_read_directory> + <xsl:for-each select="InputXSLT:read-directory('../')[@type='directory']"> + <item><xsl:value-of select="."/></item> + </xsl:for-each> + </function_read_directory> +</test_case> +</xsl:template> + +</xsl:stylesheet> |