Re: Coming to consensus on the default datatype

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Mark Birbeck wrote:
> 
> 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'. :)
> 

I thought this was Ben's datatype="plain" keyword, wasn't it?

Or we could simply say: datatype="" means, as you say, non-datatype
datatype. Then we do not need an extra keyword.

> 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'.
> 

Hm. I see what you mean, it makes sense. Having said that, if one wants
to use other datatypes (eg, integers), one has to use the xsd:
namespace, right? Or do we want to have a similar keyword for each of
the xsd datatypes? It can be done, but it is a bit shaky: what happens
if the Schema folks upgrade their datatype definitions? We loose:-(

I do not really have a strong opinion on this, I must admit.


Ivan

> 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:
>>
> 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

iD8DBQFGASFBdR3hQzQ/Gj0RAlESAKCOyjH6F0NyhQLyl+oS0oJHZ68X5gCgzxl3
AzEcv8iTeEgyU//nGq9uqpU=
=45Kt
-----END PGP SIGNATURE-----

Received on Wednesday, 21 March 2007 12:12:52 UTC