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

Re: RDFa for table columns

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Tue, 21 Apr 2009 16:51:58 +0100
Message-ID: <ed77aa9f0904210851w34e0e880w9aebfafbbf3851d0@mail.gmail.com>
To: publicayers@verizon.net
Cc: public-rdf-in-xhtml-tf@w3.org
Hi Brian,

It wasn't an oversight, though. :)

The main problem was coping with XML literals, but even if you argued
that XML literals aren't that useful, the parser would still not know
at what point to generate triples when you have nested elements:

  <div property="foaf:name">
    Is this
    <span>
      my name,
      <span>or this</span>
      , or should we
    </span>
    just combine the lot?
  </div>

Anyway, there's always scope to add more attributes in future
versions, as well as to create things like templating mechanisms which
might be more in line with what you are trying to do.

Regards,

Mark

On Tue, Apr 21, 2009 at 4:04 PM,  <publicayers@verizon.net> wrote:
> Right, but what I was hoping to do is factor out the duplicated
> @property="foaf:name" on each of the cells in the first column (and the
> @property="foaf:address" on the second, ...).
>
> It just seemed to me that you guys went through considerable trouble to
> reduce redundant assertions with things like chaining; however, as you
> pointed out, chaining doesn't work in this case. Being able to put something
> like
> <table>
> <tr>
>   <th colProp="foaf:name">Name</th>
>   <th colProp="foaf:dateOfBirth" datatype="xsd:date">Date of Birth</th></tr>
> <tr about="#alice"><td>Alice</td><td>1972-01-20</td></tr>
> <tr about="#brian">...</tr>
> ...
> </table>
>
> could save a lot of redundant @property and @datatype assertions. Not a big
> deal if the table is 2 x 3, but my organization is looking to use XHTML+RDFa
> as a standard format for web service responses that could have hundreds of
> rows.
>
> I'm not really pushing hard for this. While it seems like a kean savings, it
> does feel awkward in it's specialization.
>
> Brian
>
> On Apr 21, 2009, Mark Birbeck <mark.birbeck@webbackplane.com> wrote:
>
> Hi Brian,
>
> The only 'factoring' that you can do is with @rel and @rev; the
> 'hanging triple' behaviour allows you to have the object of the triple
> at some distance from the predicate, which effectively means you can
> 'reuse' a predicate many times over:
>
> <table about="#brian" rel="foaf:knows">
> <tr resource="#alice">
> <td property="foaf:name">Alice</td>
> </tr>
> <tr resource="#bob">
> <td property="foaf:name">Bob</td>
> </tr>
> </table>
>
> However, with @property you'll end up with an XML literal if you try
> to take the same 'hanging' approach, and @datatype must also be
> attached to the same element.
>
> Regards,
>
> Mark
>
> On Tue, Apr 21, 2009 at 3:13 PM, <publicayers@verizon.net> wrote:
>> I was looking into applying RDFa on an HTML table, detailing the
>> relationship between the table row and the columns. It looks like I'll
>> need
>> to add @rel or @property/@datatype on each table cell.
>>
>> Has there been any discussion about expanding RDFa to allow factoring all
>> those duplicate assertions into the //table or perhaps //th for the
>> columns?
>>
>> Brian
>
>
>
> --
> Mark Birbeck, webBackplane
>
> mark.birbeck@webBackplane.com
>
> http://webBackplane.com/mark-birbeck
>
> webBackplane is a trading name of Backplane Ltd. (company number
> 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
> London, EC2A 4RR)
>
>



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)
Received on Tuesday, 21 April 2009 15:52:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 21 April 2009 15:52:43 GMT