function ValidatePdfUaRoleMapUsage(const Elements: TPdfStructureElements; const RoleMapKeys, RoleMapVals: TPdfUaNameArray): TPdfUaValidationIssues;
| Elements | TPdfStructureElements |
| RoleMapKeys | TPdfUaNameArray |
| RoleMapVals | TPdfUaNameArray |
TPdfUaValidationIssuesValidatePdfUaRoleMapUsage performs a §7.1 RoleMap usage cross-check for a document
Every non-standard structure type actually used in the structure elements must resolve through the key/value pairs in the RoleMap to an ISO 32000-1 §14.8.4 standard type
The document parser accepts direct names, direct arrays, and exact-generation indirect references to name or array objects; an array resolves through its first standard structure type, while dangling references, malformed objects, and cycles remain unresolved
This is a pure data routine that requires no pdfium.dll and can be unit-tested with synthetic arrays
Issues := ValidatePdfUaRoleMapUsage(Pdf.StructureElements, Keys, Values);