The Shape to inspect, or a resolved RangeShape to re-probe
The probe containing property path and transform pipe
An immutable RangeShape effective type carrying the accumulated cardinality and the reachable
value-shape variants when the probe resolves, deduplicated to distinct shapes so an aggregate or
path that collapses the union onto one type yields a single variant. Returns an atomic
Trace string when the probe cannot be resolved against the shape: "undefined property path" if the
path fails to resolve (including a step past a non-traversable id / type field), "multiple aggregate transforms" if the pipe composes more than one aggregate transform, or "incompatible transform input" if no
resolved variant lies within the transform pipe's declared domain
Resolve the effective RangeShape a Probe yields against a shape.
Traverses the Probe.path segments through nested resource entries to locate the target shape, then applies the Probe.pipe transforms to compute the effective value set with accumulated cardinality.
Shape dispatch:
Path traversal — at each step, flattens inheritance and looks up the next property. Unknown entries cause the path to fail. At UnionShape boundaries (either at the entry or encountered as a property range), variants lacking the property are skipped; the path fails only when no variant defines it. Mid-path traversal past an
idortypefield fails as an"undefined property path", since these resolve to scalar IRIs with no traversable structure; terminalid/typeaccess remains valid.Pipe application — applies transforms to the shape resolved by path traversal, reducing each active variant independently when multiple remain. A pipe composing more than one aggregate transform is rejected upfront as
"multiple aggregate transforms", independently of the resolved shape. A non-empty pipe is coalesced access to a localised leaf: a dictionary shape contributes the winning tag's value(s) as an ordinaryxsd:stringfor domain matching and effective typing, at the leaf's per-tag cardinality (one value for single-string-per-tag, the winning tag's set for array-per-tag). Among processing-space literals (boolean, numeric, plain or temporal string), a transform applied to a literal outside its declared domain drops the offending variant from the effective set: within a union this retains only the compatible branches, so the pipe is well-typed as long as at least one variant survives. The same dropping extends to values outside the processing space (references and resources), which no transform other thancountcan act on. When no variant survives, including a single non-union shape whose sole variant falls outside the pipe's domain, the probe reports"incompatible transform input". Thecountaggregate accepts any value, references included;minandmaxaccept the literal processing types (boolean, numeric, string, temporal); the remaining transforms accept their declared processing type only.avgalways yields adecimal: the specification narrows its range tofloatforfloatinput anddoublefordoubleinput, but that processing-space distinction is not preserved on egress, so the effective type is reported uniformly asdecimal. A transform declaringreturns: "same"reproduces the input's processing type:minandmax, which keep the value within the element domain, preserve the input shape verbatim (value-domain facets included), whereassumcombines values and escapes the element domain and datatype range, so it widens to the bareintegertype for integral input or the baredecimaltype otherwise, carrying no value-domain facets.Cardinality — per-step constraints combine multiplicatively within a branch and by envelope across sibling branches:
minCountandmaxCountare the products of per-step bounds; either becomesundefinedif any step has that bound undefined. A0product stands (forminCountan equivalent encoding of "no lower bound", formaxCountthe strongest upper bound).minCounttakes the lowest lower bound (undefinedabsorbs — no lower bound wins),maxCounttakes the highest upper bound (undefinedabsorbs — unbounded wins). The effective range admits any reachable branch, so its cardinality envelopes them all; discrimination to the single driving branch is resolved separately against the model.maxCountof1for single-string-per-tag, unbounded for array-per-tag), which multiply into the branch product. A single-string-per-tag leaf is single-valued on its own, but a multi-valued prefix multiplies through, so a deep coalescible key is correctly multi-valued for the sort/focus single-valued gates while matching and filtering stay cardinality-agnostic.minCountto1for the total aggregatescountandsum, which always yield a value (0on the empty set), and toundefinedfor every other transform; scalar transforms preservemaxCount; aggregate transforms setmaxCountto1.