[xslt] document() can't open files with spaces in filename
- From: Bernhard Zwischenbrugger <bz datenkueche com>
- To: xslt gnome org
- Subject: [xslt] document() can't open files with spaces in filename
- Date: Wed, 30 May 2001 15:36:28 +0200
Hi, I think I've found a but in libxslt.
xsltproc can't open files with spaces in the filename.
My xsltproc is a snapshot from CVS ~25.May2001
::::::::::::::
doc file.xml <-- File with space in the name
::::::::::::::
<?xml version="1.0"?>
<tag1>It work's</tag1>
::::::::::::::
docfile.xml
::::::::::::::
<?xml version="1.0"?>
<tag1>It work's</tag1>
::::::::::::::
test.xml
::::::::::::::
<?xml version="1.0"?>
<files>
<file name="docfile.xml"/>
<file name="doc file.xml"/>
</files>
::::::::::::::
test.xsl
::::::::::::::
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:template match="/files/file">
<xsl:variable name="file" select="document(@name)"/>
<xsl:if test="not($file)">
<xsl:text>Can't Open File: </xsl:text>
<xsl:value-of select="@name"/>
</xsl:if>
<xsl:value-of select="$file/tag1"/>
</xsl:template>
</xsl:stylesheet>
bash-2.03# xsltproc test.xsl test.xml
It work's
Can't Open File: doc file.xml <-- The (wrong) result
bash-2.03# xsltproc -version
Using libxml 20308 and libxslt 1000
####### Sablotron Result ######
bash-2.03# sabcmd test.xsl test.xml
It work's
It work's
-----------------------------------------------------
Bernhard Zwischenbrugger Datenküche
Tel.: +43/1/944 57 64 Redaktionssystem
Mobil.: +43/699/1944 57 64 Web Content Management
-----------------------------------------------------
http://www.datenkueche.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]