aboutsummaryrefslogtreecommitdiff
path: root/dummy
diff options
context:
space:
mode:
Diffstat (limited to 'dummy')
-rw-r--r--dummy/transform.xsl28
1 files changed, 14 insertions, 14 deletions
diff --git a/dummy/transform.xsl b/dummy/transform.xsl
index 359db05..eab7a81 100644
--- a/dummy/transform.xsl
+++ b/dummy/transform.xsl
@@ -20,11 +20,11 @@
<div id="raw">
<xsl:variable name="testFile" select="external:read-file('test.txt')"/>
<xsl:choose>
- <xsl:when test="$testFile/self::status = 'successful'">
- <xsl:value-of select="$testFile/self::content"/>
+ <xsl:when test="$testFile/self::error">
+ Could not read text file.
</xsl:when>
<xsl:otherwise>
- Could not read text file.
+ <xsl:value-of select="$testFile[@name='test.txt']"/>
</xsl:otherwise>
</xsl:choose>
</div>
@@ -32,15 +32,15 @@
<div id="xml">
<xsl:variable name="testXml" select="external:read-xml-file('test.txt')"/>
<xsl:choose>
- <xsl:when test="$testXml/self::status = 'successful'">
+ <xsl:when test="$testXml/self::error">
+ Could not read XML file.
+ </xsl:when>
+ <xsl:otherwise>
<ul id="xml">
- <xsl:for-each select="$testXml/self::content/tester/eintrag">
+ <xsl:for-each select="$testXml[@name='test.txt']/tester/eintrag">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
- </xsl:when>
- <xsl:otherwise>
- Could not read XML file.
</xsl:otherwise>
</xsl:choose>
</div>
@@ -48,20 +48,20 @@
<div id="filelists">
<xsl:variable name="fileList" select="external:read-directory('../')"/>
<xsl:choose>
- <xsl:when test="$fileList/self::status = 'successful'">
+ <xsl:when test="$fileList/self::error">
+ Could not read directory.
+ </xsl:when>
+ <xsl:otherwise>
<ul id="filelist1">
- <xsl:for-each select="$fileList/self::content/item[@type='file']">
+ <xsl:for-each select="$fileList[@type='file']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
<ul id="filelist2">
- <xsl:for-each select="$fileList/self::content/item[@type='directory']">
+ <xsl:for-each select="$fileList[@type='directory']">
<li><xsl:value-of select="."/></li>
</xsl:for-each>
</ul>
- </xsl:when>
- <xsl:otherwise>
- Could not read directory.
</xsl:otherwise>
</xsl:choose>
</div>