W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > November 2010

Re: PROPOSAL to close ISSUE-57: TypedLiteralConverter Failures and Exceptions

From: Nathan <nathan@webr3.org>
Date: Thu, 11 Nov 2010 16:52:06 +0000
Message-ID: <4CDC1F36.5030308@webr3.org>
To: Toby Inkster <tai@g5n.co.uk>
CC: Manu Sporny <msporny@digitalbazaar.com>, RDFa WG <public-rdfa-wg@w3.org>
Toby Inkster wrote:
> On Wed, 10 Nov 2010 20:28:10 -0500
> Manu Sporny <msporny@digitalbazaar.com> wrote:
> 
>> TypedLiteral Conversion Algorithm:
>> If a TypedLiteralConverter is registered for the .type of the
>> typedliteral then try to convert it, if successful return the
>> converted type (for instance a Date) in all other cases (including
>> exceptions) return the TypedLiteral.
> 
> I'd have thought it more useful to return .value in other cases.
> That's how DataContext.convertType works in the current WD.
> 

Then how do you know if it's been converted or not?

options we've got on failure / no registered converter are:

return null; // what if the value should be null?
return tl.value; // how do you know it's failed and the result isn't 
what you're expecting?
return tl; // no conversion happened, no ambiguity

(where tl is an instance of TypedLiteral)

Best,

Nathan
Received on Thursday, 11 November 2010 16:53:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:05:22 UTC