Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 2, 2025

Removes the parsing error when standalone="true" is encountered. There is no reason to prevent the caller from scanning a standalone document. The XML 1.0 spec describes standalone="true" as merely a clue:

In a standalone document declaration, the value "yes" indicates that there are no external markup declarations which affect the information passed from the XML processor to the application. The value "no" indicates that there are or may be such external markup declarations. Note that the standalone document declaration only denotes the presence of external declarations; the presence, in a document, of references to external entities, when those entities are internally declared, does not change its standalone status.

If there are no external markup declarations, the standalone document declaration has no meaning. If there are external markup declarations but there is no standalone document declaration, the value "no" is assumed.

Since:

  • XMLProcessor is a non‑validating XML parser
  • XMLProcessor does not apply custom DTDs by design
  • Many documents are implicitly standalone

We can just skip past those declarations without consequences.

Testing instructions

CI. This PR enables additional W3C tests where standalone="true" is explicitly declared.

@adamziel adamziel added the enhancement New feature or request label Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants