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

Re: Blank nodes & classes

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Fri, 22 Jun 2007 13:22:18 +0100
Message-ID: <640dd5060706220522i5be2ce36s4a97e618b7989872@mail.gmail.com>
To: "CÚdric Mesnage" <cedric.mesnage@lu.unisi.ch>
Cc: public-rdf-in-xhtml-tf@w3.org

Hi CÚdric,

> First of all, thank you for your answers, I used Ben's practice to solve the
> problem.

Ok.


> I am strongly against using URIs to identify resources...

I think that's a discussion for another list. :)

But having said that..... ;)


> ...one should use URLs
> where you can get more info... so I'll use http://amazon.com/ISBN:0091808189
> instead of urn:ISBN:0091808189 even if amazon do not provide this service
> yet...

There are two problems with this in my view. First, using the URL for
a web page to simultaneously identify a book is not current 'best
practice'. Ideally we would distinguish between resources (the broad
class of things you want to refer to) and information resources (a
narrower class of resources which are retrievable over the internet).

Second, your proposal seems limited, and not as distributed as it
could be. The point I was trying to get to with my illustration was
that I want to say something about the book itself, independent of any
retailer, or even of any service that might have some data about the
book. That way, different people reading my blog could have different
information presented to them, based on their own preferences. Your
method would only give me the data that Amazon deemed important about
the book, but that might be completely irrelevant to a student of
cooking, training to be a chef.


> according to your example, to get the rdfs:label triple, the right markup
> would be:
>
> <span about="http://amazon.com/ISBN:0091808189"
> property="rdfs:label">
>  Canteen Cuisine
> </span>

I don't know if you can say it's the 'right' mark-up, although of
course it represents one view. You are saying that the label should be
spelt out, but by extension, the 'right' mark-up should really be:

  <span about="http://amazon.com/ISBN:0091808189"
    property="rdfs:label" content="Canteen Cuisine">
    Canteen Cuisine
  </span>

In other words, if you believe that we shouldn't take anything from
the structure of the document, then we really should spell everything
out.

As it happens, in my view rdfs:label is *exactly* right for this. The
definition of rdfs:label says nothing more than that rdfs:label is a
human readable label for a resource. I really don't think a big leap
in logic is being if we were to assume that an author who tags some
text with @about is making exactly that statement.


> The question seems not to be what is the minimum markup that should give a
> triple but more :
>
>  what is the minimum markup to generate the maximum triples...

They are two separate issues. The 'what is the minimum?' question
concerns trying to make things easy for authors to add useful
information. So if I have a blog and I mention a couple of books and a
company, should I need to specify more than an @about on a <span>? I
think it would be great for ease of use and adoption of RDFa if it was
not necessary. However, adding a @class value is not so much extra
work, and that's good enough for now.

But in terms of 'minimum mark-up, maximum triples' then all of your
examples that follow are perfectly fine. How far you go with packing
lots of attributes onto an element depends only on whether the mark-up
will ever be read by a human or not. :) Particularly your last
example, since a human reader might not immediately spot that some of
the attributes are attached to the bnode. But like I say, it's
certainly all correct. :)


