- From: Patrick Stickler <patrick.stickler@nokia.com>
- Date: Fri, 11 Jul 2003 12:11:03 +0300
- To: <bwm@hplb.hpl.hp.com>, "ext Martin Duerst" <duerst@w3.org>
- Cc: <w3c-rdfcore-wg@w3.org>, <w3c-i18n-ig@w3.org>
----- 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
--
Both of the following:
4. <rdf:Description rdf:about="#x">
<ex:foo><xhtml:b>bar</xhtml:b></ex:foo>
</rdf:Description>
5. <rdf:Description rdf:about="#x"
ex:foo="<xhtml:b>bar</xhtml:b>"/>
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.
--
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 .
--
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 .
--
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"><xhtml:b>bar</xhtml:b></ex:foo>
</rdf:Description>
generate the same triple:
<#x> ex:foo "<xhtml:b>bar</xhtml:b>"^^ex:blargh .
--
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 Friday, 11 July 2003 05:11:19 UTC