Matches a reference against a set of shapes, returning the one it matches or undefined.
Matching is strict and whole -- the full ordered list of component types, every id spelling
and the path shape together -- never on the last component or segment alone. That is the spec's
forward-compatibility rule, and it is load-bearing: matching on the leaf would let
forum~topic:T pass as a topic, when a topic id is unique only within its forum.
undefined is a refusal, not an error. An unrecognised shape parses perfectly well at layer 1;
this says only that no shape here claims it.
Matches a reference against a set of shapes, returning the one it matches or
undefined.Matching is strict and whole -- the full ordered list of component types, every id spelling and the path shape together -- never on the last component or segment alone. That is the spec's forward-compatibility rule, and it is load-bearing: matching on the leaf would let
forum~topic:Tpass as a topic, when a topic id is unique only within its forum.undefinedis a refusal, not an error. An unrecognised shape parses perfectly well at layer 1; this says only that no shape here claims it.