I'm trying to convert a csv file into a xml file with Saxon 9. But I have a problem when I try to check existence and read a csv file with the xslt functions: unparsed-text-available(), unparsed-text()
They work fine with a local file, but when I pass a remote file as parameter, unparsed-text-available() return false.
For example, when I pass "D:\test\test.csv", it works. when I pass "\\remote-computer\test\test.csv", it cannot find it.
Here is a part of my xsl file:
<xsl:template match="/" name="main">
<xsl:choose>
<xsl:when test="unparsed-text-available($pathToCSV)">
<xsl:variable name="csv" select="unparsed-text($pathToCSV)"/>
....
</xsl:when>
<xsl:otherwise>
<xsl:text>Cannot locate : </xsl:text><xsl:value-of select="$pathToCSV"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
It seems that document() can read remote file, but only for xml files.
Do you know some other functions that I can use for this case? In xslt or saxon?