publicId (W3C DOM Core property)
var pubid = document.doctype.publicId;
example above saves a reference to the
of the doctype. So if we were on a page with an XHTML 1.0 Strict doctype,
the pubid variable would have the value
-//W3C//DTD XHTML 1.0 Strict//EN.
This property is readonly.
Opera, Firefox and
Safari 3 are able to retrieve the
publicId of a
DocumentType. In Internet Explorer in
XML the property is undefined; in Safari 1.3
and 2 in XHTML mode or XML1 it's
null; otherwise the
doctype property itself is
Only Opera in XHTML mode or
XML2 and Internet
Explorer in XML are able to retrieve the
publicId of an
Notation, because those are the only environments
in which the root objects themselves are exposed (see
Notation for details).