fix broken paths rendering extensions

This commit is contained in:
Grahame Grieve 2022-09-01 22:40:49 +10:00
parent e8b329bc84
commit 1edb6e5c8d
1 changed files with 12 additions and 1 deletions

View File

@ -3540,7 +3540,7 @@ public class ProfileUtilities extends TranslatingUtilities {
if (ved != null && ued != null) {
Row r1 = gen.new Row();
r.getSubRows().add(r1);
r1.getCells().add(gen.new Cell(null, defFile == null ? "" : defFile+"-definitions.html#extension."+ed.getName(), ((UriType) ued.getFixed()).getValue(), null, null));
r1.getCells().add(gen.new Cell(null, defFile == null ? "" : defFile+"-definitions.html#"+ed.getId()+"."+c.getId(), ((UriType) ued.getFixed()).getValue(), null, null));
r1.getCells().add(gen.new Cell());
r1.getCells().add(gen.new Cell(null, null, describeCardinality(c, null, new UnusedTracker()), null, null));
genTypes(gen, r1, ved, defFile, ed, corePath, imagePath, false, false);
@ -6882,5 +6882,16 @@ public class ProfileUtilities extends TranslatingUtilities {
this.masterSourceFileNames = masterSourceFileNames;
}
public static ElementDefinitionConstraintComponent findConstraint(StructureDefinition sd, String inv) {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
for (ElementDefinitionConstraintComponent c : ed.getConstraint()) {
if (c.getKey().equals(inv)) {
return c;
}
}
}
return null;
}
}