From 97c6fdadb6d61d24950d8a5beccf10b49370f7ae Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Wed, 10 May 2023 19:54:39 +0400 Subject: [PATCH] #97 Profile conversions updates --- spec/index.html | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/spec/index.html b/spec/index.html index c57568c..86a8b7c 100644 --- a/spec/index.html +++ b/spec/index.html @@ -2384,7 +2384,9 @@

YamlLdErrorCode

Implementations

- TODO +

+ TODO: Implementations for Extended Internal Representation. +

@@ -2405,14 +2407,21 @@

Convert Extended YAML-LD to Basic YAML-LD and back

extended_to_basic(extended_document: YAML-LD) → YAML-LD
- Converts an Extended YAML-LD document to a YAML-LD document that a standard - processor can work with +
    +
  • Performs JSON-LD expansion to the given Extended YAML-LD document
  • +
  • Converts it to Basic YAML-LD form
  • +
-
basic_to_extended(basic_document: JSON-LD | YAML-LD) → YAML-LD
+
basic_to_extended(basic_document: YAML-LD) → YAML-LD
- Converts a basic JSON-LD or YAML-LD document to the Extended form, making - use of YAML-LD features to express the document more concisely. +
    +
  • Performs JSON-LD expansion to the given Basic YAML-LD document
  • +
  • + Converts it to the Extended form, making + use of YAML-LD features to express the document more concisely. +
  • +
@@ -2422,6 +2431,25 @@

Convert Extended YAML-LD to Basic YAML-LD and back

cases.

+

Generally, these two equalities do not hold:

+ + + +

+ When the extended → basic conversion resolves YAML tags + we no longer know where the original document used tags and where + it used @type calls. Thus, information is lost. +

+ +

+ Both of these functions lose information about anchors and + references because they're resolved by the YAML processor + underlying the implementation. +

+