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

Re: GetN3 Bookmarklet, and subject processing

From: Ed Summers <ehs@pobox.com>
Date: Mon, 25 Feb 2008 09:58:24 -0500
Message-ID: <f032cc060802250658l568bc354u4f372e20b69f3894@mail.gmail.com>
To: "Mark Birbeck" <mark.birbeck@x-port.net>
Cc: "public-rdf-in-xhtml-tf. w3. org" <public-rdf-in-xhtml-tf@w3.org>

Thanks for the clarification/explanation Mark. That makes sense, and
works as advertised with the GetN3 bookmarklet!

//Ed

On Fri, Feb 22, 2008 at 12:16 PM, Mark Birbeck <mark.birbeck@x-port.net> wrote:
> 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 Monday, 25 February 2008 14:58:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 25 February 2008 14:58:35 GMT