step-examples/12-1b-header/Lh034.stp
Sources
- 16-iso-spec ISO 10303-21 Ed.3 §8 (REFERENCE / ANCHOR cross-file linking)
Description
Edition-3 ANCHOR / REFERENCE / SIGNATURE sections support cross-file linking. A REFERENCE entry names an external instance via a URI plus `#anchor_name`; the other end (a separate file) must publish that anchor in its ANCHOR section. When the receiver imports a file with REFERENCE to an unresolvable target (companion file missing, anchor name misspelt, URI scheme unsupported), the kernel must decide whether to defer-load, fail-load, or substitute a placeholder.
Reproducer recipe
REFERENCE section listing `<file:companion-file.stp#missing_anchor>` and `<https://example.invalid/no-such-file.stp#also_missing>`.
Expected kernel behavior
report the unresolvable reference with a precise diagnostic naming the URI and anchor; allow the rest of the file to load with a placeholder if the implementer's policy is partial-load, otherwise reject deterministically.
Notes
Cross-oracle: pure-Python Part-21 validator rejects (reject(E_UNRESOLVED_REFS)); OCCT silently accepts (load is `empty`). OCC auto-heals a spec-level violation. Synonyms: "REFERENCE section unresolvable anchor", "external anchor not found", "STEP REFERENCE points at missing file", "URI anchor in REFERENCE unresolved", "broken cross-file STEP link".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'REFERENCE;') and (contains(b'companion-file.stp#missing_anchor') or contains(b'no-such-file.stp#also_missing'))contains(b'companion-file.stp') or contains(b'companion.stp') or contains(b'no-such-file.stp')
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Lh034: REFERENCE section with unresolvable external anchors */ 3/* ISO 10303-21 Ed.3: REFERENCE entry must resolve against a companion ANCHOR section */ 4/* DEFECT: companion-file.stp does not exist; missing_anchor name is misspelt */ 5/* DEFECT: https://example.invalid/no-such-file.stp is not reachable */ 6/* pure-Python validator rejects (E_UNRESOLVED_REFS); OCC silently accepts empty */ 7HEADER; 8FILE_DESCRIPTION(('Lh034: REFERENCE section with unresolvable external anchors'),'2;1'); 9FILE_NAME('Lh034.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','',''); 10FILE_SCHEMA(('AUTOMOTIVE_DESIGN')); 11ENDSEC; 12REFERENCE; 13/* DEFECT: companion-file.stp does not exist; #missing_anchor is not published */ 14#10=<file:companion-file.stp#missing_anchor>; 15/* DEFECT: example.invalid URI is unresolvable; also_missing anchor absent */ 16#11=<https://example.invalid/no-such-file.stp#also_missing>; 17ENDSEC; 18DATA; 19#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 20#2=CARTESIAN_POINT('corner',(1.,1.,0.)); 21#3=DIRECTION('xdir',(1.,0.,0.)); 22#4=DIRECTION('zdir',(0.,0.,1.)); 23#5=GEOMETRIC_CURVE_SET('broken-crossfile-link-shape',(#1,#2)); 24ENDSEC; 25END-ISO-10303-21;