A Formal Public Identifier (FPI) is a short piece of text with a particular structure that may be used to uniquely identify a product, specification or document. FPIs were introduced as part of Standard Generalized Markup Language (SGML), and serve particular purposes in formats historically derived from SGML (HTML and XML). Some of their most common uses are as part of document type declarations (DOCTYPEs) and document type definitions (DTDs) in SGML, XML and historically HTML, but they are also used in the vCard and iCalendar file formats to identify the software product which generated the file.

More recently, Uniform Resource Identifiers (URIs) and universally unique identifiers (UUIDs) are usually used to uniquely identify objects. FPIs have become a legacy system.

Syntax An FPI consists of an owner identifier, followed by a double slash (), followed by a text identifier. For example, the identifier "-//W3C//DTD HTML 4.01//EN" can be broken down into two parts: the owner identifier which indicates the issuer of the FPI, and the text identifier which indicates the particular document or object the FPI identifies. In the example, the owner identifier is "-//W3C" and the text identifier is "DTD HTML 4.01//EN".

The text identifier itself consists of multiple constituent parts. Sequences of whitespace are treated as equivalent to a single space.

Owner identifier

There are three types of owner identifier, distinguished by their first three characters, which are for an ISO owner identifier, for an unregistered owner identifier or for a registered owner identifier.

ISO owner identifier

An ISO owner identifier is either an ISO publication number such as , or an ISO-IR registration number given as e.g. for ISO-IR-111. The latter type is only permitted for FPIs (see below). In either case, it is distinguished by beginning with the characters , and does not require any prefix before those characters.

The year was formerly separated from the standard number by a hyphen (, e.g. ), which use is now deprecated. The hyphen is now, instead, used to separate the part number from the standard number (replacing earlier use of a single slash () for that purpose); "" the year follows any part number if present, and is separated by a colon ().

Unregistered owner identifier

An unregistered owner identifier begins with . Owners which use unregistered identifiers include the W3C (), the Internet Engineering Task Force (), the United States Department of Defense (), the European Parliament () and others. Since it is not registered, it is not guaranteed to be unique (another owner may choose the same owner identifier), which weakens the uniqueness guarantee of the FPI as a whole, although it is still guaranteed to be distinct both from all other FPIs with the same owner, and also from all FPIs with registered owners.

Registered owner identifier

A registered owner identifier begins with the characters . It refers to a registered identifier as stipulated by ISO 9070. The portion which is actually registered is the registered owner prefix, which follows the and may optionally be followed by one or more owner-assigned portions which might identify, for example, departments within an organisation. If owner name components additional to the registered prefix are used, they are separated from the prefix by a pair.

A registered owner prefix conforming to ISO 9070 may be one of the following: An ISO standard authority prefix, an identifier of an ISO or ISO/IEC standard. Although these FPIs do not need to have a leading as mentioned above, such a prefix is occasionally seen used in references to ISO standards in FPIs, especially those which are also IEC standards. An ISO registration authority prefix, which may be: A full registration authority prefix (an identifier of an ISO standard without the year, followed by case-insensitively) An ISO 2375 prefix (the string and a space followed by an ISO-IR number although, as mentioned above, the can be omitted in this case). An ISBN prefix (the string , a space, and an ISBN), acceptance of which was added in a later amendment to ISO 9070 More recently, registered domain names (following and a space) are also permitted. For example, the owner of example.net could issue FPIs using the owner identifier "+//IDN example.net". An ISO member body prefix, i.e. an identifier for a standards organisation which is a member of the ISO. An ISO identified organization authority prefix: the string followed, without an intervening space, by an ISO 6523 organisation code.

Text identifier

Text identifiers can be broken down into the class, description and language. In the example -//W3C//DTD HTML 4.01//EN, the class is "DTD", indicating that the FPI represents a document type definition; the description is "HTML 4.01"; and the language is "EN" which suggests that the document type definition is written in English (though documents conforming to the DTD do not need to be in English). The class is separated from the description using a space character; the description is separated from the language using a double slash. The text identifier may optionally contain a version indicator after the language, also separated by a double slash.

Class

The text identifier immediately follows the pair after the owner identifier, and must begin with one of the following block-capital words followed by a space, specifying the public text class:

, and refer to SGML documents or fragments of SGML documents. Those of the class are intended to be referenced using a text entity (without an entity-type keyword, i.e. inserted directly into the document), while those of the class are intended to be referenced using a subdocument entity (with the keyword in the entity declaration, i.e. interpreted with their own individual schemas, namespaces, and so forth). Those of the class are not intended to be referenced as an entity from an enclosing document.

