xf:upper-case

Converts all the lowercase characters of $string-var to their uppercase form.

If the value of $string-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.

Signatures

xf:upper-case(xs:string? $string-var) —> xs:string?

Arguments

Data Type
Argument
Description

xs:string?

$string-var

Represents the string to convert.

Returns

Returns the $string-var source string converted to uppercase characters.

Examples

Simple

Invoking upper-case("cat") returns the string CAT as shown in the following example query:

<result>{xf:upper-case("cat")}</result> 

The preceding query generates the following result:

<result>CAT</result> 

Pass in Null

Invoking upper-case(()) returns the null string as shown in the following example query:

<result>{xf:upper-case(())}</result> 

Note: The string: () is the empty sequence (similar to a SQL null) which is a sequence containing zero items.

The preceding query generates the following result:

<result/> 

Related Topics

W3C upper-case function description.