Following example explains the functionality of the fn:length() function − Length of String (1) : ${fn:length(string1)} Length of String (2) : ${fn:length(string2)} You will receive the following result −Length of String (1) : 21 Length of String (2) : 22