Re: Proposal for an additional 'link type' for rdf:type

Hi Niklas,

I too considered the <html> approach. :)

I decided not to mention it until I'd thought about it more, because I
initially thought of it in the same negative way that you described,
i.e., that it appears to be an exception to our bnode rules, and do we
really want exceptions. However, now that I've stumbled upon this, I
think that we really need to say something about what happens when we
put @instanceof on <html>, <head>, and <body>; this is already allowed
in RDFa, so regardless of how we advise people to set the document's
rdf:type we need to decide whether it is wise for a bnode to be
created on any or none of these elements.

Once we have clarified that, then authors can use <html> or <head> as
they choose (assuming that we decide that both will work), and it
becomes simply a matter of preference.

One thing I do like about using <head> though, is that it (sort of)
mirrors the profile attribute--it's a kind of RDF version of it,
telling you something about the document you are dealing with.

I also prefer to distinguish between the head of the document (which
is essentially the document as an information resource) and the body
of the document (which could be a different resource), leaving the
<html> element to be just a container for the two, and so for my own
mark-up I would keep it on <head>.

For example, you could distinguish the two 'aspects' of a FOAF profile
document like this:

  <html
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:foaf="http://xmlns.com/foaf/0.1/"
  >
    <head about="" instanceof="foaf:PersonalProfileDocument">
      <link rel="foaf:primaryTopic" href="#" />
      <title>My profile</title>
    </head>
    <body about="#">
      <span property="foaf:name">Mark Birbeck</span>
    </body>
  </html>

which you'll see gives you a way through the information
resource/resource problem without having to use HTTP 303s!

Regards,

Mark

PS Yes, you're right on @instanceof and CURIEs...it was a
cut-and-paste error. :)

