Skip to content

Docx writer: use namespace URI instead of prefix in extractPageLayout#11703

Merged
jgm merged 1 commit into
jgm:mainfrom
bitkojine:fix/namespace-prefix-extractPageLayout
Jun 12, 2026
Merged

Docx writer: use namespace URI instead of prefix in extractPageLayout#11703
jgm merged 1 commit into
jgm:mainfrom
bitkojine:fix/namespace-prefix-extractPageLayout

Conversation

@bitkojine

Copy link
Copy Markdown
Contributor

follow up to PR with same title to fix tests failing

When a reference document uses a non-standard namespace prefix for the
WordprocessingML namespace (e.g. ns0 instead of w), sectPr elements
copied from the reference would retain the non-w prefix, producing
malformed XML in the output document.  Similarly,
extractPageLayout only matched elements with prefix "w", missing
sectPr elements with other prefixes.

Fix by matching on the namespace URI rather than the prefix, and
normalize the prefix to "w" on all elements and attributes copied from
reference-doc sectPr.
@jgm jgm merged commit f751000 into jgm:main Jun 12, 2026
7 checks passed
@jgm

jgm commented Jun 12, 2026

Copy link
Copy Markdown
Owner

sorry, I didn't notice the test failures before merging.

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.

2 participants