Changes

Jump to navigation Jump to search
674 bytes added ,  19:32, 3 June 2013
<nowiki>http://basex.org/collation?lang=...;strength=...;decomposition=...</nowiki>
Semicolons can be replaced with ampersands; for convenience, and all the URL can be reduced to its query string component (including the question mark). All arguments are optional:
{| class="wikitable sortable"
|-
! Argument
|-
| {{Code|lang}}
| A language code, followed by an optional language variant. If no language is specified, the system’s default will be chosen. Examples: {{Code|de}}, {{Code|en-US}}.
|-
| {{Code|strength}}
| Level of difference considered significant in comparisons. Four strengths are supported: {{Code|primary}}, {{Code|secondary}}, {{Code|tertiary}}, and {{Code|identical}}. For example, in German, "Ä" and "A" are considered primary differences, "Ä" and "ä" are secondarydifferences, "Ä" and "A[http://www.fileformat.info/info/unicode/char/308/index.htm &amp;#x308;]" are tertiarydifferences, and "A" and "A" are identical.
|-
| {{Code|decomposition}}
| Defines how composed characters are handled. Three decompositions are supported: {{Code|none}}, {{Code|standard}}, and {{Code|full}}. More details are found in the [http://docs.oracle.com/javase/7/docs/api/java/text/Collator.html JavaDoc] of the JDK.
|}
 
====Examples====
 
* '''Query: '''<code>declare default collation '?lang=de;strength=secondary'; 'Straße' = 'Strasse'</code><br/>'''Result: '''<code>true</code>
* '''Query: '''<code>for $w in ("à plutôt!", "bonjour!") order by $w collation "?lang=fr" return $w</code><br/>'''Result: '''<code>à plutôt! bonjour!</code>
* '''Query: '''<code><nowiki>distinct-values(("a", "á", "à"), "http://basex.org/collation?lang=it-IT;strength=primary")</nowiki></code><br/>'''Result: '''<code>a</code>
=Changelog=
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu