Java tutorial
//package com.java2s; //License from project: Apache License import static java.lang.String.format; public class Main { public static String aggregatedTextEquals(final String text) { return format("%s = '%s'", translateTextForPath("normalize-space(string(.))"), text.toLowerCase()); } public static String translateTextForPath(String txt) { return format("translate(%s, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')", txt); } }