Skip to content

Give pub-9 and pub-10 their own titles from one map - #201

Merged
IanMayo merged 6 commits into
mainfrom
claude/affectionate-turing-i7pha5
Sep 17, 2026
Merged

IanMayo merged 6 commits into
mainfrom
claude/affectionate-turing-i7pha5

Conversation

@IanMayo

@IanMayo IanMayo commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #198.

Problem

Pubs 9 and 10 publish from one ditamap, so they share one map title, which becomes the <title> of index.html and search.html, the publication title in every page header, the logo alt, and the root entry of nav-links.js. The author renamed the map by hand before every pub-9 publish and back again for pub-10.

Why not a scenario parameter

The issue asked for the title as a scenario parameter, ideally an existing one. There is none to reuse: the WebHelp Responsive parameter set has nothing that overrides the publication title (webhelp.logo.image.alt covers the logo alt only) and DITA-OT has no such argument. The alternative was a Fi3ldMan parameter plus an XSLT override of whc:webhelp_publication_title in the template, which is a customisation to re-verify on every Oxygen upgrade.

What this does instead

The edition is chosen by the mechanism that already tells the two scenarios apart: DITA profiling on the audience axis, through the scenario's own Filters tab. Pub-10 is the edition with the content withheld from trainees and Pub-9 is the edition without it, so the two names in the title sit on the same axis as that content.

  • publications/pub-10/dita/index.ditamap: the title becomes Field Manual <ph audience="-trainee">Pub-10</ph><ph audience="trainee">Pub-9</ph> Mar 2025.
  • DITA_project_pub10.xpr: the Pub-10 scenario excludes audience=trainee; the Pub-9 scenario keeps its existing audience=-trainee exclusion. One row each. The Pub-10 scenario also stops using an unset profiling condition set, so the two differ only in that row and neither depends on whatever condition set an author has applied in the editor.
  • DITA_project_pub10.xpr also carries a project-level profiling definition for audience with -trainee and trainee, so Oxygen stops warning CND_PREF about undefined values and authors get value completion.
  • check-publish.py prints the publication title it finds in index.html, so a publish can be confirmed as the edition it claims to be before it is copied into site/. Run against the current site/pub-9/current/ it reports "Field Manual Pub-10 Mar 2025", which is the bug this fixes.
  • Docs updated: README, context-docs 01, 02, 03, 10 and 15 (new subsection in section 3 with the rationale), and the hub page note.

A first cut used a second attribute, product, with each scenario excluding the other edition's value. It worked but duplicated the trainee axis, and a profiling condition set on product could switch the title without hiding the trainee content. On one axis, a condition set per edition (Pub-10 ticks -trainee, Pub-9 ticks trainee) previews name and content together. Condition sets are created in the Oxygen UI and not committed.

Also: Author mode could not load its stylesheet

Found while checking the above in Oxygen. Both DITA_project_pub10.xpr and DITA_project_pub5.xpr attached f13ldman_author_mode.css to the DITA document type by an absolute file:/Users/… URL pointing at the retired template folder, so Author mode showed "Cannot load the associated CSS file(s)" and no Fi3ldMan styling. Each project now reaches the stylesheet in pub-5/template-2026/ through a ${pdu}-relative URL, the same way the scenarios already use ${pd}.

Not yet verified in Oxygen

This went in without an Oxygen run. On the next pub-9 and pub-10 publishes, check the header title and <title>. DITA-OT will report DOTJ031I No rule for 'audience=…' for the value each build keeps; that is information, not an error, and confirms the filter ran. The DITA Maps Manager shows both names in the title until a condition set is applied. The published site/pub-9/current/ keeps the old title until it is republished.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD

Pubs 9 and 10 publish from one ditamap, so they shared one title and the
author renamed the map by hand before each publish. No WebHelp Responsive or
DITA-OT parameter overrides the publication title, so the edition name is now
chosen by the mechanism that already separates the two scenarios: profiling.
The map title carries both names in product="pub-10" / product="pub-9" <ph>
elements, and each scenario's exclusion table drops the other edition's.

The full scenario also stops using an unset profiling condition set, so the
two scenarios now differ only in their exclusion tables. check-publish.py
prints the publication title it finds, so a publish can be confirmed as the
edition it claims to be before it is copied into site/.

Not yet publish-verified in Oxygen; the next pub-9 and pub-10 publishes
should be checked for the title in the header and in <title>.

Fixes #198

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Preview removed

This PR is closed, so its preview has been deleted from gh-pages.

github-actions Bot added a commit that referenced this pull request Sep 17, 2026
Oxygen validates profiling attributes against its Profiling/Conditional
Text preferences and warned that "product" was not defined, because the
global preferences on the authoring machine list audience only. The pub-10
project now carries its own definitions: audience with -trainee, and
product with pub-9 and pub-10, in the same serialization the legacy-regions
project already uses. Project options replace the global list, which is
why audience is defined here too. Authors also get value completion for
both attributes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
Pub-10 is the edition with the content withheld from trainees and Pub-9 is
the edition without it, so the two names in the map title belong on the
same axis as that content. "Pub-10" now carries audience="-trainee" like
the answers do, "Pub-9" carries its mirror audience="trainee", and each
scenario excludes one value: the Pub-10 scenario "trainee", the Pub-9
scenario "-trainee" as before. The product attribute is gone from the map,
the scenarios and the project's profiling definitions.

The overlap between the two axes showed up as soon as an edition preview
was wanted: a condition set on product could switch the title but not hide
the trainee content, because a set ticks values to keep and -trainee was
the only audience value. On one axis a set for each edition does both.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
Both DITA projects attached f13ldman_author_mode.css to the DITA document
type by an absolute file: URL on the original author's machine, pointing
at the retired template folder. On any other machine Author mode reported
"Cannot load the associated CSS file(s)" and showed no Fi3ldMan styling.
The stylesheet lives in the shared pub-5/template-2026; each project now
reaches it through ${pdu}, the same way the scenarios already use ${pd}.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
The gram-index buttons pull their text from the target topic's title, and
Oxygen's Author view does that without applying the profiling condition
set, so under Pub-9 they still show the vessel names. The publish filters
them correctly; record the limit so nobody reads it as a source defect.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
@IanMayo
IanMayo merged commit 810a1af into main Sep 17, 2026
3 checks passed
@IanMayo
IanMayo deleted the claude/affectionate-turing-i7pha5 branch September 17, 2026 16:37
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pubs 9 & 10 should have different document titles

2 participants