---
id: "formal_public_identifier"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["software"]
langs: ["common"]
quality: 85
url: "http://registry.apicrafter.io/datatype/formal_public_identifier"
---

# Formal Public Identifier (FPI) (`formal_public_identifier`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Structured text identifier from SGML (ISO 8879 and ISO/IEC 9070) used in DOCTYPE declarations of SGML, HTML and XML documents. It consists of an owner identifier, a double slash and a text identifier. The owner starts with -// (unregistered), +// (registered) or ISO. The text identifier starts with a public text class such as DTD or ENTITIES, followed by a description and, after another double slash, a language code.

- Personal data (PII): no
- Categories: Software development (software)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:ISO[^/]*(?:/[^/]+)*|[+-]//[^/]+(?:/[^/]+)*)//(?:CAPACITY|CHARSET|DOCUMENT|DTD|ELEMENTS|ENTITIES|LPD|NONSGML|NOTATION|SD|SHORTREF|SUBDOC|SYNTAX|TEXT) (?:-//)?[^/]+(?:/[^/]+)*//[^/]+(?:/[^/]+)*(?://[^/]+)?$
```

## Examples

- `-//W3C//DTD HTML 4.01//EN` — HTML 4.01 document type definition
- `ISO 8879:1986//ENTITIES Added Latin 1//EN` — SGML Latin-1 entity set
- `-//W3C//HTML 4.01//EN` (invalid example) — The public text class is missing

## Mappings

- wikidata: `P4506`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Formal_Public_Identifier>
- wikidata: <https://www.wikidata.org/wiki/Property:P4506>

## Quality

Score 85/100. Missing: translation, detector coverage.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/formal_public_identifier.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/software/formal_public_identifier.yaml>
