W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > December 2007

CURIE syntax thoughts + @instanceof semantics

From: Ivan Herman <ivan@w3.org>
Date: Sun, 16 Dec 2007 11:17:15 +0100
Message-ID: <4764FB2B.2040307@w3.org>
To: W3C RDFa task force <public-rdf-in-xhtml-tf@w3.org>
Hi guys,

just try to share some line of thoughts that (1) came to my mind related
to edge cases of the CURIE syntax and (2) gave me some new ideas related
to @instanceof. (I hope I could catch your attention:-)

1. At present, my reading of the CURIE syntax grammar is that the
following is illegal:


Ie, what is called a "reference" in the syntax is _required_. My first
question is: why? Why can't we say that the value of "prefix:" is, well,
the URI that is defined for the prefix? Is there any fundamental reason
for that?

2. If moved along the line of #1 and if we accepted, for a moment, that
a "prefix:" is a legal CURIE, then the next problem is to define what
the meaning of "_:" is. Well, there seems to be a perfectly valid answer
for that: this is a unique identifier chosen by the implementation with
the restriction that _each_ occurrence of "_:" is a _different_ unique
identifier. In RDF terms this means that each occurrence of "_:" is a
_different_ blank node.

3. How does this affect @instanceof? As I see the issue now is to define
unambiguously when an @instanceof generates a new (subject) BNode and
when not. At least, as far as I am concerned, this is still the
outstanding and somewhat muddy issue. So what if, instead, we say:

- accept the CURIE edge cases #1 and #2
 an abbreviation for- there is _no_ exception for @instanceof, ie, it
behaves _exactly_ like <... @rel="rdf:type" @resource="THE TYPE CURIE"/>

Ie, if we have

<div about="#a"><span instanceof="a:b"/></div>

it generates

<#a> rdf:type a:b.

If we have a hanging rel

<div about="#a" rel="q:w"><span instanceof="a:b"/></div>

then we get

<#a> q:w [ rdf:type a:b ].

Etc. But what about Ben's use case in [1]? Remember that he has
something like

<div about="#me" rel="foaf:knows">
   <span property="foaf:name"
   <span property="foaf:name">Jeni</span>

and the use case would require to get, somehow,

<#me> foaf:knows
    [ a foaf:Person; foaf:name "Ralph" ];
    [ foaf:name "Jeni" ].

and this is achieved currently by some extra rule whereby the
@instanceof, in some circumstances, would generate an extra blank node,
replacing the one to be used for the hanging @rel of the parent. Well,
this would indeed require a tiny change, but which I do not find so bad:

<div about="#me" rel="foaf:knows">
   <span about="[_:]" property="foaf:name"
   <span property="foaf:name">Jeni</span>

Which would yield the triples about without requiring any new rule and,
which is important, would be still copy-pastable (sorry for the English
neologism:-). I think the copy-pastable nature is the main requirement
here, that is why using something like @about="[_:q1]" in the first span
would not be ideal.

There is a small price to pay with the somewhat cryptic [_:] thing
(though I do not expect to come up frequently in practice) but I somehow
feel that the model would remain very clean, more easily describable and



P.S. Ralph told me on the phone that a possible change is to use @src to
generate the current subject and not the object, thereby solving the
other hanging issue of @instanceof. I think this is a perfect solution

[1] http://www.w3.org/2006/07/SWD/RDFa/impl/js/test.html


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 Sunday, 16 December 2007 10:17:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:25 UTC