Skip to content

Fix/546 xml optional dtd validation#548

Open
addielaruee wants to merge 2 commits into
Boeing:mainfrom
addielaruee:fix/546-xml-optional-dtd-validation
Open

Fix/546 xml optional dtd validation#548
addielaruee wants to merge 2 commits into
Boeing:mainfrom
addielaruee:fix/546-xml-optional-dtd-validation

Conversation

@addielaruee

@addielaruee addielaruee commented Jul 17, 2026

Copy link
Copy Markdown

Fixes #546.

helium v0.5.0+ requires a DOCTYPE to be present whenever ValidateDTD(true)
is set, so well-formed XML without a DTD now fails to parse. Pre-scan the
input for <!DOCTYPE and only enable DTD validation when one exists,
restoring the tool's intended behavior:
  - well-formed XML, no DTD -> syntax-only pass
  - XML with a DTD -> validated against it

Also fixes the dtd_and_xsd.xml test fixture: it combines a DTD with
xsi:noNamespaceSchemaLocation but never declared those attributes via
ATTLIST, which v0.5.1's stricter conformance now correctly rejects as
undeclared attributes.

Closes Boeing#546
@addielaruee
addielaruee requested a review from a team as a code owner July 17, 2026 04:50
@kehoecj kehoecj added OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(validator): upgrade helium to v0.5.1 — requires XML validator adaptation

2 participants