Skip to content

Can't decipher IRI Expansion algorithm #187

@cygri

Description

@cygri

I'm trying to work out what this should do under Expansion:

{
  "@type":"A"
}

I get lost in the IRI Expansion algorithm around here:

  1. Otherwise, split the value into a prefix and suffix from the first occurrence of ':'.

This doesn't seem to apply as the value doesn't contain a colon. But then I read in 6)

Note that an empty suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.

But 6) clearly doesn't apply to the situation, so I shouldn't even read it, no? Also, why isn't this case spelled out explicitly?

The rest of the algorithm talks about “the IRI being processed”, up until here the input has been called a “value”, so do 7) and 8) apply now?

  1. doesn't make any sense—it talks about the case where there is no colon (hence no splitting into prefix and suffix is possible), but then talks about a “mapped value” (no idea what this might possibly refer to) and about a “suffix” (which doesn't exist—there was no colon, so no suffix)

So I've no idea what the result of expanding the snippet above should be. The Playground just produces "@type": ["A"], which surely can't be right, as @type values go through IRI expansion and hence should be producing IRIs, not literals.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions