boolean (String str) { final int colon = str.indexOf(':'); if (colon == 0 || colon == str.length() - 1) { return false; } if (colon > 0) { final String prefix = str.substring(0, colon); final String localPart = str.substring(colon + 1); return XML11Char.isXML11ValidNCName(prefix) && XML11Char.isXML11ValidNCName(localPart); } return XML11Char.isXML11ValidNCName(str); }