Skip to content

Commit 9fac1c9

Browse files
Merge pull request #1350 from HL7/2026-07-gg-redirections
2026 07 gg redirections
2 parents 0e4bb21 + e8a726f commit 9fac1c9

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/HTMLInspector.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,15 @@ public List<ValidationMessage> check(String statusMessageDef, Map<String, String
346346
for (String s : sorted(cache.keySet())) {
347347
log.logDebugMessage(LogCategory.HTML, "Check "+s);
348348
LoadedFile lf = cache.get(s);
349+
// 'history.html' is generated by the publication process (it becomes the
350+
// directory of published versions). If this IG build also produces a
351+
// root-level history.html, the published version overwrites it and the
352+
// build's content is silently lost - so warn the author to rename the page.
353+
if (s.length() > rootFolder.length() && "history.html".equals(s.substring(rootFolder.length()+1))) {
354+
messages.add(new ValidationMessage(Source.Publisher, IssueType.BUSINESSRULE, s,
355+
"This IG generates a page named 'history.html'. That file name is reserved by the publication process, which replaces it with the directory of published versions when the IG is published, so the content generated here will be overwritten and lost. Rename the page to something else (e.g. test-history.html).",
356+
IssueSeverity.WARNING));
357+
}
349358
if (lf.getHl7State() != null && !lf.getHl7State()) {
350359
boolean check = true;
351360
for (String pattern : exemptHtmlPatterns ) {

org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/StructureDefinitionRenderer.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ public BindingResolutionDetails(String vss, String vsn) {
102102
public static final int GEN_MODE_DIFF = 2;
103103
public static final int GEN_MODE_MS = 3;
104104
public static final int GEN_MODE_KEY = 4;
105-
public static final String ANCHOR_PREFIX_MAP = "";
105+
public static final String ANCHOR_PREFIX_MAP_O = "o";
106+
public static final String ANCHOR_PREFIX_MAP_I = "i";
107+
public static final String ANCHOR_PREFIX_MAP_E = "e";
106108
public static final String ANCHOR_PREFIX_SNAP = "";
107109
public static final String ANCHOR_PREFIX_DIFF = "diff_";
108110
public static final String ANCHOR_PREFIX_MS = "ms_";
@@ -1333,17 +1335,17 @@ public String mappings(String defnFile, Set<String> outputTracker) throws FHIREx
13331335
}
13341336
}
13351337
XhtmlNode intTable = sdr.generateTable(new RenderingStatus(), defnFile, sd, false, destDir, false, sd.getId(), true, corePath, "", sd.getKind() == StructureDefinitionKind.LOGICAL, false,
1336-
outputTracker, false, gen, ANCHOR_PREFIX_MAP, resE, "M");
1338+
outputTracker, false, gen.withUniqueLocalPrefix(ANCHOR_PREFIX_MAP_I), ANCHOR_PREFIX_MAP_I, resE, "M");
13371339

13381340
sdr.setMappingsMode(MapStructureMode.NOT_IN_LIST);
13391341

13401342
XhtmlNode extTable = sdr.generateTable(new RenderingStatus(), defnFile, sd, false, destDir, false, sd.getId(), true, corePath, "", sd.getKind() == StructureDefinitionKind.LOGICAL, false,
1341-
outputTracker, false, gen, ANCHOR_PREFIX_MAP, resE, "M");
1343+
outputTracker, false, gen.withUniqueLocalPrefix(ANCHOR_PREFIX_MAP_E), ANCHOR_PREFIX_MAP_E, resE, "M");
13421344

13431345
sdr.setMappingsMode(MapStructureMode.OTHER);
13441346

13451347
XhtmlNode otherTable = sdr.generateTable(new RenderingStatus(), defnFile, sd, false, destDir, false, sd.getId(), true, corePath, "", sd.getKind() == StructureDefinitionKind.LOGICAL, false,
1346-
outputTracker, false, gen, ANCHOR_PREFIX_MAP, resE, "M");
1348+
outputTracker, false, gen.withUniqueLocalPrefix(ANCHOR_PREFIX_MAP_O), ANCHOR_PREFIX_MAP_O, resE, "M");
13471349

13481350
if (intTable == null && extTable == null && otherTable == null) {
13491351
return "<p>"+sdr.getContext().formatPhrase(RenderingI18nContext.STRUC_DEF_NO_MAPPINGS)+"</p>";

org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/IGReleaseRedirectionBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class IGReleaseRedirectionBuilder {
152152
public IGReleaseRedirectionBuilder(String folder, String canonical, String vpath, String websiteRootFolder) {
153153
this.folder = folder;
154154
this.canonical = canonical;
155-
this.vpath = vpath;
155+
this.vpath = vpath.replace("http://", "https://");
156156
this.websiteRootFolder = websiteRootFolder;
157157
localFolder = folder.substring(websiteRootFolder.length());
158158
countTotal = 0;

0 commit comments

Comments
 (0)