From: "James Strachan" <[EMAIL PROTECTED]>
> > They may give different results on different systems with the same
> > string. No means of choosing the locale is provided. An algorithm
> > like the one used in XSLT2
> > (http://www.w3.org/TR/xquery-operators/#func-upper-case) based on
> > Unicode case mappings <http://www.unicode.org/unicode/reports/tr21/>
> > might be more reliable or at least reproducible.
>
> Thanks for the heads up Elliotte. I'll try figure out how to implement
that
> later this week. Incidentally to be more consistent with XSLT 2 I've
renamed
> the functions to upper-case() and lower-case().

I've added this idea to the To Do list in status.xml/html

> Another idea could be to allow a second parameter to be specified with the
> Locale to be used to convert the strings.
>
> e.g.
>
> upper-case( /foo/bar, $myLocale )
>
> Then folks could put the locale to use in the VariableContext before
> evaluating XPath expressions.

I've implemented the above in CVS.

Another extension of this idea could be to also support the common locales
that are defined as static constants in the Locale class via their name and
to use reflection to find them. Then we could do things like...

upper-case( /foo/bar, 'FRENCH' )
lower-case( /foo/bar, 'CHINA' )

or

lower-case( /foo/bar, $userLocale )

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to