Re: Coming to consensus on the default datatype

Hi Ivan,

I think you are definitely right that if an author has an 'XML
literal', no further parsing is needed, i.e., as you say it should be
'switched off'. This is exactly what happens with RDF/XML, of course.

We don't need a 'real' datatype for plain literals, since the result
is a plain literal--i.e., it is untyped. So I guess we just need some
value that allows a parser to spot that the author wants a
'non-datatype datatype'. :)

If we're going to do this, perhaps we should also invent a similarly
short 'trigger' for XML literals? That would mean that authors don't
need to set up the RDF namespace which adds a lot of extra typing, and
more importantly a potential 'scare factor'.

The parsed output could still be the same when using these 'pretend'
datatypes, which is of course, plain literals on the one hand, and
typed on the other.

Obviously using 'fake' datatypes this way overloads @datatype; RDF/XML
uses @parseType to express near enough the same thing, but if people
are happy with the 'overloading' it's great, since we can avoid
introducing more attributes. (I think for a non-RDF author, the 'fake'
datatype is more intuitive.)

Regards,

Mar

On 21/03/07, Ivan Herman <ivan@w3.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ben,
>
> thanks a lot for this summary. I could follow everything you said, and
> usually agree, until the very end...:-( Where I was lost for a moment.
> You list a bunch of use cases:
>
> [snip]
> >
> > So here's a proposal for discussion, which is only a slight tweak on the
> > approach already mentioned by Mark and Steven, which is meant to make
> > for easy defaults and reasonably easy override in both directions with DRY.
> >
> > 1) Ian's use case:
> >
> > <http://example.com/doc> dc:title "RDF or Bust" .
> >
> > ========
> > <h1 property="dc:title">RDF or Bust</h1>
> > ========
> >
> > 2) Mark's use case:
> >
> > <http://example.com/doc> dc:title "E=mc<sup>2</sup>"^^rdf:XMLLiteral .
> >
> > ========
> > <h1 property="dc:title">E=mc<sup>2</sup></h1>
> > ========
> >
> > 3) Overriding the type when the markup is for presentation only:
> >
> > <http://example.com/doc> dc:title "This guy is truly intelligent" .
> >
> > ========
> > <h1 property="dc:title" datatype="plain">
> >    This guy is <em>truly</em> intelligent
> > </h1>
> > ========
> >
> > 4) Overriding the type to stay consistent with other XMLLiteral data stores:
> >
> > <http://example.com/doc> dc:title "E equals mc squared"^^rdf:XMLLiteral .
> >
> > ========
> > <h1 property="dc:title" datatype="rdf:XMLLiteral">
> >    E equals mc squared
> > </h1>
> > ========
> >
> >
> > I think we're pretty close to consensus on something like what Mark and
> > Steven proposed, possibly with the above twist.
>
> But I am not sure from the text what the proposal is!:-( But let me try
> to articulate it, maybe I get it right:
>
> - - By default:
>         - if the content contains xml elements of any kind, the literal is of
> XMLLiteral
>         - if the content does not contain any elements of any kind, the literal
> is plain
> - - You introduce (beyond the datatypes inherited from RDF/XML Schema, eg,
> XMLLiteral) an extra value for the datatype that is 'plain', with the
> obvious meaning.
>
> I can very well live with that. The only mini-mini question is whether
> we would have to have a separate namespace for this value, ie, it should
> be 'rdfs:plain' instead of 'plain'.
>
> Maybe we could also add the extra twist, ie, that if one uses
> rdf:XMLLiteral, that would switch off, so to say, any RDFa processing in
> the literal, too. Ie, that could solve Ian's puzzle; his
>
> <div about="">
>     <h2 property="dc:title">
>       E = mc<sup property="rdf:value">2</sup>: The Most Urgent Problem
> of Our Time
>     </h2>
> </div>
>
> would have to use:
>
> <div about="">
>     <h2 property="dc:title" datatype="rdf:XMLLiteral">
>       E = mc<sup property="rdf:value">2</sup>: The Most Urgent Problem
> of Our Time
>     </h2>
> </div>
>
> to generate the triple he needs...
>
> Thanks
>
> Ivan
>
> - --
>
> Ivan Herman, W3C Semantic Web Activity Lead
> URL: http://www.w3.org/People/Ivan/
> PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.1 (Cygwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGAP7kdR3hQzQ/Gj0RAmOFAJ4u4oqzRlO24V+ktsIJJ/0SoDWl4gCaA10F
> EtWd/wcgxb7uNT68IvC/lK4=
> =6Vdk
> -----END PGP SIGNATURE-----
>
>
>


-- 
  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 Wednesday, 21 March 2007 11:54:03 UTC