XSD identity-constraint validation made linear. Backward compatible, validation results identical.
Fixed
xs:unique/xs:key/xs:keyrefvalidation was quadratic over a wide list of targets: the duplicate check compared each value tuple against every tuple already seen (and akeyrefagainst every referenced key), and the error-location helper rescanned the parent's whole child list to position each target. Duplicate detection now keys tuples in aSetby their raw string when field equality provably reduces to a rawstring == stringcomparison (whitespace-preserving lexical types, which is most ids); value-space types (numeric, boolean, date), whitespace-collapsing types, and QName-bearing values keep the exact pairwise comparison, so which documents pass is unchanged. Each target is positioned through a per-parent, per-name index built once. A 16000-itemxs:uniquedocument drops from ~4.0s to ~0.12s (~34x), now linear (#312).
Found by scale-testing the identity-constraint feature at 2x/4x/8x sizes, a feature the default benchmark corpus does not exercise. Equivalence verified by an adversarial closed-form proof and the W3C XSTS datatype/identity conformance corpus (unchanged).