function ValidatePdfUa2FormulaSemantics(const Elements: TPdfStructureElements): TPdfUaValidationIssues;
| Elements | TPdfStructureElements |
TPdfUaValidationIssuesValidatePdfUa2FormulaSemantics applies ISO 14289-2 §8.2.5.29/1: a math structure element must be nested inside a Formula element or inside another math element. It does not require a Formula element to carry AlternateText, ActualText or an associated file; the PDF/UA-1 §7.7 fallback requirement is handled separately by ValidatePdfUaStructureElements
A math structure element is recognised by its MathML namespace, by a role map that resolves into the MathML namespace, or by the /S /Math role name. The native page snapshot can leave the namespace fields empty, so the role name keeps the parent check effective; a math element whose parent is neither a Formula nor another math element reports pvuaiFormulaSemanticInvalid
Any element with an associated file must carry a non-empty AssociatedFileDescription and one of the seven standard relationships (Source, Data, Alternative, Supplement, EncryptedPayload, FormData or Schema), otherwise pvuaiAssociatedFileSemanticInvalid is reported
ClassifyPdfUaNamespace from both NamespaceUri and RoleMappedNamespaceUri; because the native page snapshot can leave those empty, the /S /Math role name is also acceptedFormulaIssues := ValidatePdfUa2FormulaSemantics(Pdf.StructureElements);