Re: Datayped tagged literals: a case for option 4 vs option 2d

Just some more comments on what you say and one question below:

Le 26/09/2011 11:28, Richard Cyganiak a écrit :
> On 26 Sep 2011, at 09:50, Antoine Zimmermann wrote:
>> - Syntactically, xxx@lll would simply be a shortcut for the
>> abstract syntax "xxx@lll"^^rdf:LangString.
>
> No. In rdf:PlainLiteral, the "xxx@lll"^^rdf:PlainLiteral form is
> *forbidden* except in environments that don't support language tags.
> This restriction exists for very good reasons that I won't reiterate
> here. The "xxx@lll"^^rdf:LangString form would have to remain
> forbidden for the same reasons.
 >
>> For instance, time zone, year, hour, date in xsd:datetimeStamp are
>> obtained by parsing the lexical form. Same for exponent in
>> xsd:float, same for any component of any typed literals. Why should
>> it be different for lang tagged strings?
>
> 2.5 is a decimal number and that 2011-09-26 is a date. These things
> have been enshrined in a gazillion specifications and programming
> languages and libraries for decades.
>
> No programming language knows that "foo@en" is supposedly a string
> tagged as English.

Right but RDF and other specs can---and do---introduce types of their
own (e.g., rdf:XMLLiteral, rdf:PlainLiteral, owl:decimal, owl:real for
instance). The datatype mechanism of RDF is extensible so that we can do 
this kind of things.

>> In terms of pure specs, I think option 4 is much more elegant and
>> easy. However, I understand that there are practical issues with
>> option 4
>
> You understate the issues.

Possibly.
>
> Every existing application that uses the Literal.getLexicalForm()
> call of some API to get at the xxx part of xxx@lll would have to be
> changed, because the lexical form of xxx@lll is now xxx@lll.

This argument is quite compelling indeed.

However, I'd like to know what you say about implementations that use 
Literal.getDatatype() or Literal.getDatatypeURI() to do some specific 
tasks for tagged literals?

They'll have to change their tests from if(dt==null) {...} to 
if(dt.equals(RDF.LangString)) {...}.

Can you justify that this is not significant, while code using 
getLexicalForm() is?


--AZ


> That's a complete non-starter.
>
> Best, Richard
>

-- 
Antoine Zimmermann
ISCOD / LSTI - Institut Henri Fayol
École Nationale Supérieure des Mines de Saint-Étienne
158 cours Fauriel
42023 Saint-Étienne Cedex 2
France
Tél:+33(0)4 77 42 66 03
Fax:+33(0)4 77 42 66 66
http://zimmer.aprilfoolsreview.com/

Received on Monday, 26 September 2011 12:22:29 UTC