A RESTful browser for eXist Java-Based Function Modules


http://www.w3.org/2005/xpath-functions
A module with the XQuery/XPath Core Library Functions

compare($string-1 as xs:string?, $string-2 as xs:string?) xs:integer?
Returns the collatable comparison between $string-1 and $string-2, -1 if $string-1 is inferior to $string-2, 0 if $string-1 is equal to $string-2, 1 if $string-1 is superior to $string-2. If either comparand is the empty sequence, the empty sequence is returned. Please remember to specify the collation in the context or use the three argument version if you don't want the system default.
$string-1The first string
$string-2The second string

Returns -1 if $string-1 is inferior to $string-2, 0 if $string-1 is equal to $string-2, 1 if $string-1 is superior to $string-2. If either comparand is the empty sequence, the empty sequence is returned.

compare($string-1 as xs:string?, $string-2 as xs:string?, $collation-uri as xs:string) xs:integer?
Returns the collatable comparison using $collation-uri between $string-1 and $string-2, -1 if $string-1 is inferior to $string-2, 0 if $string-1 is equal to $string-2, 1 if $string-1 is superior to $string-2. If either comparand is the empty sequence, the empty sequence is returned. The third argument $collation-uri is relative so you only need to specify the last part of a valid full collation-uri, e.g. '?lang=sv-SE', 'lang=sv-SE;strength=primary;decomposition=standard' or 'swedish'.
$string-1The first string
$string-2The second string
$collation-uriThe relative collation URI

Returns -1 if $string-1 is inferior to $string-2, 0 if $string-1 is equal to $string-2, 1 if $string-1 is superior to $string-2. If either comparand is the empty sequence, the empty sequence is returned.
Return to list of all modules