FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-156388: Docs: clarify DocumentType identifiers by Neiland85 · Pull Request #157646 · python/cpython · GitHub

Repository navigation

gh-156388: Docs: clarify DocumentType identifiers - #157646

Open
Neiland85 wants to merge 2 commits into
python:mainfrom
Neiland85:docs-xml-dom-156388
Open

Neiland85 wants to merge 2 commits into
python:mainfrom
Neiland85:docs-xml-dom-156388

Conversation

Neiland85 commented Sep 16, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Refs #156388

Clarify the documented relationship between DocumentType.publicId and systemId for parsed XML documents, including PUBLIC and SYSTEM declarations, and note that createDocumentType() does not validate identifier combinations for programmatically created objects.

This covers only the publicId/systemId mapping. Other remaining items in #156388 are out of scope.

bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting review labels Sep 16, 2026
github-project-automation Bot moved this to Todo in Docs PRs Sep 16, 2026
Neiland85 changed the title Docs: clarify DocumentType identifiers gh-156388: Docs: clarify DocumentType identifiers Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for confirming this point in the issue discussion. I’ve submitted #157646 to document that mapping explicitly.

For parsed XML documents, the combinations correspond as follows:

  • publicId and systemId non-None → PUBLIC
  • publicId is None, systemId non-None → SYSTEM
  • both are None → no external identifier
  • publicId non-None, systemId None → not produced by parsing a valid XML DOCTYPE

I also noted in the PR that createDocumentType() does not validate the identifiers, so programmatically created DocumentType objects may have other combinations.

I’ll leave the PR open for maintainer review and follow any requested changes.

read-the-docs-community Bot commented Sep 19, 2026 •
edited
Loading

Copy link
Copy Markdown

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL