origam.com

XSLT Function FileExists

Returns true if file exists on the given path.

NAMESPACE

xmlns:fs="http://xsl.origam.com/filesystem"

SYNTAX

bool FileExists(string path)

EXAMPLE

Stylesheet

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:AS="http://schema.advantages.cz/AsapFunctions" 
    xmlns:date="http://exslt.org/dates-and-times" 
    xmlns:fs="http://xsl.origam.com/filesystem" 
    exclude-result-prefixes="AS date fs"> 
    <xsl:template match="/"> 
        <xsl:value-of select="fs:FileExists('c:\\huhu.txt')"/> 
    </xsl:template> 
</xsl:stylesheet>