function ValidatePdfUa2Containment(const Elements: TPdfStructureElements): TPdfUaValidationIssues;
| Elements | TPdfStructureElements |
TPdfUaValidationIssuesValidatePdfUa2Containment walks the ParentIndex links of the flattened structure data and verifies that every element sits in an allowed parent for the ISO/TS 32005 containment model
Only a Document element may be a root, and a Document element may not have a parent; a parent index that is out of range or points at the element itself is also invalid
DocumentFragment and Title may only appear under Document, DocumentFragment, Part, Art, Sect, Div, or Aside
LI requires an L parent; Lbl requires LI, FENote, Note, or BibEntry; LBody requires LI
THead, TBody, and TFoot require a Table parent; TR requires Table, THead, TBody, or TFoot; TH and TD require TR
TOCI requires TOC or TOCI; Caption requires TOC, Table, Figure, Formula, or Aside
A MathML-namespaced element must sit inside a Formula element or inside another MathML-namespaced element
Every violation is reported as pvuaiNamespaceContainmentInvalid
ContainmentIssues := ValidatePdfUa2Containment(Pdf.StructureElements);