Skip to content

Serializer accepts invalid Turtle syntax as input and outputs invalid RDF #85

@rjyounes

Description

@rjyounes

The serializer accepts the following as input:

@prefix ex: <https://example.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .

ex:Person
	a owl:Class ;
	skos:prefLabel: "Person"^^xs:string ;
	.

and outputs the following invalid RDF/XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF [
	<!ENTITY ex "https://example.org/">
	<!ENTITY owl "http://www.w3.org/2002/07/owl#">
	<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
	<!ENTITY skos "http://www.w3.org/2004/02/skos/core#">
	<!ENTITY xs "http://www.w3.org/2001/XMLSchema#">
]>
<rdf:RDF
	xmlns:ex="https://example.org/"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:skos="http://www.w3.org/2004/02/skos/core#"
	xmlns:xs="http://www.w3.org/2001/XMLSchema#">
	
	<owl:Class rdf:about="&ex;Person">
		<skos:prefLabel: rdf:datatype="&xs;string">Person</skos:prefLabel:>
	</owl:Class>

</rdf:RDF>

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