Re: [xslt] document() can't open files with spaces in filename
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] document() can't open files with spaces in filename
- Date: Wed, 30 May 2001 10:27:40 -0400
My understanding of the issue is the following:
- the spec says the string argument passed to document() should
be interpreted as an URI-Reference
http://www.w3.org/TR/xslt#document
- libxml URI code probably found that "doc file.xml" is not
a valid URI-Reference
I suggest you try with "doc%20file.xml" , if "this works" I would be tempted
to think that libxslt is actually right ans sablotron wrong ... But I didn't
really had time to fully examine the issue,
Daniel
On Wed, May 30, 2001 at 03:36:28PM +0200, Bernhard Zwischenbrugger wrote:
> 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
>
>
>
> _______________________________________________
> xslt mailing list
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]