Skip to content

Improve Object to RDF Conversion language regarding datatype well-formedness #282

@kasei

Description

@kasei

Object to RDF Conversion step 6 says:

If datatype is not well-formed, return null.

However, I believe the condition here should be expanded to:

If datatype is not null and is not well-formed, return null.

This is because datatype can be set to null in step step 5, and I do not believe null is a well-formed datatype IRI (but do believe that the intent here is for this step to be skipped if datatype is null). However, the language used for "well-formedness" is also a bit confusing:

A literal is well-formed if it has the lexical form of a string, any datatype IRI is well-formed, and any language tag is well-formed according to section 2.2.9 of [BCP47].

This comes in a section that only seems to define IRIs, blank node identifiers, and literals for well-formedness. I interpret "any datatype IRI is well-formed" to mean that a datatype must be a well-formed IRI, but it would be nice to see the language improved to make that explicit, since in this case the algorithm is explicitly testing a datatype for well-formedness.

This proposed condition language for step 6 would also match the style of step 7 which says:

If item has an @language entry which is not well-formed, return null.

(testing for existence as well as for well-formedness)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions