Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turtle shorthands #2

Open
samuelbarrett1234 opened this issue Sep 11, 2022 · 0 comments
Open

Turtle shorthands #2

samuelbarrett1234 opened this issue Sep 11, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@samuelbarrett1234
Copy link
Owner

samuelbarrett1234 commented Sep 11, 2022

This example shows how many predicate-object pairs can be associated with a single object (note the semicolons):

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<http://www.w3.org/1999/02/22-rdf-syntax-ns#> a owl:Ontology ;
	dc:title "The RDF Concepts Vocabulary (RDF)" ;
	dc:date "2019-12-16" ;
	dc:description "This is the RDF Schema for the RDF vocabulary terms in the RDF Namespace, defined in RDF 1.1 Concepts." .

rdf:HTML a rdfs:Datatype ;
	rdfs:subClassOf rdfs:Literal ;
	rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
	rdfs:seeAlso <http://www.w3.org/TR/rdf11-concepts/#section-html> ;
	rdfs:label "HTML" ;
	rdfs:comment "The datatype of RDF literals storing fragments of HTML content" .

rdf:langString a rdfs:Datatype ;
	rdfs:subClassOf rdfs:Literal ;
	rdfs:isDefinedBy <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ;
	rdfs:seeAlso <http://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal> ;
	rdfs:label "langString" ;
	rdfs:comment "The datatype of language-tagged string values" .

And this example shows how many objects can be associated with a single subject-predicate pair (note the square brackets):

@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc:   <http://purl.org/dc/elements/1.1/> .

<http://en.wikipedia.org/wiki/Tony_Benn>
    dc:publisher "Wikipedia" ;
    dc:title "Tony Benn" ;
    foaf:primaryTopic [
        a foaf:Person ;
        foaf:name "Tony Benn"
    ] .
@samuelbarrett1234 samuelbarrett1234 added the enhancement New feature or request label Sep 11, 2022
@samuelbarrett1234 samuelbarrett1234 changed the title Turtle shorthand for specifying multiple triples with a single subject Turtle shorthands Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant