[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

document( URI ) with accented chars fails

Subject: document( URI ) with accented chars fails
From: "Alexandre Hoïde alexandre.hoide@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Nov 2020 20:28:40 -0000
 document( URI ) with accented chars fails
  Hello !

  I have a little problem : URI inside a bdocument()bB9 is
ignored when the filename contains accented (UTF-8)
character(s).

  When applying the XSLT on the source with the sample
2 files below, with the following command

~~~{Command line}
$ xsltproc multifiles.xsl files-list.xml
~~~

I expect the following result :

~~~{expected result}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <el>element 1</el>
  <el>element 2</el>
  <el>element 3</el>
</root>
~~~

but I only get the `el`s from the ASCII only filename.

~~~{output}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <el>element 1</el>
</root>
~~~


~~~{multifiles.xsl}
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <root>
      <xsl:for-each select="document(/fileslist/filepath)/root/el">
        <xsl:copy-of select="." />
      </xsl:for-each>
    </root>
  </xsl:template>
</xsl:stylesheet>
~~~

~~~{files-list.xml}
<?xml version="1.0" encoding="UTF-8"?>
<fileslist>
  <filepath>filename-without-accented-char.xml</filepath>
  <filepath>filename-with-utf-8-accented-char-C).xml</filepath>
</fileslist>
~~~
(When i add files to the `files-list.xml`, the ones
containing accented chars are consistently ignored.)

~~~{filename-without-accented-char.xml}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <el>element 1</el>
</root>
~~~

~~~{filename-with-utf-8-accented-char-C).xml}
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <el>element 2</el>
  <el>element 3</el>
</root>
~~~

  Do i miss something or is it a libxslt bug ?
  
  Thanks for your time !

Alexandre HoC/de

XSLT Processor Version (under Guix GNU/Linux)
  XSL version: 1.0
  Vendor: libxslt
  version: 1.1.34
  (libxml2@xxxxxx)
  Vendor URL: http://xmlsoft.org/XSLT/

1. https://www.w3.org/TR/xslt-10/#document

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.