Skip to content

Question About Recent Changes in Long Turtle Serializer in v7.1.3 #3062

@lsharma-202

Description

@lsharma-202

Hi,

With the recent changes in serializers/longturtle.py, it seems that maintaining an empty prefix in a .ttl file is no longer possible. For example, the following:

PREFIX : <http://example.org/resource>

:A  
    rdf:type owl:Ontology  
.  

is now reformatted as:

<http://example.org/resource#A>  
    rdf:type owl:Ontology  
.  

I’d like to understand the motivation behind converting this to an N-Triples-like format and what benefits this change brings.

Additionally, would it be possible to support both rdf:type and a declarations at the same time? There are cases where I need to keep rdf:type in the object position, for instance: sh:property rdf:type. However, the Long Turtle serializer automatically replaces all occurrences of rdf:type with a, while also removing unused the PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> declaration. This results in a BadSyntax error since rdf is no longer defined, even though sh:property rdf:type is still present after serialization.

I hope this clarifies the issue. Looking forward to your insights!

Best,
Lokesh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions