Motivation
populated_from dot-paths (#212) walk FK joins via ObjectIndex. For sources where the hierarchy is inlined (XML, JSON Schema, OWL, EML — anything tree-shaped that isn't relational), the same syntax doesn't reach: the FK-resolution path engages, finds no FK to resolve, warns Cross-class lookup requires object_index, and returns None.
Concrete driver: schema-automator's EML importer (linkml/schema-automator#208, branch eml-importer). Today it works around this by using three single-level class_derivations plus a Python loop that iterates dataset.dataTable[] and attributeList.attribute[] and invokes the transform per source instance. Future XSD / JSON-Schema importers will hit the same shape.
Proposed direction
When the source schema declares a slot with inlined: true (or inlined_as_list: true) and range: <SomeClass>, treat dot-path traversal as a structural walk through the inlined object/list rather than an FK lookup. Per-slot decision: identifier-shaped scalar → ObjectIndex (current); dict / list of dicts → walk directly (new).
With this in place, class_derivation chaining works for inlined sources symmetrically with FK ones:
class_derivations:
SchemaDefinition:
populated_from: EMLDocument
slot_derivations:
title:
populated_from: dataset.title # scalar, deep inline
classes:
populated_from: dataset.dataTable # multivalued inline;
# ClassDefinition auto-fires
# per item
ClassDefinition:
populated_from: DataTable
...
No new memory cost — the source tree is already loaded; no ObjectIndex build needed for inlined paths.
Open questions
- Detection: prefer declarative (
inlined: true from source schema). Runtime shape detection is a fallback.
- Diagnostics on missing path segments should name the failing segment, not bottom out as a silent
None.
References / contrasts
Motivation
populated_fromdot-paths (#212) walk FK joins viaObjectIndex. For sources where the hierarchy is inlined (XML, JSON Schema, OWL, EML — anything tree-shaped that isn't relational), the same syntax doesn't reach: the FK-resolution path engages, finds no FK to resolve, warnsCross-class lookup requires object_index, and returnsNone.Concrete driver: schema-automator's EML importer (linkml/schema-automator#208, branch
eml-importer). Today it works around this by using three single-level class_derivations plus a Python loop that iteratesdataset.dataTable[]andattributeList.attribute[]and invokes the transform per source instance. Future XSD / JSON-Schema importers will hit the same shape.Proposed direction
When the source schema declares a slot with
inlined: true(orinlined_as_list: true) andrange: <SomeClass>, treat dot-path traversal as a structural walk through the inlined object/list rather than an FK lookup. Per-slot decision: identifier-shaped scalar →ObjectIndex(current); dict / list of dicts → walk directly (new).With this in place, class_derivation chaining works for inlined sources symmetrically with FK ones:
No new memory cost — the source tree is already loaded; no
ObjectIndexbuild needed for inlined paths.Open questions
inlined: truefrom source schema). Runtime shape detection is a fallback.None.References / contrasts