json-ld / yaml-ld

CG specification for YAML-LD and UCR
https://json-ld.github.io/yaml-ld/spec
Other
22 stars 8 forks source link

Fragment identifier #31

Open ioggstream opened 2 years ago

ioggstream commented 2 years ago

As a user … WHO I want a fragment identifier specification … WHAT So that I can reference specific elements of a yaml-ld … WHY

Notes

Q0. Do you think that yaml processing is enough? Q1. Do .jsonld support JSON Pointer or other referencing method? Q2. Do we need a way to reference a specific resource via id, eg. #id=<URI> ? In case, this will be specific yaml-ld extension that generic yaml parsers might not support.

gkellogg commented 2 years ago

Q0. Do you think that yaml processing is enough?

The RDF/XML IANA Registration has the following statement on fragment identifiers, which may bear on our usage:

In RDF, the thing identified by a URI with fragment identifier does not necessarily bear any particular relationship to the thing identified by the URI alone. This differs from some readings of the URI specification [8], so attention is recommended when creating new RDF terms which use fragment identifiers.

More details on RDF's treatment of fragment identifiers can be found in the section "Fragment Identifiers" of the RDF Concepts document [2].

Q1. Do .jsonld support JSON Pointer or other referencing method?

JSON-LD does not have any relationship with JSON-Pointer.

Q2. Do we need a way to reference a specific resource via id, eg. #id= ? In case, this will be specific yaml-ld extension that generic yaml parsers might not support.

JSON-LD doesn't have such a facility, for parity, I don't think it makes sense for YAML-LD to be able to refer to an artifact, either. What if a fragment is established using {"@id": "#here", ...} and either the * of / facilities? Could this lead to some confusion. It might be best to say that YAML-LD relies on exactly the same fragment identifier definition as JSON-LD.

ioggstream commented 2 years ago

@gkellogg there's an ongoing discussion on YAML fragids here https://github.com/ietf-wg-httpapi/mediatypes/issues/50

There's a proposal for applying to all xxx+yaml the fragid defined for yaml. Please have a look at the thread because it is important.

gkellogg commented 2 years ago

@gkellogg there's an ongoing discussion on YAML fragids here ietf-wg-httpapi/mediatypes#50

There's a proposal for applying to all xxx+yaml the fragid defined for yaml. Please have a look at the thread because it is important.

I think there is probably some room for using fragment identifiers for different things. For RDF/JSON-LD a class of fragment identifiers relates to things described in the RDF graph. This may allow parallel use of YAML fragment identifiers for simply referring to things within the YAML document itself, which would certainly be needed to unwind references. We need to be sure we're compatible with RDF Concepts use for Fragment Identifiers.