Fix rendering of XML Attributes in profiles

This commit is contained in:
Grahame Grieve 2023-10-09 17:46:49 +11:00
parent 9da31ae8ad
commit 737c51f2a5
1 changed files with 10 additions and 2 deletions

View File

@ -848,8 +848,16 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
if (element.hasSliceName()) if (element.hasSliceName())
sName = sName +":"+element.getSliceName(); sName = sName +":"+element.getSliceName();
used.used = true; used.used = true;
if (logicalModel && element.hasRepresentation(PropertyRepresentation.XMLATTR)) if (logicalModel) {
if (element.hasRepresentation(PropertyRepresentation.XMLATTR)) {
sName = "@"+sName; sName = "@"+sName;
} else if (element.hasUserData("derived.pointer")) {
ElementDefinition drv = (ElementDefinition) element.getUserData("derived.pointer");
if (drv.hasRepresentation(PropertyRepresentation.XMLATTR)) {
sName = "@"+sName;
}
}
}
Cell nc = genElementNameCell(gen, element, profileBaseFileName, snapshot, corePath, imagePath, root, logicalModel, allInvariants, profile, typesRow, row, hasDef, ext, used, ref, sName, all); Cell nc = genElementNameCell(gen, element, profileBaseFileName, snapshot, corePath, imagePath, root, logicalModel, allInvariants, profile, typesRow, row, hasDef, ext, used, ref, sName, all);
switch (context.getStructureMode()) { switch (context.getStructureMode()) {
case BINDINGS: case BINDINGS: