Skip to content

ext/dom: resolve in-scope prefixed QName values during document valid…#22224

Open
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh22219-84
Open

ext/dom: resolve in-scope prefixed QName values during document valid…#22224
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh22219-84

Conversation

@devnexen
Copy link
Copy Markdown
Member

@devnexen devnexen commented Jun 4, 2026

…ation.

Fix #22219

Modern DOM keeps namespace declarations off the tree (node->nsDef is NULL), so libxml's native validators cannot resolve a prefixed QName appearing in element or attribute content. Temporarily materialize them as nsDef entries around schema, RelaxNG and DTD validation, reusing the C14N relink machinery, then restore the tree.

…ation.

Fix php#22219

Modern DOM keeps namespace declarations off the tree (node->nsDef is NULL),
so libxml's native validators cannot resolve a prefixed QName appearing in
element or attribute content. Temporarily materialize them as nsDef entries
around schema, RelaxNG and DTD validation, reusing the C14N relink
machinery, then restore the tree.
@devnexen devnexen marked this pull request as ready for review June 4, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant