The FPI is undoubtedly the least well-understood part of the
document type declaration (DOCTYPE), an integral component of valid
HTML,
XML and
Standard Generalized Markup Language (SGML) documents. The Formal Public Identifier's effect upon its host document is unusual in that it can depend not only upon its own syntactical correctness and the behaviour of the program
parsing it, but also upon the ISO-registration status of the organisation responsible for
schema referenced by the FPI.
Public identifiers and system identifiers in SGML SGML uses two forms of identifier for resources:
system identifiers are unique and meaningful only within a particular system, while
public identifiers are unique and meaningful within a wider scope. The use of the keyword in an
SGML entity definition without a following system identifier is permitted, if the entity manager is able to resolve the entity from its name alone. As an exception to this, however, notation declarations may use a public identifier without a system identifier. In contrast to the requirement that the system identifier be a URI (classified for purposes of
HyTime as a type of
formal system identifier or FSI, the SGML feature is disabled in XML, since the format of public identifiers is not specified by XML (i.e. they are not explicitly required to be FPIs, although they may be). The only details which the XML specification stipulates about the public identifier are that it may be given alongside the system identifier, and may be used by an XML processor along with other information to determine an alternative URI (failing which, it is required to use the URI given in the system identifier). although they are not required to be resolvable URLs and may, for example, be
URNs. includes support for
XML namespaces (which DTDs can only interpret as fixed portions of the element and attribute names in question), allows
regular expression constraints to be placed on the format of text data such as telephone numbers, and is better able to express complex content-model structures. Similarly, the
DocBook format, which initially used a document type declaration identifying a DTD by an FPI, switched its primary schema definition from DTD to
RELAX NG in version 5.0, and ceased to use document type declarations at that time, and
Scalable Vector Graphics (SVG) did the same in version 1.2.
Lookup and resolution of FPIs If a system identifier (such as a path or URL) is not given for a resource identified by a public identifier such as an FPI, an SGML system's
entity manager will generate one with reference to the public identifier. Although the SGML specification itself does not specify how the entity manager should do this, Although XML mandates the use of system identifiers in more places than does SGML itself, catalogs may still be needed for remapping and overriding the given system identifier: a system identifier which is a local path may not be useful on other machines, while one which is a network URL will not be useful when a network connection is not available, for example. Accordingly, an alternative
XML-based catalog format exists for use by XML software, supporting rules for replacing or rewriting URIs, as well as for mapping FPIs to URIs. PUBLIC "-//W3C//DTD SVG 1.1//EN" svg11.dtd DTDDECL "-//W3C//DTD SVG 1.1//EN" /usr/share/xml/declaration/xml.dcl The schema for the alternative XML catalog format is itself defined in a DTD, itself identified by an FPI (). The above DTD FPI mapping is represented as follows:
Use in HTML HTML 2 through 4 HTML versions 2 through 4 (including the XML-based
XHTML 1.x) were defined as profiles of SGML, and specified with an SGML declaration and a
document type definition (DTD). The particular DTD version in use was specified in a document type declaration using an FPI, sometimes (especially in the later versions, and required in XML as mentioned above) in combination with a URL for the DTD file as a system identifier. containing an FPI: The FPI in the document type declaration above reads -//W3C//DTD HTML 4.01//EN, "
Quirks mode" retained legacy behaviour from earlier browser versions to avoid breaking existing pages—for example,
Internet Explorer versions 6 and 7 would render the page using the Internet Explorer 5.5 box model. "Standards mode" would conform more closely to the relevant specifications. What was at the time called "almost standards mode" and initially implemented by
Firefox and
Safari would use traditional behaviour when determining the height of table cells containing images, but otherwise behave like standards mode; this corresponded to the behaviour of the "standards mode" of Internet Explorer at the time it was introduced. This was ultimately done away with altogether, and the final HTML 5 DOCTYPE does not use an FPI. The preferred form is simply (with neither a public nor system identifier), although a system identifier of (using the
URI scheme) is condoned. The XML representation (XHTML), by contrast, is permitted but not required to bear any DOCTYPE, but no validating DTD is provided for the HTML 5 schema. However, various FPIs for XHTML 1.0, XHTML 1.1 and MathML DTDs are defined as instead pointing to a
URI (so as to avoid requiring network access) containing the definitions for the
character entities. The sole function of an FPI in HTML 5's HTML (as opposed to XHTML) representation is triggering legacy modes. The
WHATWG HTML standard specifies a list of which FPIs should trigger quirks mode. These include the FPIs for various vendor-customised HTML DTDs. They also include the FPIs for the DTDs of the various HTML 2.0 "levels", as well as those for HTML 3.0, 3.2 and the Transitional and Frameset versions of HTML 4.0 and 4.01—except that when the HTML 4.01 (but not HTML 4.0) Transitional and Frameset FPIs are accompanied by a system identifier, they instead trigger almost‑standards mode (renamed to "limited‑quirks mode"). The XHTML 1.0 Transitional and Frameset FPIs trigger limited‑quirks mode unconditionally. Mostly, these are specified as prefixes including the owner, class and description (but matching any language part). == Relationship to URIs ==