Re: Proposal 2

Hello Patrick,

Many thanks for your various proposals. I have now had time
to look at them in detail.

I have to say that of all your proposals, I like this one
best, because it brings us closest to the last call state.

See more comments inline.

At 12:11 03/07/11 +0300, Patrick Stickler wrote:

>----- Original Message -----
>From: "ext Martin Duerst" <duerst@w3.org>
>To: <Patrick.Stickler@nokia.com>; <bwm@hplb.hpl.hp.com>
>Cc: <w3c-rdfcore-wg@w3.org>; <w3c-i18n-ig@w3.org>
>Sent: 11 July, 2003 01:54
>Subject: Re: Proposal
>
>
> > ...
> > But more than that, I think it collapses two things that should
> > be distinct: Strings that happen to look like XML fragments, and
> > strings that are actually XML fragments. XML makes a clear distinction
> > between these, but the above would blur this distinction. It would
> > most probably lead to a great deal of confusion among a wide range
> > of users. It would also not help with a natural transition from
> > 'plain' to 'xml' literals.
>
>OK, here's a second (and I think last) alternative to consider, which is
>actually an option that has been on the table a few times:
>
>Changes:
>
>1. The datatype rdf:XMLLiteral is discarded (or at least optional).
>
>2. There are three types of literals: plain, XML, and typed.
>
>3. The attribute rdf:datatype can co-occur with rdf:parseType="Literal".
>
>    a. The combination of these two attributes
>        together is similar to the present interpretation of
>        rdf:parseType="Literal" alone, but now requires the
>        explicit specification of a datatype rather than
>        being implicitly taken to be of type rdf:XMLLiteral.
>
>     b. The presence of only rdf:parseType="Literal" results
>         in the creation of an XML literal in the graph, distinct
>         from a plain literal, but allowing association of a
>         lang tag.
>
>4. Comparison of XML literals is based on canonicalization as
>     presently defined, and optionally, if rdf:XMLLiteral remains
>     defined by the spec, then equality of XML literals without
>     lang tag and typed literals of type rdf:XMLLiteral can be
>     defined in terms of canonicalization. An XML literal with
>     lang tag is guarunteed to be equal to no value denoted by
>     a typed literal of datatype rdf:XMLLiteral.
>
>--
>
>Thus, given a context of
>
>    <rdf:RDF ... xml:lang="fi">
>       ...
>    </rdf:RDF>
>
>both of the following:
>
>1. <rdf:Description rdf:about="#x">
>       <ex:foo>bar</ex:foo>
>    </rdf:Description>
>
>2. <rdf:Description rdf:about="#x" ex:foo="bar"/>
>
>generate the same triple:
>
>   <#x> ex:foo "bar"@fi .
>
>--
>
>Whereas the following:
>
>3. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:parseType="Literal">bar</ex:foo>
>    </rdf:Description>
>
>generates the triple:
>
>   <#x> ex:foo xml"bar"@fi .
>
>** Note: a distinct XML literal, with lang tag

Great! (well, I wish there were no difference between "bar"@fi
and xml"bar"@fi, in the same way there is no difference in
examples 6./7., but at least we are back to having language
on xml literals).


>--
>
>Both of the following:
>
>4. <rdf:Description rdf:about="#x">
>       <ex:foo>&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;</ex:foo>
>    </rdf:Description>
>
>5. <rdf:Description rdf:about="#x"
>ex:foo="&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;"/>
>
>generate the same triple:
>
>    <#x> ex:foo "<xhtml:b>bar</xhtml:b>"@fi .
>
>** Note: no distinct XML literal. Just a plain literal that coincidentally
>has XML markup.

Minor nit: Instead of saying that this is a plain literal that
coincidentally *has* XML markup, we should say that this is a
plain literal that coincidentally *looks like* XML markup
(but may instead be the name of some extraterrestliar, or whatever).


>--
>
>whereas the following
>
>6. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:parseType="Literal"><xhtml:b>bar</xhtml:b></ex:foo>
>    </rdf:Description>
>
>generates the triple:
>
>    <#x> ex:foo xml"<xhtml:b>bar</xhtml:b>"@fi .

Great!


>--
>
>Both of the following:
>
>7. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh">bar</ex:foo>
>    </rdf:Description>
>
>8. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh" rdf:parseType="Literal">bar</ex:foo>
>    </rdf:Description>
>
>generate the same triple:
>
>    <#x> ex:foo "bar"^^ex:blargh .

Great again.


>--
>
>And both of the following:
>
>9. <rdf:Description rdf:about="#x">
>       <ex:foo rdf:datatype="&ex;blargh"
>rdf:parseType="Literal"><xhtml:b>bar</xhtml:b></ex:foo>
>    </rdf:Description>
>
>10.<rdf:Description rdf:about="#x">
>       <ex:foo
>rdf:datatype="&ex;blargh">&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;</ex:foo>
>    </rdf:Description>
>
>generate the same triple:
>
>    <#x> ex:foo "<xhtml:b>bar</xhtml:b>"^^ex:blargh .

I understand that Patrick cares a lot about such kinds of usages,
and I somewhat understand the potential they have, but if
I were the RDF WG, I would be rather careful to introduce
them. For example, Patrick has mentioned the potential to
use complex types here, and it is not clear to me that the
datatype model that RDF Core has used for simple types is
directly applicable for complex types.

Also, this seems to bring back the "parseType='Literal' as
CDATA section" thing, which is the main problem in proposal 1.


Regards,    Martin.


>--
>
>As an aside, if this particular alternative is chosen, I would strongly
>recommend that rdf:parseType="Literal" be changed to something
>a bit clearer such as rdf:parseType="XML".
>
>Regards,
>
>Patrick
>
>--
>Patrick Stickler
>Nokia, Finland
>patrick.stickler@nokia.com

Received on Monday, 14 July 2003 15:21:28 UTC