and refer to portions of an SGML declaration. (for an entire SGML declaration) was added to this list by a later extension added to the standard as an annex, which also specifies certain extensions required by XML. refers to an SGML link process definition (defining a transformation from one SGML format to another). , and refer to portions of a document type definition (DTD) consisting of specific types of markup declaration. refers to an entire DTD.

The remaining three refer to concepts from outside of SGML: refers to a coded character set, to a format such as a file format (either for references to entities from external files, or for interpreting a textual format contained within an element), and to an asset in a non-SGML format.

Availability marker and description

The space after the text class name is followed by the sequence if the FPI refers to unavailable public text—i.e. a document, file or specification which is not available for access or purchase by the general public. The public text description follows this marker; for an available public text, the description immediately follows the space after the text class name. For an ISO publication, the description is taken from the final element of the title of the publication, not counting any part number; otherwise, it can be any suitably unique string of permitted characters. The description is terminated by another pair.

ISO 2022 designating sequence

The part of the FPI following the description depends on the text class. For FPIs, it is a public text designating sequence, giving a textual representation of an ISO/IEC 2022 designation escape sequence in column/line notation (e.g. ); registered designation escapes are expected to match the ISO owner identifier given, while private-use designation escapes are namespaced by the FPI owner identifier. As an example of this type of FPI, the FPI is used in HTML 4's SGML declaration to identify Unicode.

Language

For all other FPIs (i.e. those where the class is not ), the part following the description is a public text language which is a sequence of uppercase letters, strongly encouraged (but not mandated) to be an ISO 639-1 code. Stopping short of mandating the use of an ISO 639-1 code avoids requiring validating software to check whether the language is an ISO 639-1 code, and also allows for extensibility: for example, a small number of FPIs used in practice use ISO 639-3 codes (such as for Low German) or IETF language tags with hyphens removed (such as for Serbian written in Gajica) for cases where ISO 639-1 codes prove insufficient for distinguishing a resource from versions in other languages or language varieties. In accordance with recommendations made by ISO 9070, Steven DeRose and David G. Durand suggest using if no ISO 639 code is applicable.

The specification notes that while the language of the resource might affect the data and names defined and the language of any source-code comments, the language affects the usability of some text classes more than others. For example, the language given in the FPI in an HTML 4 or XHTML 1 DOCTYPE declaration should not be changed, regardless of the language of the web page itself; by contrast, the DSSSL stylesheets for DocBook internally use FPIs with different languages to identify string-table entity sets for particular localisations.

Entity display version

Additionally, except for , , and FPIs, for which the designating sequence or language must be the final part, the language code may be followed by another pair, followed by a public text display version, which specifies a particular platform that the implementation of SGML entities should target. For example, the base entity set defines the Latin-1 named entities using tautological entities, while implements them using Unicode code point references for use in XML. Similarly, the common entity set for HTML 5 and MathML uses the FPI .

Example FPIs +Examples of FPIs FPI Meaning+//ISBN 0-7923-9432-1::Graphic Notation//NOTATION CompuServe Graphic Interchange Format//ENThe GIF () image format (equivalent to MIME type )—an example of an ISBN FPI owner, and of a FPI used as a file-format identifier.The base unit of kilogramThe Unicode (or UCS) coded character set, as referenced by numeric character references in HTML—an example of a FPIDocument type definition of HTML 4.01 Transitional; corresponds to the system identifier URL Facebook Events as an iCalendar file generator—an example of a FPI used to identify a software packageResults of the European Parliament roll-call vote on Support for EU Strategic Framework on health and safety at work 2014-2020 (A8-0312/2015)—an example of a FPI used to identify a document in a non-SGML format (in this case, PDF)Character entity set of HTML 5 and MathML; corresponds to the system identifier URL —an example of an FPIDocument type definition of a variant of DocBook 3.1 which can simultaneously constitute a DSSSL stylesheet—an example of a domain name used as an FPI ownerThe LaTeX format, as used for formulae in academic works—an example of an FPI using a language code other than to refer to non-English reference materialRespectively English, French and Greek string tables used by DSSSL stylesheets for DocBook (for example, the entity is defined as in French and in English)—an example of use of a FPI language code to differentiate between different localisations

Use in XML, SGML and HTML

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.Definition: FPI (Formal Public Identifier) [Web and XML Glossary] 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.