xsl-list
[Top] [All Lists]

Re: [xsl] Sorting behavior of Latin accented characters depends on what characters follow them ... XPath fails to sort correctly

2013-01-07 05:12:26

On 07/01/2013 10:25, Costello, Roger L. wrote:
Hi Folks,

The character 'A' sorts before the character 'Ã' so this XPath expression 
returns true:

       'A'  lt  'Ã'
No, it depends on the default collation in the static context.

For Saxon, the default collation is the Unicode codepoint collation, where ('A' lt 'Ã') is true. But another product might choose a default collation in which ('A' eq 'Ã'), or it might choose a default collation based on the locale settings in your user profile in your operating system.

In XSLT 2.0 you can set the default collation for XPath expressions using the default-collation attribute on the xsl:stylesheet element, or in fact on any enclosing XSLT element.

According to [1] the sorting behavior changes depending on what character 
follows.
That blog posting is about sorting behavior on OS X, not about sorting behavior in XPath.

Michael Kay
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>