Re: N3 bnode question

Toby A Inkster wrote:
> 
> It seems that in N3, I have two choices for expressing a blank node:
> 
>     :mydoc1 dc:creator [ foaf:name "Toby Inkster" ] .
> 
> or
> 
>     :mydoc1 dc:creator _:a .
>     _:a foaf:name "Toby Inkster" .
> 
> My problem is that although the first syntax is more readable (when
> dealing with a graph with dozens or more bnodes), it doesn't offer a way
> of referring to the same bnode multiple times. That is, if I have:
> 
>     :mydoc1 dc:creator [ foaf:name "Toby Inkster" ] .
>     :mydoc2 dc:creator [ foaf:name "Toby Inkster" ] .
> 
> It cannot be legitimately concluded that mydoc1 and mydoc2 share an
> author. (Though I can't imagine there are too many other Toby Inksters
> in the world.)
>

Although your last statement is probably correct:-) indeed, the two
blank nodes cannot be considered as identical...

> So I've been trying to find some sort of compromise, such that the first
> bnode can be given an ID and the others made into references back to
> that ID. rdf:nodeID makes this very easy for RDF/XML, but unless I'm
> mistaken this solution cannot be leveraged in N3. So my proposed
> solution is:
> 
>     :mydoc1 dc:creator [ owl:sameAs _:a ;
>             foaf:name "Toby Inkster"
>             ] .
>     :mydoc2 dc:creator _:a .
> 

well... owl:sameAs is not part of the core RDF vocabulary terms, not
even RDFS[1]. Although widely used, you have to realize that you cannot
expect any RDF or even RDFS environments to understand what it means. In
other words, you rely on a semantic level and implementation that seems
to be relatively heavy compared to what you want to achieve.

That being said, and if you accept this problem then, of course, it can
work at least in some environments. I must admit that for this usage I
would stick to the original idiom of using _:a.

> Or is rdf:nodeID allowed in N3? i.e.
> 
>     :mydoc1 dc:creator [ rdf:nodeID _:a ;
>             foaf:name "Toby Inkster"
>             ] .
>     :mydoc2 dc:creator _:a .
> 
> Is rdf:nodeID allowed to be used like this? 

Sorry, no:-(

Unfortunately, the 'rdf:' (well, to be precise, the corresponding URI[2]
that is abbreviated by it), has a double usage: defines the RDF terms
per the RDF Semantics document[1] and it is also the XML namespace URI
for purely RDF/XML[3] features that are not part of the RDF semantics.
rdf:nodeID is in the latter category: it is a purely RDF/XML artefact
that has no role in the RDF semantics, hence not used in N3/Turtle
either...

>                                              If not, is owl:sameAs a good
> solution to my quandary?
> 
> Thanks for reading, and thanks even more if you can answer my questions!
> 

Well, you are welcome, but I do not think I have made you happier with
my answer:-(

Cheers

Ivan

[1] http://www.w3.org/TR/rdf-mt/
[2] http://www.w3.org/1999/02/22-rdf-syntax-ns#
[3] http://www.w3.org/TR/rdf-syntax-grammar/

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 15 August 2008 13:52:57 UTC