PDFium Delphi Component Docs

ValidatePdfUa2NamespaceSemantics function

Unit: PDFium
Validates ISO/TS 32005 namespace assignments and role mappings of a PDF/UA-2 structure tree

Syntax

function ValidatePdfUa2NamespaceSemantics(const Elements: TPdfStructureElements): TPdfUaValidationIssues;

Parameters

ElementsTPdfStructureElements

Return Value

TPdfUaValidationIssues

Description

ValidatePdfUa2NamespaceSemantics classifies each element namespace with ClassifyPdfUaNamespace and checks that the type name is legal there

An element without a namespace must use a type that is standard in PDF 1.7 or PDF 2.0 or a numbered heading, otherwise pvuaiNamespaceMissing is reported; a PDF 1.7-only type without a namespace is reported as invalid reuse

The PDF 1.7 namespace (http://iso.org/pdf/ssn) may only carry its exclusive types Art, BlockQuote, TOC, TOCI, Index, Private, Quote, Note, Reference, BibEntry and Code

The PDF 2.0 namespace (http://iso.org/pdf2/ssn) must carry a known type that is not PDF 1.7-only, otherwise pvuaiNamespaceReuseInvalid is reported

The MathML namespace requires a non-empty type name

Custom, ARIA and DPUB namespaces must role-map through RoleMappedTypeName and RoleMappedNamespaceUri to a standard type in a standard namespace, and the target namespace must differ from the source namespace, otherwise pvuaiNamespaceRoleMapInvalid is reported

A role-mapped type that resolves into the same namespace as its source element is reported as invalid role mapping

Remarks

Example

NsIssues := ValidatePdfUa2NamespaceSemantics(Pdf.StructureElements);

See Also

ClassifyPdfUaNamespace, ValidatePdfUa2StructureElements, ValidatePdfUa2Containment, ValidatePdfUaRoleMapUsage, TPdf.StructureElements