> Can we have :
>
> <span about="http://amazon.com/ISBN:0091808189"
> property="rdfs:label" class="bib:book">
>  Canteen Cuisine
> </span>
>
> which would give:
>
> <http://amazon.com/ISBN:0091808189> rdf:type bib:book.
> <http://amazon.com/ISBN:0091808189> rdfs:label "Canteen
> Cuisine".
>
> and to go back to my example with Ben's solution:
>
> <div class="foaf:Person" rel="rdf:li">
>  some things about the person
> </div>
>
> which gives the triples :
>
> <> rdf:li _:whatever.
> _:whatever rdf:type foaf:Person.
>
> Can we go further than that and do :
>
> <div class="foaf:Person" rel="rdf:li" property="foaf:name">
>  CÚdric Mesnage
> </div>
>
> or even :
>
> <div class="foaf:Person" rel="rdf:li" property="foaf:name" content="CÚdric
> Mesnage"/>
>
> and get:
>
> <> rdf:li _:whatever.
> _:whatever rdf:type foaf:Person.
> _:whatever foaf:name "CÚdric Mesnage".
>
>
>
> ---
> CÚdric Mesnage
> PhD Student
> cedric.mesnage@lu.unisi.ch
> http://www.cedricmesnage.org
> http://blog.cedricmesnage.org/
>
>
>
> On Jun 21, 2007, at 12:10 PM, Mark Birbeck wrote:
>
> Hi Ben/CÚdric,
>
> [I'm not proposing a resolution to this question in this version of
> RDFa, but I think it's useful to collect use-cases.]
>
> I had a use-case the other day that is related to the ones you are
> describing. Essentially the question we all seem to be converging on
> is what is the minimum amount of mark-up that should give us a triple?
>
> So, the following feels quite natural, as a way of marking up the
> mention of something like a book in my blog:
>
>  Today I bought a copy of
>  <span about="urn:ISBN:0091808189" class="bib:book">
>    Canteen Cuisine
>  </span>
>  from my local bookshop.
>
> Since my system uses the URI to retrieve some data about the book from
> a book site like Amazon, I don't actually need any further triples
> like title, price, publisher, author, or whatever. But there is a an
> interesting question as to whether the following should be enough to
> get an entry in the triple store:
>
>  <span about="urn:ISBN:0091808189">
>    Canteen Cuisine
>  </span>
>
> The system could still do the same thing, and retrieve additional
> triples based on the resource, but the question is what are the
> parsing rules that get from this mark-up to a triple?
>
> The only way I can think of to achieve this from the mark-up I've
> shown is be automatically generate labels from the content of
> elements. The mark-up would therefore generate this:
>
>  <urn:ISBN:0091808189> rdfs:label "Canteen Cuisine" .
>
> and we would now have the URI for the book in our triple-store, and
> can make use of it to retrieve further information.
>
> Regards,
>
> Mark
>
> On 13/06/07, Ben Adida <ben@adida.net> wrote:
>
>
> Cedric,
>
> This is an interesting question. I had to deal with this with the RDFa
> clipboard [1], and I chose to use the predicate rel="rdf:li" on any
> bnode I wanted to appear on the page, effectively saying "this bnode is
> an item of the current page." For example, in your code below:
>
> <span class="foaf:Person" rel="rdf:li">
> some things about the person
> </span>
>
> which yields:
>
> <> rdf:li
>      [a foaf:Person; ...things about the person...]
>
> I'm pretty sure this is not a "best practice", but it's the work-around
> I came up with for precisely this issue, and it's not all that wrong in
> terms of semantics: after all, that *is* an item on the page.
>
> -Ben
>
> CÚdric Mesnage wrote:
> > Hi all,
> >
> > I have a question regarding blank nodes in RDFa, I don't know if the
> > issue has been raised already and I apologize if it has. In the RDFa
> > Primer I saw that you can create unnamed blank nodes using the 'rel'
> > attribute as in the example:
> >
> > <dl class="foaf:Person" about="#card" id="card">
> > ...
> >  <dt>Address</dt>
> >  <dd rel="foaf:address">
> >   <span property="foaf:address_line_1">77 Massachusetts
> Ave.</span><br />
> >     <span property="foaf:address_line_2">MIT Room
> 32-G524</span><br />
> >   <span property="foaf:city">Cambridge</span> MA 02139<br
> />
> >   <span property="foaf:country">USA</span>
> >  </dd>
> > ...
> > </dl>
> >
> > This works for predicates layered in an instance definition, do you plan
> > having a similar principle for classes? I'd like to have:
> >
> > <span class="foaf:Person" >
> > some things about the person
> > </span>
> >
> > to be considered as a blank node, currently in RDFa On
> > Rails(http://rdfa.rubyforge.org/) I generate blank node names this way:
> >
> > <span class="foaf:Person" about="#BNode1">
> > some things about the person
> > </span>
> >
> > incrementing the number through the page generation, but this is ugly.
> > The other solution is that I can just forbidden the use of classes if no
> > uri or explicit blank node name is given.
> >
> > Hope this does make some sense and look forward to get you point of view.
> >
> > Best Regards!
> > ---
> > CÚdric Mesnage
> > PhD Student
> > cedric.mesnage@lu.unisi.ch
> <mailto:cedric.mesnage@lu.unisi.ch>
> > http://www.inf.unisi.ch/phd/mesnage/
> > http://myunderstanding.wordpress.com/
> >
> >
>
>
>
>
>
>
>
> --
>  Mark Birbeck, formsPlayer
>
>  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
>  http://www.formsPlayer.com |
> http://internet-apps.blogspot.com
>
>  standards. innovation.
>


-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.
Received on Friday, 22 June 2007 12:22:26 UTC

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