Page MenuHomeSoftware Heritage

SWORD documents use `xmlns:codemeta` as context instead of namespace
Closed, MigratedEdits Locked


Since early versions of the deposit (rDDEPf04c12ed5813676c1eed581ef5594d9a1379365c), xmlns:codemeta="" is used, even though the actual Codemeta namespace is

This means that this document:

<?xml version="1.0"?>
    <entry xmlns=""
        <title>Awesome Compiler</title>
        <codemeta:url>origin url</codemeta:url>

Should actually be translated to a JSON-LD document that looks like this:

    "@context": [
        {"atom": ""}
    "atom:title": "Awesome Compiler",
    "id": "1785io25c695",
    "url": "origin url"

(note the added # to the atom namespace, so it is valid JSON-LD; / would have worked too)

Which is equivalent to this in a somewhat expanded form:

  "": "Awesome Compiler",
  "@id": "",
  "": " url"

This is very counter-intuitive, as one would expect XMLNSs to be mapped to JSON-LD compact URIs, like so:

    "@context": {
        "codemeta": "",
        "atom": ""
    "atom:title": "Awesome Compiler",
    "codemeta:id": "1785io25c695",
    "codemeta:url": "origin url"

(note the added # as well)

which is equivalent to this:

  "": "Awesome Compiler",
  "": "1785io25c695",
  "": "origin url"

which is clearly not a codemeta document.

We need to clearly document this pecular behavior, along with the rest of the implied JSON-LD <-> XML translations that are going on in the deposit.