fix problem validating extension context on choice types

This commit is contained in:
Grahame Grieve 2022-01-29 09:17:29 +11:00
parent 3559bd6638
commit ccfd715a5a
1 changed files with 4 additions and 2 deletions

View File

@ -119,7 +119,7 @@ public class NodeStack {
}
res.logicalPaths = new ArrayList<String>();
if (type != null) {
// type will be bull if we on a stitching point of a contained resource, or if....
// type will be null if we on a stitching point of a contained resource, or if....
res.type = type;
String tn = res.type.getPath();
String t = tail(definition.getPath());
@ -128,8 +128,10 @@ public class NodeStack {
}
for (String lp : getLogicalPaths()) {
res.logicalPaths.add(lp + "." + t);
if (t.endsWith("[x]"))
if (t.endsWith("[x]")) {
res.logicalPaths.add(lp + "." + t.substring(0, t.length() - 3) + ".ofType("+type.getPath()+")");
res.logicalPaths.add(lp + "." + t.substring(0, t.length() - 3) + type.getPath());
}
}
res.logicalPaths.add(tn);
} else if (definition != null) {