On 01/10/2007, Niklas Lindström <lindstream@gmail.com> wrote:
>
> Hi Mark,
>
> you beat me to it. :) I was just writing a response very close to your
> thinking. But I placed the stuff in the root element instead.. Would
> that not validate? (A note also: isn't @instanceof supposed to take
> only CURIE values? If so, you don't need/cannot use brackets in it,
> right?)
>
> I just paste my response here; I think it pretty much supports your reasoning:
>
> I think I'd like if this:
>
>     <html xmlns="http://www.w3.org/1999/xhtml"
>           xmlns:foaf="http://xmlns.com/foaf/0.1/"
>           instanceof="foaf:PersonalProfileDocument">
>         <head>
>             <title>My profile</title>
>         </head>
>         ...
>
> would be enough. Though it seems (to the in the *trained* eye IMHO)
> that this generates a bnode for the entire content, I'd like to think
> that the root element provides ("captures") the current resource,
> meaning that its start tag has an implicit @about="" in it. Hence
> making the above mean exactly the same as:
>
>     <html xmlns="http://www.w3.org/1999/xhtml"
>           xmlns:foaf="http://xmlns.com/foaf/0.1/"
>           about=""
>           instanceof="foaf:PersonalProfileDocument">
>         <head>
>             <title>My profile</title>
>         </head>
>         ...
>
> , which does achieve what we're after..
>
> Or is this just a stretch, making @instanceof (seem to) behave
> differently on the root element? If so, is the latter so bad it really
> calls for something more?
>
> Best regards,
> Niklas
>
>
>
> On 10/1/07, Mark Birbeck <mark.birbeck@formsplayer.com> wrote:
> >
> > Hi Ivan,
> >
> > Thanks for forcing me to think it through more. :) I think that there
> > is probably a neat way to write this using current mark-up, although
> > working through it has highlighted something that I think we need to
> > clarify.
> >
> > Sticking purely with trying to make the rdf:type use-case easier
> > (i.e., rather than the general use of RDF/RDFS namespaces), there is
> > nothing to stop us doing this:
> >
> >   <html
> >    xmlns="http://www.w3.org/1999/xhtml"
> >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> >   >
> >     <head>
> >       <title>My profile</title>
> >       <link about="" instanceof="[foaf:PersonalProfileDocument]" />
> >     </head>
> >      .
> >      .
> >      .
> >   </html>
> >
> > It looks odd, since there is no @rel or @rev, but it is allowed by the
> > syntax. But once you go down that route, you might as well use the
> > following, which is also allowed by the syntax, and is probably much
> > clearer in terms of intent:
> >
> >   <html
> >    xmlns="http://www.w3.org/1999/xhtml"
> >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> >   >
> >     <head about="" instanceof="[foaf:PersonalProfileDocument]">
> >       <title>My profile</title>
> >     </head>
> >      .
> >      .
> >      .
> >   </html>
> >
> > Which brings us to the point that I think we need to clarify; what if
> > I wrote this:
> >
> >     <head instanceof="[foaf:PersonalProfileDocument]">
> >       <title>My profile</title>
> >       <meta property="dc:creator" content="John Doe" />
> >     </head>
> >
> > In our current rules this would generate a new bnode for <head>, and
> > the dc:creator property would apply to that, which I don't think is
> > desirable. But if we were to make it a little more explicit that the
> > 'identity' of <head> is the current document, unless overridden
> > *explicitly* by @about, then my rdf:type use-case falls out quite
> > neatly to the following mark-up:
> >
> >   <html
> >    xmlns="http://www.w3.org/1999/xhtml"
> >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> >   >
> >     <head instanceof="[foaf:PersonalProfileDocument]">
> >       <title>My profile</title>
> >     </head>
> >       .
> >       .
> >      .
> >   </html>
> >
> > I think that's actually quite clear from the point of view of what an
> > author is trying to do, and it has also exposed that we might need to
> > say a little more about what happens with the <head> element.
> >
> > What do you think?
> >
> > Regards,
> >
> > Mark
> >
> >
> >
> > On 01/10/2007, Ivan Herman <ivan@w3.org> wrote:
> > > Hm. You won't like me, but I am not sure I like it:-)
> > >
> > > Though is see the rationale, we create some sort of an odd case. At the
> > > moment the agreement is that a @rel value without a CURIE prefix is
> > > considered to be in
> > >
> > > http://www.w3.org/1999/xhtml/vocab#
> > >
> > > and that is it. This is a very clear and easy-to-follow rule. What you
> > > propose is that, well, this is true, _except_ for the value of
> > > instanceof that behaves differently. I am not sure it is good if we
> > > begin to introduce such exceptions.
> > >
> > > Or did I misunderstand you?
> > >
> > > A possible way out is to say that the 'rdf:' prefix (and probably the
> > > 'rdfs:' prefix) will always be added to the result of an RDFa processor
> > > with the usual values. This is not very nice either, but I would prefer
> > > to solve your problem that way...
> > >
> > >
> > > Ivan
> > >
> > > Mark Birbeck wrote:
> > > > Hello all,
> > > >
> > > > Whilst considering RDFa use in the wild, it occurred to me that
> > > > constructs like the following would almost certainly become quite
> > > > common:
> > > >
> > > >   <html
> > > >    xmlns="http://www.w3.org/1999/xhtml"
> > > >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> > > >    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> > > >   >
> > > >     <head>
> > > >       <title>My profile</title>
> > > >       <link rel="rdf:type" resource="[foaf:PersonalProfileDocument]" />
> > > >     </head>
> > > >     .
> > > >     .
> > > >     .
> > > >   </html>
> > > >
> > > > If the author wants to avoid having to include the RDF namespace, they
> > > > would have to change their mark-up to look something like this:
> > > >
> > > >   <html
> > > >    xmlns="http://www.w3.org/1999/xhtml"
> > > >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> > > >   >
> > > >     <head>
> > > >       <title>My profile</title>
> > > >     </head>
> > > >     <body about="" instanceof="foaf:PersonalProfileDocument">
> > > >       .
> > > >       .
> > > >       .
> > > >     </body>
> > > >   </html>
> > > >
> > > > However, if we added an additional link type, such as 'a' or
> > > > 'instanceof', we could also allow the following mark-up:
> > > >
> > > >   <html
> > > >    xmlns="http://www.w3.org/1999/xhtml"
> > > >    xmlns:foaf="http://xmlns.com/foaf/0.1/"
> > > >   >
> > > >     <head>
> > > >       <title>My profile</title>
> > > >       <link rel="instanceof" resource="[foaf:PersonalProfileDocument]" />
> > > >     </head>
> > > >     .
> > > >     .
> > > >     .
> > > >   </html>
> > > >
> > > > This avoids the need to declare the RDF namespace, and keeps the
> > > > metadata in the head of the document which seems more appropriate for
> > > > this particular kind of statement.
> > > >
> > > > Regards,
> > > >
> > > > Mark
> > > >
> > > >
> > >
> > > --
> > >
> > > Ivan Herman, W3C Semantic Web Activity Lead
> > > Home: http://www.w3.org/People/Ivan/
> > > PGP Key: http://www.ivan-herman.net/pgpkey.html
> > > FOAF: http://www.ivan-herman.net/foaf.rdf
> > >
> > >
> >
> >
> > --
> >   Mark Birbeck, formsPlayer
> >
> >   mark.birbeck@formsPlayer.com | +44 (0) 20 7689 9232
> >   http://www.formsPlayer.com | http://internet-apps.blogspot.com
> >
> >   standards. innovation.
> >
> >
>
>


-- 
  Mark Birbeck, formsPlayer

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

  standards. innovation.

Received on Monday, 1 October 2007 12:48:35 UTC