Skip to content

schema_to_frame: emit @embed:@never subframes for reference-valued properties #155

Description

@simontaurus

Implements the frame derivation from OO-LD/oold-schema#160.

schema_to_frame builds {"@embed": "@once"} plus empty subframes for embedded objects; reference-valued properties get nothing, on the documented assumption that a referenced IRI carries no local triples. When it does (several documents merged into one graph), framing embeds the referenced node into the first match and the framed document stops validating against its own schema (an object where the schema says string) - see the parent issue for the three-node example.

  • add {"@embed": "@never"} per reference-valued property: x-oold-range on a string-typed value, IRI-family format (iri, iri-reference, uri, uri-reference), or a context term mapped "@type": "@id" with no embedding shape
  • embedded-object detection takes precedence where both signals appear
  • the playground's reference_preserving_frame derives from format today and can serve as the starting point
  • the JS twin oold-js schema_to_frame.mjs needs the same change to keep the ports aligned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions