GNOME Bugzilla – Bug 325592
document() doesn't handle non-ASCII paths
Last modified: 2021-07-05 11:00:49 UTC
In the attached test case, only an ASCII filename works. Works in Firefox as expected, but doesn't work in command-line xsltproc (version installed with Mac OS X 10.4). For easier testing, I have also made the test available via http: xsltproc http://nypop.com/~ap/webkit/xslt-%D0%BF%D1%83%D1%82%D0%B8/xslt-%D0%BF%D1%83%D1%82%D0%B8.xml Should have the string "Hello, WebKit!" in all lines (except for the first one in http-based test, of course).
Created attachment 56700 [details] test case
"only an ASCII filename works" -> what is a filename ? http://www.w3.org/TR/xslt#function-document "This string is treated as a URI reference; the resource identified by the URI is retrieved." Check the definition of document(), the string is to be interpreted as an URI-Reference ! XSLT has no idea of what a filename is. On the other hand it references RFC 2396 (and later) for URI and URI-References. Your strings are not %escaped as an URI Reference should be, hence the failure, I don't think it is a bug. Daniel
Sorry about the confused terminology. The language of standards is often pretty confusing when it comes to non-ASCII characters, but in most implementation that I have seen, non-ASCII characters are permitted, and are percent-escaped only for transmission. This is also the most safe appoach, because otherwise the encoding of escaped characters (UTF-8, Latin-1 etc.) could easily get out of sync with the encoding of the document itself. I have additionally verified that the attached test case works not only in Firefox, but also in Saxon 6.5.5.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxslt/-/issues/ Thank you for your understanding and your help.