Re: [RDFa] rdf:XMLLiteral (was RE: Missing issue on the list: identification of RDFa content)

Hi Ian,

> I'm looking specifically at the default of XMLLiteral. I've read Mark's
> clear explanation of the thinking behind it[1] and understand the
> arguments. My preference, from a usability and "principle of least
> surprise" point of view is for the default to be plain literals.

I don't follow such arguments...who are we talking about surprising
here? And in what way is there a question of usability? We need to be
clear that the way RDFa operates currently is such that everything we
are talking about is *hidden* from the author, and only affects what
is stored in a triple store.

I should add though, that the only alternative on the table at the
moment--to require the author to be explicit about using mark-up in
strings--does not itself hold to the principle of least surprise _or_
have a significant measure of usability. To mark up a document with
'sup' or 'sub' in the title would, with this approach, require the use
of the datatype attribute and of course the specification of the RDF
namespace:

  <h2 property="dc:title" datatype="rdf:XMLLiteral"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    E = mc<sup>2</sup>: The Most Urgent Problem of Our Time
  </h2>

I'm having trouble seeing why this is advantageous in any way.


> However, I'm still working through the various pros/cons.

Ok.


> I have a question which I couldn't find an answer to in my reading of
> the syntax doc[2]. How would the following triple be encoded in RDFa
> (given usual namespace prefix mappings):
>
> <http://example.com/doc> dc:title "RDF or Bust" .
>
> The natural place for this to fit would be on the <title> element of the
> HTML document, or possible on an <h1>.

The only way to encode this *exactly* would be to do this:

  <span property="dc:title" content="RDF or Bust" />

However, I would suggest that in this discussion we have to keep
reminding ourselves that we are dealing with XHTML that contains RDF,
and *not* with RDF. So, to illustrate why this is significant, take
the fact that best practice in XHTML is to have a default language at
the root of the document. Your example might now look like this:

  <html xmlns="..." lang="en" xml:lang="en">
    ...
    <body>
      <span property="dc:title" content="RDF or Bust" />
    </body>
  </html>

But the addition of the language attribute means that your triple
immediately becomes this:

  <http://example.com/doc> dc:title "RDF or Bust"@en .

In other words, even taking the apparently simple route--using plain
literals--you still don't actually get the *exact* triple that you
want, because we are not dealing with just another RDF serialisation,
we are dealing with RDF in XHTML.

Where do we go from here? Do we ignore the language settings? If so,
that means that we are now ignoring even more of authors' intent from
their mark-up. I'm afraid that's not a route we can go down.

So, all I did when trying to address this problem originally was ask,
what is so bad about the following triple being used instead:

  <http://example.com/doc> dc:title "RDF or Bust"^^rdf:XMLLiteral .

Although it's not perfect, I found after a lot of research that there
isn't as much wrong with it as one might initially think, and I've
still not heard of another way to solve all of the issues and remain
consistent with our design goals.

Regards,

Mark

-- 
  Mark Birbeck, formsPlayer

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

  standards. innovation.

Received on Monday, 19 March 2007 02:51:17 UTC