File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -571,13 +571,23 @@ following attributes:
571571.. attribute :: DocumentType.publicId
572572
573573 The public identifier for the external subset of the document type definition,
574- or ``None `` if the ``DOCTYPE `` declaration does not specify it.
574+ or ``None `` if the ``DOCTYPE `` declaration does not specify it. A ``PUBLIC ``
575+ ``DOCTYPE `` declaration always has both a public and a system identifier.
575576
576577
577578.. attribute :: DocumentType.systemId
578579
579580 The system identifier, a URI, for the external subset of the document type
580581 definition, or ``None `` if the ``DOCTYPE `` declaration does not specify it.
582+ A ``SYSTEM `` ``DOCTYPE `` declaration has a system identifier but no public
583+ identifier.
584+
585+ For a parsed XML document, ``publicId `` and ``systemId `` correspond to the
586+ external identifier in the ``DOCTYPE `` declaration: both are non-``None `` for
587+ a ``PUBLIC `` declaration, only ``systemId `` is non-``None `` for a ``SYSTEM ``
588+ declaration, and both are ``None `` when there is no external identifier.
589+ :meth: `DOMImplementation.createDocumentType ` does not validate the identifiers,
590+ so programmatically created objects may have other combinations.
581591
582592
583593.. attribute :: DocumentType.internalSubset
You can’t perform that action at this time.
0 commit comments