You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that <did:AtprotoPersonalDataServer> is being emitted as the canonization of AtprotoPersonalDataServer which is incorrect.
Tangentially, taking out the @base from the @context and absolutizing the service.id in some other way (like prefixing it with a URI) will cause the processor to emit a warning about a "relative @type reference".
Also tangentially, taking out the @base from the @context and also taking out the # from the id atproto_pds will exhibit similar behavior -- <did:atproto_pds> is emitted as the object of the quad.
{"@base": "did:plc:ewvi7nxzyoun6zhxrhs64oiz"} will do this, but {"@base": "did:plc:ewvi7nxzyoun6zhxrhs64oiz#"} will also do the same thing.
In short, the playground is behaving as if I am declaring {"@base": "did:"}; the base IRI is seemingly truncated after the first colon.
The text was updated successfully, but these errors were encountered:
<did:AtprotoPersonalDataServer> is correct, according the the way IRIs are resolved. Rules are different for resolving vocabulary-relative and document-relative IRIs, and @type uses both vocabulary- and document-relative processing (different from everything else). If it were vocabulary relative, and @vocab had been set to "did:plc:ewvi7nxzyoun6zhxrhs64oiz", "AtprotoPersonalDataServer" would get appended, yielding <did:AtprotoPersonalDataServerAtprotoPersonalDataServer > (probably also not what you'd want).
Given that it is document-relative, the rules for resolving relative IRIs ( "AtprotoPersonalDataServer") are defined in RFC3886 Relative Resolution. The operative bit in 5.2.3 Merge Paths is:
return a string consisting of the reference's path component
appended to all but the last segment of the base URI's path (i.e.,
excluding any characters after the right-most "/" in the base URI
path, or excluding the entire base URI path if it does not contain
any "/" characters).
The base URI has only one segment, so the relative IRI is appended to the scheme.
In playing around with w3c/json-ld-syntax#446 (i.e. where
@type
is not an IRI), I discovered that the playground will take this:and canonize it as this:
Note that
<did:AtprotoPersonalDataServer>
is being emitted as the canonization ofAtprotoPersonalDataServer
which is incorrect.Tangentially, taking out the
@base
from the@context
and absolutizing the service.id in some other way (like prefixing it with a URI) will cause the processor to emit a warning about a "relative@type
reference".Also tangentially, taking out the
@base
from the@context
and also taking out the#
from the idatproto_pds
will exhibit similar behavior --<did:atproto_pds>
is emitted as the object of the quad.{"@base": "did:plc:ewvi7nxzyoun6zhxrhs64oiz"}
will do this, but{"@base": "did:plc:ewvi7nxzyoun6zhxrhs64oiz#"}
will also do the same thing.In short, the playground is behaving as if I am declaring
{"@base": "did:"}
; the base IRI is seemingly truncated after the first colon.The text was updated successfully, but these errors were encountered: