/** * PSVI — Post-Schema-Validation Infoset (G29 — v1.7.0) * * v1.7.0 performance: * • Object pool for common (null-value, no-memberType) annotations avoids * per-node heap allocation on deep trees. Pool cap: 256 distinct entries. * * P1 fix — notKnown semantics: * The `notKnown` validity state is ONLY used when: * (a) no schema declaration exists for the element AND mode is 'lax', OR * (b) the element type reference could not be resolved (broken schema), OR * (c) xsi:type override references an unknown type. * It is NOT used for: substitution-group members, abstract base types, or * elements validated in 'lax' mode with a known schema declaration. * * P1 fix — extractPsvi paths filter: * Pass `options.paths` to limit extraction to specific subtrees. */ import type { XmlElement, XmlDocument } from '../parser/XmlNodes'; export interface PsviAnnotation { xsdType: string; normalizedValue: string | null; validity: 'valid' | 'invalid' | 'notKnown'; memberType?: string; } export type PsviMap = Map & { get(key: XmlElement | null): PsviAnnotation | undefined; }; /** * Create a PSVI annotation, using a pool for common null-value entries. * @internal Use `ValidationOptions.psvi = true` and `extractPsvi()` instead. */ export declare function makePsviAnnotation(xsdType: string, normalizedValue: string | null, validity: PsviAnnotation['validity'], memberType?: string): PsviAnnotation; export interface ExtractPsviOptions { /** * P1 fix: When provided, only extract annotations for elements whose path * starts with one of these prefixes. Avoids a full tree walk when only * a subset of nodes is needed (e.g. IDE hover, subtree diagnostics). */ paths?: string[]; } /** * Extract PSVI annotations into a serialisable path→annotation map. */ export declare function extractPsvi(psvi: PsviMap, root: XmlDocument | XmlElement, options?: ExtractPsviOptions): Map; //# sourceMappingURL=Psvi.d.ts.map