- From: Ruben Verborgh <ruben.verborgh@ugent.be>
- Date: Mon, 4 Jan 2016 09:48:16 +0100
- To: RDF-JS <public-rdfjs@w3.org>
Dear all, As part of the specification for JavaScript RDF library interoperability, we aim to create a method or property for a "canonical representation" of triples/quads and their components. We would like your input for this. For example, consider the triple (Turtle notation): PREFIX schema: <http://schema.org/> <http://example.org/Concept> schema:url "http://example.org/Concept". A JavaScript library will represent this in memory in some way. With the current proposal, the following will be possible: console.log(triple.subject.value) // "http://example.org/Concept" console.log(triple.subject.termType) // "iri" console.log(triple.predicate.value) // "http://schema.org/url" console.log(triple.predicate.termType) // "iri" console.log(triple.object.value) // "http://example.org/Concept" console.log(triple.object.termType) // "literal" Note in particular that subject.value and object.value are the same strings, even though subject and object are different entities. Also note that it taks two property accesses to fully capture an entity (even more in case of a literal, which might have a datatype or language). Therefore, we want to introduce a property or method that returns a string which uniquely represents an entity / triple / quad. There must be a 1-to-1 correspondence between such a representation and an entity / triple / quad. A (fictitious) example of how this could work: console.log(triple.subject.getCanonicalRepresentation()) // "<http://example.org/Concept>" console.log(triple.object.getCanonicalRepresentation()) // "^http://example.org/Concept^" Note how the representation is different for IRIs and literals, even if they have the same value. Note also that this representation is _not_ Turtle or N-Triples, since these formats can only express full triples. Moreover, our library aims to support variables, which are not available in these formats. What we are looking for is: – a name for this method or property – current suggestions include .toCanonical() and .toNT() – values this method or property should return – e.g., "IRIs are surrounded by angular brackets" We appreciate your take on this. Best regards and my best wishes for 2016, Ruben
Received on Monday, 4 January 2016 08:48:45 UTC