Skip to content

Form Format

Closed enumeration of the file format a form instance arrives in: docx, xlsx, pdf, html, md. CORE per §6.2 — closed by what platform supports. Drives extraction-route selection in the form pipeline (the cataloguer reads the format → applies the right extraction approach per source §4.5).

Reference corrected (id-417 B3 ruling, S535): this CV’s original substrate — a planned form_templates.form_format column — never landed, and form_templates was itself renamed form_instances at {145.6} W1c. The live substrate is form_instances.mime_type (nullable text carrying MIME strings, e.g. application/pdf), which encodes the same axis at a different grain. Any future enforcement of this closed set needs an explicit MIME→format mapping; no CHECK exists today.

None.

keylabelprovenance
docxDOCXcore
xlsxXLSXcore
pdfPDFcore
htmlHTMLcore
mdMarkdowncore
  • form_instances.mime_type — the live column carrying this axis (nullable text, MIME strings; corrected reference per the id-417 B3 ruling — the previously-cited form_templates.form_format column never existed and the table is now form_instances).
  • No form_formats table or CHECK exists; enforcement, if ever needed, is a future migration plus a MIME→format mapping.
  • Adjacent to CV 26 form_type — same form_type may exist in multiple formats (XLSX SSQ + PDF SSQ + DOCX SSQ all map to form_type=SSQ per source §4.5).
  • Layer 5: drives format-specific extraction routes (Docling for DOCX/XLSX/PDF, Turndown / mammoth for HTML, etc.).
  • Form-extraction pipeline (cataloguer step) — chooses extraction route per format.
  • Form template upload UI surface (validates supported formats).
  • Existing extraction code paths the future cataloguer leverages: lib/source-documents/ (mammoth + Turndown for HTML), scripts/kb_pipeline/extract.py (PDF via pdfplumber), Docling adapter (XLSX/DOCX/PDF — WP-DOCLING-XLSX bake-off).
  • Status: needed — vocabulary not yet enumerated as a table.
  • Closed CORE per §6.2 — no client extension; expansion requires platform-support work plus a schema migration.
  • mammoth (HTML) and Docling / markitdown (XLSX, DOCX, PDF) are the referenced extraction routes per source §6 implications and the WP-DOCLING-XLSX bake-off.