Chapter 2

Document Data Formats and Standards

Standardized data formats are the foundation of interoperable digital document systems, enabling seamless exchange and verification across agencies, platforms, and borders while preserving semantic meaning and legal validity.

Core Document Schema Design

The WIA-SOCIAL Public Document standard defines a hierarchical schema architecture that balances flexibility with structure. At the top level, all documents share common metadata fields including unique identifiers, issuance information, and cryptographic signatures. Document type-specific schemas extend this base schema with additional fields relevant to particular document categories.

This approach provides several advantages. Common tooling can process any document type for authentication, storage, and routing. Type-specific validation can enforce business rules and data quality. New document types can be added without breaking existing systems. Partial schemas allow documents to be extended with additional attributes while maintaining backward compatibility.

Base Document Schema

Every public document, regardless of type, includes a core set of metadata fields. The document ID provides a globally unique identifier, typically combining an issuing authority code, document type code, and sequential or random identifier. Issuer information identifies the government agency or authorized entity that created the document. Issuance and expiration dates define the document's temporal validity. The subject identifies the person, organization, or entity to whom the document pertains.

Base Document Schema (JSON)

{
  "documentId": "EE-BC-2025-001234",
  "documentType": "BirthCertificate",
  "version": "2.0",
  "issuer": {
    "countryCode": "EE",
    "organizationName": "Estonian Ministry of Interior",
    "organizationId": "70000329",
    "signerName": "Registrar Maria Tamm",
    "signerTitle": "Chief Registrar, Tallinn District"
  },
  "issuedDate": "2025-01-15T10:30:00Z",
  "validFrom": "2025-01-10",
  "validUntil": null,
  "status": "active",
  "subject": {
    "subjectType": "person",
    "personalCode": "52501104567"
  },
  "metadata": {
    "language": "et",
    "jurisdiction": "EE",
    "documentFormat": "WIA-SOCIAL-v2.0",
    "qrCode": "https://verify.gov.ee/doc/EE-BC-2025-001234",
    "accessLevel": "public-with-consent"
  },
  "signature": {
    "algorithm": "ECDSA-P256-SHA256",
    "certificateChain": ["..."],
    "signatureValue": "...",
    "timestamp": "2025-01-15T10:30:15Z"
  }
}

Document Type-Specific Schemas

Type-specific schemas extend the base schema with additional fields. A birth certificate includes parent information, birth weight and length, hospital details, and registration information. A driver's license includes vehicle classes, restrictions, and endorsements. A property deed includes legal descriptions, parcel numbers, and chain of ownership. Each schema is defined using JSON Schema, allowing automatic validation and documentation generation.

Document Type Key Additional Fields Schema Version Compliance Standard
Birth Certificate Parents, birth details, medical info 2.1 WHO ICD-10, ISO 8601
Passport Travel document number, biometrics, MRZ 3.0 ICAO 9303
Driver's License Vehicle classes, restrictions, points 2.3 UN Vienna Convention
Property Deed Legal description, parcel ID, survey data 1.8 ISO 19152 LADM
Business License Business activities, conditions, fees 2.0 ISIC Rev. 4
Vaccination Record Vaccine type, batch, administering HCP 1.2 HL7 FHIR, ICD-11

Encoding Formats

While the logical schema defines document structure and semantics, the encoding format determines how documents are serialized for storage and transmission. The WIA-SOCIAL standard supports multiple encoding formats to accommodate different use cases and integration requirements.

JSON (JavaScript Object Notation)

JSON serves as the primary encoding format for API interactions and web applications. Its human-readable structure, native JavaScript support, and extensive library ecosystem make it ideal for modern web services. JSON's flexibility allows easy extension with custom attributes while maintaining backward compatibility. However, JSON's verbosity and lack of binary data support make it less suitable for bandwidth-constrained environments.

XML (Extensible Markup Language)

XML remains important for integration with legacy government systems and enterprise applications. Many existing document standards, including those from the United Nations and various government agencies, are defined in XML Schema. XML's namespace support allows mixing vocabularies from multiple standards in a single document. XML digital signatures (XMLDSig) provide standardized cryptographic protection. The primary drawbacks are verbosity and parsing complexity.

CBOR (Concise Binary Object Representation)

CBOR provides a binary encoding with a data model similar to JSON but much more compact. It's particularly valuable for constrained environments like smart cards, mobile applications with limited bandwidth, and IoT devices. CBOR supports binary data natively, unlike JSON's base64 encoding. CBOR is used extensively in the W3C Web Authentication standard and is gaining adoption for mobile identity credentials.

PDF/A (PDF for Long-term Archival)

