diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FetchedResource.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FetchedResource.java index 77e9d4274..e9a55bd2f 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FetchedResource.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/FetchedResource.java @@ -39,6 +39,7 @@ public class FetchedResource { private String path; // where published private Resource resource; private Element element; + private Element logicalElement; private JsonObject config; private boolean validated; private boolean validateAsResource; @@ -291,5 +292,13 @@ public String getNameForErrors() { public void setNameForErrors(String nameForErrors) { this.nameForErrors = nameForErrors; } + + public Element getLogicalElement() { + return logicalElement; + } + + public void setLogicalElement(Element logicalElement) { + this.logicalElement = logicalElement; + } } diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java index 1a5b0b94a..1c099af67 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java @@ -7097,7 +7097,7 @@ private void validate() throws Exception { private void validate(FetchedFile f, FetchedResource r, Binary bin, List errs, FhirFormat fmt, List profiles) { long ts = System.currentTimeMillis(); - validator.validate(r.getElement(), errs, new ByteArrayInputStream(bin.getContent()), fmt, profiles); + r.setLogicalElement(validator.validate(r.getElement(), errs, new ByteArrayInputStream(bin.getContent()), fmt, profiles)); long tf = System.currentTimeMillis(); if (tf-ts > validationLogTime && validationLogTime > 0) { reportLongValidation(f, r, tf-ts);