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

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 11 additions & 1 deletion Doc/library/xml.dom.rst
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
Original file line number Diff line number Diff line change
Expand Up @@ -571,13 +571,23 @@ following attributes:
.. attribute:: DocumentType.publicId

The public identifier for the external subset of the document type definition,
or ``None`` if the ``DOCTYPE`` declaration does not specify it.
or ``None`` if the ``DOCTYPE`` declaration does not specify it. A ``PUBLIC``
``DOCTYPE`` declaration always has both a public and a system identifier.


.. attribute:: DocumentType.systemId

The system identifier, a URI, for the external subset of the document type
definition, or ``None`` if the ``DOCTYPE`` declaration does not specify it.
A ``SYSTEM`` ``DOCTYPE`` declaration has a system identifier but no public
identifier.

For a parsed XML document, ``publicId`` and ``systemId`` correspond to the
external identifier in the ``DOCTYPE`` declaration: both are non-``None`` for
a ``PUBLIC`` declaration, only ``systemId`` is non-``None`` for a ``SYSTEM``
declaration, and both are ``None`` when there is no external identifier.
:meth:`DOMImplementation.createDocumentType` does not validate the identifiers,
so programmatically created objects may have other combinations.


.. attribute:: DocumentType.internalSubset
Expand Down
Loading

Back | FazBrowse Home | New Git URL