Repository navigation
Give pub-9 and pub-10 their own titles from one map - #201
Merged
Merged
Conversation
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
Contributor
Preview removedThis PR is closed, so its preview has been deleted from |
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
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
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #198.
Problem
Pubs 9 and 10 publish from one ditamap, so they share one map title, which becomes the
<title>ofindex.htmlandsearch.html, the publication title in every page header, the logoalt, and the root entry ofnav-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.altcovers the logoaltonly) and DITA-OT has no such argument. The alternative was a Fi3ldMan parameter plus an XSLT override ofwhc:webhelp_publication_titlein 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
audienceaxis, 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 becomesField Manual <ph audience="-trainee">Pub-10</ph><ph audience="trainee">Pub-9</ph> Mar 2025.DITA_project_pub10.xpr: the Pub-10 scenario excludesaudience=trainee; the Pub-9 scenario keeps its existingaudience=-traineeexclusion. 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.xpralso carries a project-level profiling definition foraudiencewith-traineeandtrainee, so Oxygen stops warningCND_PREFabout undefined values and authors get value completion.check-publish.pyprints the publication title it finds inindex.html, so a publish can be confirmed as the edition it claims to be before it is copied intosite/. Run against the currentsite/pub-9/current/it reports "Field Manual Pub-10 Mar 2025", which is the bug this fixes.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 onproductcould switch the title without hiding the trainee content. On one axis, a condition set per edition (Pub-10 ticks-trainee, Pub-9 tickstrainee) 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.xprandDITA_project_pub5.xprattachedf13ldman_author_mode.cssto the DITA document type by an absolutefile:/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 inpub-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 reportDOTJ031I 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 publishedsite/pub-9/current/keeps the old title until it is republished.🤖 Generated with Claude Code
https://claude.ai/code/session_01PYsbdyzpWXUJAMGoXaiauD