|
|
fn:compare(
|
|
$comparand1 as xs:string?,
|
|
$comparand2 as xs:string?,
|
|
[$collation as xs:string]
|
| ) as xs:integer? |
|
 |
Summary:
Returns -1, 0, or 1, depending on whether the value of the $comparand1 is respectively less than, equal to, or greater than the value of $comparand2, according to the rules of the collation that is used.
|
Parameters:
$comparand1
:
A string to be compared.
|
$comparand2
:
A string to be compared.
|
$collation
(optional):
The optional name of a valid collation URI. For information on the
collation URI syntax, see the Developer's Guide.
|
|
Example:
fn:compare("hello", "goodbye")
=> 1
|
|
|
|
fn:escape-uri(
|
|
$uri-part as xs:string,
|
|
$escape-reserved as xs:boolean
|
| ) as xs:string |
|
 |
Summary:
This is a May 2003 function, and is only available in compatibility mode
(XQuery 0.9-ML)--it has been replaced with fn:encode-for-uri,
fn:iri-to-uri, and fn:escape-html-uri.
Returns a string representing the specified URI either with escaped reserved
characters ($escape-reserved=true) or with the reserved characters left as
specified ($escape-reserved=true). For more details, see the W3C XQuery Functions and Operators specification.
|
Parameters:
$uri-part
:
A string representing an unescaped URI.
|
$escape-reserved
:
Specify a boolean value of true to return an escaped URI or
a boolean value of false to return an unescaped URI.
|
|
Example:
fn:escape-uri("http://developer.marklogic.com", fn:true())
=> http%3A%2F%2Fdeveloper.marklogic.com
fn:escape-uri("http://developer.marklogic.com", fn:false())
=> http://developer.marklogic.com
|
|
|