fox for "Any" in extension context (from R3)

This commit is contained in:
Grahame Grieve 2020-03-28 06:10:43 +11:00
parent 1ad34c7a50
commit 32b0563ea1
1 changed files with 2 additions and 2 deletions

View File

@ -1529,7 +1529,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (ctxt.getType() == ExtensionContextType.ELEMENT) {
String en = ctxt.getExpression();
contexts.append("e:" + en);
if ("Element".equals(en)) {
if (Utilities.existsInList(en, "Element", "Any")) {
ok = true;
} else if (en.equals("Resource") && container.isResource()) {
ok = true;
@ -2019,7 +2019,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
try {
for (char ch : value.toCharArray()) {
if (!(Character.isDigit(ch) || Character.isAlphabetic(ch) || Utilities.existsInList(ch, ';', '?', ':', '@', '&', '=', '+', '$', '.', ',', '/', '%', '-', '_', '~', '#', '[', ']', '!', '\'', '(', ')', '*'))) {
if (!(Character.isDigit(ch) || Character.isAlphabetic(ch) || Utilities.existsInList(ch, ';', '?', ':', '@', '&', '=', '+', '$', '.', ',', '/', '%', '-', '_', '~', '#', '[', ']', '!', '\'', '(', ')', '*' ))) {
return false;
}
}