aboutsummaryrefslogtreecommitdiff
path: root/test/read_directory
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-06-01 17:31:17 +0200
committerAdrian Kummerländer2014-06-01 17:31:17 +0200
commit6b5da054693cd348f3c357dbf1c8cb1979fecf6a (patch)
tree8b998b3c3ea08bb7bb5c9a41569ca94d9f3166d5 /test/read_directory
parent1a744712426c9c19019b8ebebdd0c703aae204a6 (diff)
downloadInputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar.gz
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar.bz2
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar.lz
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar.xz
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.tar.zst
InputXSLT-6b5da054693cd348f3c357dbf1c8cb1979fecf6a.zip
Simplified test case result variable definitions
* variables containing the output of a external function can be defined using the "select" attribute ** tree-like definition is only needed when helper templates such as "transformer" are used ** queries on variables that are instantiated in this fashion need the "self::" prefix before base nodes * changed includes of the "testcase.xsl" base template to imports ** this signifies that the importing template is based on the imported template ** ... and this is exactly what we want to define
Diffstat (limited to 'test/read_directory')
-rw-r--r--test/read_directory/transformation.xsl10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/read_directory/transformation.xsl b/test/read_directory/transformation.xsl
index f1446a2..5955c26 100644
--- a/test/read_directory/transformation.xsl
+++ b/test/read_directory/transformation.xsl
@@ -7,16 +7,14 @@
exclude-result-prefixes="InputXSLT xalan"
>
-<xsl:include href="[testcase.xsl]"/>
+<xsl:import href="[testcase.xsl]"/>
<xsl:template name="implementation">
- <xsl:variable name="result">
- <xsl:copy-of select="InputXSLT:read-directory('../')"/>
- </xsl:variable>
+ <xsl:variable name="result" select="InputXSLT:read-directory('../')"/>
<xsl:choose>
- <xsl:when test="xalan:nodeset($result)/directory/@result = 'success'">
- <xsl:for-each select="xalan:nodeset($result)/directory/entry">
+ <xsl:when test="$result/self::directory/@result = 'success'">
+ <xsl:for-each select="$result/self::directory/entry">
<item type="{@type}">
<name><xsl:value-of select="./name"/></name>