lucmoreau/ProvToolbox

prov-n internationalized string incorrectly serialized

lucmoreau opened this issue · 5 comments

prov-n internationalized strings are currently serialized as

"un lieu"@fr %% prov:InternationalizedString

instead of

"un lieu"@fr

The type prov:InternationalizedString is the type for such strings in the xml serialization. It is also how
the ProvToolbox encodes the types of such strings internally. It should not be exposed in the prov-n representation.

I don't know how this bug this affects the json serialization.

I don't think it have any impact on prov-json as I'm checking the Java type of the value (whether it is a LangString) before encoding it as an international string.

There is probably a change required to the prov-json spec to explain how to serialise internationalized strings.

PROV-JSON says:

if the xsd:string value has a language tag, the literal must be represented in a JSON object as specified above, the language tag in the lang property and the type property omitted.

It looks like I should remove those prov:InternationalString added in the JSON outputs.

I think that an xsd:string cannot have a language tag since it is a XML simple type.

Original issue is now addressed in development branch. Prov-json issue is outstanding.