For human-readable documents requiring long-term preservation, PDF/A provides a standardized format that embeds all necessary fonts, images, and formatting information. Unlike regular PDF, PDF/A prohibits features that depend on external resources or could prevent future rendering. PDF/A-3 allows embedding structured data (XML, JSON) within the PDF, enabling both human viewing and machine processing from a single file.

Format Best Use Case Advantages Disadvantages
JSON APIs, web applications Human-readable, widespread support Verbose, no binary support
XML Enterprise integration, legacy systems Mature, schema validation, namespaces Very verbose, complex parsing
CBOR Mobile, smart cards, IoT Compact, binary support, fast parsing Not human-readable, less tooling
PDF/A Archival, citizen-facing documents Self-contained, long-term preservation Not suitable for machine processing
Protocol Buffers High-performance services Extremely compact, strongly typed Requires schema compilation

Metadata Standards and Vocabularies

Consistent metadata enables discovery, classification, and lifecycle management of documents. The WIA-SOCIAL standard incorporates established metadata vocabularies where possible, ensuring compatibility with library systems, content management platforms, and international standards.

Dublin Core

Dublin Core provides 15 core metadata elements widely used across digital libraries and repositories: title, creator, subject, description, publisher, contributor, date, type, format, identifier, source, language, relation, coverage, and rights. These elements provide basic bibliographic information applicable to any resource. Extended Dublin Core adds domain-specific terms while maintaining core element compatibility.

ISO 23081 Records Management

ISO 23081 defines metadata for managing records throughout their lifecycle. It specifies metadata for creation, classification, access control, storage, use, and disposition. Government agencies implementing digital document systems typically adopt ISO 23081 to ensure compliance with records management regulations and enable proper retention scheduling.

PREMIS Preservation Metadata

For documents requiring long-term preservation (birth certificates, property deeds, court records), PREMIS (PREservation Metadata: Implementation Strategies) provides a comprehensive framework. PREMIS captures technical metadata about file formats, software dependencies, and preservation actions. This ensures documents remain accessible even as technologies evolve over decades.

Example Metadata Bundle:
{
  "dublinCore": {
    "title": "Birth Certificate - Anna Kask",
    "creator": "Estonian Ministry of Interior",
    "date": "2025-01-15",
    "type": "Text/Official Document",
    "format": "application/json",
    "identifier": "EE-BC-2025-001234",
    "language": "et",
    "rights": "Personal data - subject consent required"
  },
  "iso23081": {
    "classification": "Personal Identity Document",
    "securityClassification": "Protected B",
    "retentionPeriod": "Permanent",
    "disposalAction": "Retain indefinitely",
    "accessRights": "Subject, parents, legal guardians, authorized officials"
  },
  "premis": {
    "originalFormat": "application/json",
    "creatingApplication": "DocGen v3.2.1",
    "preservationLevel": "Full",
    "migrationPath": ["JSON 1.0 → JSON 2.0 → CBOR if needed"]
  }
}

Biometric Data Encoding

Modern identity documents increasingly incorporate biometric data for authentication. Standardized biometric encodings ensure interoperability across capture devices, storage systems, and verification systems.

ISO/IEC 19794 Biometric Data Formats

ISO/IEC 19794 defines standard formats for various biometric modalities. Part 2 covers finger minutiae data (unique points on fingerprints). Part 4 specifies finger image data. Part 5 defines face image data including requirements for pose, lighting, and resolution. Part 6 covers iris image data. These standards ensure biometric data can be shared across systems from different vendors.

Biometric Template Protection

Raw biometric data poses privacy risks—fingerprints and iris scans cannot be changed if compromised. Template protection techniques create one-way transformations of biometric data suitable for matching but not reconstruction. Fuzzy extractors generate cryptographic keys from biometric data, allowing authentication without storing biometric templates. These techniques are increasingly required by privacy regulations.

Biometric Type Standard Format Typical Size Matching Accuracy
Face Photo ISO 19794-5, JPEG 2000 15-45 KB FAR 0.1%, FRR 1-3%
Fingerprint Minutiae ISO 19794-2, ANSI 378 200-600 bytes FAR 0.01%, FRR 0.5-2%
Fingerprint Image ISO 19794-4, WSQ 10-30 KB FAR 0.001%, FRR 0.5%
Iris Image ISO 19794-6 2-10 KB FAR 0.0001%, FRR 0.1%
Voice Template ISO 19794-13 1-5 KB FAR 2%, FRR 5-10%

Machine-Readable Zones and Visual Encodings

To bridge physical and digital worlds, documents often include machine-readable encodings that allow rapid data capture using cameras or specialized readers.

QR Codes

QR codes can encode up to 4,296 alphanumeric characters in a two-dimensional barcode easily scanned by smartphones. For documents, QR codes typically encode either the full document data (for small documents) or a URL linking to verification services. Digital signatures can be included in the QR code, allowing offline verification. The EU Digital COVID Certificate famously used signed QR codes containing full credential data plus cryptographic proof.

NFC and RFID Chips

Near Field Communication (NFC) chips embedded in cards or documents can store larger amounts of data (typically 4-64 KB) and perform cryptographic operations. E-passports contain NFC chips storing biometric data and performing active authentication to prevent cloning. The chips support various security protocols including Basic Access Control (BAC), Password Authenticated Connection Establishment (PACE), and Extended Access Control (EAC) to prevent unauthorized reading.

Machine-Readable Zones (MRZ)

The machine-readable zone, developed by ICAO for passports and travel documents, uses two or three lines of OCR-readable text containing key document data. While older than QR codes, MRZ remains the international standard for travel documents. The format includes check digits computed from data fields, allowing detection of transcription errors. All international passports include an MRZ, and many national ID cards do as well.

MRZ Format Example (Passport)

P<ESTTEST<<ANNA<<<<<<<<<<<<<<<<<<<<<<<<<<<
ZE0123456<4EST9501101F3112315<<<<<<<<<<<<<02

Line 1: P < Country < Name (with filler <)
Line 2: Document number < Country < DOB < Sex < Expiry < Personal number < Check digits

Multi-Format Representation

Real-world document systems must support multiple representations of the same logical document. A birth certificate might exist as a PDF for printing, JSON for API access, XML for legacy system integration, and a QR code for mobile verification. Ensuring consistency across these representations requires careful architecture.

Canonical Form

Systems should designate one format as the canonical representation—the authoritative source from which all other formats are derived. Typically, this is a structured format like JSON or XML. Digital signatures are applied to the canonical form, not derived formats. When documents are retrieved, they can be transformed into requested formats, but signature verification always operates on canonical data.

Format Conversion

Automated conversion between formats requires careful handling of semantic equivalence. Some data may be lost or transformed during conversion—XML attributes might become JSON properties, date formats might change, binary data encodings differ. Conversion systems should be tested extensively, and round-trip conversion (A → B → A) should preserve all information when possible.

Format Negotiation

RESTful APIs use content negotiation to serve documents in multiple formats from a single URL. Clients specify preferred formats using the Accept HTTP header. Servers respond with the best available format and indicate the format using the Content-Type header. This allows the same API endpoint to serve JSON to web applications, XML to enterprise systems, and PDF to human users.

Content Negotiation Example:
GET /api/documents/EE-BC-2025-001234 HTTP/1.1
Host: api.gov.ee
Accept: application/json, application/xml;q=0.9, application/pdf;q=0.8
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4523
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"

{
  "documentId": "EE-BC-2025-001234",
  "documentType": "BirthCertificate",
  ...
}

Data Quality and Validation

Ensuring data quality is critical for public documents that serve as authoritative records. Validation occurs at multiple stages: during data entry, before document generation, at system boundaries, and during verification.

Schema Validation

JSON Schema and XML Schema provide formal specifications of valid document structure. Validation engines check that documents conform to schemas, rejecting malformed data before it enters systems. Schemas define required fields, data types, value constraints, and structural relationships. Modern schema languages support conditional requirements, pattern matching, and cross-field validation.

Business Rule Validation

Beyond structural correctness, documents must satisfy business rules. Birth dates must be in the past. Document expiration dates must be after issuance dates. Referenced entities (parent documents, issuing officials) must exist. Some validation requires external data—checking that a social security number is validly issued, verifying that an address exists, confirming that a license applicant has no disqualifying violations. Rule engines and workflow systems encode and enforce these requirements.

Data Consistency Checking

Computed fields like check digits must match their source data. Derived values must be correctly calculated. Cryptographic signatures must verify successfully. These checks detect data corruption, transmission errors, and tampering attempts. Critical documents should be validated every time they're accessed, not just at creation.

Summary

Key Takeaways:

Review Questions

  1. Explain the advantages of hierarchical schema design with base and type-specific schemas. How does this support extensibility?
  2. Compare JSON, XML, and CBOR encodings. What are the trade-offs and when would you choose each?
  3. Why is canonical form important for multi-format documents? How does it relate to digital signatures?
  4. Describe the purpose and structure of Machine-Readable Zones (MRZ) in passports. Why do they include check digits?
  5. What is biometric template protection and why is it important? How does it differ from simply encrypting biometric data?
  6. Explain how content negotiation works in RESTful APIs. How does it enable serving multiple document formats from a single endpoint?
  7. What metadata is captured by PREMIS and why is it important for long-term document preservation?
  8. Describe the difference between schema validation and business rule validation. Give examples of rules that each would enforce.

Korea Digital Transformation Detailed Mapping

Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.

Korea Industrial, Research, Education Infrastructure Mapping

Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.