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

Re: GetN3 Bookmarklet, and subject processing

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Fri, 22 Feb 2008 17:16:43 +0000
Message-ID: <a707f8300802220916r62cbabcfpdd86b28c9e4d3d6a@mail.gmail.com>
To: "Ed Summers" <ehs@pobox.com>
Cc: "public-rdf-in-xhtml-tf. w3. org" <public-rdf-in-xhtml-tf@w3.org>

Hi Ed,

The key thing here is @instanceof. This attribute has its roots in the
HTML @class attribute, and in much the same was as @class, it
'applies' to the current element. So in this case:

  <p instanceof="cal:Vevent">
    ...
  </p>

think of @instanceof as setting the 'type' of the <p> element to be an
event, and then all of the properties within the <p> are attached to
that event.

Further, if there is no 'name' to give to this event then one is
automatically created (which is why you get a bnode), but if a name
exists, it will be used:

  <p about="#bbq" instanceof="cal:Vevent">
    ...
  </p>

Regards,

Mark


On 22/02/2008, Ed Summers <ehs@pobox.com> wrote:
>
>  I've been trying out the RDFa GetN3 bookmarklet [1] and have a
>  question about an example I pulled from the Syntax and Processing doc
>  [2]. Basically I put this html up at
>  http://inkdroid.org/tmp/ex5.xhtml:
>
>  <html
>   xmlns="http://www.w3.org/1999/xhtml"
>   xmlns:cal="http://www.w3.org/2002/12/cal/ical#"
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>   >
>   <head><title>Jo's Friends and Family Blog</title></head>
>   <body>
>     <p instanceof="cal:Vevent">
>       I'm holding
>       <span property="cal:summary">
>         one last summer Barbecue
>       </span>,
>       on
>       <span property="cal:dtstart" content="20070916T1600-0500"
>             datatype="xsd:datetime">
>         September 16th at 4pm
>       </span>.
>     </p>
>   </body>
>  </html>
>
>  I directed my browser there and then clicked on the GetN3 bookmarklet
>  and got the following triples:
>
>  _:n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>  <http://www.w3.org/2002/12/cal/ical#Vevent> .
>  _:n0 <http://www.w3.org/2002/12/cal/ical#summary> "
>         one last summer Barbecue
>       " .
>  _:n0 <http://www.w3.org/2002/12/cal/ical#dtstart>
>  "20070916T1600-0500"^^<http://www.w3.org/2001/XMLSchemadatetime> .
>
>  I was expecting the subjects to be <http://inkdroid.org/tmp/ex5.xhtml>
>  instead of blank nodes (_:n0). Perhaps I am misinterpreting the
>  processing instructions?
>
>  """
>  # the [base] is set to either the URL of the document or the value
>  specified in the base element, if present;
>  # the [parent subject] is set to the [base] value;
>
>  ...
>
>  When triples are created they will always be in relation to a subject
>  resource which is provided either by [new subject] (if there are rules
>  on the current element that have set a subject) or [parent subject],
>  as passed in via the [evaluation context].
>  """
>
>  Or maybe GetN3 needs to account for this step in the processing?
>
>  //Ed
>
>  [1] http://www.w3.org/2006/07/SWD/RDFa/impl/js/
>  [2] http://www.w3.org/TR/rdfa-syntax/#sec_2.2.
>
>


-- 
  Mark Birbeck

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

  x-port.net Ltd. is registered in England and Wales, number 03730711
  The registered office is at:

    2nd Floor
    Titchfield House
    69-85 Tabernacle Street
    London
    EC2A 4RR
Received on Friday, 22 February 2008 17:17:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 February 2008 17:17:02 GMT