Repository navigation
Description
PDF 2.0 introduced structure namespaces (14.7.4, 14.8.6) so a document can carry tags from more than
one vocabulary and role-map between them. None of it is written today: PdfStructElem has no /NS,
and /Namespaces and /RoleMapNS appear nowhere.
Everything else in v2.11 and v2.12 depends on this, because PDF/UA-2 §8.2.5.2 requires the
Document structure element to be explicitly in the PDF 2.0 namespace — so a conforming file cannot
avoid namespaces even if it uses only PDF 1.7 tags elsewhere.
Scope
/Namespaces— an array of namespace dictionaries on/StructTreeRoot.- Namespace dictionaries:
<</Type /Namespace /NS (uri) /RoleMapNS … /Schema … >>. /NSon structure elements./RoleMapNS, for mapping a custom type into a standard namespace. Role mapping may be transitive,
and PDF/UA-2 §8.2.4 forbids mapping a type to another type in the same namespace — worth
enforcing rather than trusting.
The URIs, verified against the specification itself
Full-text search of ISO 32000-2:2020 returns exactly these three:
| Namespace | URI |
|---|---|
| PDF 1.7 | http://iso.org/pdf/ssn |
| PDF 2.0 | http://iso.org/pdf2/ssn |
| MathML | http://www.w3.org/1998/Math/MathML |
Cite §14.8.6 for these, not the examples elsewhere. Neither ISO/TS 32005 nor ISO 14289-2 states
them in normative text — TS 32005 contains no occurrence of the strings at all, and PDF/UA-2's only
literal appearance is inside the §8.2.6.4 code example. A citation to an example is not a citation to a
requirement.
Version obligation
ISO/TS 32005 §5.1: a document conforming to it shall be versioned as PDF 2.0, via the header or the
catalog /Version. So using namespaces pins the version, which ties directly to #223's work.
Acceptance
- A structure tree with elements in both the PDF 1.7 and PDF 2.0 namespaces, round-tripping.
- A custom namespace role-mapped into PDF 2.0, including a transitive mapping.
- A same-namespace role mapping rejected.
- The three URIs asserted as exact byte strings.
- veraPDF
ua1stays green — namespaces are additive to a PDF/UA-1 file.
Relates to
- G2 — the
PdfStructElemsurface that carries/NS. - G4 — the containment rules that apply per namespace.
- Kernel: let callers choose the PDF version to write (1.4–2.0), and document what we read/write #223 — TS 32005 §5.1 pins the version.
Activity
Tim81 commentedon Nov 27, 2026
A consumer once this lands: the note block of #721 tags its box
Divin every file, because the Kernel cannot yet writeAsidewith the PDF 2.0 namespace. AnAsidewritten without/NSfalls in the default (PDF 1.7) namespace, where it is a non-standard type with no role mapping (ISO 32000-2 14.8.6.1 and 14.8.6.2; ISO/TS 32005 5.4 requires PDF 2.0 elements to declare their namespace), and veraPDF's WTPDF profile reports it under rule 8.2.4-1. When/Namespacesand/NSexist, a PDF 2.0 file should tag the note blockAsidein the PDF 2.0 namespace (ISO 32000-2 14.8.4.4: callouts are an example ofAside).