Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify that @none @id are blank nodes, swap Examples 104 and 105 #397

Open
VladimirAlexiev opened this issue Jun 21, 2022 · 2 comments
Open
Labels
Editorial Used by the errata management ErratumRaised Used by the errata management

Comments

@VladimirAlexiev
Copy link

VladimirAlexiev commented Jun 21, 2022

I suggest the following editorial changes:

  • Edit Example 105
    • The special index @none is used for indexing node objects which do not have an @id, which is useful to maintain a normalized representation.

    • The special index @none is used for indexing node objects which do not have an @id, i.e. are blank nodes. This is useful to maintain a normalized representation. In cases where multiple blank nodes may be present, it is useful to combine @id with @set, see the next example

  • Swap Examples 104 and 105
  • Edit the old Example 104:
    • When compacting, this ensures that a JSON-LD processor will use the array form for all values of node identifiers.

    • When compacting, this ensures that a JSON-LD processor will use the array form for all values of node identifiers. This ensures a normalized representation in case of blank nodes, all of which will be mapped to @none and therefore need an array to hold their values.

    • Edit its code to the following (last 2 blocks changed):
{
  "@context": {
    "@version": 1.1,
    "schema": "http://schema.org/",
    "name": "schema:name",
    "body": "schema:articleBody",
    "words": "schema:wordCount",
    "post": {
      "@id": "schema:blogPost",
      "@container": ["@id", "@set"]
    }
  },
  "@id": "http://example.com/",
  "@type": "schema:Blog",
  "name": "World Financial News",
  "post": {
    "http://example.com/posts/1/en": [{
      "body": "World commodities were up today with heavy trading of crude oil...",
      "words": 1539
    }],
    "http://example.com/posts/1/de": [{
      "body": "Die Werte an Warenbörsen stiegen im Sog eines starken Handels von Rohöl...",
      "words": 1204
    }],
    "@none": [{
        "body": "First object without an @id",
         "words": 201
      }, 
      {
        "body": "Second object without an @id",
        "words": 202
    }]
  }
}
@VladimirAlexiev
Copy link
Author

A similar edit could be done to Examples 107 and 108 https://w3c.github.io/json-ld-syntax/#example-indexing-data-in-json-ld-by-type-with-set-representation.
In such case the code in Example 108 https://w3c.github.io/json-ld-syntax/#example-indexing-data-in-json-ld-by-type-using-none could be changed to eg

    "none": [{
      "@id": "https://greggkellogg.net/",
      "name": "Gregg Kellogg"
    }, {
      "@id": "http://champin.net/",
      "name": "Pierre-Antoine Champin"
    }]

@VladimirAlexiev
Copy link
Author

In the same train of thought: Example 122 https://w3c.github.io/json-ld-syntax/#example-referencing-named-graphs-using-an-id-map-with-none shows precisely two anonymous (blank node) graphs.

So I think the note above it is misleading because no graphs are merged (check in the Expanded and TriX tabs):

Note, however, that if multiple graphs are represented without an @id, they will be merged on expansion. To prevent this, use @none judiciously, and consider giving graphs their own distinct identifier.

Suggest to change it to:

But using anonymous graphs is not recommended because it could lead to confusion. So use @none judiciously, and consider giving graphs their own distinct identifier.

@gkellogg gkellogg added ErratumRaised Used by the errata management Editorial Used by the errata management labels Jun 21, 2022
@pchampin pchampin moved this to Errata in JSON-LD Management May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial Used by the errata management ErratumRaised Used by the errata management
Projects
Status: Errata
Development

No branches or pull requests

2 participants