diff --git a/README.md b/README.md index 4e68151..fccbedf 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ from it. | | | | --- | --- | | `pub-5/` | The main publication. `dita/` source, `template-2026/` (current, Oxygen 28.1, and now **shared with pub-10**), `template-2024/` (what the oxygen-26 publish was built with), `check-publish.py`, `audit-classes.py`, and pub-5's ditaval / author layout / icon-audit config | -| `pub-10/` | Spectral analysis ("Grams"). `dita/` source only — it has no template of its own. Published twice from `pub-5/template-2026/`: the full edition to `site/pub-10/current/`, and the redacted one to `site/pub-9/current/` via a single `audience` filter | +| `pub-10/` | Spectral analysis ("Grams"). `dita/` source only — it has no template of its own. Published twice from `pub-5/template-2026/`: the full edition to `site/pub-10/current/`, and the redacted one to `site/pub-9/current/` via an `audience` filter. The map title carries both edition names on the same `audience` axis, so it publishes as "Pub-10" or "Pub-9" without editing | | `legacy-regions/` | Archived DITA specialization with a custom DTD. Kept for reference, not developed | Oxygen writes each publish to a gitignored `out/` inside the publication. diff --git a/context-docs/01-repository-architecture.md b/context-docs/01-repository-architecture.md index ba4eef7..f4ee277 100644 --- a/context-docs/01-repository-architecture.md +++ b/context-docs/01-repository-architecture.md @@ -169,7 +169,9 @@ site/mockups/p9-10/ Pub-9 has no DITA source of its own and needs none: it is `publications/pub-10/dita/` published through a scenario filter that excludes `audience="-trainee"`, which -removes the vessel identifications and the worked-analysis links. Published to +removes the vessel identifications and the worked-analysis links, and the +"Pub-10" in the map title with them; the Pub-10 scenario excludes +`audience="trainee"`, which is only the "Pub-9" in the title. Published to `site/pub-9/current/`; the mockups here are the original hand-built previews. See `15-shared-publishing-template.md`. diff --git a/context-docs/02-publications-guide.md b/context-docs/02-publications-guide.md index 3581f2d..9bab271 100644 --- a/context-docs/02-publications-guide.md +++ b/context-docs/02-publications-guide.md @@ -134,7 +134,7 @@ The separator lives **inside** the ``, with the name. That is the one place ## Publication 9 (Pub-9) - Companion to Pub-10 ### Purpose -Pub-9 is the redacted edition of Pub-10, not a separate publication. It is built from the same `publications/pub-10/dita/` source and the same publishing template, through one transformation-scenario filter that excludes `audience="-trainee"` — stripping the vessel identifications from the gram titles and the links to the worked analysis. Published to `site/pub-9/current/` (10 pages, against Pub-10's 12). See `15-shared-publishing-template.md`. +Pub-9 is the redacted edition of Pub-10, not a separate publication. It is built from the same `publications/pub-10/dita/` source and the same publishing template, through one transformation-scenario filter that excludes `audience="-trainee"` — stripping the vessel identifications from the gram titles and the links to the worked analysis. The map title carries both edition names on the same axis, `audience="-trainee"` for "Pub-10" and `audience="trainee"` for "Pub-9", and the Pub-10 scenario excludes `audience="trainee"`, which is how one map publishes under either name. Published to `site/pub-9/current/` (10 pages, against Pub-10's 12). See `15-shared-publishing-template.md`. ### Current State - **Mockup location**: `site/mockups/p9-10/p9/` diff --git a/context-docs/03-dita-authoring-content-model.md b/context-docs/03-dita-authoring-content-model.md index 3bc3d0d..09d7b8f 100644 --- a/context-docs/03-dita-authoring-content-model.md +++ b/context-docs/03-dita-authoring-content-model.md @@ -27,13 +27,19 @@ The map references top-level topics that serve as tile entry points on the landi ### Pub-10 Master Map (`publications/pub-10/dita/index.ditamap`) ```xml - + + Field Manual <ph audience="-trainee">Pub-10</ph><ph audience="trainee">Pub-9</ph> Mar 2025 ``` -A much simpler map with just two top-level references. +A much simpler map with just two top-level references. The two `` elements +in the title are how one map publishes as Pub-10 or Pub-9. They sit on the same +`audience` axis as the trainee content: `-trainee` is withheld from trainees +(Pub-10 only), `trainee` is for trainees only (Pub-9), and each scenario excludes +one value. The author never edits the title to switch editions (see +`15-shared-publishing-template.md`, section 3). ## Subject Scheme (Country Filtering) diff --git a/context-docs/10-content-authoring-publishing-workflows.md b/context-docs/10-content-authoring-publishing-workflows.md index 7a801dc..89607de 100644 --- a/context-docs/10-content-authoring-publishing-workflows.md +++ b/context-docs/10-content-authoring-publishing-workflows.md @@ -46,7 +46,7 @@ Several OxygenXML Author mode enhancements support content maintainers: | Whitespace visibility | Toggle to see whitespace in Author mode (legacy content used whitespace for layout) | #110 | | Surround with PH | Inline text shading/coloring via `` element wrapping | #111 | | xref wrapper removal | Guidance for removing unnecessary xref elements around images | #112 | -| Author-mode CSS | Custom styling for interactive elements (e.g., enterBtn) in Author view | #155, #156 | +| Author-mode CSS | `pub-5/template-2026/f13ldman_author_mode.css`, styling interactive elements (e.g., enterBtn) in Author view. Each project's `.xpr` attaches it to the DITA document type by a `${pdu}`-relative URL; an absolute path there breaks on every other machine ("Cannot load the associated CSS file(s)") | #155, #156 | | DTD management | Managed via OxygenXML project file to avoid relative DTD path references | — | ### Authoring Guidance diff --git a/context-docs/15-shared-publishing-template.md b/context-docs/15-shared-publishing-template.md index aca2f3e..5f0a9a1 100644 --- a/context-docs/15-shared-publishing-template.md +++ b/context-docs/15-shared-publishing-template.md @@ -88,6 +88,94 @@ That filter lives on the transformation scenario in `DITA_project_pub10.xpr`, published and deployed: `site/pub-10/current/` (full, 12 pages) and `site/pub-9/current/` (redacted, 10 pages). +### The two editions carry their own titles (issue #198) + +The map title is the publication title: it becomes the `` of +`index.html` and `search.html`, the `wh_publication_title` in every page +header, the logo's `alt`, and the root entry of `nav-links.js`. One map, one +title — so until this change the author renamed the map by hand before every +pub-9 publish, and back again for pub-10. + +The ask was a title parameter on the scenario. There is none to reuse: the +WebHelp Responsive parameter set has nothing that overrides the publication +title (`webhelp.logo.image.alt` covers the logo's `alt` only), and DITA-OT has +no such argument either. Rather than add a Fi3ldMan parameter and an XSLT +override of `whc:webhelp_publication_title` to the template — a customisation +to re-verify on every Oxygen upgrade — the edition name is chosen by the +mechanism that already tells the two scenarios apart: profiling. + +```xml +<title>Field Manual <ph audience="-trainee">Pub-10</ph><ph audience="trainee">Pub-9</ph> Mar 2025 +``` + +The two names sit on the **same axis as the content**. `audience="-trainee"` +already marks what is withheld from trainees — the vessel identities and the +worked analysis — and that is exactly the content Pub-10 has and Pub-9 lacks, +so the "Pub-10" in the title carries the same marker. `audience="trainee"` is +its mirror, content for trainees only, and today the "Pub-9" in the title is +the only thing that carries it. Each scenario's **Filters** tab ("Exclude from +output all elements with any of the following attributes") then needs one row: + +| Scenario | Excludes | +| --- | --- | +| Pub-10 WebHelp Responsive (full) | `audience` = `trainee` | +| Pub-9 WebHelp Responsive (redacted) | `audience` = `-trainee` (unchanged) | + +Filtering runs before the WebHelp stage reads the map, so every place the title +lands gets the right name. + +A first cut used a second attribute, `product="pub-9"` / `product="pub-10"`, +with each scenario excluding the other's value. It worked, and it was wrong: +the edition and the trainee marker are one distinction, not two, and the +overlap showed up as soon as an author wanted to preview an edition — a +profiling condition set on `product` could switch the title but could not hide +the trainee content, because a set works by ticking values to keep and +`-trainee` was the only `audience` value there was. One axis has no such gap. + +Three things to know: + +- Oxygen validates profiling attributes against its Profiling/Conditional Text + preferences, and warns `[CND_PREF] Profiling attribute "…" is not defined` + for any attribute or value that page does not list. `DITA_project_pub10.xpr` + carries its own project-level definition (`profiling.conditions.list`, the + same serialization the legacy-regions project uses): `audience` with the + values `-trainee` and `trainee`, each with a description. Project options + replace the global list for that project, and authors get value completion. +- In the DITA Maps Manager and Author view the title shows **both** names + (`Field Manual Pub-10Pub-9 Mar 2025`) unless a profiling condition set is + applied, because the editor does not run the scenario's filter. That is + cosmetic; the published output is what the filter decides. Two condition + sets on the same preferences page give a true per-edition preview — Pub-10 + ticks `-trainee`, Pub-9 ticks `trainee` — each hiding the other edition's + name **and** its content, applied from the Profiling toolbar. None is + committed: the project file has no populated condition set to copy the + serialization from, so they are created in the UI. + One thing the preview cannot show: the gram-index buttons are empty + ``s whose text Author mode pulls from the target topic's title as + plain text, ignoring the applied set, so under Pub-9 they still read + "Gram 2 : Spirit of Whale Island" while the topic's own heading hides the + name. The publish is right — DITA-OT filters every topic before it pulls + link text, and `site/pub-9/current/gram-index.html` reads "Gram 2" — + and the only way to make the editor agree would be literal text in every + xref, which duplicates the titles and defeats the filter. +- The full scenario previously had "Use profiling condition set" ticked with + no set chosen. It is now unticked, like the redacted scenario, so the two + differ only in the exclusion table and neither depends on whatever condition + set an author happens to have applied in the editor — which matters now that + applying one is the recommended way to preview an edition. +- DITA-OT reports `DOTJ031I No rule for 'audience=…' was found in the DITAVAL + file` for each profiled value a build keeps: `-trainee` on the Pub-10 build, + `trainee` on the Pub-9 build. The exclusion table writes exclude rules only, + so a kept value has none. It is information, not an error, and it confirms + the filter ran; silencing it would take a real `.ditaval` with explicit + include rules per scenario, which was considered and not worth it. + +`check-publish.py` now prints the publication title it finds in `index.html`, +so the first line of the check confirms which edition a publish is before it +is copied into `site/`. Not yet publish-verified: the change went in without +an Oxygen run, so the next pub-9 and pub-10 publishes should be checked for +the title in the page header and in ``. + The original hand-built mockups under `site/mockups/p9-10/` corroborated this before either edition was published: the p9 and p10 mockups use an **identical set of 165 HTML classes**, and the p9 mockup already lacked the ship names and @@ -256,7 +344,9 @@ So the fork's two headline defects — the machine-absolute logo path and the 25.1-era asset bundles that would 404 under Oxygen 28 — are both fixed by publishing from this template, with no pub-10-specific configuration. -The `audience = -trainee` filter behaves exactly as intended. The pub-9 build +The `audience = -trainee` filter behaves exactly as intended (the profiled +map title and the Pub-10 scenario's `trainee` exclusion, section 3, came later +and are not covered by this verification). The pub-9 build is the pub-10 build minus `Grams/gram1 analysis.html` and `Grams/gram2 analysis.html`, with zero occurrences of the ship identities ("Pride of Le Havre", "Spirit of Whale Island") and zero ANALYSIS links. The diff --git a/publications/pub-10/dita/DITA_project_pub10.xpr b/publications/pub-10/dita/DITA_project_pub10.xpr index 454b6e2..e5431bf 100644 --- a/publications/pub-10/dita/DITA_project_pub10.xpr +++ b/publications/pub-10/dita/DITA_project_pub10.xpr @@ -7176,7 +7176,7 @@ ${caret}</String> <cssFile-array> <cssFile> <field name="href"> - <String>file:/Users/ian/git/Fi3ldMan/template/f13ldman_author_mode.css</String> + <String>${pdu}/../../pub-5/template-2026/f13ldman_author_mode.css</String> </field> <field name="title"> <String></String> @@ -16541,6 +16541,68 @@ self::image[empty(parent::imagemap)] or oxy:current-selected-element()[self::ima <String>key.publishing.option.pane</String> <Boolean>true</Boolean> </entry> + <entry> + <String>profiling.conditions</String> + <Boolean>true</Boolean> + </entry> + <entry> + <String>profiling.conditions.list</String> + <profileConditionInfo-array> + <profileConditionInfo> + <field name="attributeName"> + <String>audience</String> + </field> + <field name="allowsMultipleValues"> + <Boolean>true</Boolean> + </field> + <field name="allowedValues"> + <profileConditionValue-array> + <profileConditionValue> + <field name="value"> + <String>-trainee</String> + </field> + <field name="description"> + <String>Withheld from trainees: Pub-10 (instructor) edition only, excluded by the Pub-9 scenario</String> + </field> + <field name="level"> + <Integer>0</Integer> + </field> + <field name="renderName"> + <null/> + </field> + </profileConditionValue> + <profileConditionValue> + <field name="value"> + <String>trainee</String> + </field> + <field name="description"> + <String>For trainees only: Pub-9 (trainee) edition only, excluded by the Pub-10 scenario</String> + </field> + <field name="level"> + <Integer>0</Integer> + </field> + <field name="renderName"> + <null/> + </field> + </profileConditionValue> + </profileConditionValue-array> + </field> + <field name="documentTypePattern"> + <String>*DITA*</String> + </field> + <field name="valuesSeparator"> + <String> </String> + </field> + <field name="attributeRenderName"> + <null/> + </field> + </profileConditionInfo> + </profileConditionInfo-array> + </entry> + <entry> + <String>profiling.pane</String> + <Boolean>true</Boolean> + </entry> <entry> <String>publishing.templates.gallery.directories</String> <String-array> @@ -16612,7 +16674,7 @@ self::image[empty(parent::imagemap)] or oxy:current-selected-element()[self::ima <Boolean>false</Boolean> </field> <field name="useAppliedConditionSet"> - <Boolean>true</Boolean> + <Boolean>false</Boolean> </field> <field name="appliedConditionSet"> <null/> @@ -16621,7 +16683,16 @@ self::image[empty(parent::imagemap)] or oxy:current-selected-element()[self::ima <null/> </field> <field name="simpleFiltersList"> - <list/> + <list> + <ditavalSimpleFilter> + <field name="attrName"> + <String>audience</String> + </field> + <field name="attrValue"> + <String>trainee</String> + </field> + </ditavalSimpleFilter> + </list> </field> </ditavalFilters> </field> diff --git a/publications/pub-10/dita/index.ditamap b/publications/pub-10/dita/index.ditamap index c9d8d04..7c78c09 100644 --- a/publications/pub-10/dita/index.ditamap +++ b/publications/pub-10/dita/index.ditamap @@ -1,7 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> <map> - <title>Field Manual Pub-10 Mar 2025 + + Field Manual <ph audience="-trainee">Pub-10</ph><ph audience="trainee">Pub-9</ph> Mar 2025 diff --git a/publications/pub-5/check-publish.py b/publications/pub-5/check-publish.py index f6269bf..242002c 100644 --- a/publications/pub-5/check-publish.py +++ b/publications/pub-5/check-publish.py @@ -39,7 +39,21 @@ app = os.path.join(root, "oxygen-webhelp", "app") have = lambda n: "yes" if os.path.exists(os.path.join(app, n)) else "NO" +# The publication title is the map title after filtering. Pub-9 and pub-10 +# publish from one map whose title carries both names behind audience="-trainee" +# (Pub-10) / audience="trainee" (Pub-9) elements, and each scenario +# excludes the other's - so this line is the quick check that a publish is the +# edition it claims to be. +def pub_title(): + try: + t = open(os.path.join(root, "index.html"), encoding="utf-8", errors="ignore").read() + except OSError: + return "(no index.html)" + m = re.search(r"(.*?)", t, re.S) + return html.unescape(m.group(1)).strip() if m else "(no )" + print(f"root : {root}") +print(f"publication : {pub_title()}") print(f"html pages : {len(pages)} files: {sum(len(f) for _,_,f in os.walk(root))}") print(f"oxygen buildIds : {sorted(build_ids)}") print("era markers : commons.css=%s commons.js=%s | bootstrap.css=%s main.css=%s jquery.js=%s" diff --git a/publications/pub-5/dita/DITA_project_pub5.xpr b/publications/pub-5/dita/DITA_project_pub5.xpr index 1f19409..ff03e16 100644 --- a/publications/pub-5/dita/DITA_project_pub5.xpr +++ b/publications/pub-5/dita/DITA_project_pub5.xpr @@ -7222,7 +7222,7 @@ The current selection is kept unchanged if this parameter is not set.</li>< <cssFile-array> <cssFile> <field name="href"> - <String>file:/Users/ian/git/Fi3ldMan/template/f13ldman_author_mode.css</String> + <String>${pdu}/../template-2026/f13ldman_author_mode.css</String> </field> <field name="title"> <String></String> diff --git a/site/index.html b/site/index.html index 7c03766..074f4ed 100644 --- a/site/index.html +++ b/site/index.html @@ -108,8 +108,9 @@ <h2>Pub-9 and Pub-10</h2> <li class="current"> <a href="pub-9/current/index.html">Pub-9 — redacted edition</a><span class="tag">current</span> <span class="meta">Published 2026-09-11, Oxygen 28.1. The same ten pages minus the analysis - topics, produced by one filter (<code>audience</code> excluding <code>-trainee</code>) rather - than a separate source.</span> + topics, produced by a scenario filter (<code>audience</code> excluding <code>-trainee</code>) + rather than a separate source. The map title carries both edition names on the same + <code>audience</code> axis, which is how one map publishes as Pub-10 or Pub-9.</span> </li> </ul>