Skip to content

document-schema.js: section page-furniture slots; wpd-codec lifts its furniture and note bodies - #1181

Merged
Mearman merged 2 commits into
mainfrom
fix/1128-schema-furniture
Sep 10, 2026
Merged

document-schema.js: section page-furniture slots; wpd-codec lifts its furniture and note bodies#1181
Mearman merged 2 commits into
mainfrom
fix/1128-schema-furniture

Conversation

@Mearman

@Mearman Mearman commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closes #1128 with two homes for the two constructs, each following an existing precedent rather than inventing a shape:

  • page furniture: new optional headers/footers fields on the flat ContentSection, each a ContentPageFurniture { default?, even?, first? } of per-slot block flows -- WordprocessingML's own headerReference/@w:type vocabulary, which every furniture-carrying format narrows onto (docx sectPr, ODF's master-page slots, WPD's D6 occurrence bits). Section-scoped like breakType, and both boundary directions are future-field-safe by design, so the tree transform needed zero changes -- a new bijection corpus entry proves the three laws hold for the new fields
  • notes: no schema change -- the footnote/endnote anchor kinds and the definitions-table note tenant already exist (markdown-codec's vocabulary); wpd-codec's tree reader gains the definitions splice, and the flat reader emits the anchor pair with honest per-still-borne-body diagnostics

wpd-codec's D6/D7 reading is grounded in the WP SDK's own pages (cited in code): odd-only and both-parities occurrence bits map to default, even-only to even; watermarks report rather than lift; A/B collisions take first-wins. Six new tests; doc-codec's and rtf-codec's equivalent constructs can migrate onto the new fields in their own PRs (public-API shape changes).

Closes #1128.

@Mearman
Mearman marked this pull request as ready for review September 10, 2026 04:10
@Mearman

Mearman commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@Mearman
Mearman enabled auto-merge (rebase) September 10, 2026 04:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-09-10T04:26:37.433925Z 13d9a1d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ers and footers

ContentSection gains optional headers/footers, each a per-slot block
flow in WordprocessingML's own headerReference/@w:type vocabulary
(default/even/first) -- the three-slot shape every page-furniture-
carrying format narrows onto: docx's sectPr references, an ODF master
page's header/header-left/header-first trio, WordPerfect's D6
occurrence bits (odd-only and both-parities are default, even-only is
even). Section-scoped like breakType, and carried by the existing
descriptor rest-spread through the tree boundary in both directions --
the bijection corpus entry proves the laws hold with no transform
change. Slot-less decorations (a watermark owns no parity) stay
outside it.

Part of #1128.
The D6 and D7 groups' text is lifted rather than dropped. A header or
footer function's occurrence bits narrow onto the new furniture slots
(odd-only and both-parities -> default, even-only -> even), its body
folded from the General WP Text packet its first prefix ID names; a
watermark and an A/B slot collision stay reported, since the one-flow-
per-slot vocabulary carries neither. A note pair anchors its reference
site in the flat form (a footnote/endnote anchor construct whose
definition key names its position in document order) and readWpd
carries each body as a definitions-table entry -- the tenant
vocabulary markdown-codec's footnote definitions established -- while
the flat readWpdContent reports each still-borne body, whose real home
is exactly that tree-only table.

Closes #1128.
@Mearman
Mearman force-pushed the fix/1128-schema-furniture branch from 13d9a1d to 9769d9e Compare September 10, 2026 04:17
@Mearman
Mearman merged commit 42d133c into main Sep 10, 2026
22 checks passed
@Mearman
Mearman deleted the fix/1128-schema-furniture branch September 10, 2026 04:20
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wpd-codec: headers, footers, footnotes, and endnotes need a note/page-furniture position in the flat schema

1 participant