Subject: RE: [xsl] Why does the doc() function reject non-ASCII characters in the filename? From: "Costello, Roger L." <costello@xxxxxxxxx> Date: Fri, 5 Oct 2012 16:12:00 +0000 |
Thank you very much Ken and Gerrit -- awesome! Because of your help I have solved the problem. Here's what I did: To read in the list of filenames I was using unparsed-text like so: <xsl:variable name="text" select="unparsed-text('all-files.txt', 'utf-8')"/> I changed it from 'utf-8' to 'iso-8859-1' like so: <xsl:variable name="text" select="unparsed-text('all-files.txt', 'iso-8859-1')"/> Then, in my loop to process each filename I checked for doc-available like so: <xsl:choose> <xsl:when test="doc-available(encode-for-uri($filename))"> <xsl:variable name="file" select="doc(encode-for-uri($filename))" /> <!-- Process the file --> </xsl:when> </xsl:choose> That works great. Thanks again! /Roger -----Original Message----- From: Imsieke, Gerrit, le-tex [mailto:gerrit.imsieke@xxxxxxxxx] Sent: Friday, October 05, 2012 11:43 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Why does the doc() function reject non-ASCII characters in the filename? Another reason why it failed might be that the text file that contains the file names is encoded differently from what Java expects (if your XSLT processor runs on Java). Maybe you need to specify -Dfile.encoding=UTF8 (or whatever) when invoking Java. Gerrit
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Why does the doc() functi, Imsieke, Gerrit, le- | Thread | [xsl] [ANN] Online XPath 2.0 analys, Philip Fearon |
Re: [xsl] Re: Grouping flat HTML at, Wendell Piez | Date | [xsl] [ANN] Online XPath 2.0 analys, Philip Fearon |
Month |