fix npe and improve error message about uri values
This commit is contained in:
parent
13254f39a2
commit
de0af46394
|
@ -536,7 +536,7 @@ XHTML_URL_INVALID_CHARS_one = URL contains Invalid Character ({1})
|
|||
XHTML_URL_INVALID_CHARS_other = URL contains {0} Invalid Characters ({1})
|
||||
TERMINOLOGY_TX_SYSTEM_HTTPS = The system URL ''{0}'' wrongly starts with https: not http:
|
||||
CODESYSTEM_CS_NO_VS_NOTCOMPLETE = Review the All Codes Value Set - incomplete CodeSystems generally should not have an all codes value set specified
|
||||
TYPE_SPECIFIC_CHECKS_DT_IDENTIFIER_IETF_SYSTEM_VALUE = if identifier.system is ''urn:ietf:rfc:3986'', then the identifier.value must be a full URI (e.g. start with a scheme)
|
||||
TYPE_SPECIFIC_CHECKS_DT_IDENTIFIER_IETF_SYSTEM_VALUE = if identifier.system is ''urn:ietf:rfc:3986'', then the identifier.value must be a full URI (e.g. start with a scheme), not ''{0}''
|
||||
TYPE_SPECIFIC_CHECKS_DT_ATT_SIZE_INVALID = Stated Attachment Size {0} is not valid
|
||||
TYPE_SPECIFIC_CHECKS_DT_ATT_SIZE_CORRECT = Stated Attachment Size {0} does not match actual attachment size {1}
|
||||
TYPE_SPECIFIC_CHECKS_DT_ATT_NO_FETCHER = Attachment size cannot be checked because the validator has not been set up to access the network (url = {0})
|
||||
|
|
|
@ -2255,7 +2255,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
ok = rule(errors, NO_RULE_DATE, IssueType.CODEINVALID, element.line(), element.col(), path, system == null || isIdentifierSystemReferenceValid(system), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_IDENTIFIER_SYSTEM) && ok;
|
||||
if ("urn:ietf:rfc:3986".equals(system)) {
|
||||
String value = element.getNamedChildValue("value");
|
||||
ok = rule(errors, NO_RULE_DATE, IssueType.CODEINVALID, element.line(), element.col(), path, value == null || isAbsolute(value), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_IDENTIFIER_IETF_SYSTEM_VALUE) && ok;
|
||||
ok = rule(errors, NO_RULE_DATE, IssueType.CODEINVALID, element.line(), element.col(), path, value == null || isAbsolute(value), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_IDENTIFIER_IETF_SYSTEM_VALUE, value) && ok;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
|
|
@ -1276,6 +1276,9 @@ public class StructureMapValidator extends BaseValidator {
|
|||
}
|
||||
}
|
||||
StructureDefinition tsd = context.fetchTypeDefinition(type);
|
||||
if (tsd == null) {
|
||||
return false;
|
||||
}
|
||||
StructureDefinition sd = context.fetchTypeDefinition(v.getType());
|
||||
while (sd != null) {
|
||||
if (sd.getUrl().equals(tsd.getUrl())) {
|
||||
|
|
Loading…
Reference in New Issue