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

Using @class to represent rdf:type [was RE: Drafts of CURIE note, RDF/A spec, and Examples]

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Sun, 23 Oct 2005 22:31:43 +0100
Message-ID: <338F7A20-139A-45B0-8227-E390BE48A49B@s15.mail.x-port.net>
To: "'Ben Adida'" <ben@mit.edu>
Cc: "'public-rdf-in-xhtml task force'" <public-rdf-in-xhtml-tf@w3.org>, "'Ian Davis'" <iand@internetalchemy.org>

Hi Ben,

@class doesn't only represent something in the stylesheet, it just happens
that this is the most common usage. A 'proper' usage of @class from an HTML
point of view would still be something like this:

  <span class="book">Crime and Punishment</span>

The fact that I can add CSS styling based on this is obviously useful, and
over the years that has of course become the predominant purpose. But
despite that the microformat people have made use of @profile, and the GRDDL
people have made use of context, to read meaning into these @class values.
Despite the problems of trying to use @class this way when there are no
namespaces, it's clear that there is an increasing move towards using @class
in its 'proper' semantic sense (as Ian has himself been codifying).

It's also worth remembering that the early motivation for @role was because
@class had been 'polluted' by being used for styling, although I have to say
that people were a little scared of the alternative solution which was to
put QNames into @class and CSS. But since using QNames (or now CURIEs) in
@class is completely doable, then the only tricky bit we are left with as
far as I can see, is to choose one or other from the following:

   * We either turn *all* entries in @class into rdf:types, with a
     consequence that we end up with lots of extra triples;

   * we only turn *prefixed* entries in @class into rdf:types, which
     will mean that legacy stuff will just not feature in our triples.

Note though that even the first solution is not as bad as it sounds, since
the triples from our previous example of:

  <div class="biblio:Publication book">
    ...
  </div>

would actually be:

  _:div0 rdf:type biblio:Publication
  _:div0 rdf:type :book

The latter triple is there if you want to use it (a kind of 'localised' book
object), but is also easy to ignore since it doesn't have any 'global'
meaning.


Anyway, to come at it from another direction...there is an increasing use of
@class *anyway* to provide semantic information, but it suffers from a lack
of CURIEs. We should therefore consider what the contents of @class mean in
RDF/A, otherwise we risk requiring duplication of information. It certainly
feels like using it to provide typing information is a good use of it.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/ 

> -----Original Message-----
> From: Ben Adida [mailto:ben@mit.edu] 
> Sent: 23 October 2005 18:48
> To: Mark Birbeck
> Cc: 'public-rdf-in-xhtml task force'; 'Ian Davis'
> Subject: Re: Drafts of CURIE note, RDF/A spec, and Examples
> 
> 
> Mark,
> 
> I see the appeal, but I'm a bit wary of the consequences of 
> making @class a shorthand for rdf:type. Specifically, all 
> current class=""  
> attributes would yield triples with an object URI that might 
> well be something totally different from what one might 
> expect (or it might be nothing at all). @class refers to 
> something in the stylesheet, yet that would not be reflected 
> in the typical CURIE resolution....
> 
> So, like I said, I see the appeal, but I think we need to 
> consider the potential complications.
> 
> -Ben
> 
> On Oct 23, 2005, at 1:32 PM, Mark Birbeck wrote:
> 
> >
> > Ben,
> >
> > Reading Ian Davis' proposal (which is excellent Ian, by the 
> way), and 
> > looking at your latest examples Ben, it occurred to me that 
> we could 
> > easily make @class into a CURIE in XHTML 2, and cause that 
> to generate 
> > a triple with a predicate of rdf:type.
> >
> > This would solve the problem we have been discussing of:
> >
> >   is there some way that xh2:role is equivalent to rdf:type, and if 
> > not
> >   how do we get such a convenient shorthand (technically 
> known as the
> >   Pemberton-shorthand ;)).
> >
> > Using this approach, we could recast one of your examples 
> as follows:
> >
> >   <h2>Publications</h2>
> >   <div id="publication_1" class="biblio:Publication">
> >     <link rel="dc:creator" href="http://www.blogger.com/profile/
> > 1109404" />
> >     <meta property="dc:title">A Standards-Based Virtual 
> Machine</meta>
> >     <link rel="taxo:topics" href="#tag_standards" />
> >   </div>
> >
> > It would still give the same triples:
> >
> >   <#publication_1> rdf:type biblio:Publication .
> >   <#publication_1> dc:creator 
> <http://www.blogger.com/profile/1109404>
> >   <#publication_1> dc:title "A Standards-Based Virtual Machine" .
> >   <#publication_1> taxo:topics <#tag_standards> .
> >
> > Note by the way that mixing CURIEs and class names in 
> @class doesn't 
> > fall into the same set of issues as I mentioned before with @rel, 
> > since there are no 'standard' class names. So this is fine:
> >
> >   <div class="biblio:Publication book">
> >     ...
> >   </div>
> >
> > 'book' could just be in the namespace of the current 
> document, and if 
> > present, @profile could be used (as is the current trend with 
> > microformats).
> >
> > Regards,
> >
> > Mark
> >
> >
> > Mark Birbeck
> > CEO
> > x-port.net Ltd.
> >
> > e: Mark.Birbeck@x-port.net
> > t: +44 (0) 20 7689 9232
> > w: http://www.formsPlayer.com/
> > b: http://internet-apps.blogspot.com/
> >
> > Download our XForms processor from
> > http://www.formsPlayer.com/
> >
> >
> >> -----Original Message-----
> >> From: public-rdf-in-xhtml-tf-request@w3.org
> >> [mailto:public-rdf-in-xhtml-tf-request@w3.org] On Behalf 
> Of Ben Adida
> >> Sent: 23 October 2005 03:21
> >> To: public-rdf-in-xhtml task force
> >> Subject: Drafts of CURIE note, RDF/A spec, and Examples
> >>
> >>
> >>
> >> Hi all,
> >>
> >> Well, I can say that we're on schedule by 90 minutes :)
> >>
> >> PLEASE, if you can, take a couple of hours between now and 
> Tuesday's 
> >> telecon to look these over and send comments. This is the 
> first time 
> >> we've written down the latest details we've discussed, so 
> we need to 
> >> double and triple check this.
> >>
> >> Thanks to Mark, we have a CURIE note:
> >> http://www.w3.org/2001/sw/BestPractices/HTML/2005-10-21-curie
> >>
> >> I've worked to update the RDF/A specification. Please forgive the 
> >> extraneous characters as I had to work from the HTML, not the base 
> >> XML. I'll get those fixed eventually. Note that the "Motivation"
> >> section probably needs another look, but it will do for now.
> >> Finally, I'm sure I've got some bugs in there 
> (particularly CURIE), 
> >> so feel free to send corrections.
> >> http://www.w3.org/2001/sw/BestPractices/HTML/2005-rdfa-spec
> >>
> >> And then the examples, which will need to be beefed up 
> into a primer:
> >> http://www.w3.org/2001/sw/BestPractices/HTML/2005-rdfa
> >>
> >> -Ben
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 
Received on Sunday, 23 October 2005 21:33:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:00 GMT