// make sure that the converted lexical value is allowed by this type.
// sometimes, facets that are added later rejects some of
// enumeration values.
boolean allowed = dt.isValid(lex, new ValidationContext() {
public String resolveNamespacePrefix(String prefix) {
if (!prefix.startsWith("ns"))
return null;
int i = Integer.parseInt(prefix.substring(2));