Changes

Jump to navigation Jump to search
481 bytes added ,  16:43, 27 August 2014
=Collations=
Another XQuery feature related to natural language processing are '''Collations'''. By default, string comparisons in XQuery are based on the Unicode codepoint order. The default namespace URI {{Code|http://www.w3.org/2003/05/xpath-functions/collation/codepoint}} specifies this ordering. Other collations are completely implementation-defined. In BaseX, the following namespace URI syntax is supported to specify collations:
<nowiki>http://basex.org/collation?lang=...;strength=...;decomposition=...</nowiki>
| 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.
|}
 
===Case-Insensitive Collation===
 
{{Mark|Introduced with BaseX 8.0}}:
 
Since XQuery 3.1, another default collation exists, which allows case-insensitive search of ASCII characters (<code>0x41</code> - <code>0x5A</code>, <code>0x61</code> - <code>0x7A</code>). This query returns <code>true</code>:
 
<pre class="brush:xquery">
declare default collation 'http://www.w3.org/2005/xpath-functions/collation/html-ascii-case-insensitive';
'HTML' = 'html'
</pre>
 
===Examples===
Changelog
 
; Version 8.0:
 
* Added: [[#Case-Insensitive Collation|Case-Insensitive Collation]].
; Version 7.7:
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu