DTD Formal Public Identifier (FPI)

When declaring a DTD available for public use, you need to use the PUBLIC keyword within your DOCTYPE declaration.

When you use the PUBLIC keyword, you also need to use an FPI (which stands for Formal Public Identifier).

FPI Syntax

An FPI is made up of 4 fields, each separated by double forward slashes (//):

FPI Example

Here's a real life example of an FPI. In this case, the DTD was created by the W3C for XHTML:

FPI Fields

An FPI must contain the following fields:

FieldExampleDescription
Separator//This is used to separate the different fields of the FPI.
First field-Indicates whether the DTD is connected to a formal standard or not. If the DTD hasn't been approved (for example, you've defined the DTD yourself), use a hypen (-). If the DTD has been approved by a nonstandards body, use a plus sign "+". If the DTD has been approved by a formal standards body this field should be a reference to the standard itself.
Second fieldW3CHolds the name of the group (or person) responsible for the DTD. The above example is maintained by the W3C, so "W3C" appears in the second field.
Third fieldDTD XHTML 1.0 TransitionalIndicates the type of document that is being described. This usually contains some form of unique identifier (such as a version number).
Fourth fieldENSpecifies the language that the DTD uses. This is achieved by using the two letter identifier for the language (i.e. for english, use "EN").

FPI DOCTYPE Syntax

When using a public DTD, place the FPI between the PUBLIC keyword and the URI/URL.

FPI DOCTYPE Example

You can see an example of an FPI in the following DOCTYPE declaration (the FPI is in bold):