String encoding = nsService.lookup(p);
if (encoding == null) {
return encode(WILDCARD_ENCODING);
}
final ValueEncoding ve = getValueEncoding(encoding);
if (ve == null) {
return encode(encoding);
}
return encode(ve.getDisplayValue());
} catch (NamespaceSyntaxWarning e) {
return encode(WILDCARD_ENCODING);
} catch (IndexingFailure idxf) {
return encode(WILDCARD_ENCODING);
}