RE: [xsl] File vs URL

Subject: RE: [xsl] File vs URL
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 23 Jan 2006 09:01:30 -0000
This xsl:document element appears to be based on something that was in the
abandoned XSLT 1.1 draft. (In 2.0 it's been renamed xsl:result-document.) I
don't think the specs will give you much help in discovering how libxslt
inteprets it -- though IIRC they do say that href must be a URL, which means
it can't contain spaces -- but you're better off going to a libxslt forum
for advice on this.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Kaila Kaarle [mailto:Kaarle.Kaila@xxxxxxx] 
> Sent: 23 January 2006 07:15
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] File vs URL
> 
> Hello,
> 
> I have a problem converting my xml to a Word 2003 xml document. The
> problem and my solution I described in
> 
> http://www.biglist.com/lists/xsl-list/archives/200601/msg00111.html
> 
>  So far it's been funtioning OK in my own tests but my users found
> problem with pathnames. In this I would appreciate help.
> 
> I use libxslt/libxml with XSLT 1.0 with some XSLT 1.1 features
> 
> My stylesheet has a variable tmpname that contains the string:
> C:/DATA/My Music//pavetest_files/tmp.xml
> 
> --------------
> First I create an xml file with this:
> 
> <xsl:document href="{$tmpname}">
>   <dict>
>     <entry>
>       <xsl:call-template name="raport"/>
>     </entry>
>   </dict>
> </xsl:document>
> -----------------
> 
> Then I (try to) process the tmp.xml with this:
> 
> <xsl:apply-templates select="document($tmpname)"/>
> ----------------------
> 
> This all works fine if there are no spaces or non-usascii 
> characters in
> tmpname
> E.g. C:/DATA/MyMusic//pavetest_files/tmp.xml  is ok but
> C:/DATA/My Music//pavetest_files/tmp.xml fails.
> 
> The tmp.xml is created in both cases but is not found in the 
> case where
> pathname contains a space.
> 
> -------------
> Is this a problem in libxslt or can I do something to convert the
> tmpname to a url that the document function would understand?
> 
> I need also some other files from the folder (pavetest_files) such as
> images.
> 
> Regards
> Kaarle Kaila

Current Thread