The read-only publicId property of the DocumentType returns a formal identifier of the document.
publicId
MDN Reference