Re: better support for bnodes

Mark Birbeck wrote:
> 
> Hi all,
> 
> Good work Ben, on the example.
> 
>
[snip]
> 
> WHAT TO DO IF WE HAVE A PREDICATE BUT NO OBJECT
> 
> I'd say that one way to look at the problem is that we don't say
> anything about what should happen if there is no @href, but there is a
> predicate present. To illustrate, I'll mark up as far as is currently
> possible in RDFa, Ben's example, in a way that I would suggest is
> quite intuitive (I've only used a part of the Turtle, since the
> collection of authors is another matter again):
> 
>  <div about="[_:DJDKWBDADIH05]" class="bibtex:Article">
>    <meta property="bibtex:title">Do you see what I mean?</meta>
>    <div rel="bibtex:journal">
>      <meta property="bibtex:name">IEEE Computer Graphics &amp;
> Application</meta>
>    </div>
>  </div>
> 
> I don't think we can mark up the example any more simply than this,
> and to me it 'feels' quite natural. But the odd thing is that although
> it feels right, the second-level 'div' with only a @rel doesn't
> actually mean anything in RDFa. This is because we don't say anything
> about what to do if a @rel (or other predicate) is detected but an
> @href isn't.
> 
> Just to recap on how we've defined the processing model, in section
> 4.2 in RDFa Syntax we say that processing starts when we see a
> predicate (@rel in this example). We then go on to 'look for' a
> subject and an object, based on various rules. The rules for the
> subject are pretty clear, and they already take into account what
> happens if no subject can be found. But although the rules for the
> object are also clear, nothing is said about what happens if an object
> attribute is missing.
> 
> (Note that if there is no object when the predicate is @property, the
> obvious default for the object is a string literal of an empty string.
> We also have a rule for a missing object if the predicate is @rev,
> since the rules for @about will kick in. So we're really only talking
> about the situation where we have an element with a @rel, but no
> @href.)
> 
> So, one way to improve the use of bnodes would be to make use of this
> 'missing object syntax', and say that if no object is specified then
> the object is the 'current element'. In the example I gave above, this
> amounts to a triple that uses the internally generated bnode
> identifier on the second-level 'div' as its object, which is what we
> want.
> 
> 
> WRINKLE 1
> 
> Unfortunately, the first wrinkle with this is what to do if the author
> at some later point adds an @href:
> 
>  <div about="[_:DJDKWBDADIH05]" class="bibtex:Article">
>    <meta property="bibtex:title">Do you see what I mean?</meta>
>    <div rel="bibtex:journal" href="[journal:IEEECGA]">
>      <meta property="bibtex:name">IEEE Computer Graphics &amp;
> Application</meta>
>    </div>
>  </div>
> 
> We've now got a bnode that isn't attached to anything, with a
> predicate of bibtex:name. 

Hm. Is there? My understanding (but that may be wrong!) is that in your
outlined solution above the blank node is created because no object has
been assigned to bibtex:journal. If there is an object to it, then there
is no reason to define a blank node; the meta would then be attached to
the _:DJDKWBDADIH05 under the rules of finding a subject. Isn't that
what would happen? (It is not necessarily much nicer, though, but those
are the rules...)


>                            It may be argued that this is not actually a
> problem, since the author has now explicitly specified a new resource
> for the bibtex:journal predicate, but the issue is the 'trailing'
> anonymous node. I happen to think this is all ok, since it takes the
> author at their word, but I'm flagging it up for discussion.
> 
> 
> WRINKLE 2
> 
> The second issue is that the group might feel uncomfortable with the
> object of the statement being the automatically created @id of the
> anonymous node, when using @rel. To put it another way, we have:
> 
>  @about @rel @id
> 
> to generate the statement, but @id is normally used as the subject. It
> may feel a little more 'natural' to use @rev:
> 
>  <div about="[_:DJDKWBDADIH05]" class="bibtex:Article">
>    <meta property="bibtex:title">Do you see what I mean?</meta>
>    <div rev="bibtex:journal">
>      <meta property="bibtex:name">IEEE Computer Graphics &amp;
> Application</meta>
>    </div>
>  </div>
> 
> But this then has the disadvantage that the subject is now @about,
> which does not conform to the normal object resolution rules. Also,
> the rule would still be overridden by the presence of an @href, since
> this attribute already has clearly defined behaviour.
> 
> Having said that, I could go either way on this, since the
> 'unusualness' of @rev would draw attention to this construction.
> 
> 
> SUMMARY
> 
> Anyway, wrinkles and all, it seems to me that there is a solution in
> here somewhere, fighting to get out. 


:-) Well, I am happy I could assist in this fight:-)

Seriously, the solution you have outlined seem to work...


>                                        In summary, it would be something
> like an addition of the following to the 'object resolution' section
> (4.4.2):
> 
>  DELETE:There is no other way...
> 
>  ADD:If there is no 'href' attribute present, the URI to use for the
> object is a
>  [unique anonymous ID] generated to identify the [blank node] associated
> with
>  the [context statement].
> 
> Not quite sure if this is right...but I hope that will get us going,
> as a strawman for discussion.
> 
> Regards,
> 
> Mark
> 
> 
> 
> On 01/10/06, Ben Adida <ben@mit.edu> wrote:
> 
>>
>>
>> I was tasked with sending a complete example of the bnode support issue,
>> as described by Ivan Herman. The issue is: how can we make it easier to
>> represent this in RDFa? Currently, we would have to name the bnodes
>> uniquely, which somewhat defeats the purpose of the bnode in the first
>> place.
>>
>> Here is the turtle example:
>>
>>
>> :DJDKWBDADIH05 a bibtex:Article;
>>     bibtex:title "Do you see what I mean?";
>>     bibtex:author (
>>           [
>>             foaf:name "David J Duke".
>>           ],
>>           [
>>             foaf:name "Ken W Brodlie".
>>           ]
>>           [
>>             foaf:name "David J Duce".
>>           ],
>>           [
>>             foaf:name "Ivan Herman".
>>           ]
>>     );
>>     bibtex:journal [
>>           bibtex:name "IEEE Computer Graphics &amp; Application"
>>         ];
>>     bibtex:volume "25";
>>     bibtex:number "3";
>>     bibtex:date [
>>           bibtex:year "2005";
>>           bibtex:month "3";
>>     ]
>>     bibtex:page [
>>           bibtex:startPage "6";
>>           bibtex:endPage "9".
>>     ].
>>
>>
>> -Ben
>>
>>
>>
> 
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 2 October 2006 18:10:14 UTC