w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

What's the use of 7.3? #256

Closed azaroth42 closed 4 years ago

azaroth42 commented 5 years ago

Doesn't this just redescribe anchors in HTML? It doesn't allow Dave to know Gregg, or anything like that?

I think the introduction to the section needs more explanatory text, especially a use case for when whatever this does would be useful.

gkellogg commented 4 years ago

The point of the example is that a URL can target a specific script element using the fragment identifier and that the extraction algorithm will only take that particular script element, and not merge together other elements.

If you think it's confusing that elements appear to be interrelated, when they're not, perhaps suggest better examples to use.

azaroth42 commented 4 years ago

I think I must have been tired at this point, as that's indeed what the text of the first paragraph clearly states.

Suggest changing not the example in the the HTML, but the example in the description paragraph to reflect the technical example. Along the lines of:

For example, given an HTML document located at http://example.com/document, a script element identified by "dave" can be targeted using the URL http://example.com/document#dave, and the data from any other elements would not be extracted