On 2008-04-21 10:19:25 -0400, Daniel Veillard wrote: > On Tue, Apr 15, 2008 at 01:28:45PM +0200, Vincent Lefevre wrote: [...] > > The note about the encoding should be added here too: > > > > --param PARAMNAME PARAMVALUE > > Pass a parameter of name PARAMNAME and value PARAMVALUE (written > > as an XPath expression) to the stylesheet. You may pass multiple > > name/value pairs up to a maximum of 32. If the value being passed > > is a string, you can use --stringparam instead, to avoid additional > > quote characters that appear in string expressions. Note: The XPath > > expression must be UTF-8 encoded. > > I made the change in SVN
Thanks. > > BTW, I think that passing arguments that are not encoded in the locale > > encoding is not intuitive, as arguments are generally typed by the user > > thus are in the locale encoding. IMHO, the behavior should be controlled > > by an option. > > I think that making the processing in any way locale sensitive make the > whole process non-predictable and hence way worse than the inconvenience > of understanding what is actually happening when they use a string at the > shell level. This really depends on where the arguments come from. If the encoding of the arguments is regarded as fixed (to UTF-8) by xsltproc and the user types the arguments, then this will work under UTF-8 locales, but not under ISO-8859-1 locales, for instance. So, the process is non-predictable in this case too. That's why I suggested an option. If the call to xsltproc appears in a shell script and the user wants predictability, then the script should switch to fixed locales at the beginning, in general C or POSIX locales. As 8-bit characters aren't defined in such locales, accepting UTF-8 encoded strings could be OK in these locales (there would be no clash with what the user types). -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
