diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index 7dcd5ed99..bf34be42f 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -574,7 +574,7 @@ public class StructureDefinitionValidator extends BaseValidator { fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings); } else { StructureDefinition sd = context.fetchTypeDefinition(rootPath); - if (sd != null) { + if (sd != null && sd.getKind() == StructureDefinitionKind.RESOURCE) { fpe.checkOnTypes(vc, rootPath, types, fpe.parse(exp), warnings); } else { fpe.checkOnTypes(vc, "DomainResource", types, fpe.parse(exp), warnings);