Skip to content

Qualified names should be typed as xsd:QName in PROV-JSON #168

@ynamiki

Description

@ynamiki

When encoding the example described in Section 3.1.2 of the PROV-JSON document using the prov library, the generated JSON output differs from what is shown in the documentation.

Specifically, the output produced by prov is:

import prov.model as prov

document = prov.ProvDocument()

document.set_default_namespace('http://example.org/default')
document.add_namespace('ex', 'http://example.org/')

document.agent('e1', {prov.PROV_TYPE: 'prov:Person'})

document.serialize(format='json')) # =>

# {
#   "prefix": {
#     "ex": "http://example.org/",
#     "default": "http://example.org/default"
#   },
#   "agent": {
#     "e1": {
#       "prov:type": "prov:Person"
#     }
#   }
# }

However, the PROV-JSON document shows the following output for the same example:

...
"agent": {
    "e1": {
        ...
        "prov:type": {
            "$": "prov:Person",
            "type": "xsd:QName"
        }
    }
    ...
},
...

It seems that it should be represented as an xsd:QName according to the document.

prov version: 2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions