Follow content reference when rendering XML resources
This commit is contained in:
parent
4923382138
commit
98ba40748e
|
@ -553,8 +553,18 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ElementDefinition> getChildList(StructureDefinition structure, ElementDefinition element) {
|
public List<ElementDefinition> getChildList(StructureDefinition structure, ElementDefinition element) {
|
||||||
|
if (element.hasContentReference()) {
|
||||||
|
ElementDefinition target = element;
|
||||||
|
for (ElementDefinition t : structure.getSnapshot().getElement()) {
|
||||||
|
if (t.getId().equals(element.getContentReference().substring(1))) {
|
||||||
|
target = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getChildList(structure, target.getPath(), target.getId(), false);
|
||||||
|
} else {
|
||||||
return getChildList(structure, element.getPath(), element.getId(), false);
|
return getChildList(structure, element.getPath(), element.getId(), false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void updateMaps(StructureDefinition base, StructureDefinition derived) throws DefinitionException {
|
public void updateMaps(StructureDefinition base, StructureDefinition derived) throws DefinitionException {
|
||||||
if (base == null)
|
if (base == null)
|
||||||
|
@ -3680,7 +3690,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private String codeForAggregation(AggregationMode a) {
|
public static String codeForAggregation(AggregationMode a) {
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case BUNDLED : return "b";
|
case BUNDLED : return "b";
|
||||||
case CONTAINED : return "c";
|
case CONTAINED : return "c";
|
||||||
|
@ -3689,7 +3699,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String hintForAggregation(AggregationMode a) {
|
public static String hintForAggregation(AggregationMode a) {
|
||||||
if (a != null)
|
if (a != null)
|
||||||
return a.getDefinition();
|
return a.getDefinition();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue